-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Fix navigation for the Basic licence #139469
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
Functional tests LGTM
@@ -287,7 +288,7 @@ export async function cloneJob(jobId) { | |||
); | |||
} | |||
|
|||
window.location.href = '#/jobs/new_job'; | |||
getApplication().navigateToApp('ml', { path: ML_PAGES.ANOMALY_DETECTION_CREATE_JOB }); |
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.
PLUGIN_ID
could be used here
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.
updated in e8767d4
} | ||
|
||
private redirectToBasic() { | ||
return this.application.navigateToApp('ml', { path: ML_PAGES.DATA_VISUALIZER }); |
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.
PLUGIN_ID
could be used here
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.
updated in e8767d4
super(); | ||
} | ||
|
||
private redirectToKibana() { |
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.
I believe these should still return Promise.reject(); as the originals did.
They are used in the page loading resolver, if any of the promises reject at he beginning, the function will return early.
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.
updated in e8767d4
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.
Tested and LGTM. Did not hit the redirect loop with any of the navigation between apps that was happening previously.
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @darnautov |
* fix redirect to the data vis * update jest tests * remove window.location.href from the clone action * assert the redirect * update power user tests * use plugin id const, return promise reject (cherry picked from commit 62578bd)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
* fix redirect to the data vis * update jest tests * remove window.location.href from the clone action * assert the redirect * update power user tests * use plugin id const, return promise reject (cherry picked from commit 62578bd) Co-authored-by: Dima Arnautov <[email protected]>
* fix redirect to the data vis * update jest tests * remove window.location.href from the clone action * assert the redirect * update power user tests * use plugin id const, return promise reject
Summary
Fixes #139279
Previously when running with a basic licence, when you landed on the ML app from certain apps, e.g. Discover or Stack Monitoring, it would get stuck in a redirect loop showing the Page Not Found warning message.
Checklist