fix: resolve TypeScript compilation errors and failing tests

- Update registerDetailsViewSection and registerAppBarAction calls to match new Headlamp plugin API (single argument)
- Add SimpleTable mock to DashboardView tests
- Fix all TypeScript compilation errors
- All 50 tests now passing

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
2026-02-11 21:47:32 -05:00
parent a18710ccb1
commit cab2118a88
7 changed files with 73 additions and 36 deletions
+11 -5
View File
@@ -1,4 +1,9 @@
import { NameValueTable, SectionBox, StatusLabel, SimpleTable } from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import {
NameValueTable,
SectionBox,
StatusLabel,
SimpleTable,
} from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import { Link } from 'react-router-dom';
import React from 'react';
import { usePolarisDataContext } from '../api/PolarisDataContext';
@@ -140,9 +145,7 @@ export default function InlineAuditSection({ resource }: InlineAuditSectionProps
{
label: 'Severity',
getter: (f: CheckFailure) => (
<StatusLabel status={getSeverityStatus(f.severity)}>
{f.severity}
</StatusLabel>
<StatusLabel status={getSeverityStatus(f.severity)}>{f.severity}</StatusLabel>
),
},
{ label: 'Message', getter: (f: CheckFailure) => f.message },
@@ -153,7 +156,10 @@ export default function InlineAuditSection({ resource }: InlineAuditSectionProps
)}
<div style={{ marginTop: '16px' }}>
<Link to={`/polaris/namespaces#${namespace}`} style={{ color: 'var(--link-color, #1976d2)' }}>
<Link
to={`/polaris/namespaces#${namespace}`}
style={{ color: 'var(--link-color, #1976d2)' }}
>
View Full Report
</Link>
</div>