fix: remove all MUI dependencies causing plugin load failure

Replace all @mui/material and @mui/icons-material imports with standard
HTML elements and inline styles. This fixes the browser error:
"TypeError: undefined is not an object (evaluating 'q.createSvgIcon')"

The Headlamp plugin environment doesn't provide the full MUI library,
so plugins must use only Headlamp CommonComponents or standard HTML.

Changes:
- AppBarScoreBadge: Replace Chip and ShieldIcon with button and emoji
- DashboardView: Replace Button and RefreshIcon with button and emoji
- ExemptionManager: Replace all MUI form components with HTML equivalents
- PolarisSettings: Replace Button with HTML button

All tests passing (50/50), TypeScript compilation clean, build successful.

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 22:18:20 -05:00
parent b67f770660
commit 5eaa6603f1
4 changed files with 133 additions and 53 deletions
+12 -5
View File
@@ -4,7 +4,6 @@ import {
StatusLabel,
} from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import { ApiProxy } from '@kinvolk/headlamp-plugin/lib';
import { Button } from '@mui/material';
import React from 'react';
import {
getDashboardUrl,
@@ -124,14 +123,22 @@ export default function PolarisSettings(props: PluginSettingsProps) {
name: 'Connection Test',
value: (
<div>
<Button
variant="contained"
<button
onClick={testConnection}
disabled={testing}
size="small"
style={{
padding: '6px 16px',
backgroundColor: testing ? '#ccc' : '#1976d2',
color: 'white',
border: 'none',
borderRadius: '4px',
cursor: testing ? 'not-allowed' : 'pointer',
fontSize: '13px',
fontWeight: 500,
}}
>
{testing ? 'Testing...' : 'Test Connection'}
</Button>
</button>
{testResult && (
<div style={{ marginTop: '8px' }}>
<StatusLabel status={testResult.success ? 'success' : 'error'}>