Skip to content

[ML] Anomaly Detection: Show Switch to apply time range when opening job selector from left nav#213382

Merged
rbrtj merged 5 commits intoelastic:mainfrom
rbrtj:ml-fix-switch-apply-time-range
Mar 11, 2025
Merged

[ML] Anomaly Detection: Show Switch to apply time range when opening job selector from left nav#213382
rbrtj merged 5 commits intoelastic:mainfrom
rbrtj:ml-fix-switch-apply-time-range

Conversation

@rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Mar 6, 2025

Fix for: #211018 and #212407

Note: Previously, the apply time range setting was saved in local storage even if the changes were not applied. After the fix, the setting is saved in local storage only if the user applies the new selection.

After:

Screen.Recording.2025-03-06.at.13.39.30.mov

@rbrtj rbrtj added release_note:fix :ml Feature:Anomaly Detection ML anomaly detection v9.0.0 Team:ML Team label for ML (also use :ml) t// backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Mar 6, 2025
@rbrtj rbrtj requested review from darnautov and peteharverson March 6, 2025 13:30
@rbrtj rbrtj self-assigned this Mar 6, 2025
@rbrtj rbrtj requested a review from a team as a code owner March 6, 2025 13:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@rbrtj rbrtj added v8.18.0 and removed v8.19.0 labels Mar 6, 2025
@rbrtj rbrtj requested a review from darnautov March 10, 2025 13:52
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM. I can no longer reproduce the workflow issues captured in the two issues you linked to in the description.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 5.3MB 5.3MB -95.0B

History

cc @rbrtj

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM, and thanks for doing the refactoring 🙌🏻

@rbrtj rbrtj merged commit cbcb7ed into elastic:main Mar 11, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 9.0

https://github.com/elastic/kibana/actions/runs/13789712782

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 11, 2025
…g job selector from left nav (elastic#213382)

Fix for: elastic#211018 and
elastic#212407

Note: Previously, the `apply time range` setting was saved in local
storage even if the changes were not applied. After the fix, the setting
is saved in local storage only if the user applies the new selection.

After:

https://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55
(cherry picked from commit cbcb7ed)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 11, 2025
…g job selector from left nav (elastic#213382)

Fix for: elastic#211018 and
elastic#212407

Note: Previously, the `apply time range` setting was saved in local
storage even if the changes were not applied. After the fix, the setting
is saved in local storage only if the user applies the new selection.

After:

https://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55
(cherry picked from commit cbcb7ed)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@rbrtj rbrtj added the v8.19.0 label Mar 11, 2025
kibanamachine added a commit that referenced this pull request Mar 11, 2025
…opening job selector from left nav (#213382) (#213925)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ML] Anomaly Detection: Show `Switch to apply time range` when
opening job selector from left nav
(#213382)](#213382)

<!--- 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-03-11T13:50:52Z","message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v9.0.0","Team:ML","backport:version","v8.18.0","v9.1.0"],"title":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left
nav","number":213382,"url":"https://github.com/elastic/kibana/pull/213382","mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213382","number":213382,"mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Mar 11, 2025
… opening job selector from left nav (#213382) (#213924)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ML] Anomaly Detection: Show `Switch to apply time range` when
opening job selector from left nav
(#213382)](#213382)

<!--- 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-03-11T13:50:52Z","message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v9.0.0","Team:ML","backport:version","v8.18.0","v9.1.0"],"title":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left
nav","number":213382,"url":"https://github.com/elastic/kibana/pull/213382","mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213382","number":213382,"mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
@rbrtj rbrtj added backport:version Backport to applied version labels and removed backport:version Backport to applied version labels labels Mar 11, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/13792582406

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 11, 2025
…g job selector from left nav (elastic#213382)

Fix for: elastic#211018 and
elastic#212407

Note: Previously, the `apply time range` setting was saved in local
storage even if the changes were not applied. After the fix, the setting
is saved in local storage only if the user applies the new selection.

After:

https://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55
(cherry picked from commit cbcb7ed)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Cherrypick failed because the selected commit (cbcb7ed) is empty. It looks like the commit was already backported in #213924
8.x
9.0 Cherrypick failed because the selected commit (cbcb7ed) is empty. It looks like the commit was already backported in #213925

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 213382

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 11, 2025
…opening job selector from left nav (#213382) (#213965)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Anomaly Detection: Show `Switch to apply time range` when
opening job selector from left nav
(#213382)](#213382)

<!--- 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-03-11T13:50:52Z","message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v9.0.0","Team:ML","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left
nav","number":213382,"url":"https://github.com/elastic/kibana/pull/213382","mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213925","number":213925,"state":"MERGED","mergeCommit":{"sha":"c68d82ee86e69ed23813c1024770626c5b98f285","message":"[9.0]
[ML] Anomaly Detection: Show `Switch to apply time range` when opening
job selector from left nav (#213382) (#213925)\n\n# Backport\n\nThis
will backport the following commits from `main` to `9.0`:\n- [[ML]
Anomaly Detection: Show `Switch to apply time range` when\nopening job
selector from left
nav\n(#213382)](https://github.com/elastic/kibana/pull/213382)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Robert Jaszczurek
<92210485+rbrtj@users.noreply.github.com>"}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213924","number":213924,"state":"MERGED","mergeCommit":{"sha":"f41478f8e519752dd50608df22bb591aba4b3087","message":"[8.18]
[ML] Anomaly Detection: Show `Switch to apply time range` when opening
job selector from left nav (#213382) (#213924)\n\n# Backport\n\nThis
will backport the following commits from `main` to `8.18`:\n- [[ML]
Anomaly Detection: Show `Switch to apply time range` when\nopening job
selector from left
nav\n(#213382)](https://github.com/elastic/kibana/pull/213382)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Robert Jaszczurek
<92210485+rbrtj@users.noreply.github.com>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213382","number":213382,"mergeCommit":{"message":"[ML]
Anomaly Detection: Show `Switch to apply time range` when opening job
selector from left nav (#213382)\n\nFix for:
#211018
and\nhttps://github.com//issues/212407\n\nNote:
Previously, the `apply time range` setting was saved in local\nstorage
even if the changes were not applied. After the fix, the setting\nis
saved in local storage only if the user applies the new
selection.\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55","sha":"cbcb7edb94e44bc8edc1a4e6f21bff5504c4d61a"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
…g job selector from left nav (elastic#213382)

Fix for: elastic#211018 and
elastic#212407

Note: Previously, the `apply time range` setting was saved in local
storage even if the changes were not applied. After the fix, the setting
is saved in local storage only if the user applies the new selection.

After:


https://github.com/user-attachments/assets/1657f0f4-c580-4941-9582-bf5f9dc3cd55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Anomaly Detection ML anomaly detection :ml release_note:fix Team:ML Team label for ML (also use :ml) t// v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants