-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Navigation] Register all plugins to NavGroups (#369)
* Add a function to register all plugin Nav groups and categories Signed-off-by: Adam Tackett <[email protected]> * Updated addNavLinkGroups path Signed-off-by: Adam Tackett <[email protected]> * Add always show to analytics group Signed-off-by: Adam Tackett <[email protected]> * Adjust dashboardsAndReport rename and lint errors Signed-off-by: Adam Tackett <[email protected]> * Add groups and remove analytics Signed-off-by: Adam Tackett <[email protected]> * Fix lint error Signed-off-by: Adam Tackett <[email protected]> --------- Signed-off-by: Adam Tackett <[email protected]> Co-authored-by: Adam Tackett <[email protected]>
- Loading branch information
Showing
2 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { CoreSetup } from '../../../src/core/public'; | ||
import { ReportsDashboardsPluginSetup } from './types'; | ||
import { PLUGIN_ID } from '../common'; | ||
import { DEFAULT_NAV_GROUPS, DEFAULT_APP_CATEGORIES } from '../../../src/core/public'; | ||
|
||
export function registerAllPluginNavGroups(core: CoreSetup<ReportsDashboardsPluginSetup>) { | ||
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.observability, [ | ||
{ | ||
id: PLUGIN_ID, | ||
category: DEFAULT_APP_CATEGORIES.visualizeAndReport, | ||
order: 300, | ||
}, | ||
]); | ||
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS[`security-analytics`], [ | ||
{ | ||
id: PLUGIN_ID, | ||
category: DEFAULT_APP_CATEGORIES.visualizeAndReport, | ||
order: 300, | ||
}, | ||
]); | ||
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.search, [ | ||
{ | ||
id: PLUGIN_ID, | ||
category: DEFAULT_APP_CATEGORIES.analyzeSearch, | ||
order: 300, | ||
}, | ||
]); | ||
} |