Skip to content

Commit

Permalink
Add support new navigation for maps
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Jul 17, 2024
1 parent 605e894 commit 295274c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
22 changes: 22 additions & 0 deletions public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
AppMountParameters,
CoreSetup,
CoreStart,
DEFAULT_APP_CATEGORIES,
DEFAULT_NAV_GROUPS,
Plugin,
PluginInitializerContext,
} from '../../../src/core/public';
Expand Down Expand Up @@ -100,6 +102,26 @@ 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,
// Pending change ready from OSD
// showInAllNavGroup: true,
}]);

core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.search, [{
id: MAPS_APP_ID,
category: DEFAULT_APP_CATEGORIES.visualizeAndReport,
order: 200,
}]);

const mapEmbeddableFactory = new MapEmbeddableFactoryDefinition(async () => {
const [coreStart, depsStart] = await core.getStartServices();
const { navigation, data: useData } = depsStart as AppPluginStartDependencies;
Expand Down

0 comments on commit 295274c

Please sign in to comment.