Skip to content

Commit

Permalink
[Navigation-next] Add all use case (opensearch-project#7235) (opensea…
Browse files Browse the repository at this point in the history
…rch-project#7239)

* feat: add all use case



* Changeset file for PR opensearch-project#7235 created/updated

---------



(cherry picked from commit 34f3eb2)

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 15, 2024
1 parent c3dd768 commit 30067fa
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7235.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Add all use case ([#7235](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7235))
5 changes: 5 additions & 0 deletions src/core/public/chrome/nav_group/nav_group_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export interface ChromeRegistrationNavLink {
* link with parentNavLinkId field will be displayed as nested items in navigation.
*/
parentNavLinkId?: string;

/**
* If the nav link should be shown in 'all' nav group
*/
showInAllNavGroup?: boolean;
}

export type NavGroupItemInMap = ChromeNavGroup & {
Expand Down
1 change: 1 addition & 0 deletions src/core/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export {
WORKSPACE_TYPE,
cleanWorkspaceId,
DEFAULT_NAV_GROUPS,
ALL_USE_CASE_ID,
} from '../utils';
export {
AppCategory,
Expand Down
21 changes: 17 additions & 4 deletions src/core/utils/default_nav_groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import { i18n } from '@osd/i18n';
import { ChromeNavGroup, NavGroupType } from '../types';

export const ALL_USE_CASE_ID = 'all';

const defaultNavGroups = {
dataAdministration: {
id: 'dataAdministration',
Expand All @@ -29,6 +31,17 @@ const defaultNavGroups = {
order: 2000,
type: NavGroupType.SYSTEM,
},
all: {
id: ALL_USE_CASE_ID,
title: i18n.translate('core.ui.group.all.title', {
defaultMessage: 'All use case',
}),
description: i18n.translate('core.ui.group.all.description', {
defaultMessage: 'This is a usse case contains all the features.',
}),
order: 3000,
type: NavGroupType.SYSTEM,
},
observability: {
id: 'observability',
title: i18n.translate('core.ui.group.observability.title', {
Expand All @@ -38,7 +51,7 @@ const defaultNavGroups = {
defaultMessage:
'Gain visibility into system health, performance, and reliability through monitoring and analysis of logs, metrics, and traces.',
}),
order: 3000,
order: 4000,
},
'security-analytics': {
id: 'security-analytics',
Expand All @@ -49,7 +62,7 @@ const defaultNavGroups = {
defaultMessage:
'Detect and investigate potential security threats and vulnerabilities across your systems and data.',
}),
order: 4000,
order: 5000,
},
analytics: {
id: 'analytics',
Expand All @@ -60,7 +73,7 @@ const defaultNavGroups = {
defaultMessage:
'Analyze data to derive insights, identify patterns and trends, and make data-driven decisions.',
}),
order: 5000,
order: 6000,
},
search: {
id: 'search',
Expand All @@ -71,7 +84,7 @@ const defaultNavGroups = {
defaultMessage:
"Quickly find and explore relevant information across your organization's data sources.",
}),
order: 6000,
order: 7000,
},
} as const;

Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ export {
export { DEFAULT_APP_CATEGORIES } from './default_app_categories';
export { WORKSPACE_PATH_PREFIX, WORKSPACE_TYPE } from './constants';
export { getWorkspaceIdFromUrl, formatUrlWithWorkspaceId, cleanWorkspaceId } from './workspace';
export { DEFAULT_NAV_GROUPS } from './default_nav_groups';
export { DEFAULT_NAV_GROUPS, ALL_USE_CASE_ID } from './default_nav_groups';

0 comments on commit 30067fa

Please sign in to comment.