Skip to content

Commit a681867

Browse files
yjaaouanedarsene
authored andcommitted
feat(container): add observability legacy entry menu
resolves: #MAOBS-101 Signed-off-by: yjaaouane <[email protected]>
1 parent 7389436 commit a681867

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

packages/manager/apps/container/src/container/legacy/server-sidebar/universe/DedicatedSidebar.tsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ export const features = [
5050
'network-security',
5151
'key-management-service',
5252
'okms:key-management-service',
53+
'observability',
54+
'observability:dashboards',
55+
'observability:metrics:tenants',
5356
];
5457

5558
export default function DedicatedSidebar() {
@@ -486,6 +489,48 @@ export default function DedicatedSidebar() {
486489
});
487490
}
488491

492+
if (feature['observability']) {
493+
494+
const observabilityIcon = (
495+
<OsdsIcon
496+
name={ODS_ICON_NAME.KEY_CONCEPT}
497+
size={ODS_ICON_SIZE.xxs}
498+
color={ODS_THEME_COLOR_INTENT.text}
499+
/>
500+
);
501+
502+
menu.push({
503+
id: 'observability',
504+
label: t('sidebar_observability'),
505+
icon: (
506+
<OsdsIcon
507+
name={ODS_ICON_NAME.CLOUD_EYE_CONCEPT}
508+
size={ODS_ICON_SIZE.xxs}
509+
color={ODS_THEME_COLOR_INTENT.text}
510+
/>
511+
),
512+
pathMatcher: new RegExp('^/observability'),
513+
subItems: [
514+
feature['observability:dashboards'] && {
515+
id: 'dashboards',
516+
href: navigation.getURL('observability', '#/dashboards'),
517+
label: t('sidebar_observability_dashboards'),
518+
pathMatcher: new RegExp('^/observability/dashboards'),
519+
ignoreSearch: true,
520+
icon: observabilityIcon,
521+
},
522+
feature['observability:metrics:tenants'] && {
523+
id: 'tenants',
524+
href: navigation.getURL('observability', '#/metrics/tenants'),
525+
label: t('sidebar_observability_metrics_tenants'),
526+
pathMatcher: new RegExp('^/observability/metrics/tenants'),
527+
ignoreSearch: true,
528+
icon: observabilityIcon,
529+
},
530+
].filter(Boolean),
531+
});
532+
}
533+
489534
return menu;
490535
};
491536

0 commit comments

Comments
 (0)