Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Navigation-next] Add all use case #7235

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
Loading