[ML] AIOps: Enhances No Results state for Change Point Detection#219072
[ML] AIOps: Enhances No Results state for Change Point Detection#219072rbrtj merged 33 commits intoelastic:mainfrom
No Results state for Change Point Detection#219072Conversation
…enhance-no-results-state
|
Pinging @elastic/ml-ui (:ml) |
No Results state for Change Point Detection
peteharverson
left a comment
There was a problem hiding this comment.
Overall this is working well. I like the callout in the ML page - can you see how it looks when used in the embeddable as I think it's a clearer UX than the warning icon? It will take up more space, but as we are only showing one series in this case, there is probably enough room.
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest changes and LGTM
| return [ | ||
| { | ||
| ...firstRawChangePoint.current, | ||
| kind: 'noChangePoints', | ||
| label: 'No change points found', | ||
| p_value: null, | ||
| timestamp: null, | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
Can we simply return an empty array here instead? And get rid of the additional type with kind: 'noChangePoints ?
It should simplify the code quite a bit.
|
|
||
| const [results, setResults] = useState<ChangePointAnnotation[]>([]); | ||
| const [validChangePoints, setValidChangePoints] = useState<ChangePointAnnotation[]>([]); | ||
| const firstRawChangePoint = useRef<ChangePointAnnotation | null>(null); |
There was a problem hiding this comment.
Might be worth adding a comment to explain why this is needed. Also, should we rename it to something more semantic, like sampleChangePointResponse?
| results, | ||
| isLoading: annotationsLoading, | ||
| progress, | ||
| sampleChangePointResponse, |
There was a problem hiding this comment.
I don't think you need to return it from useChangePointResults and pass around
darnautov
left a comment
There was a problem hiding this comment.
LGTM overall, great enhancement! 🚀 Please update the functional tests using the UTC timezone.
| await PageObjects.timePicker.setAbsoluteRange( | ||
| 'Jun 12, 2023 @ 00:04:19.000', | ||
| 'Jun 12, 2023 @ 01:00:19.000' | ||
| ); |
There was a problem hiding this comment.
before hook.
await kibanaServer.uiSettings.update({
'dateFormat:tz': 'UTC',
});There was a problem hiding this comment.
All of the mentioned tests use await ml.testResources.setKibanaTimeZoneToUTC(); in the before hook, which is responsible for setting timezone to UTC
szabosteve
left a comment
There was a problem hiding this comment.
Left a small suggestion, otherwise LGTM.
cc @nastasha-solomon
| id="xpack.aiops.changePointDetection.noChangePointsFoundMessage" | ||
| defaultMessage="Detect statistically significant change points such as dips, spikes, and distribution changes in a metric. Select a metric and set a time range to start detecting change points in your data." | ||
| id="xpack.aiops.changePointDetection.noDataFoundMessage" | ||
| defaultMessage="No data was found for the selected metric and time range. Please adjust your selection to include data from your indices." |
There was a problem hiding this comment.
| defaultMessage="No data was found for the selected metric and time range. Please adjust your selection to include data from your indices." | |
| defaultMessage="No data found for the selected metric and time range. Try adjusting your selection to include data from your indices." |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
cc @rbrtj |
|
Starting backport for target branches: 8.19 |
…astic#219072) This PR introduces new 'empty' states for Change Point Detection page and embeddable. Previously, if no change point was found, we displayed an Empty State screen. Now, we plot a sample metric instead. For partitioned fields, we select the first partition value and plot a metric for it. If there is no data to plot for the selected time range, this PR introduces a new empty state screen. Note: Warnings in the embeddable will be displayed in the bottom-left corner, similar to how Lens embeddable warnings are shown. Currently, we are waiting for the ability to push custom errors to the lens embeddable - see elastic#220208 * Embeddable (charts): No change point found, with a reason <img width="966" alt="image" src="https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089" /> * Embeddable (charts): No change point found, without a reason <img width="991" alt="image" src="https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575" /> * Embeddable (table): No change point found, with a reason <img width="883" alt="image" src="https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106" /> * Embeddable (table): No change point found, without a reason <img width="983" alt="image" src="https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749" /> * Change Point Page: No change point found, with a reason <img width="1217" alt="image" src="https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4" /> * Change Point Page: No change point found, without a reason <img width="1225" alt="image" src="https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7" /> Fixes elastic#170388 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 1e7d418)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ion (#219072) (#222228) # Backport This will backport the following commits from `main` to `8.19`: - [[ML] AIOps: Enhance `No Results` state for Change Point Detection (#219072)](#219072) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Robert Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-02T15:09:46Z","message":"[ML] AIOps: Enhance `No Results` state for Change Point Detection (#219072)\n\nThis PR introduces new 'empty' states for Change Point Detection page\nand embeddable.\nPreviously, if no change point was found, we displayed an Empty State\nscreen. Now, we plot a sample metric instead. For partitioned fields, we\nselect the first partition value and plot a metric for it. If there is\nno data to plot for the selected time range, this PR introduces a new\nempty state screen.\n\nNote: Warnings in the embeddable will be displayed in the bottom-left\ncorner, similar to how Lens embeddable warnings are shown. Currently, we\nare waiting for the ability to push custom errors to the lens embeddable\n- see https://github.com/elastic/kibana/issues/220208\n\n* Embeddable (charts): No change point found, with a reason\n<img width=\"966\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089\"\n/>\n\n* Embeddable (charts): No change point found, without a reason\n<img width=\"991\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575\"\n/>\n\n* Embeddable (table): No change point found, with a reason\n<img width=\"883\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106\"\n/>\n\n\n* Embeddable (table): No change point found, without a reason\n<img width=\"983\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749\"\n/>\n\n* Change Point Page: No change point found, with a reason\n<img width=\"1217\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4\"\n/>\n\n* Change Point Page: No change point found, without a reason\n<img width=\"1225\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7\"\n/>\n\n\nFixes https://github.com/elastic/kibana/issues/170388\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"1e7d418b3564004831920263333bac4136b15c7b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Team:ML","Feature:ML/AIOps","backport:version","v9.1.0","v8.19.0"],"title":"[ML] AIOps: Enhance `No Results` state for Change Point Detection","number":219072,"url":"https://github.com/elastic/kibana/pull/219072","mergeCommit":{"message":"[ML] AIOps: Enhance `No Results` state for Change Point Detection (#219072)\n\nThis PR introduces new 'empty' states for Change Point Detection page\nand embeddable.\nPreviously, if no change point was found, we displayed an Empty State\nscreen. Now, we plot a sample metric instead. For partitioned fields, we\nselect the first partition value and plot a metric for it. If there is\nno data to plot for the selected time range, this PR introduces a new\nempty state screen.\n\nNote: Warnings in the embeddable will be displayed in the bottom-left\ncorner, similar to how Lens embeddable warnings are shown. Currently, we\nare waiting for the ability to push custom errors to the lens embeddable\n- see https://github.com/elastic/kibana/issues/220208\n\n* Embeddable (charts): No change point found, with a reason\n<img width=\"966\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089\"\n/>\n\n* Embeddable (charts): No change point found, without a reason\n<img width=\"991\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575\"\n/>\n\n* Embeddable (table): No change point found, with a reason\n<img width=\"883\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106\"\n/>\n\n\n* Embeddable (table): No change point found, without a reason\n<img width=\"983\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749\"\n/>\n\n* Change Point Page: No change point found, with a reason\n<img width=\"1217\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4\"\n/>\n\n* Change Point Page: No change point found, without a reason\n<img width=\"1225\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7\"\n/>\n\n\nFixes https://github.com/elastic/kibana/issues/170388\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"1e7d418b3564004831920263333bac4136b15c7b"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219072","number":219072,"mergeCommit":{"message":"[ML] AIOps: Enhance `No Results` state for Change Point Detection (#219072)\n\nThis PR introduces new 'empty' states for Change Point Detection page\nand embeddable.\nPreviously, if no change point was found, we displayed an Empty State\nscreen. Now, we plot a sample metric instead. For partitioned fields, we\nselect the first partition value and plot a metric for it. If there is\nno data to plot for the selected time range, this PR introduces a new\nempty state screen.\n\nNote: Warnings in the embeddable will be displayed in the bottom-left\ncorner, similar to how Lens embeddable warnings are shown. Currently, we\nare waiting for the ability to push custom errors to the lens embeddable\n- see https://github.com/elastic/kibana/issues/220208\n\n* Embeddable (charts): No change point found, with a reason\n<img width=\"966\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089\"\n/>\n\n* Embeddable (charts): No change point found, without a reason\n<img width=\"991\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575\"\n/>\n\n* Embeddable (table): No change point found, with a reason\n<img width=\"883\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106\"\n/>\n\n\n* Embeddable (table): No change point found, without a reason\n<img width=\"983\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749\"\n/>\n\n* Change Point Page: No change point found, with a reason\n<img width=\"1217\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4\"\n/>\n\n* Change Point Page: No change point found, without a reason\n<img width=\"1225\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7\"\n/>\n\n\nFixes https://github.com/elastic/kibana/issues/170388\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"1e7d418b3564004831920263333bac4136b15c7b"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
…astic#219072) This PR introduces new 'empty' states for Change Point Detection page and embeddable. Previously, if no change point was found, we displayed an Empty State screen. Now, we plot a sample metric instead. For partitioned fields, we select the first partition value and plot a metric for it. If there is no data to plot for the selected time range, this PR introduces a new empty state screen. Note: Warnings in the embeddable will be displayed in the bottom-left corner, similar to how Lens embeddable warnings are shown. Currently, we are waiting for the ability to push custom errors to the lens embeddable - see elastic#220208 * Embeddable (charts): No change point found, with a reason <img width="966" alt="image" src="https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089" /> * Embeddable (charts): No change point found, without a reason <img width="991" alt="image" src="https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575" /> * Embeddable (table): No change point found, with a reason <img width="883" alt="image" src="https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106" /> * Embeddable (table): No change point found, without a reason <img width="983" alt="image" src="https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749" /> * Change Point Page: No change point found, with a reason <img width="1217" alt="image" src="https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4" /> * Change Point Page: No change point found, without a reason <img width="1225" alt="image" src="https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7" /> Fixes elastic#170388 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…astic#219072) This PR introduces new 'empty' states for Change Point Detection page and embeddable. Previously, if no change point was found, we displayed an Empty State screen. Now, we plot a sample metric instead. For partitioned fields, we select the first partition value and plot a metric for it. If there is no data to plot for the selected time range, this PR introduces a new empty state screen. Note: Warnings in the embeddable will be displayed in the bottom-left corner, similar to how Lens embeddable warnings are shown. Currently, we are waiting for the ability to push custom errors to the lens embeddable - see elastic#220208 * Embeddable (charts): No change point found, with a reason <img width="966" alt="image" src="https://github.com/user-attachments/assets/88d4f920-6739-4af7-9903-1fb210dfa089" /> * Embeddable (charts): No change point found, without a reason <img width="991" alt="image" src="https://github.com/user-attachments/assets/6bef28e0-19f3-46f5-af63-e31b4e77d575" /> * Embeddable (table): No change point found, with a reason <img width="883" alt="image" src="https://github.com/user-attachments/assets/628ba7fb-000c-45c3-9f23-2fd0535e5106" /> * Embeddable (table): No change point found, without a reason <img width="983" alt="image" src="https://github.com/user-attachments/assets/567c6127-267f-47a0-b280-52fb00c6c749" /> * Change Point Page: No change point found, with a reason <img width="1217" alt="image" src="https://github.com/user-attachments/assets/ab2fbeef-e4f6-4fa9-8cbe-c44abe0357b4" /> * Change Point Page: No change point found, without a reason <img width="1225" alt="image" src="https://github.com/user-attachments/assets/c16dd55a-37eb-45c2-a3eb-51ea9744e0d7" /> Fixes elastic#170388 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
No Results state for Change Point Detection
This PR introduces new 'empty' states for Change Point Detection page and embeddable.
Previously, if no change point was found, we displayed an Empty State screen. Now, we plot a sample metric instead. For partitioned fields, we select the first partition value and plot a metric for it. If there is no data to plot for the selected time range, this PR introduces a new empty state screen.
Note: Warnings in the embeddable will be displayed in the bottom-left corner, similar to how Lens embeddable warnings are shown. Currently, we are waiting for the ability to push custom errors to the lens embeddable - see #220208
Fixes #170388