Compare commits

..

8 Commits

Author SHA1 Message Date
github-actions[bot] 5188bc289e ci: update artifact hub metadata for v0.3.4 2026-02-12 03:45:07 +00:00
Chris Farhood 33ef816826 chore: bump version to 0.3.4 2026-02-11 22:44:29 -05:00
Chris Farhood ea28ab3a81 Merge pull request #5 from cpfarhood/fix/dark-mode-theme-support
fix: add dark mode support using MUI CSS variables
2026-02-11 22:44:06 -05:00
Chris Farhood 57f0bf6b4b fix: add dark mode support using MUI CSS variables
Replace all hardcoded colors with Headlamp's MUI CSS variables to ensure
proper theme support in both light and dark modes. This fixes the issue
where plugin UI elements had white backgrounds when the site switched to
dark mode.

Changes:
- PolarisSettings: Use theme variables for input, button, text colors
- ExemptionManager: Use theme variables for all buttons and UI elements
- DashboardView: Use theme variables for refresh button
- AppBarScoreBadge: Keep semantic colors (green/orange/red) for status

CSS Variables Used:
- --mui-palette-primary-main: Primary action color
- --mui-palette-primary-contrastText: Text on primary bg
- --mui-palette-background-paper: Card/paper backgrounds
- --mui-palette-text-primary: Primary text color
- --mui-palette-text-secondary: Secondary text color
- --mui-palette-divider: Border/divider colors
- --mui-palette-action-disabled: Disabled text color
- --mui-palette-action-disabledBackground: Disabled bg color
- --mui-palette-error-main: Error/danger actions

All tests passing (50/50), 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>
2026-02-11 22:43:52 -05:00
github-actions[bot] 8dd71772f5 ci: update artifact hub metadata for v0.3.3 2026-02-12 03:41:49 +00:00
Chris Farhood c3b2877c51 chore: bump version to 0.3.3 2026-02-11 22:41:11 -05:00
Chris Farhood 62aa181433 Merge pull request #4 from cpfarhood/fix/plugin-settings-registration
fix: correct plugin settings registration name and add save button
2026-02-11 22:40:45 -05:00
Chris Farhood 2c077907e9 fix: correct plugin settings registration name and add save button
The plugin settings were not showing because the registration name was
incorrect. Changed from 'polaris' to 'headlamp-polaris-plugin' (matching
package.json name) and added displaySaveButton=true parameter.

According to Headlamp plugin API:
registerPluginSettings(name, component, displaySaveButton)

The name must match the plugin name from package.json.

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>
2026-02-11 22:40:34 -05:00
6 changed files with 45 additions and 19 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
version: 0.3.2
version: 0.3.4
name: headlamp-polaris-plugin
displayName: Polaris
createdAt: "2026-02-05T19:00:00Z"
@@ -28,7 +28,7 @@ maintainers:
- name: cpfarhood
email: "chris@farhood.org"
annotations:
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.3.2/headlamp-polaris-plugin-0.3.2.tar.gz"
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.3.4/headlamp-polaris-plugin-0.3.4.tar.gz"
headlamp/plugin/version-compat: ">=0.26"
headlamp/plugin/archive-checksum: sha256:66d51513a6bf73b6f67af10d2dc55dabea7340d551faf3d59a9cd34b232ca868
headlamp/plugin/archive-checksum: sha256:175a7bdedaf6a9329abc9041b505bfa07029e1ae512fc8207301d216e01ce5b1
headlamp/plugin/distro-compat: in-cluster
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "headlamp-polaris-plugin",
"version": "0.3.2",
"version": "0.3.4",
"description": "Headlamp plugin for Fairwinds Polaris audit results",
"scripts": {
"start": "headlamp-plugin start",
+2 -2
View File
@@ -117,8 +117,8 @@ export default function DashboardView() {
style={{
padding: '6px 16px',
backgroundColor: 'transparent',
color: '#1976d2',
border: '1px solid #1976d2',
color: 'var(--mui-palette-primary-main, #1976d2)',
border: '1px solid var(--mui-palette-primary-main, #1976d2)',
borderRadius: '4px',
cursor: 'pointer',
fontSize: '13px',
+22 -8
View File
@@ -149,8 +149,8 @@ export default function ExemptionManager({
<button
style={{
padding: '4px 12px',
backgroundColor: '#f44336',
color: 'white',
backgroundColor: 'var(--mui-palette-error-main, #f44336)',
color: 'var(--mui-palette-error-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
@@ -176,10 +176,19 @@ export default function ExemptionManager({
style={{
marginTop: '8px',
padding: '6px 16px',
backgroundColor: failingChecks.length === 0 ? '#ccc' : 'transparent',
color: failingChecks.length === 0 ? '#999' : '#1976d2',
backgroundColor:
failingChecks.length === 0
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'transparent',
color:
failingChecks.length === 0
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-main, #1976d2)',
border: '1px solid',
borderColor: failingChecks.length === 0 ? '#ccc' : '#1976d2',
borderColor:
failingChecks.length === 0
? 'var(--mui-palette-divider, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
borderRadius: '4px',
cursor: failingChecks.length === 0 ? 'not-allowed' : 'pointer',
fontSize: '13px',
@@ -237,7 +246,7 @@ export default function ExemptionManager({
style={{
padding: '6px 16px',
backgroundColor: 'transparent',
color: '#1976d2',
color: 'var(--mui-palette-primary-main, #1976d2)',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
@@ -252,8 +261,13 @@ export default function ExemptionManager({
style={{
padding: '6px 16px',
backgroundColor:
applying || (!exemptAll && selectedChecks.size === 0) ? '#ccc' : '#1976d2',
color: 'white',
applying || (!exemptAll && selectedChecks.size === 0)
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
color:
applying || (!exemptAll && selectedChecks.size === 0)
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor:
+16 -4
View File
@@ -105,12 +105,20 @@ export default function PolarisSettings(props: PluginSettingsProps) {
style={{
width: '100%',
padding: '4px 8px',
border: '1px solid #ccc',
border: '1px solid var(--mui-palette-divider, #e0e0e0)',
borderRadius: '4px',
fontSize: '14px',
backgroundColor: 'var(--mui-palette-background-paper, #fff)',
color: 'var(--mui-palette-text-primary, #000)',
}}
/>
<div style={{ fontSize: '12px', color: '#666', marginTop: '4px' }}>
<div
style={{
fontSize: '12px',
color: 'var(--mui-palette-text-secondary, #666)',
marginTop: '4px',
}}
>
Examples:
<br /> K8s proxy:{' '}
<code>/api/v1/namespaces/polaris/services/polaris-dashboard:80/proxy/</code>
@@ -128,8 +136,12 @@ export default function PolarisSettings(props: PluginSettingsProps) {
disabled={testing}
style={{
padding: '6px 16px',
backgroundColor: testing ? '#ccc' : '#1976d2',
color: 'white',
backgroundColor: testing
? 'var(--mui-palette-action-disabledBackground, #e0e0e0)'
: 'var(--mui-palette-primary-main, #1976d2)',
color: testing
? 'var(--mui-palette-action-disabled, #9e9e9e)'
: 'var(--mui-palette-primary-contrastText, #fff)',
border: 'none',
borderRadius: '4px',
cursor: testing ? 'not-allowed' : 'pointer',
+1 -1
View File
@@ -66,7 +66,7 @@ registerRoute({
});
// Register plugin settings
registerPluginSettings('polaris', PolarisSettings);
registerPluginSettings('headlamp-polaris-plugin', PolarisSettings, true);
// Register details view section for supported controller types
registerDetailsViewSection(({ resource }) => {