mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Fix registerUrlGenerator broken on basic licensing (#77832)
This commit is contained in:
parent
9f3992f6c2
commit
4980af7565
1 changed files with 5 additions and 1 deletions
|
@ -106,12 +106,17 @@ export class MlPlugin implements Plugin<MlPluginSetup, MlPluginStart> {
|
|||
const licensing = pluginsSetup.licensing.license$.pipe(take(1));
|
||||
licensing.subscribe(async (license) => {
|
||||
const [coreStart] = await core.getStartServices();
|
||||
|
||||
if (isMlEnabled(license)) {
|
||||
// add ML to home page
|
||||
if (pluginsSetup.home) {
|
||||
registerFeature(pluginsSetup.home);
|
||||
}
|
||||
|
||||
// the mlUrlGenerator should be registered even without full license
|
||||
// for other plugins to access ML links
|
||||
registerUrlGenerator(pluginsSetup.share, core);
|
||||
|
||||
const { capabilities } = coreStart.application;
|
||||
|
||||
// register ML for the index pattern management no data screen.
|
||||
|
@ -129,7 +134,6 @@ export class MlPlugin implements Plugin<MlPluginSetup, MlPluginStart> {
|
|||
}
|
||||
registerEmbeddables(pluginsSetup.embeddable, core);
|
||||
registerMlUiActions(pluginsSetup.uiActions, core);
|
||||
registerUrlGenerator(pluginsSetup.share, core);
|
||||
} else if (managementApp) {
|
||||
managementApp.disable();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue