feat: restructure sidebar hierarchy and add full audit view
Reorganize the sidebar into a proper hierarchy (Overview, Full Audit, Namespaces) and add a Full Audit dashboard view that includes skipped checks. Namespace routes move to /polaris/ns/:namespace to avoid path collisions, and namespace detail pages now link out to the Polaris dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+44
-3
@@ -5,10 +5,12 @@ import {
|
||||
} from '@kinvolk/headlamp-plugin/lib';
|
||||
import React from 'react';
|
||||
import { PolarisDataProvider } from './api/PolarisDataContext';
|
||||
import DashboardView from './components/DashboardView';
|
||||
import DynamicSidebarRegistrar from './components/DynamicSidebarRegistrar';
|
||||
import NamespaceDetailView from './components/NamespaceDetailView';
|
||||
import PolarisSettings from './components/PolarisSettings';
|
||||
import PolarisView from './components/PolarisView';
|
||||
|
||||
// --- Sidebar entries ---
|
||||
|
||||
registerSidebarEntry({
|
||||
parent: null,
|
||||
@@ -18,6 +20,32 @@ registerSidebarEntry({
|
||||
icon: 'mdi:shield-check',
|
||||
});
|
||||
|
||||
registerSidebarEntry({
|
||||
parent: 'polaris',
|
||||
name: 'polaris-overview',
|
||||
label: 'Overview',
|
||||
url: '/polaris',
|
||||
icon: 'mdi:view-dashboard',
|
||||
});
|
||||
|
||||
registerSidebarEntry({
|
||||
parent: 'polaris',
|
||||
name: 'polaris-full',
|
||||
label: 'Full Audit',
|
||||
url: '/polaris/full-audit',
|
||||
icon: 'mdi:clipboard-text-search',
|
||||
});
|
||||
|
||||
registerSidebarEntry({
|
||||
parent: 'polaris',
|
||||
name: 'polaris-namespaces',
|
||||
label: 'Namespaces',
|
||||
url: '/polaris',
|
||||
icon: 'mdi:dns',
|
||||
});
|
||||
|
||||
// --- Routes ---
|
||||
|
||||
registerRoute({
|
||||
path: '/polaris',
|
||||
sidebar: 'polaris',
|
||||
@@ -26,13 +54,26 @@ registerRoute({
|
||||
component: () => (
|
||||
<PolarisDataProvider>
|
||||
<DynamicSidebarRegistrar />
|
||||
<PolarisView />
|
||||
<DashboardView includeSkipped={false} />
|
||||
</PolarisDataProvider>
|
||||
),
|
||||
});
|
||||
|
||||
registerRoute({
|
||||
path: '/polaris/:namespace',
|
||||
path: '/polaris/full-audit',
|
||||
sidebar: 'polaris-full',
|
||||
name: 'polaris-full-audit',
|
||||
exact: true,
|
||||
component: () => (
|
||||
<PolarisDataProvider>
|
||||
<DynamicSidebarRegistrar />
|
||||
<DashboardView includeSkipped />
|
||||
</PolarisDataProvider>
|
||||
),
|
||||
});
|
||||
|
||||
registerRoute({
|
||||
path: '/polaris/ns/:namespace',
|
||||
sidebar: 'polaris',
|
||||
name: 'polaris-namespace',
|
||||
exact: true,
|
||||
|
||||
Reference in New Issue
Block a user