From 3f4f5ba054beffc35a4fe26a82c566f7bf368c2c Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Mon, 15 Jul 2024 10:56:56 -0700 Subject: [PATCH] Add support new navigation for maps Signed-off-by: Junqiu Lei --- CHANGELOG.md | 1 + public/plugin.tsx | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d70ffb..aedb680f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased 2.x](https://github.com/opensearch-project/dashboards-maps/compare/2.15...2.x) ### Features +* Add support new navigation for maps ([#635](https://github.com/opensearch-project/dashboards-maps/pull/635)) ### Enhancements ### Bug Fixes * Fixed broken wms custom layer update ([#601](https://github.com/opensearch-project/dashboards-maps/pull/631)) diff --git a/public/plugin.tsx b/public/plugin.tsx index 66e2b085..fd0e76d6 100644 --- a/public/plugin.tsx +++ b/public/plugin.tsx @@ -8,6 +8,8 @@ import { AppMountParameters, CoreSetup, CoreStart, + DEFAULT_APP_CATEGORIES, + DEFAULT_NAV_GROUPS, Plugin, PluginInitializerContext, } from '../../../src/core/public'; @@ -100,6 +102,24 @@ export class CustomImportMapPlugin }, }); + core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.observability, [{ + id: MAPS_APP_ID, + category: DEFAULT_APP_CATEGORIES.visualizeAndReport, + order: 200, + }]); + + core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS['security-analytics'], [{ + id: MAPS_APP_ID, + category: DEFAULT_APP_CATEGORIES.visualizeAndReport, + order: 200, + }]); + + core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.search, [{ + id: MAPS_APP_ID, + category: DEFAULT_APP_CATEGORIES.analyzeSearch, + order: 200, + }]); + const mapEmbeddableFactory = new MapEmbeddableFactoryDefinition(async () => { const [coreStart, depsStart] = await core.getStartServices(); const { navigation, data: useData } = depsStart as AppPluginStartDependencies;