Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Update route resolvers (#159176)
## Summary Resolves #153932 Updates route resolver callback to track license and ML capabilities requirements. - The logic for resolving the data view and saved search has been moved to the dedicated context `DataSourceContextProvider` and only applies to pages that need it. It also shows an error callout in case of an error during the data view fetch. - ML License class has been updated to track license changes and logic for redirects has been moved to the route resolver - `MlCapabilitiesService` has been updated to periodically fetch capabilities - Most of the static usages of `checkPermission` have been replaced with `usePermissionCheck` ### Notes for reviewers - Now it's obvious what license and capabilities requirements each route has. We should carefully review it because I assume legacy resolvers were not entirely correct in the same cases. ### 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
- Loading branch information
Showing
117 changed files
with
1,198 additions
and
1,393 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
* 2.0. | ||
*/ | ||
|
||
export { Page } from './page'; | ||
export { AccessDeniedCallout } from './access_denied'; |
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.