[ML] Fix registerUrlGenerator broken on basic licensing (#77832)
This commit is contained in:
parent
9f3992f6c2
commit
4980af7565
|
@ -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…
Reference in a new issue