diff --git a/src/components/AppBarScoreBadge.tsx b/src/components/AppBarScoreBadge.tsx
index 9419351..85fe7eb 100644
--- a/src/components/AppBarScoreBadge.tsx
+++ b/src/components/AppBarScoreBadge.tsx
@@ -1,5 +1,3 @@
-import { Chip } from '@mui/material';
-import { Shield as ShieldIcon } from '@mui/icons-material';
import React from 'react';
import { useHistory } from 'react-router-dom';
import { usePolarisDataContext } from '../api/PolarisDataContext';
@@ -21,10 +19,10 @@ export default function AppBarScoreBadge() {
const score = computeScore(counts);
// Color based on score
- const getColor = (score: number): 'success' | 'warning' | 'error' => {
- if (score >= 80) return 'success';
- if (score >= 50) return 'warning';
- return 'error';
+ const getColor = (score: number): string => {
+ if (score >= 80) return '#4caf50'; // green
+ if (score >= 50) return '#ff9800'; // orange
+ return '#f44336'; // red
};
const handleClick = () => {
@@ -32,13 +30,26 @@ export default function AppBarScoreBadge() {
};
return (
- }
- label={`Polaris: ${score}%`}
- color={getColor(score)}
- size="small"
+
+ style={{
+ cursor: 'pointer',
+ marginRight: '8px',
+ padding: '4px 12px',
+ borderRadius: '16px',
+ border: 'none',
+ backgroundColor: getColor(score),
+ color: 'white',
+ fontSize: '13px',
+ fontWeight: 500,
+ display: 'inline-flex',
+ alignItems: 'center',
+ gap: '4px',
+ }}
+ aria-label={`Polaris cluster score: ${score}%`}
+ >
+ 🛡️
+ Polaris: {score}%
+
);
}
diff --git a/src/components/DashboardView.tsx b/src/components/DashboardView.tsx
index 9379373..5f358d4 100644
--- a/src/components/DashboardView.tsx
+++ b/src/components/DashboardView.tsx
@@ -8,8 +8,6 @@ import {
SimpleTable,
StatusLabel,
} from '@kinvolk/headlamp-plugin/lib/CommonComponents';
-import { Button } from '@mui/material';
-import { Refresh as RefreshIcon } from '@mui/icons-material';
import React from 'react';
import { AuditData, computeScore, countResults, ResultCounts } from '../api/polaris';
import { usePolarisDataContext } from '../api/PolarisDataContext';
@@ -114,9 +112,25 @@ export default function DashboardView() {
Last updated: {formatAuditTime(data.AuditTime)}
- } onClick={refresh} size="small">
- Refresh
-
+
)}
diff --git a/src/components/ExemptionManager.tsx b/src/components/ExemptionManager.tsx
index c9641b4..20bb4c9 100644
--- a/src/components/ExemptionManager.tsx
+++ b/src/components/ExemptionManager.tsx
@@ -1,6 +1,5 @@
import { NameValueTable, SectionBox, Dialog } from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import { ApiProxy } from '@kinvolk/headlamp-plugin/lib';
-import { Button, Checkbox, FormControlLabel, FormGroup } from '@mui/material';
import React from 'react';
import { Result } from '../api/polaris';
import { getCheckName } from '../api/checkMapping';
@@ -147,16 +146,23 @@ export default function ExemptionManager({
rows={currentExemptions.map(exemption => ({
name: exemption,
value: (
-
+
),
}))}
/>
@@ -164,58 +170,100 @@ export default function ExemptionManager({
No exemptions configured
)}
-
+
diff --git a/src/components/PolarisSettings.tsx b/src/components/PolarisSettings.tsx
index d91e82c..533eaae 100644
--- a/src/components/PolarisSettings.tsx
+++ b/src/components/PolarisSettings.tsx
@@ -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: (
-
+
{testResult && (