Skip to content
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

[ML] Anomaly Detection: Adds popover links menu to anomaly explorer charts. #186587

Merged
merged 22 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/packages/ml/anomaly_utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export interface MlAnomaliesTableRecord {
/**
* Returns true if the job has the model plot enabled
*/
modelPlotEnabled: boolean;
modelPlotEnabled?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this because for this PR I reused some mock data previously only used with js instead of ts and assigning the mock to this type failed. First I thought the mock was outdated, but it turns out looking at current live data we get from Kibana server this attribute isn't always present.

}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ "default": {
{
"default": {
"anomalies": [
{
"time": 1486018800000,
Expand Down Expand Up @@ -44,9 +45,11 @@
"metricDescriptionSort": 82.83851409101328,
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
]
"influencers": [
{
"mockInfluencerField": "mockInfluencerValue"
}
]
Comment on lines -47 to +52
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating this to match the type MlAnomaliesTableRecord. Until now this mock was only used with js code, now also using it with ts code I noticed the structure was outdated for the influencers attribute.

},
{
"time": 1486018800000,
Expand Down Expand Up @@ -92,12 +95,16 @@
"metricDescriptionSort": 38.82201810127708,
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
]
"influencers": [
{
"mockInfluencerField": "mockInfluencerValue"
}
]
}
],
"jobIds": ["it-ops-count-by-mlcategory-one"],
"jobIds": [
"it-ops-count-by-mlcategory-one"
],
"interval": "day",
"examplesByJobId": {
"it-ops-count-by-mlcategory-one": {
Expand Down Expand Up @@ -161,7 +168,9 @@
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
{
"mockInfluencerField": "mockInfluencerValue"
}
]
},
{
Expand Down Expand Up @@ -208,7 +217,9 @@
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
{
"mockInfluencerField": "mockInfluencerValue"
}
]
}
],
Expand Down Expand Up @@ -496,7 +507,9 @@
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
{
"mockInfluencerField": "mockInfluencerValue"
}
]
},
{
Expand Down Expand Up @@ -541,7 +554,9 @@
"detector": "count by mlcategory",
"isTimeSeriesViewDetector": false,
"influencers": [
"mockInfluencer"
{
"mockInfluencerField": "mockInfluencerValue"
}
]
}
],
Expand Down
Loading