fix: skipped display, namespace link crash, overview redesign

- Fix skipped count showing empty by rendering as plain text instead
  of StatusLabel with empty status (which renders near-invisible)
- Fix namespace link crash by using Router.createRouteURL to generate
  cluster-prefixed URLs with react-router-dom Link, instead of
  Headlamp's Link component which crashes on plugin-registered routes
- Redesign overview page with PercentageCircle score chart and
  PercentageBar check distribution for a better visual experience

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 14:45:39 -05:00
parent 3784b9b1c8
commit 50caae256d
3 changed files with 29 additions and 24 deletions
+8 -3
View File
@@ -1,5 +1,5 @@
import { Router } from '@kinvolk/headlamp-plugin/lib';
import {
Link,
Loader,
NameValueTable,
SectionBox,
@@ -8,6 +8,7 @@ import {
StatusLabel,
} from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import React from 'react';
import { Link } from 'react-router-dom';
import {
computeScore,
countResultsForItems,
@@ -91,7 +92,11 @@ export default function NamespacesListView() {
{
label: 'Namespace',
getter: (row: NamespaceRow) => (
<Link routeName="polaris-namespace" params={{ namespace: row.namespace }}>
<Link
to={Router.createRouteURL('polaris-namespace', {
namespace: row.namespace,
})}
>
{row.namespace}
</Link>
),
@@ -118,7 +123,7 @@ export default function NamespacesListView() {
},
{
label: 'Skipped',
getter: (row: NamespaceRow) => <StatusLabel status="">{row.skipped}</StatusLabel>,
getter: (row: NamespaceRow) => String(row.skipped),
},
]}
data={rows}