Enhance the namespace detail drawer with URL-aware navigation and
keyboard accessibility features.
Changes:
- URL hash support: /polaris/namespaces#alpha opens alpha drawer
- Deep linking: URLs can be bookmarked and shared
- Browser back/forward: Navigate drawer history with browser buttons
- Keyboard navigation: Escape key closes the drawer
- URL synchronization: Hash updates when drawer opens/closes
Technical implementation:
- Use React Router v5 useHistory/useLocation hooks
- Initialize drawer state from location.hash on mount
- Sync drawer state when hash changes (back/forward navigation)
- Update hash when drawer opens/closes via history.push()
- Add global keydown listener for Escape key
Tests:
- Added test for clicking namespace button opens drawer
- Added test for initializing drawer from URL hash
- All 50 tests 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>
Replace the standalone namespace detail route with an inline drawer panel
that slides in from the right when clicking a namespace in the list view.
This provides a more fluid UX without full page navigation.
Changes:
- Namespace detail now opens in a fixed-position right-side panel (600px width)
- Added semi-transparent backdrop that closes the panel when clicked
- Converted namespace links to buttons with proper click handlers
- Removed /polaris/ns/:namespace route and NamespaceDetailView import
- Updated tests to check for buttons instead of links
- Panel includes close button (×) in header
Technical details:
- Uses React state (selectedNamespace) instead of route params
- Panel styled with fixed positioning, z-index layering, and box shadow
- Backdrop at z-index 1100, panel at 1200 to overlay content
- No MUI imports (stays within Headlamp CommonComponents constraint)
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>
The skipped count only reflects checks with Severity=ignore from
the Polaris API. Annotation-based exemptions (e.g.,
polaris.fairwinds.com/*-exempt) are not included because:
1. Exempted checks are completely omitted from results.json
2. The Polaris dashboard UI counts exemptions client-side by
querying Kubernetes resources for annotations
3. Our plugin only has access to the processed audit results
Added HTML title tooltip to explain this limitation to users.
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>
The POLARIS_DASHBOARD_PROXY constant was missing :80, causing
dashboard links in the UI to fail with "no endpoints available".
This matches the fix already applied to POLARIS_API_PATH.
Fixes external dashboard link in namespace detail view.
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>
The removal of :80 in commit 39d85a3 broke service proxy requests.
Kubernetes API requires explicit port specification when services
have named ports. Without it, the API server returns "no endpoints
available" even though endpoints exist.
Root cause: polaris-dashboard service defines port as named
"http-dashboard" on port 80. The proxy sub-resource requires
either :80 or :http-dashboard suffix to resolve correctly.
Fixes the "Polaris dashboard not reachable" error on v0.1.4.
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>
When the proxy URL includes `:80`, Kubernetes checks the RBAC
resourceName as `polaris-dashboard:80` which doesn't match the
Role's resourceNames `["polaris-dashboard"]`. Dropping the port
suffix uses the service's default port and matches the RBAC correctly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix getNamespaces() to skip cluster-scoped resources (Namespace: "")
that caused Router.createRouteURL to throw TypeError on the Namespaces
page. Add Playwright E2E smoke tests with Authentik OIDC auth for CI
and K8s token fallback for local dev. Add Gitea Actions E2E workflow,
vitest unit test infrastructure, and test-utils fixtures.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 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>
Merge Overview and Full Audit into a single dashboard page that always
shows the skipped check count. Fix namespace link 404s by using
Headlamp's Link component (which generates cluster-prefixed URLs)
instead of raw react-router-dom Link. Add vitest unit tests for all
polaris.ts utility functions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Headlamp's sidebar Collapse only opens when an item is selected via
route matching, so 3-level nesting (Polaris > Namespaces > ns) never
expanded. Replace the DynamicSidebarRegistrar with a dedicated
/polaris/namespaces route that shows a table of namespaces with
scores and clickable links to the detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorganize the sidebar into a proper hierarchy (Overview, Full Audit,
Namespaces) and add a Full Audit dashboard view that includes skipped
checks. Namespace routes move to /polaris/ns/:namespace to avoid
path collisions, and namespace detail pages now link out to the
Polaris dashboard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Aligns npm package name with the repo and ArtifactHub package name.
Updates all references: package.json, registerPluginSettings, Dockerfile,
release workflow tarball URLs, artifacthub-pkg.yml archive-url, and README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoid recalculating per-resource counts 3x per table row by precomputing
them into a Map. Add explicit ResultCounts return type to resourceCounts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add drill-down namespace views under the Polaris sidebar entry. Each
namespace gets a sidebar sub-item registered dynamically from audit data,
linking to /polaris/:namespace with a score summary and per-resource table.
Introduces a shared PolarisDataContext so the sidebar registrar and view
components share a single data fetch. Also updates the Artifact Hub
repository ID.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Register plugin settings via registerPluginSettings so the refresh
interval is configurable from Headlamp's plugin config page instead
of being embedded in the main view header.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline-styled divs and native HTML elements with Headlamp's
built-in NameValueTable, StatusLabel, and HeaderLabel components so the
plugin matches the look and feel of native pages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The plugin now fetches audit data from the Polaris dashboard service
via the Kubernetes service proxy instead of reading from a ConfigMap.
This works with the standard Polaris dashboard deployment without
requiring additional configuration.
- Replace ConfigMap.useGet with ApiProxy.request to /results.json
- Compute score from result counts (pass/total) since the API
response doesn't include a pre-computed score
- Update error messages for service proxy context
- Update CLAUDE.md to reflect new data source
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ESLint, Prettier, and TypeScript config files extending the shared
Headlamp plugin configs. Add npm scripts for lint/format. Auto-fix
existing source files. Add CI workflow for PRs and main pushes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sidebar page at /polaris that reads Fairwinds Polaris audit results
from ConfigMap/polaris-dashboard in the polaris namespace. Displays
cluster score, check summary (pass/warning/danger counts), and
cluster info. Caches results with user-configurable refresh interval.
Handles 403, 404, and malformed JSON error states.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>