Skip to content

Commit

Permalink
feat: add all use case
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Jul 13, 2024
1 parent 0215e32 commit dab4789
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
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 dab4789

Please sign in to comment.