@skyhook-io/k8s-ui 1.7.15 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/package.json +2 -1
  2. package/src/components/applications/ApplicationsList.tsx +131 -115
  3. package/src/components/applications/index.ts +3 -1
  4. package/src/components/audit/AuditCard.tsx +1 -1
  5. package/src/components/charts/AreaChart.tsx +52 -18
  6. package/src/components/charts/MetricsSummary.tsx +12 -3
  7. package/src/components/charts/saturation.test.ts +34 -0
  8. package/src/components/charts/saturation.ts +1 -0
  9. package/src/components/charts/types.ts +5 -4
  10. package/src/components/checks/ChecksView.tsx +12 -23
  11. package/src/components/checks/severity.ts +11 -11
  12. package/src/components/gitops/GitOpsTableView.tsx +298 -274
  13. package/src/components/issues/severity.ts +19 -11
  14. package/src/components/resources/ResourcesSidebar.tsx +3 -1
  15. package/src/components/resources/ResourcesView.tsx +13 -0
  16. package/src/components/resources/index.ts +1 -0
  17. package/src/components/resources/renderers/HPARenderer.test.tsx +91 -0
  18. package/src/components/resources/renderers/HPARenderer.tsx +93 -86
  19. package/src/components/resources/renderers/WorkloadRenderer.test.tsx +83 -0
  20. package/src/components/resources/renderers/WorkloadRenderer.tsx +73 -4
  21. package/src/components/resources/resource-utils-hpa.test.ts +30 -0
  22. package/src/components/resources/resource-utils-hpa.ts +106 -0
  23. package/src/components/resources/resource-utils.ts +2 -10
  24. package/src/components/shared/ResourceRendererDispatch.tsx +10 -2
  25. package/src/components/ui/DistributionBar.tsx +88 -0
  26. package/src/components/ui/Facet.tsx +130 -0
  27. package/src/components/ui/PageHeader.tsx +43 -0
  28. package/src/components/ui/SearchPillInput.tsx +237 -0
  29. package/src/components/ui/SortableTh.tsx +58 -0
  30. package/src/components/ui/SummaryTile.tsx +60 -0
  31. package/src/components/ui/drawer-components.tsx +56 -17
  32. package/src/components/ui/index.ts +12 -0
  33. package/src/components/workload/WorkloadView.tsx +18 -1
  34. package/src/theme/tailwind-theme.css +1 -0
  35. package/src/theme/variables.css +7 -3
  36. package/src/types/core.ts +54 -2
  37. package/src/utils/rbac-blast-radius.test.ts +48 -3
  38. package/src/utils/rbac-blast-radius.ts +14 -4
  39. package/tsconfig.json +1 -0
@@ -1,12 +1,9 @@
1
1
  import type { CheckSeverity } from './types'
2
+ import { BADGE_SEVERITY_COLORS as sev } from '../ui/Badge'
2
3
 
3
- // The visual language for the 4-tier Checks severity ladder. Pale-pastel tints
4
- // with hand-rolled dark variants (no theme token covers these). One hue per
5
- // tier: red=critical, orange=high, amber=medium, slate=low read the queue's
6
- // left rail top-to-bottom and severity is obvious without reading a word.
7
- //
8
- // Class strings are literal so each consuming app's Tailwind @source scan emits
9
- // them.
4
+ // The visual language for the 4-tier Checks severity ladder. One hue per tier:
5
+ // red=critical, orange=high, amber=medium, neutral=low read the queue's left
6
+ // rail top-to-bottom and severity is obvious without reading a word.
10
7
 
11
8
  export const SEVERITY_LABEL: Record<CheckSeverity, string> = {
12
9
  critical: 'Critical',
@@ -16,11 +13,14 @@ export const SEVERITY_LABEL: Record<CheckSeverity, string> = {
16
13
  }
17
14
 
18
15
  // Pill badge — the loud, explicit severity signal on rows + drawer header.
16
+ // Uses the canonical Badge severity tones (BADGE_SEVERITY_COLORS) so the queue's
17
+ // severity pills read identically to status badges everywhere else (rendered
18
+ // with `badge-sm`).
19
19
  export const SEVERITY_BADGE_CLASS: Record<CheckSeverity, string> = {
20
- critical: 'bg-red-50 text-red-700 ring-1 ring-red-200 dark:bg-red-950/50 dark:text-red-300 dark:ring-red-900',
21
- high: 'bg-orange-50 text-orange-700 ring-1 ring-orange-200 dark:bg-orange-950/50 dark:text-orange-300 dark:ring-orange-900',
22
- medium: 'bg-amber-50 text-amber-700 ring-1 ring-amber-200 dark:bg-amber-950/50 dark:text-amber-300 dark:ring-amber-900',
23
- low: 'bg-slate-100 text-slate-600 ring-1 ring-slate-200 dark:bg-slate-800/60 dark:text-slate-300 dark:ring-slate-700',
20
+ critical: sev.error,
21
+ high: sev.alert,
22
+ medium: sev.warning,
23
+ low: sev.neutral,
24
24
  }
25
25
 
26
26
  // Solid fill — dots + the proportional distribution bar segments.