-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Uptime] Ml detection of duration anomalies #59785
Merged
shahzad31
merged 87 commits into
elastic:master
from
shahzad31:ml-detecttion-of-duration-anamolies
Mar 24, 2020
Merged
Changes from 72 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
b8f4e50
add flyout
shahzad31 3a9d5ff
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 eedef4f
add state
shahzad31 315008e
update state
shahzad31 28e0bcc
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 3822ad5
ad job
shahzad31 6990a0e
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 c3d8d69
update
shahzad31 3601e2f
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 8c5412f
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 dedfc71
updat
shahzad31 f41b944
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 ecc1453
add ml analyze button
shahzad31 aa85eca
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 fad528e
update api
shahzad31 76dea0c
use differential colors for duration chart
shahzad31 7db5295
remove duration chart gql
shahzad31 b0bd131
update type
shahzad31 251941b
type fix
shahzad31 448bcd8
fix tyoe
shahzad31 03e130e
Merge branch 'master' into feature/improve-duration-chart
shahzad31 646570e
Merge branch 'master' into feature/improve-duration-chart
shahzad31 be5cbe9
update translation
shahzad31 0170326
update test
shahzad31 8d81cb0
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 b50c13b
Merge branch 'master' into feature/improve-duration-chart
shahzad31 a582794
update conflicts
shahzad31 43022f0
Merge branch 'feature/improve-duration-chart' into ml-detecttion-of-d…
shahzad31 ebf18bd
update anomaly record
shahzad31 3f2cd84
chart
shahzad31 a0b71a6
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 b86d4ce
added annotations
shahzad31 4fe5e9c
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 925ec4d
update error handling
shahzad31 d6210d3
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 c344852
update
shahzad31 d0d95fe
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 2e89bf6
update types
shahzad31 07c4134
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 e203366
fixed types
shahzad31 0ee23d2
fix types
shahzad31 91ad10b
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 cbf8681
update types
shahzad31 dc7b612
update
shahzad31 25989b5
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 80ce3c4
update
shahzad31 7d36063
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 3b0280b
remove unnecessary change
shahzad31 b50c0fd
remove unnecessary change
shahzad31 9e4a9d2
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 bd0df8e
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 bc18845
fix type
shahzad31 540312b
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 d5ddb2e
update
shahzad31 9552458
save
shahzad31 f500fb5
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 21ec018
update pr
shahzad31 6d697ba
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 e9dd066
update tets
shahzad31 877c5c1
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 35a4efc
update job deletion
shahzad31 ab0f14d
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 e2ff2bf
update
shahzad31 203d3f9
update tets
shahzad31 42578ef
upadte tests
shahzad31 3266764
fix types
shahzad31 7aed440
update title text
shahzad31 29912ed
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 36d1955
update types
shahzad31 f85def8
fixed tests
shahzad31 45d5e14
update tests and types
shahzad31 2b1b63e
updated types
shahzad31 ee2cba5
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 3460492
fix PR feedback
shahzad31 c5e52d1
unit test
shahzad31 6223e21
update more types
shahzad31 64e07f6
update test and manage job
shahzad31 8248469
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 b323b8c
resolve conflicts
shahzad31 029449f
types
shahzad31 68cfc26
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 a7af917
remove unnecessary change
shahzad31 b6212d8
revert ml code
shahzad31 3e50e16
revert ml code
shahzad31 8d3feec
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 6eade46
fixed formatting issues pointed by pr feedback
shahzad31 2750e60
Merge branch 'master' into ml-detecttion-of-duration-anamolies
shahzad31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...public/components/functional/charts/__tests__/__snapshots__/duration_charts.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
x-pack/legacy/plugins/uptime/public/components/functional/charts/annotation_tooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import React from 'react'; | ||
import moment from 'moment'; | ||
import styled from 'styled-components'; | ||
|
||
const Header = styled.div` | ||
font-weight: bold; | ||
padding-left: 4px; | ||
`; | ||
|
||
const RecordSeverity = styled.div` | ||
font-weight: bold; | ||
border-left: 4px solid ${props => props.color}; | ||
shahzad31 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
padding-left: 2px; | ||
`; | ||
|
||
const TimeDiv = styled.div` | ||
font-weight: 500; | ||
border-bottom: 1px solid gray; | ||
padding-bottom: 2px; | ||
`; | ||
|
||
export const AnnotationTooltip = ({ details }: { details: string }) => { | ||
const data = JSON.parse(details); | ||
|
||
function capitalizeFirstLetter(str: string) { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
} | ||
|
||
return ( | ||
<> | ||
<TimeDiv>{moment(data.time).format('lll')}</TimeDiv> | ||
<Header>Score: {data.score.toFixed(2)}</Header> | ||
shahzad31 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<RecordSeverity color={data.color}> | ||
Severity: {capitalizeFirstLetter(data.severity)} | ||
shahzad31 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</RecordSeverity> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to need
dateRangeStart
anddateRangeEnd
in here anymore.I'm assuming adding
getAnomalyRecordsAction
causes a render loop if it's included? Would it help to wrap thedispatch
in auseCallback
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i have added them dateRangeStart, dateRangeEnd to make sure date change is captured and can't add absoluteDateRangeStart, absoluteDateRangeEnd, because it will result in endless loop.