forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] AIOps: Adds link to log rate analysis from anomaly table (elasti…
…c#175289) ## Summary Part of elastic#153753. Adds an action to the actions menu of the ML anomaly table in both Anomaly Explorer and Single Metric Viewer to Log Rate Analysis. The action is available for the anomaly detection functions `count`, `high_count`, `low_count`, `high_non_zero_count` and `low_non_zero_count`. - For multi-metric and population jobs, adds the current entity as a Kuery search filter. - Fixes an issue with restoring the correct time range from url state. - Fixes an issue with restoring the correct query from url state. - The action auto-selects an overall time range and baseline and deviation time range based on the anomaly timestamp and multiples of bucket spans. Functional tests have been added that test the actions in both Anomaly Explorer and Single Metric Viewer for single and multi metric `count` job, as well as testing a job when the action should not be available. [aiops-ad-link-0001.webm](https://github.com/elastic/kibana/assets/230104/c1d1336b-f62d-4861-b1a4-1a8ed9dbef4c) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4929 - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information
Showing
13 changed files
with
554 additions
and
55 deletions.
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
22 changes: 22 additions & 0 deletions
22
x-pack/plugins/aiops/public/application/url_state/common.test.ts
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,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { isDefaultSearchQuery } from './common'; | ||
|
||
describe('isDefaultSearchQuery', () => { | ||
it('returns true for default search query', () => { | ||
expect(isDefaultSearchQuery({ match_all: {} })).toBe(true); | ||
}); | ||
|
||
it('returns false for non default search query', () => { | ||
expect( | ||
isDefaultSearchQuery({ | ||
bool: { must_not: [{ term: { 'the-term': 'the-value' } }] }, | ||
}) | ||
).toBe(false); | ||
}); | ||
}); |
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
Oops, something went wrong.