Skip to content

Commit

Permalink
Register admin UI as AI models in data administration use case (#337)
Browse files Browse the repository at this point in the history
* Register admin UI as ai models in data administration use case

Signed-off-by: Lin Wang <[email protected]>

* Fix addNavLinksToGroup not found in chrome service

Signed-off-by: Lin Wang <[email protected]>

* Update nav link text

Signed-off-by: Lin Wang <[email protected]>

* Change text to AI models

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam authored Jul 11, 2024
1 parent 97d7f98 commit 83b3a2d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '../../../src/core/public';
import { i18n } from '@osd/i18n';
import {
AppMountParameters,
CoreSetup,
CoreStart,
DEFAULT_NAV_GROUPS,
Plugin,
} from '../../../src/core/public';
import {
MlCommonsPluginPluginSetup,
MlCommonsPluginPluginStart,
Expand Down Expand Up @@ -48,6 +55,21 @@ export class MlCommonsPluginPlugin
},
});

core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.dataAdministration, [
{
id: PLUGIN_ID,
title: i18n.translate('MLCommonsDashboards.NavLink.AIModels.title', {
defaultMessage: 'AI models',
}),
category: {
id: 'ai-models',
label: i18n.translate('MLCommonsDashboards.Category.AIModels.label', {
defaultMessage: 'AI models',
}),
},
},
]);

// Return methods that should be available to other plugins
return {};
}
Expand Down

0 comments on commit 83b3a2d

Please sign in to comment.