Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Consolidate container and Kubernetes platform tabs

rcourtmana590024ca067
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 21e36a4316..0bc55a89e6 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -169,11 +169,22 @@ Platform page subnavigation is a shared frontend primitive. Docker / Podman
and Kubernetes platform pages may add native API-backed sections, but the tabs
must use `PlatformSectionTabs`, canonical table alignment helpers, and shared
resource type presentation/reporting helpers rather than page-local tab shells,
-alignment classes, or ad hoc report-category coercion. Docker / Podman native
-subsections now include runtime containers, engine storage usage, Swarm node
-inventory, and metadata-only Swarm secret/config inventory where the documented
-Docker APIs report those resources; Podman-only libpod pod inventory must not
-be represented until the collector has a libpod-native source. Kubernetes config
+alignment classes, or ad hoc report-category coercion. Platform tabs are
+workflow-level navigation, not one visible tab per API resource kind: Docker /
+Podman exposes `Overview`, `Containers`, `Images`, `Storage`, `Networks`, and
+`Swarm`, while Kubernetes exposes `Overview`, `Nodes`, `Workloads`, `Services`,
+`Storage`, `Configuration`, and `Events`. API-native tables remain bespoke under
+those workflows, so Docker `Storage` owns engine disk usage plus volumes and
+Docker `Swarm` owns services, tasks, nodes, secrets, and configs; Kubernetes
+`Workloads` owns Pods, Deployments, controllers, and autoscaling, `Services`
+owns Services plus ingress/endpoint inventory, and `Configuration` owns config
+plus policy inventory. Legacy object-specific URLs may resolve to the owning
+workflow tab, but they must not reappear as top-level platform navigation unless
+the product IA is intentionally changed. Docker / Podman native subsections now
+include runtime containers, engine storage usage, Swarm node inventory, and
+metadata-only Swarm secret/config inventory where the documented Docker APIs
+report those resources; Podman-only libpod pod inventory must not be represented
+until the collector has a libpod-native source. Kubernetes config
inventory must preserve the same trust boundary for metadata-only ConfigMap
and Secret rows: the shared table wording may indicate metadata-only inventory,
but must not imply payload fields were read when the agent used Kubernetes
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 540edccc31..7248250c29 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -979,10 +979,10 @@ in the same pass. The K8s Namespaces and Deployments drawer "Open Pods" /
"View Pods" buttons
(`frontend-modern/src/components/Kubernetes/K8sNamespacesDrawer.tsx`,
`frontend-modern/src/components/Kubernetes/K8sDeploymentsDrawer.tsx`) now
-route to `/kubernetes/pods` rather than building
+route to `/kubernetes/workloads` rather than building
`/workloads?type=pod&context=...&namespace=...` URLs; the legacy
context/namespace query filter does not carry forward because the new
-Kubernetes Pods sub-tab does not consume those parameters. New drawer or
+Kubernetes Workloads tab does not consume those parameters. New drawer or
correlation surfaces must anchor on platform routes (or stay-in-place drawer
expansion) instead of resurrecting the retired top-level paths.
@@ -2098,13 +2098,22 @@ Unsupported secondary tabs now also use the same terse availability notices
(`PMG resources only.`, `Kubernetes clusters only.`, `Docker runtimes with
Swarm only.`) instead of explanatory sentences, so mismatch fallback state
stays readable without turning support surfaces into inline documentation.
-Docker platform subtabs now follow canonical resource evidence as well:
-`Containers` is visible only when Docker/Podman app-container resources exist,
-`Storage` is backed by host-level Docker/Podman `/system/df` usage buckets,
-`Swarm services` is visible only when canonical `docker-service` resources
-exist, and `Swarm nodes` is backed by canonical `docker-swarm-node` resources
-from Docker manager node inventory. Inactive standalone Docker Swarm metadata
-is not a tab, host role, or service-surface signal.
+Docker and Kubernetes platform subtabs now follow canonical resource evidence
+inside workflow-level navigation instead of exposing one visible tab per API
+kind. Docker / Podman keeps top-level `Overview`, `Containers`, `Images`,
+`Storage`, `Networks`, and `Swarm` tabs: `Storage` is backed by host-level
+Docker/Podman `/system/df` usage buckets plus canonical `docker-volume` rows,
+and `Swarm` is backed by canonical `docker-service`, `docker-task`,
+`docker-swarm-node`, `docker-secret`, and `docker-config` rows from manager
+inventory. Kubernetes keeps top-level `Overview`, `Nodes`, `Workloads`,
+`Services`, `Storage`, `Configuration`, and `Events` tabs: `Workloads` groups
+Pods, Deployments, controller resources, and HorizontalPodAutoscalers;
+`Services` groups Service rows with ingress and endpoint-slice rows without
+duplicating Services in the networking table; and `Configuration` groups
+metadata-only config rows with policy, quota, limit, and disruption-budget
+rows. Legacy object-specific routes may resolve to the owning workflow tab, but
+top-level tab visibility is governed by the workflow model. Inactive standalone
+Docker Swarm metadata is not a tab, host role, or service-surface signal.
The frontend Docker facet contract covers host runtime telemetry, runtime
container projection, and Swarm service/task/node projection. Host resources
may expose runtime/version, OS, temperature, uptime,
diff --git a/frontend-modern/src/components/Kubernetes/K8sDeploymentsDrawer.tsx b/frontend-modern/src/components/Kubernetes/K8sDeploymentsDrawer.tsx
index 809295fb5f..4cada6913d 100644
--- a/frontend-modern/src/components/Kubernetes/K8sDeploymentsDrawer.tsx
+++ b/frontend-modern/src/components/Kubernetes/K8sDeploymentsDrawer.tsx
@@ -168,7 +168,7 @@ export const K8sDeploymentsDrawer: Component<{
const openPods = (_ns?: string) => {
if (!clusterName()) return;
- navigate(buildKubernetesPath('pods'));
+ navigate(buildKubernetesPath('workloads'));
};
const headingId = () => `k8s-deployments-drawer-heading-${clusterName() || 'cluster'}`;
diff --git a/frontend-modern/src/components/Kubernetes/K8sNamespacesDrawer.tsx b/frontend-modern/src/components/Kubernetes/K8sNamespacesDrawer.tsx
index 6ae760e634..dfbb97819d 100644
--- a/frontend-modern/src/components/Kubernetes/K8sNamespacesDrawer.tsx
+++ b/frontend-modern/src/components/Kubernetes/K8sNamespacesDrawer.tsx
@@ -87,7 +87,7 @@ export const K8sNamespacesDrawer: Component<{
const openPods = (_namespace: string | null) => {
if (!clusterName()) return;
- navigate(buildKubernetesPath('pods'));
+ navigate(buildKubernetesPath('workloads'));
};
const headingId = () => `k8s-namespaces-drawer-heading-${clusterName() || 'cluster'}`;
diff --git a/frontend-modern/src/components/Kubernetes/__tests__/K8sDeploymentsDrawer.test.tsx b/frontend-modern/src/components/Kubernetes/__tests__/K8sDeploymentsDrawer.test.tsx
index dd7f09a514..12a9c524f1 100644
--- a/frontend-modern/src/components/Kubernetes/__tests__/K8sDeploymentsDrawer.test.tsx
+++ b/frontend-modern/src/components/Kubernetes/__tests__/K8sDeploymentsDrawer.test.tsx
@@ -756,7 +756,7 @@ describe('K8sDeploymentsDrawer', () => {
});
describe('navigation', () => {
- it('"Open Pods" button navigates to the Kubernetes Pods sub-tab', async () => {
+ it('"Open Pods" button navigates to the Kubernetes Workloads tab', async () => {
mockApiResponse([makeDeployment()]);
render(() => <K8sDeploymentsDrawer cluster="my-cluster" />);
@@ -768,10 +768,10 @@ describe('K8sDeploymentsDrawer', () => {
fireEvent.click(openPodsBtn);
expect(navigateMock).toHaveBeenCalledTimes(1);
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
});
- it('"Open Pods" routes to the Kubernetes Pods sub-tab regardless of selected namespace', async () => {
+ it('"Open Pods" routes to the Kubernetes Workloads tab regardless of selected namespace', async () => {
mockApiResponse([
makeDeployment({ id: '1', name: 'dep-a', kubernetes: { namespace: 'production' } }),
makeDeployment({ id: '2', name: 'dep-b', kubernetes: { namespace: 'staging' } }),
@@ -783,7 +783,7 @@ describe('K8sDeploymentsDrawer', () => {
});
// Selecting a namespace narrows the in-drawer view but no longer
- // forwards as a URL filter (the platform-first Kubernetes Pods tab
+ // forwards as a URL filter (the platform-first Kubernetes Workloads tab
// does not consume legacy ?namespace= query params).
const select = screen.getByLabelText('Namespace');
fireEvent.change(select, { target: { value: 'production' } });
@@ -792,10 +792,10 @@ describe('K8sDeploymentsDrawer', () => {
fireEvent.click(openPodsBtn);
expect(navigateMock).toHaveBeenCalledTimes(1);
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
});
- it('"View Pods" button on a row navigates to the Kubernetes Pods sub-tab', async () => {
+ it('"View Pods" button on a row navigates to the Kubernetes Workloads tab', async () => {
mockApiResponse([
makeDeployment({ id: '1', name: 'dep-a', kubernetes: { namespace: 'kube-system' } }),
]);
@@ -809,7 +809,7 @@ describe('K8sDeploymentsDrawer', () => {
fireEvent.click(viewPodsBtn);
expect(navigateMock).toHaveBeenCalledTimes(1);
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
});
it('does not navigate when cluster is empty', async () => {
diff --git a/frontend-modern/src/components/Kubernetes/__tests__/K8sNamespacesDrawer.test.tsx b/frontend-modern/src/components/Kubernetes/__tests__/K8sNamespacesDrawer.test.tsx
index 0ad2d89d36..064ea92fbc 100644
--- a/frontend-modern/src/components/Kubernetes/__tests__/K8sNamespacesDrawer.test.tsx
+++ b/frontend-modern/src/components/Kubernetes/__tests__/K8sNamespacesDrawer.test.tsx
@@ -33,7 +33,7 @@ describe('K8sNamespacesDrawer', () => {
cleanup();
});
- it('navigates to the Kubernetes Pods sub-tab from the cluster summary', async () => {
+ it('navigates to the Kubernetes Workloads tab from the cluster summary', async () => {
apiFetchJSONMock.mockResolvedValueOnce(makeResponse([{ namespace: 'default' }]));
render(() => <K8sNamespacesDrawer cluster="cluster-a" />);
@@ -44,10 +44,10 @@ describe('K8sNamespacesDrawer', () => {
await fireEvent.click(screen.getByRole('button', { name: 'Open All Pods' }));
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
});
- it('navigates to the Kubernetes Pods sub-tab from a namespace row', async () => {
+ it('navigates to the Kubernetes Workloads tab from a namespace row', async () => {
apiFetchJSONMock.mockResolvedValueOnce(makeResponse([{ namespace: 'kube-system' }]));
render(() => <K8sNamespacesDrawer cluster="cluster-a" />);
@@ -58,7 +58,7 @@ describe('K8sNamespacesDrawer', () => {
await fireEvent.click(screen.getByRole('button', { name: 'Open Pods' }));
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
});
it('uses the shared platform table spacing and divider contract', async () => {
diff --git a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx
index 0ab1c154cd..69c3939d91 100644
--- a/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/CommandPaletteModal.test.tsx
@@ -76,6 +76,7 @@ describe('CommandPaletteModal', () => {
expect(commandPaletteModelSource).toContain("id: 'nav-proxmox'");
expect(commandPaletteModelSource).toContain("id: 'nav-docker'");
expect(commandPaletteModelSource).toContain("id: 'nav-kubernetes'");
+ expect(commandPaletteModelSource).toContain("id: 'nav-kubernetes-workloads'");
expect(commandPaletteModelSource).toContain("id: 'nav-truenas'");
expect(commandPaletteModelSource).toContain("id: 'nav-vmware'");
expect(commandPaletteModelSource).toContain("id: 'nav-vmware-networks'");
@@ -97,8 +98,8 @@ describe('CommandPaletteModal', () => {
expect(screen.getByText('Go to Agents')).toBeInTheDocument();
expect(screen.getByText('Go to Proxmox')).toBeInTheDocument();
expect(screen.getByText('Go to Containers')).toBeInTheDocument();
- expect(screen.getByText('Go to Kubernetes Pods')).toBeInTheDocument();
- expect(screen.getByText('/kubernetes/pods')).toBeInTheDocument();
+ expect(screen.getByText('Go to Kubernetes Workloads')).toBeInTheDocument();
+ expect(screen.getByText('/kubernetes/workloads')).toBeInTheDocument();
expect(screen.getByText('Go to vSphere')).toBeInTheDocument();
expect(screen.getByText('Go to vSphere Networks')).toBeInTheDocument();
expect(screen.getByText('/vmware/networks')).toBeInTheDocument();
@@ -109,7 +110,7 @@ describe('CommandPaletteModal', () => {
);
});
- it('navigates to the Kubernetes pods sub-tab', async () => {
+ it('navigates to the Kubernetes workloads tab', async () => {
const onClose = vi.fn();
render(() => (
<CommandPaletteModal
@@ -119,9 +120,9 @@ describe('CommandPaletteModal', () => {
/>
));
- await fireEvent.click(screen.getByText('Go to Kubernetes Pods'));
+ await fireEvent.click(screen.getByText('Go to Kubernetes Workloads'));
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
expect(onClose).toHaveBeenCalledTimes(1);
});
@@ -155,7 +156,7 @@ describe('CommandPaletteModal', () => {
await fireEvent.input(input, { target: { value: 'kubernetes pods' } });
await fireEvent.keyDown(input, { key: 'Enter' });
- expect(navigateMock).toHaveBeenCalledWith('/kubernetes/pods');
+ expect(navigateMock).toHaveBeenCalledWith('/kubernetes/workloads');
expect(onClose).toHaveBeenCalledTimes(1);
});
diff --git a/frontend-modern/src/components/shared/commandPaletteModel.ts b/frontend-modern/src/components/shared/commandPaletteModel.ts
index 1d37860333..69b2711072 100644
--- a/frontend-modern/src/components/shared/commandPaletteModel.ts
+++ b/frontend-modern/src/components/shared/commandPaletteModel.ts
@@ -23,7 +23,7 @@ export type CommandPaletteCommandPaths = {
proxmoxPath: string;
dockerPath: string;
kubernetesPath: string;
- kubernetesPodsPath: string;
+ kubernetesWorkloadsPath: string;
trueNasPath: string;
vmwarePath: string;
vmwareNetworksPath: string;
@@ -69,11 +69,11 @@ export function buildCommandPaletteCommands(options: {
action: () => options.navigate(options.paths.kubernetesPath),
},
{
- id: 'nav-kubernetes-pods',
- label: 'Go to Kubernetes Pods',
- description: options.paths.kubernetesPodsPath,
- keywords: ['k8s', 'kubernetes', 'pods', 'workloads'],
- action: () => options.navigate(options.paths.kubernetesPodsPath),
+ id: 'nav-kubernetes-workloads',
+ label: 'Go to Kubernetes Workloads',
+ description: options.paths.kubernetesWorkloadsPath,
+ keywords: ['k8s', 'kubernetes', 'pods', 'deployments', 'controllers', 'workloads'],
+ action: () => options.navigate(options.paths.kubernetesWorkloadsPath),
},
);
}
diff --git a/frontend-modern/src/components/shared/useCommandPaletteState.ts b/frontend-modern/src/components/shared/useCommandPaletteState.ts
index e33f773cf5..28855c7db9 100644
--- a/frontend-modern/src/components/shared/useCommandPaletteState.ts
+++ b/frontend-modern/src/components/shared/useCommandPaletteState.ts
@@ -29,7 +29,7 @@ export function useCommandPaletteState(props: CommandPaletteModalProps) {
proxmoxPath: buildProxmoxPath(),
dockerPath: buildDockerPath(),
kubernetesPath: buildKubernetesPath(),
- kubernetesPodsPath: buildKubernetesPath('pods'),
+ kubernetesWorkloadsPath: buildKubernetesPath('workloads'),
trueNasPath: buildTrueNASPath(),
vmwarePath: buildVmwarePath(),
vmwareNetworksPath: buildVmwarePath('networks'),
diff --git a/frontend-modern/src/features/docker/DockerPageSurface.tsx b/frontend-modern/src/features/docker/DockerPageSurface.tsx
index 1827836b5b..b466c081b8 100644
--- a/frontend-modern/src/features/docker/DockerPageSurface.tsx
+++ b/frontend-modern/src/features/docker/DockerPageSurface.tsx
@@ -19,11 +19,16 @@ import { DockerStorageUsageTable } from './DockerStorageUsageTable';
import { DockerSwarmNodesTable } from './DockerSwarmNodesTable';
import { DockerTasksTable } from './DockerTasksTable';
import { DockerVolumesTable } from './DockerVolumesTable';
-import { DOCKER_TAB_SPECS, buildDockerPageModel, type DockerPageTabId } from './dockerPageModel';
+import {
+ DOCKER_TAB_SPECS,
+ buildDockerPageModel,
+ resolveDockerPageTabId,
+ type DockerPageModel,
+ type DockerPageTabId,
+} from './dockerPageModel';
const DOCKER_RESOURCE_QUERY =
'type=agent,docker-host,app-container,docker-service,docker-image,docker-volume,docker-network,docker-task,docker-swarm-node,docker-secret,docker-config';
-const VALID_TABS = new Set<DockerPageTabId>(DOCKER_TAB_SPECS.map((tab) => tab.id));
const dockerIcon = () => <ContainerIcon class="h-6 w-6 text-slate-400" />;
@@ -35,8 +40,8 @@ export function DockerPageSurface() {
initialHydration: 'prefer-ws-then-rest',
});
const activeTab = createMemo<DockerPageTabId>(() => {
- const segment = location.pathname.split('/').filter(Boolean)[1] as DockerPageTabId | undefined;
- return segment && VALID_TABS.has(segment) ? segment : 'overview';
+ const segment = location.pathname.split('/').filter(Boolean)[1];
+ return resolveDockerPageTabId(segment);
});
const model = createMemo(() => buildDockerPageModel(resources()));
const showServicesSection = createMemo(() => model().services.length > 0);
@@ -104,14 +109,6 @@ export function DockerPageSurface() {
emptyDescription="Images appear here when a Docker or Podman host reports local image inventory."
/>
</Show>
- <Show when={activeTab() === 'volumes'}>
- <DockerVolumesTable
- resources={model().volumes}
- emptyIcon={dockerIcon()}
- emptyTitle="No volumes"
- emptyDescription="Volumes appear here when the container runtime reports volume inventory."
- />
- </Show>
<Show when={activeTab() === 'networks'}>
<DockerNetworksTable
resources={model().networks}
@@ -121,54 +118,10 @@ export function DockerPageSurface() {
/>
</Show>
<Show when={activeTab() === 'storage'}>
- <DockerStorageUsageTable
- hosts={model().hosts}
- sourceCount={model().hosts.length}
- emptyIcon={dockerIcon()}
- emptyTitle="No engine storage usage"
- emptyDescription="Docker / Podman storage usage appears here when hosts report the engine disk-usage snapshot."
- />
- </Show>
- <Show when={activeTab() === 'swarm-nodes'}>
- <DockerSwarmNodesTable
- resources={model().nodes}
- emptyIcon={dockerIcon()}
- emptyTitle="No Swarm nodes"
- emptyDescription="Swarm nodes appear here when a Docker manager reports the cluster node inventory."
- />
- </Show>
- <Show when={activeTab() === 'services'}>
- <DockerServicesTable
- resources={model().services}
- sourceCount={model().services.length}
- emptyIcon={dockerIcon()}
- emptyTitle="No Swarm services"
- emptyDescription="Docker Swarm services appear here when a Swarm manager reports them."
- />
- </Show>
- <Show when={activeTab() === 'tasks'}>
- <DockerTasksTable
- resources={model().tasks}
- emptyIcon={dockerIcon()}
- emptyTitle="No Swarm tasks"
- emptyDescription="Swarm tasks appear here when a Swarm manager reports replica task inventory."
- />
- </Show>
- <Show when={activeTab() === 'secrets'}>
- <DockerSecretsTable
- resources={model().secrets}
- emptyIcon={dockerIcon()}
- emptyTitle="No Swarm secrets"
- emptyDescription="Swarm secret metadata appears here when a Docker manager reports the secrets API."
- />
+ <DockerStorage model={model()} />
</Show>
- <Show when={activeTab() === 'configs'}>
- <DockerConfigsTable
- resources={model().configs}
- emptyIcon={dockerIcon()}
- emptyTitle="No Swarm configs"
- emptyDescription="Swarm config metadata appears here when a Docker manager reports the configs API."
- />
+ <Show when={activeTab() === 'swarm'}>
+ <DockerSwarm model={model()} />
</Show>
</Show>
</Show>
@@ -179,6 +132,94 @@ export function DockerPageSurface() {
export default DockerPageSurface;
+function DockerStorage(props: { model: DockerPageModel }) {
+ return (
+ <div class="space-y-4">
+ <DockerStorageUsageTable
+ hosts={props.model.hosts}
+ sourceCount={props.model.hosts.length}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Docker or Podman storage usage"
+ emptyDescription="Engine disk-usage snapshots appear here when a Docker or Podman host reports them."
+ />
+ <DockerVolumesTable
+ resources={props.model.volumes}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No volumes"
+ emptyDescription="Volumes appear here when the container runtime reports volume inventory."
+ />
+ </div>
+ );
+}
+
+function DockerSwarm(props: { model: DockerPageModel }) {
+ const hasSwarmInventory = createMemo(
+ () =>
+ props.model.services.length > 0 ||
+ props.model.tasks.length > 0 ||
+ props.model.nodes.length > 0 ||
+ props.model.secrets.length > 0 ||
+ props.model.configs.length > 0,
+ );
+
+ return (
+ <Show
+ when={hasSwarmInventory()}
+ fallback={
+ <PlatformTableEmptyState
+ icon={dockerIcon()}
+ title="No Swarm inventory"
+ description="Docker Swarm services, tasks, nodes, secrets, and configs appear here when a Swarm manager reports them."
+ />
+ }
+ >
+ <div class="space-y-4">
+ <Show when={props.model.services.length > 0}>
+ <DockerServicesTable
+ resources={props.model.services}
+ sourceCount={props.model.services.length}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Swarm services"
+ emptyDescription="Docker Swarm services appear here when a Swarm manager reports them."
+ />
+ </Show>
+ <Show when={props.model.tasks.length > 0}>
+ <DockerTasksTable
+ resources={props.model.tasks}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Swarm tasks"
+ emptyDescription="Docker Swarm tasks appear here when a Swarm manager reports task state."
+ />
+ </Show>
+ <Show when={props.model.nodes.length > 0}>
+ <DockerSwarmNodesTable
+ resources={props.model.nodes}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Swarm nodes"
+ emptyDescription="Swarm nodes appear here when a Swarm manager reports cluster membership."
+ />
+ </Show>
+ <Show when={props.model.secrets.length > 0}>
+ <DockerSecretsTable
+ resources={props.model.secrets}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Swarm secrets"
+ emptyDescription="Docker Swarm secrets appear here when a Swarm manager reports secret metadata."
+ />
+ </Show>
+ <Show when={props.model.configs.length > 0}>
+ <DockerConfigsTable
+ resources={props.model.configs}
+ emptyIcon={dockerIcon()}
+ emptyTitle="No Swarm configs"
+ emptyDescription="Docker Swarm configs appear here when a Swarm manager reports config metadata."
+ />
+ </Show>
+ </div>
+ </Show>
+ );
+}
+
function DockerOverview(props: {
hosts: ReturnType<typeof buildDockerPageModel>['hosts'];
hostSourceCount: number;
diff --git a/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts b/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
index 6755a6697c..c96406e3ea 100644
--- a/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
+++ b/frontend-modern/src/features/docker/__tests__/dockerPageModel.test.ts
@@ -6,6 +6,7 @@ import {
buildDockerPageModel,
getDockerHostSystemBadge,
hasDockerSwarmEvidence,
+ resolveDockerPageTabId,
} from '../dockerPageModel';
const makeResource = (resource: Partial<Resource> & Pick<Resource, 'id' | 'type'>): Resource => ({
@@ -69,22 +70,30 @@ describe('dockerPageModel', () => {
);
});
- it('declares bespoke Docker storage and Swarm node tabs', () => {
+ it('declares operator workflow tabs for Docker runtime inventory', () => {
expect(DOCKER_TAB_SPECS.map((tab) => tab.id)).toEqual([
'overview',
'containers',
'images',
- 'volumes',
- 'networks',
'storage',
- 'swarm-nodes',
- 'services',
- 'tasks',
- 'secrets',
- 'configs',
+ 'networks',
+ 'swarm',
]);
});
+ it('keeps legacy Docker object routes mapped to workflow tabs', () => {
+ expect(resolveDockerPageTabId(undefined)).toBe('overview');
+ expect(resolveDockerPageTabId('containers')).toBe('containers');
+ expect(resolveDockerPageTabId('volumes')).toBe('storage');
+ expect(resolveDockerPageTabId('storage')).toBe('storage');
+ expect(resolveDockerPageTabId('services')).toBe('swarm');
+ expect(resolveDockerPageTabId('tasks')).toBe('swarm');
+ expect(resolveDockerPageTabId('swarm-nodes')).toBe('swarm');
+ expect(resolveDockerPageTabId('secrets')).toBe('swarm');
+ expect(resolveDockerPageTabId('configs')).toBe('swarm');
+ expect(resolveDockerPageTabId('unknown')).toBe('overview');
+ });
+
it('excludes non-Docker hosts that share the agent type', () => {
const model = buildDockerPageModel([
makeResource({
diff --git a/frontend-modern/src/features/docker/dockerPageModel.ts b/frontend-modern/src/features/docker/dockerPageModel.ts
index 683f035c59..565aee30bd 100644
--- a/frontend-modern/src/features/docker/dockerPageModel.ts
+++ b/frontend-modern/src/features/docker/dockerPageModel.ts
@@ -20,14 +20,9 @@ export type DockerPageTabId =
| 'overview'
| 'containers'
| 'images'
- | 'volumes'
- | 'networks'
| 'storage'
- | 'swarm-nodes'
- | 'services'
- | 'tasks'
- | 'secrets'
- | 'configs';
+ | 'networks'
+ | 'swarm';
export const DOCKER_TAB_SPECS: readonly {
id: DockerPageTabId;
@@ -37,18 +32,30 @@ export const DOCKER_TAB_SPECS: readonly {
{ id: 'overview', label: 'Overview', path: '/docker/overview' },
{ id: 'containers', label: 'Containers', path: '/docker/containers' },
{ id: 'images', label: 'Images', path: '/docker/images' },
- { id: 'volumes', label: 'Volumes', path: '/docker/volumes' },
- { id: 'networks', label: 'Networks', path: '/docker/networks' },
{ id: 'storage', label: 'Storage', path: '/docker/storage' },
- { id: 'swarm-nodes', label: 'Swarm Nodes', path: '/docker/swarm-nodes' },
- { id: 'services', label: 'Services', path: '/docker/services' },
- { id: 'tasks', label: 'Tasks', path: '/docker/tasks' },
- { id: 'secrets', label: 'Secrets', path: '/docker/secrets' },
- { id: 'configs', label: 'Configs', path: '/docker/configs' },
+ { id: 'networks', label: 'Networks', path: '/docker/networks' },
+ { id: 'swarm', label: 'Swarm', path: '/docker/swarm' },
] as const;
const asTrimmedString = (value: unknown): string => (typeof value === 'string' ? value.trim() : '');
+const DOCKER_ROUTE_TAB_ALIASES: Record<string, DockerPageTabId> = {
+ configs: 'swarm',
+ secrets: 'swarm',
+ services: 'swarm',
+ 'swarm-nodes': 'swarm',
+ tasks: 'swarm',
+ volumes: 'storage',
+};
+
+export const resolveDockerPageTabId = (segment: string | undefined): DockerPageTabId => {
+ const normalized = asTrimmedString(segment).toLowerCase();
+ if (!normalized) return 'overview';
+ const direct = DOCKER_TAB_SPECS.find((tab) => tab.id === normalized);
+ if (direct) return direct.id;
+ return DOCKER_ROUTE_TAB_ALIASES[normalized] ?? 'overview';
+};
+
const isDockerPlatform = (resource: Resource): boolean =>
resolveResourcePlatformType(resource) === 'docker';
diff --git a/frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx b/frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx
index 90d8d3323c..200f4dcedf 100644
--- a/frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx
+++ b/frontend-modern/src/features/kubernetes/KubernetesPageSurface.tsx
@@ -24,6 +24,7 @@ import { KubernetesStorageTable } from './KubernetesStorageTable';
import {
KUBERNETES_TAB_SPECS,
buildKubernetesPageModel,
+ resolveKubernetesPageTabId,
type KubernetesPageModel,
type KubernetesPageTabId,
} from './kubernetesPageModel';
@@ -34,7 +35,6 @@ import {
// those tagged kubernetes.
const KUBERNETES_RESOURCE_QUERY =
'type=k8s-cluster,k8s-node,pod,k8s-deployment,k8s-replicaset,k8s-namespace,k8s-service,k8s-statefulset,k8s-daemonset,k8s-job,k8s-cronjob,k8s-ingress,k8s-endpoint-slice,k8s-network-policy,k8s-persistent-volume,k8s-persistent-volume-claim,k8s-storage-class,k8s-configmap,k8s-secret,k8s-serviceaccount,k8s-resource-quota,k8s-limit-range,k8s-pod-disruption-budget,k8s-horizontal-pod-autoscaler,k8s-event,agent';
-const VALID_TABS = new Set<KubernetesPageTabId>(KUBERNETES_TAB_SPECS.map((tab) => tab.id));
const k8sIcon = () => <ShipWheelIcon class="h-6 w-6 text-slate-400" />;
@@ -47,10 +47,7 @@ export function KubernetesPageSurface() {
});
const activeTab = createMemo<KubernetesPageTabId>(() => {
const segment = location.pathname.split('/').filter(Boolean)[1];
- if (segment === 'workloads') return 'pods';
- return segment && VALID_TABS.has(segment as KubernetesPageTabId)
- ? (segment as KubernetesPageTabId)
- : 'overview';
+ return resolveKubernetesPageTabId(segment);
});
const model = createMemo(() => buildKubernetesPageModel(resources()));
const controllerResources = createMemo(() => getKubernetesControllerResources(model()));
@@ -103,37 +100,11 @@ export function KubernetesPageSurface() {
emptyDescription="Kubernetes nodes appear here as soon as the agent enumerates Node resources."
/>
</Show>
- <Show when={activeTab() === 'pods'}>
- <KubernetesPodsTable
- resources={model().pods}
- emptyIcon={k8sIcon()}
- emptyTitle="No pods reported"
- emptyDescription="Pods appear here once the agent can read Pod resources."
- />
- </Show>
- <Show when={activeTab() === 'deployments'}>
- <KubernetesDeploymentsTable
- resources={model().deployments}
- emptyIcon={k8sIcon()}
- emptyTitle="No deployments reported"
- emptyDescription="Deployments appear here once the agent can read Deployment resources."
- />
- </Show>
- <Show when={activeTab() === 'controllers'}>
- <KubernetesControllersTable
- resources={controllerResources()}
- emptyIcon={k8sIcon()}
- emptyTitle="No workload controllers reported"
- emptyDescription="StatefulSets, DaemonSets, Jobs, and CronJobs appear here when the agent reports them."
- />
+ <Show when={activeTab() === 'workloads'}>
+ <KubernetesWorkloads model={model()} controllers={controllerResources()} />
</Show>
<Show when={activeTab() === 'services'}>
- <KubernetesServicesTable
- resources={model().services}
- emptyIcon={k8sIcon()}
- emptyTitle="No services reported"
- emptyDescription="Services appear here once the agent can read Service resources."
- />
+ <KubernetesServices model={model()} />
</Show>
<Show when={activeTab() === 'storage'}>
<KubernetesStorageTable
@@ -143,37 +114,8 @@ export function KubernetesPageSurface() {
emptyDescription="StorageClasses, persistent volumes, and claims appear here once the agent can read storage inventory."
/>
</Show>
- <Show when={activeTab() === 'networking'}>
- <KubernetesNetworkingTable
- resources={model().networking}
- emptyIcon={k8sIcon()}
- emptyTitle="No networking resources reported"
- emptyDescription="Services, ingresses, and endpoint slices appear here once the agent can read networking inventory."
- />
- </Show>
- <Show when={activeTab() === 'config'}>
- <KubernetesConfigTable
- resources={model().config}
- emptyIcon={k8sIcon()}
- emptyTitle="No config resources reported"
- emptyDescription="Namespaces, ConfigMaps, Secrets, and ServiceAccounts appear here once the agent can read cluster configuration inventory."
- />
- </Show>
- <Show when={activeTab() === 'policy'}>
- <KubernetesPolicyTable
- resources={model().policy}
- emptyIcon={k8sIcon()}
- emptyTitle="No policy resources reported"
- emptyDescription="NetworkPolicies, PodDisruptionBudgets, ResourceQuotas, and LimitRanges appear here once the agent can read policy inventory."
- />
- </Show>
- <Show when={activeTab() === 'autoscaling'}>
- <KubernetesAutoscalingTable
- resources={model().autoscaling}
- emptyIcon={k8sIcon()}
- emptyTitle="No autoscaling resources reported"
- emptyDescription="HorizontalPodAutoscalers appear here once the agent can read autoscaling inventory."
- />
+ <Show when={activeTab() === 'configuration'}>
+ <KubernetesConfiguration model={model()} />
</Show>
<Show when={activeTab() === 'events'}>
<KubernetesEventsTable
@@ -202,6 +144,140 @@ const getKubernetesControllerResources = (model: KubernetesPageModel): Resource[
...model.cronJobs,
];
+function KubernetesWorkloads(props: { model: KubernetesPageModel; controllers: Resource[] }) {
+ const hasWorkloadInventory = createMemo(
+ () =>
+ props.model.pods.length > 0 ||
+ props.model.deployments.length > 0 ||
+ props.controllers.length > 0 ||
+ props.model.autoscaling.length > 0,
+ );
+
+ return (
+ <Show
+ when={hasWorkloadInventory()}
+ fallback={
+ <PlatformTableEmptyState
+ icon={k8sIcon()}
+ title="No workload resources reported"
+ description="Pods, Deployments, workload controllers, and HorizontalPodAutoscalers appear here once the agent can read them."
+ />
+ }
+ >
+ <div class="space-y-4">
+ <Show when={props.model.deployments.length > 0}>
+ <KubernetesDeploymentsTable
+ resources={props.model.deployments}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No deployments reported"
+ emptyDescription="Deployments appear here once the agent can read Deployment resources."
+ />
+ </Show>
+ <Show when={props.model.pods.length > 0}>
+ <KubernetesPodsTable
+ resources={props.model.pods}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No pods reported"
+ emptyDescription="Pods appear here once the agent can read Pod resources."
+ />
+ </Show>
+ <Show when={props.controllers.length > 0}>
+ <KubernetesControllersTable
+ resources={props.controllers}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No workload controllers reported"
+ emptyDescription="StatefulSets, DaemonSets, Jobs, and CronJobs appear here when the agent reports them."
+ />
+ </Show>
+ <Show when={props.model.autoscaling.length > 0}>
+ <KubernetesAutoscalingTable
+ resources={props.model.autoscaling}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No autoscaling resources reported"
+ emptyDescription="HorizontalPodAutoscalers appear here once the agent can read autoscaling inventory."
+ />
+ </Show>
+ </div>
+ </Show>
+ );
+}
+
+function KubernetesServices(props: { model: KubernetesPageModel }) {
+ const hasServiceInventory = createMemo(
+ () => props.model.services.length > 0 || props.model.serviceNetworking.length > 0,
+ );
+
+ return (
+ <Show
+ when={hasServiceInventory()}
+ fallback={
+ <PlatformTableEmptyState
+ icon={k8sIcon()}
+ title="No service or networking resources reported"
+ description="Services, ingresses, and endpoint slices appear here once the agent can read cluster traffic resources."
+ />
+ }
+ >
+ <div class="space-y-4">
+ <Show when={props.model.services.length > 0}>
+ <KubernetesServicesTable
+ resources={props.model.services}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No services reported"
+ emptyDescription="Services appear here once the agent can read Service resources."
+ />
+ </Show>
+ <Show when={props.model.serviceNetworking.length > 0}>
+ <KubernetesNetworkingTable
+ resources={props.model.serviceNetworking}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No ingress or endpoint resources reported"
+ emptyDescription="Ingresses and endpoint slices appear here once the agent can read networking inventory."
+ />
+ </Show>
+ </div>
+ </Show>
+ );
+}
+
+function KubernetesConfiguration(props: { model: KubernetesPageModel }) {
+ const hasConfigurationInventory = createMemo(
+ () => props.model.config.length > 0 || props.model.policy.length > 0,
+ );
+
+ return (
+ <Show
+ when={hasConfigurationInventory()}
+ fallback={
+ <PlatformTableEmptyState
+ icon={k8sIcon()}
+ title="No configuration or policy resources reported"
+ description="Namespaces, ConfigMaps, Secrets, ServiceAccounts, policies, quotas, and limits appear here once the agent can read them."
+ />
+ }
+ >
+ <div class="space-y-4">
+ <Show when={props.model.config.length > 0}>
+ <KubernetesConfigTable
+ resources={props.model.config}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No config resources reported"
+ emptyDescription="Namespaces, ConfigMaps, Secrets, and ServiceAccounts appear here once the agent can read cluster configuration inventory."
+ />
+ </Show>
+ <Show when={props.model.policy.length > 0}>
+ <KubernetesPolicyTable
+ resources={props.model.policy}
+ emptyIcon={k8sIcon()}
+ emptyTitle="No policy resources reported"
+ emptyDescription="NetworkPolicies, PodDisruptionBudgets, ResourceQuotas, and LimitRanges appear here once the agent can read policy inventory."
+ />
+ </Show>
+ </div>
+ </Show>
+ );
+}
+
function KubernetesOverview(props: KubernetesOverviewProps) {
return (
<div class="space-y-4">
diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
index e1b100e6ec..3675080217 100644
--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
@@ -145,7 +145,7 @@ describe('KubernetesPageSurface contract', () => {
vi.clearAllMocks();
});
- it('declares Pods, Deployments, and Controllers as API-native workload tabs', () => {
+ it('declares workflow tabs while querying API-native Kubernetes resources', () => {
setResources([
makeResource({ id: 'cluster-1', type: 'k8s-cluster' }),
makeResource({ id: 'pod-1', type: 'pod' }),
@@ -172,78 +172,89 @@ describe('KubernetesPageSurface contract', () => {
);
expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute(
'data-tabs',
- 'overview,nodes,pods,deployments,controllers,services,storage,networking,config,policy,autoscaling,events',
- );
- expect(screen.getByTestId('platform-section-tabs').getAttribute('data-tabs')).not.toContain(
- 'workloads',
+ 'overview,nodes,workloads,services,storage,configuration,events',
);
+ expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute('data-active', 'overview');
expect(screen.getByTestId('pods-table')).toHaveAttribute('data-rows', '1');
expect(screen.getByTestId('deployments-table')).toHaveAttribute('data-rows', '1');
expect(screen.getByTestId('controllers-table')).toHaveAttribute('data-rows', '1');
});
- it('renders Kubernetes pods through the pod-native table', () => {
- mockPathname.mockReturnValue('/kubernetes/pods');
- setResources([makeResource({ id: 'checkout-api', type: 'pod' })]);
-
- renderSurface();
-
- expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute('data-active', 'pods');
- expect(screen.getByTestId('pods-table')).toHaveAttribute('data-rows', '1');
- expect(screen.queryByTestId('deployments-table')).not.toBeInTheDocument();
- });
-
- it('maps the legacy Kubernetes workloads route to the pod-native tab', () => {
+ it('groups workload API tables under the Workloads tab', () => {
mockPathname.mockReturnValue('/kubernetes/workloads');
- setResources([makeResource({ id: 'checkout-api', type: 'pod' })]);
+ setResources([
+ makeResource({ id: 'checkout-api', type: 'pod' }),
+ makeResource({ id: 'checkout-deployment', type: 'k8s-deployment' }),
+ makeResource({ id: 'checkout-stateful', type: 'k8s-statefulset' }),
+ makeResource({ id: 'checkout-hpa', type: 'k8s-horizontal-pod-autoscaler' }),
+ ]);
renderSurface();
- expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute('data-active', 'pods');
+ expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute('data-active', 'workloads');
expect(screen.getByTestId('pods-table')).toHaveAttribute('data-rows', '1');
+ expect(screen.getByTestId('deployments-table')).toHaveAttribute('data-rows', '1');
+ expect(screen.getByTestId('controllers-table')).toHaveAttribute('data-rows', '1');
+ expect(screen.getByTestId('autoscaling-table')).toHaveAttribute('data-rows', '1');
});
- it('renders Kubernetes deployments through the deployment-native table', () => {
- mockPathname.mockReturnValue('/kubernetes/deployments');
- setResources([makeResource({ id: 'checkout-api', type: 'k8s-deployment' })]);
+ it('groups Services, ingress, and endpoints under the Services tab without duplicating services in networking', () => {
+ mockPathname.mockReturnValue('/kubernetes/services');
+ setResources([
+ makeResource({ id: 'checkout-service', type: 'k8s-service' }),
+ makeResource({ id: 'checkout-ingress', type: 'k8s-ingress' }),
+ makeResource({ id: 'checkout-endpoints', type: 'k8s-endpoint-slice' }),
+ ]);
renderSurface();
- expect(screen.getByTestId('deployments-table')).toHaveAttribute('data-rows', '1');
- expect(screen.queryByTestId('pods-table')).not.toBeInTheDocument();
+ expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute('data-active', 'services');
+ expect(screen.getByTestId('services-table')).toHaveAttribute('data-rows', '1');
+ expect(screen.getByTestId('networking-table')).toHaveAttribute('data-rows', '2');
});
- it('renders Kubernetes workload controllers through the controller-native table', () => {
- mockPathname.mockReturnValue('/kubernetes/controllers');
+ it('groups config and policy API tables under the Configuration tab', () => {
+ mockPathname.mockReturnValue('/kubernetes/configuration');
setResources([
- makeResource({ id: 'checkout-stateful', type: 'k8s-statefulset' }),
- makeResource({ id: 'node-exporter', type: 'k8s-daemonset' }),
- makeResource({ id: 'nightly-import', type: 'k8s-job' }),
- makeResource({ id: 'billing-rollup', type: 'k8s-cronjob' }),
- makeResource({ id: 'deployment-1', type: 'k8s-deployment' }),
+ makeResource({ id: 'checkout-config', type: 'k8s-configmap' }),
+ makeResource({ id: 'checkout-policy', type: 'k8s-network-policy' }),
]);
renderSurface();
- expect(screen.getByTestId('controllers-table')).toHaveAttribute('data-rows', '4');
- expect(screen.queryByTestId('deployments-table')).not.toBeInTheDocument();
+ expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute(
+ 'data-active',
+ 'configuration',
+ );
+ expect(screen.getByTestId('config-table')).toHaveAttribute('data-rows', '1');
+ expect(screen.getByTestId('policy-table')).toHaveAttribute('data-rows', '1');
});
it.each([
- ['/kubernetes/nodes', 'k8s-node', 'nodes-table'],
- ['/kubernetes/services', 'k8s-service', 'services-table'],
- ['/kubernetes/storage', 'k8s-storage-class', 'storage-table'],
- ['/kubernetes/networking', 'k8s-ingress', 'networking-table'],
- ['/kubernetes/config', 'k8s-configmap', 'config-table'],
- ['/kubernetes/policy', 'k8s-network-policy', 'policy-table'],
- ['/kubernetes/autoscaling', 'k8s-horizontal-pod-autoscaler', 'autoscaling-table'],
- ['/kubernetes/events', 'k8s-event', 'events-table'],
- ] as const)('renders %s through its API-native table', (path, type, testId) => {
- mockPathname.mockReturnValue(path);
- setResources([makeResource({ id: `${type}-1`, type })]);
-
- renderSurface();
-
- expect(screen.getByTestId(testId)).toHaveAttribute('data-rows', '1');
- });
+ ['/kubernetes/nodes', 'k8s-node', 'nodes', 'nodes-table'],
+ ['/kubernetes/pods', 'pod', 'workloads', 'pods-table'],
+ ['/kubernetes/deployments', 'k8s-deployment', 'workloads', 'deployments-table'],
+ ['/kubernetes/controllers', 'k8s-statefulset', 'workloads', 'controllers-table'],
+ ['/kubernetes/autoscaling', 'k8s-horizontal-pod-autoscaler', 'workloads', 'autoscaling-table'],
+ ['/kubernetes/services', 'k8s-service', 'services', 'services-table'],
+ ['/kubernetes/networking', 'k8s-ingress', 'services', 'networking-table'],
+ ['/kubernetes/storage', 'k8s-storage-class', 'storage', 'storage-table'],
+ ['/kubernetes/config', 'k8s-configmap', 'configuration', 'config-table'],
+ ['/kubernetes/policy', 'k8s-network-policy', 'configuration', 'policy-table'],
+ ['/kubernetes/events', 'k8s-event', 'events', 'events-table'],
+ ] as const)(
+ 'maps %s to the %s workflow and renders its API-native table',
+ (path, type, expectedActive, testId) => {
+ mockPathname.mockReturnValue(path);
+ setResources([makeResource({ id: `${type}-1`, type })]);
+
+ renderSurface();
+
+ expect(screen.getByTestId('platform-section-tabs')).toHaveAttribute(
+ 'data-active',
+ expectedActive,
+ );
+ expect(screen.getByTestId(testId)).toHaveAttribute('data-rows', '1');
+ },
+ );
});
diff --git a/frontend-modern/src/features/kubernetes/__tests__/kubernetesPageModel.test.ts b/frontend-modern/src/features/kubernetes/__tests__/kubernetesPageModel.test.ts
index 181c92ece4..fa2c3d85d9 100644
--- a/frontend-modern/src/features/kubernetes/__tests__/kubernetesPageModel.test.ts
+++ b/frontend-modern/src/features/kubernetes/__tests__/kubernetesPageModel.test.ts
@@ -1,6 +1,10 @@
import { describe, expect, it } from 'vitest';
import type { Resource } from '@/types/resource';
-import { KUBERNETES_TAB_SPECS, buildKubernetesPageModel } from '../kubernetesPageModel';
+import {
+ KUBERNETES_TAB_SPECS,
+ buildKubernetesPageModel,
+ resolveKubernetesPageTabId,
+} from '../kubernetesPageModel';
const makeResource = (resource: Partial<Resource> & Pick<Resource, 'id' | 'type'>): Resource => ({
name: resource.id,
@@ -15,23 +19,31 @@ const makeResource = (resource: Partial<Resource> & Pick<Resource, 'id' | 'type'
});
describe('kubernetesPageModel', () => {
- it('declares API-native Kubernetes sections', () => {
+ it('declares operator workflow tabs for Kubernetes inventory', () => {
expect(KUBERNETES_TAB_SPECS.map((tab) => tab.id)).toEqual([
'overview',
'nodes',
- 'pods',
- 'deployments',
- 'controllers',
+ 'workloads',
'services',
'storage',
- 'networking',
- 'config',
- 'policy',
- 'autoscaling',
+ 'configuration',
'events',
]);
});
+ it('keeps legacy Kubernetes object routes mapped to workflow tabs', () => {
+ expect(resolveKubernetesPageTabId(undefined)).toBe('overview');
+ expect(resolveKubernetesPageTabId('nodes')).toBe('nodes');
+ expect(resolveKubernetesPageTabId('pods')).toBe('workloads');
+ expect(resolveKubernetesPageTabId('deployments')).toBe('workloads');
+ expect(resolveKubernetesPageTabId('controllers')).toBe('workloads');
+ expect(resolveKubernetesPageTabId('autoscaling')).toBe('workloads');
+ expect(resolveKubernetesPageTabId('networking')).toBe('services');
+ expect(resolveKubernetesPageTabId('config')).toBe('configuration');
+ expect(resolveKubernetesPageTabId('policy')).toBe('configuration');
+ expect(resolveKubernetesPageTabId('unknown')).toBe('overview');
+ });
+
it('buckets clusters, nodes, workloads, services, storage, networking, config, policy, autoscaling, and events', () => {
const model = buildKubernetesPageModel([
makeResource({ id: 'cluster-1', type: 'k8s-cluster' }),
@@ -92,6 +104,7 @@ describe('kubernetesPageModel', () => {
);
expect(model.storage.map((r) => r.id).sort()).toEqual(['pv-1', 'pvc-1', 'sc-1']);
expect(model.networking.map((r) => r.id).sort()).toEqual(['eps-1', 'ing-1', 'svc-1'].sort());
+ expect(model.serviceNetworking.map((r) => r.id).sort()).toEqual(['eps-1', 'ing-1']);
expect(model.config.map((r) => r.id).sort()).toEqual(
['cm-1', 'ns-1', 'sa-1', 'secret-1'].sort(),
);
diff --git a/frontend-modern/src/features/kubernetes/kubernetesPageModel.ts b/frontend-modern/src/features/kubernetes/kubernetesPageModel.ts
index 3e4c4be959..a45fafc889 100644
--- a/frontend-modern/src/features/kubernetes/kubernetesPageModel.ts
+++ b/frontend-modern/src/features/kubernetes/kubernetesPageModel.ts
@@ -4,15 +4,10 @@ import { resolveResourcePlatformType } from '@/utils/sourcePlatforms';
export type KubernetesPageTabId =
| 'overview'
| 'nodes'
- | 'pods'
- | 'deployments'
- | 'controllers'
+ | 'workloads'
| 'services'
| 'storage'
- | 'networking'
- | 'config'
- | 'policy'
- | 'autoscaling'
+ | 'configuration'
| 'events';
export type KubernetesTabSpec = {
@@ -24,18 +19,33 @@ export type KubernetesTabSpec = {
export const KUBERNETES_TAB_SPECS: readonly KubernetesTabSpec[] = [
{ id: 'overview', label: 'Overview', path: '/kubernetes/overview' },
{ id: 'nodes', label: 'Nodes', path: '/kubernetes/nodes' },
- { id: 'pods', label: 'Pods', path: '/kubernetes/pods' },
- { id: 'deployments', label: 'Deployments', path: '/kubernetes/deployments' },
- { id: 'controllers', label: 'Controllers', path: '/kubernetes/controllers' },
+ { id: 'workloads', label: 'Workloads', path: '/kubernetes/workloads' },
{ id: 'services', label: 'Services', path: '/kubernetes/services' },
{ id: 'storage', label: 'Storage', path: '/kubernetes/storage' },
- { id: 'networking', label: 'Networking', path: '/kubernetes/networking' },
- { id: 'config', label: 'Config', path: '/kubernetes/config' },
- { id: 'policy', label: 'Policy', path: '/kubernetes/policy' },
- { id: 'autoscaling', label: 'Autoscaling', path: '/kubernetes/autoscaling' },
+ { id: 'configuration', label: 'Configuration', path: '/kubernetes/configuration' },
{ id: 'events', label: 'Events', path: '/kubernetes/events' },
] as const;
+const asTrimmedString = (value: unknown): string => (typeof value === 'string' ? value.trim() : '');
+
+const KUBERNETES_ROUTE_TAB_ALIASES: Record<string, KubernetesPageTabId> = {
+ autoscaling: 'workloads',
+ config: 'configuration',
+ controllers: 'workloads',
+ deployments: 'workloads',
+ networking: 'services',
+ pods: 'workloads',
+ policy: 'configuration',
+};
+
+export const resolveKubernetesPageTabId = (segment: string | undefined): KubernetesPageTabId => {
+ const normalized = asTrimmedString(segment).toLowerCase();
+ if (!normalized) return 'overview';
+ const direct = KUBERNETES_TAB_SPECS.find((tab) => tab.id === normalized);
+ if (direct) return direct.id;
+ return KUBERNETES_ROUTE_TAB_ALIASES[normalized] ?? 'overview';
+};
+
const KUBERNETES_RESOURCE_TYPES = new Set<ResourceType>([
'k8s-cluster',
'k8s-node',
@@ -109,6 +119,7 @@ export type KubernetesPageModel = {
workloads: Resource[];
storage: Resource[];
networking: Resource[];
+ serviceNetworking: Resource[];
config: Resource[];
policy: Resource[];
autoscaling: Resource[];
@@ -160,6 +171,7 @@ export function buildKubernetesPageModel(resources: Resource[]): KubernetesPageM
];
const storage = [...storageClasses, ...persistentVolumes, ...persistentVolumeClaims];
const networking = [...services, ...ingresses, ...endpointSlices];
+ const serviceNetworking = [...ingresses, ...endpointSlices];
const config = [...namespaces, ...configMaps, ...secrets, ...serviceAccounts];
const policy = [...networkPolicies, ...podDisruptionBudgets, ...resourceQuotas, ...limitRanges];
const autoscaling = [...horizontalPodAutoscalers];
@@ -194,6 +206,7 @@ export function buildKubernetesPageModel(resources: Resource[]): KubernetesPageM
workloads,
storage,
networking,
+ serviceNetworking,
config,
policy,
autoscaling,
diff --git a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
index 7de2c26e4c..461e040cfa 100644
--- a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
+++ b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
@@ -58,9 +58,10 @@ describe('resource link routing contract', () => {
expect(KUBERNETES_PATH).toBe('/kubernetes');
expect(buildKubernetesPath()).toBe('/kubernetes/overview');
+ expect(buildKubernetesPath('workloads')).toBe('/kubernetes/workloads');
+ expect(buildKubernetesPath('services')).toBe('/kubernetes/services');
+ expect(buildKubernetesPath('configuration')).toBe('/kubernetes/configuration');
expect(buildKubernetesPath('pods')).toBe('/kubernetes/pods');
- expect(buildKubernetesPath('deployments')).toBe('/kubernetes/deployments');
- expect(buildKubernetesPath('controllers')).toBe('/kubernetes/controllers');
expect(TRUENAS_PATH).toBe('/truenas');
expect(buildTrueNASPath()).toBe('/truenas/overview');
diff --git a/internal/mock/platform_support_contract_test.go b/internal/mock/platform_support_contract_test.go
index bcef155b07..98990a1ff4 100644
--- a/internal/mock/platform_support_contract_test.go
+++ b/internal/mock/platform_support_contract_test.go
@@ -431,6 +431,15 @@ func assertKubernetesMockCoverage(t *testing.T, graph FixtureGraph) {
storageClassCount := 0
persistentVolumeCount := 0
persistentVolumeClaimCount := 0
+ configMapCount := 0
+ secretCount := 0
+ serviceAccountCount := 0
+ networkPolicyCount := 0
+ resourceQuotaCount := 0
+ limitRangeCount := 0
+ podDisruptionBudgetCount := 0
+ horizontalPodAutoscalerCount := 0
+ eventCount := 0
for _, cluster := range graph.State.KubernetesClusters {
nodeCount += len(cluster.Nodes)
deploymentCount += len(cluster.Deployments)
@@ -445,6 +454,15 @@ func assertKubernetesMockCoverage(t *testing.T, graph FixtureGraph) {
storageClassCount += len(cluster.StorageClasses)
persistentVolumeCount += len(cluster.PersistentVolumes)
persistentVolumeClaimCount += len(cluster.PersistentVolumeClaims)
+ configMapCount += len(cluster.ConfigMaps)
+ secretCount += len(cluster.Secrets)
+ serviceAccountCount += len(cluster.ServiceAccounts)
+ networkPolicyCount += len(cluster.NetworkPolicies)
+ resourceQuotaCount += len(cluster.ResourceQuotas)
+ limitRangeCount += len(cluster.LimitRanges)
+ podDisruptionBudgetCount += len(cluster.PodDisruptionBudgets)
+ horizontalPodAutoscalerCount += len(cluster.HorizontalPodAutoscalers)
+ eventCount += len(cluster.Events)
}
if nodeCount == 0 || deploymentCount == 0 || podCount == 0 {
t.Fatalf(
@@ -479,6 +497,30 @@ func assertKubernetesMockCoverage(t *testing.T, graph FixtureGraph) {
persistentVolumeClaimCount,
)
}
+ if configMapCount == 0 || secretCount == 0 || serviceAccountCount == 0 {
+ t.Fatalf(
+ "expected kubernetes fixtures to include configuration resources; got configMaps=%d secrets=%d serviceAccounts=%d",
+ configMapCount,
+ secretCount,
+ serviceAccountCount,
+ )
+ }
+ if networkPolicyCount == 0 || resourceQuotaCount == 0 || limitRangeCount == 0 || podDisruptionBudgetCount == 0 {
+ t.Fatalf(
+ "expected kubernetes fixtures to include policy resources; got networkPolicies=%d resourceQuotas=%d limitRanges=%d pdbs=%d",
+ networkPolicyCount,
+ resourceQuotaCount,
+ limitRangeCount,
+ podDisruptionBudgetCount,
+ )
+ }
+ if horizontalPodAutoscalerCount == 0 || eventCount == 0 {
+ t.Fatalf(
+ "expected kubernetes fixtures to include autoscaling and event resources; got hpas=%d events=%d",
+ horizontalPodAutoscalerCount,
+ eventCount,
+ )
+ }
}
func assertProxmoxPVEMockCoverage(t *testing.T, graph FixtureGraph) {
diff --git a/tests/integration/tests/68-platform-pages-shell.spec.ts b/tests/integration/tests/68-platform-pages-shell.spec.ts
index 6f7d822d40..f1bb3305f1 100644
--- a/tests/integration/tests/68-platform-pages-shell.spec.ts
+++ b/tests/integration/tests/68-platform-pages-shell.spec.ts
@@ -60,14 +60,20 @@ const PLATFORM_PAGES: readonly PlatformPageCase[] = [
tabPaths: [
'/kubernetes/overview',
'/kubernetes/nodes',
- '/kubernetes/pods',
- '/kubernetes/deployments',
+ '/kubernetes/workloads',
+ '/kubernetes/services',
+ '/kubernetes/storage',
+ '/kubernetes/configuration',
+ '/kubernetes/events',
],
populatedTabPaths: [
'/kubernetes/overview',
'/kubernetes/nodes',
- '/kubernetes/pods',
- '/kubernetes/deployments',
+ '/kubernetes/workloads',
+ '/kubernetes/services',
+ '/kubernetes/storage',
+ '/kubernetes/configuration',
+ '/kubernetes/events',
],
},
{
@@ -108,8 +114,20 @@ const PLATFORM_PAGES: readonly PlatformPageCase[] = [
rootPath: '/vmware',
testId: 'vmware-page',
ariaLabel: 'VMware sections',
- tabPaths: ['/vmware/overview', '/vmware/vms', '/vmware/storage'],
- populatedTabPaths: ['/vmware/overview', '/vmware/vms', '/vmware/storage'],
+ tabPaths: [
+ '/vmware/overview',
+ '/vmware/storage',
+ '/vmware/networks',
+ '/vmware/health',
+ '/vmware/activity',
+ ],
+ populatedTabPaths: [
+ '/vmware/overview',
+ '/vmware/storage',
+ '/vmware/networks',
+ '/vmware/health',
+ '/vmware/activity',
+ ],
},
];
@@ -179,7 +197,7 @@ test.describe('Platform pages shell', () => {
});
}
- test('docker page renders as a single unified surface without sub-tabs', async ({
+ test('docker page renders container runtime workflow tabs', async ({
page,
}, testInfo) => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop shell smoke');
@@ -190,7 +208,20 @@ test.describe('Platform pages shell', () => {
const pageRoot = page.getByTestId('docker-page');
await expect(pageRoot).toBeVisible({ timeout: 30_000 });
- await expect(page.getByRole('navigation', { name: 'Docker sections' })).toHaveCount(0);
+ const sectionNav = page.getByRole('navigation', {
+ name: 'Container runtime sections',
+ });
+ await expect(sectionNav).toBeVisible();
+ for (const tabPath of [
+ '/docker/overview',
+ '/docker/containers',
+ '/docker/images',
+ '/docker/storage',
+ '/docker/networks',
+ '/docker/swarm',
+ ]) {
+ await expect(sectionNav.locator(`a[href="${tabPath}"]`)).toBeVisible();
+ }
});
test('every platform sub-tab exposes v5-style operator controls', async ({
@@ -198,28 +229,35 @@ test.describe('Platform pages shell', () => {
}, testInfo) => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop chrome audit');
- // Every populated sub-tab — embedded canonical Workloads/Storage AND
+ // Every populated inventory tab — embedded canonical Workloads/Storage AND
// UnifiedResourceTable-backed infra views — must render an operator
- // search input under platform-page chrome. The shared
+ // search input under platform-page chrome. Overview stacks are summary
+ // surfaces and intentionally keep their table toolbars suppressed. The shared
// PlatformResourceTable wrapper provides the toolbar for the
// UnifiedResourceTable-backed tabs; the embedded surfaces use their
// own canonical FilterBar via `showFilterToolbar`.
const cases: ReadonlyArray<{ path: string; testId: string }> = [
- { path: '/docker/overview', testId: 'docker-page' },
- { path: '/kubernetes/overview', testId: 'kubernetes-page' },
+ { path: '/docker/containers', testId: 'docker-page' },
+ { path: '/docker/images', testId: 'docker-page' },
+ { path: '/docker/storage', testId: 'docker-page' },
+ { path: '/docker/networks', testId: 'docker-page' },
+ { path: '/docker/swarm', testId: 'docker-page' },
{ path: '/kubernetes/nodes', testId: 'kubernetes-page' },
- { path: '/kubernetes/pods', testId: 'kubernetes-page' },
- { path: '/kubernetes/deployments', testId: 'kubernetes-page' },
- { path: '/truenas/overview', testId: 'truenas-page' },
+ { path: '/kubernetes/workloads', testId: 'kubernetes-page' },
+ { path: '/kubernetes/services', testId: 'kubernetes-page' },
+ { path: '/kubernetes/storage', testId: 'kubernetes-page' },
+ { path: '/kubernetes/configuration', testId: 'kubernetes-page' },
+ { path: '/kubernetes/events', testId: 'kubernetes-page' },
{ path: '/truenas/storage', testId: 'truenas-page' },
{ path: '/truenas/services', testId: 'truenas-page' },
{ path: '/truenas/apps', testId: 'truenas-page' },
{ path: '/truenas/vms', testId: 'truenas-page' },
{ path: '/truenas/shares', testId: 'truenas-page' },
{ path: '/truenas/protection', testId: 'truenas-page' },
- { path: '/vmware/overview', testId: 'vmware-page' },
- { path: '/vmware/vms', testId: 'vmware-page' },
{ path: '/vmware/storage', testId: 'vmware-page' },
+ { path: '/vmware/networks', testId: 'vmware-page' },
+ { path: '/vmware/health', testId: 'vmware-page' },
+ { path: '/vmware/activity', testId: 'vmware-page' },
];
for (const c of cases) {