@skyhook-io/radar-app 1.21.8 → 1.22.1

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 (83) hide show
  1. package/package.json +1 -1
  2. package/src/App.tsx +16 -1
  3. package/src/api/client.ts +18 -0
  4. package/src/api/cnpg-history.ts +3 -3
  5. package/src/api/cnpg-storage.ts +3 -3
  6. package/src/api/diagnose.test.ts +34 -0
  7. package/src/api/diagnose.ts +17 -4
  8. package/src/api/radarFeatures.test.ts +13 -1
  9. package/src/api/radarFeatures.ts +6 -0
  10. package/src/api/resourceActions.test.ts +829 -0
  11. package/src/api/resourceActions.ts +584 -0
  12. package/src/api/resourceActions.ui.test.tsx +1882 -0
  13. package/src/api/reviewedActionMutation.ts +56 -28
  14. package/src/api/substrateHealth.ts +2 -3
  15. package/src/api/traefik.ts +33 -0
  16. package/src/api/traffic.ts +14 -5
  17. package/src/api/workloadMetrics.test.ts +11 -2
  18. package/src/api/workloadMetrics.ts +2 -2
  19. package/src/components/CloudFunnelButton.test.tsx +39 -1
  20. package/src/components/CloudFunnelButton.tsx +10 -3
  21. package/src/components/cnpg/CNPGOverview.test.tsx +75 -3
  22. package/src/components/cnpg/CNPGOverview.tsx +62 -4
  23. package/src/components/diagnose/AnalysisStory.test.tsx +12 -0
  24. package/src/components/diagnose/DiagnoseContext.question.test.tsx +34 -1
  25. package/src/components/diagnose/DiagnoseContext.tsx +28 -3
  26. package/src/components/diagnose/DiagnoseSurface.tsx +5 -4
  27. package/src/components/diagnose/Home.tsx +3 -0
  28. package/src/components/diagnose/InvestigationEvidencePane.test.tsx +61 -0
  29. package/src/components/diagnose/InvestigationView.followupFailure.test.tsx +122 -0
  30. package/src/components/diagnose/InvestigationView.tsx +10 -2
  31. package/src/components/diagnose/LocalDiagnoseAction.history.test.tsx +1 -1
  32. package/src/components/diagnose/LocalDiagnoseAction.tsx +2 -2
  33. package/src/components/diagnose/QuestionComposer.test.tsx +16 -2
  34. package/src/components/diagnose/QuestionComposer.tsx +13 -8
  35. package/src/components/diagnose/diagnoseEvidenceTypes.ts +47 -8
  36. package/src/components/diagnose/investigationEvidence/adapters/diagnose.test.ts +153 -0
  37. package/src/components/diagnose/investigationEvidence/adapters/diagnose.ts +9 -13
  38. package/src/components/diagnose/investigationEvidence/adapters/issues.ts +21 -5
  39. package/src/components/diagnose/investigationEvidence/bodies/network.tsx +63 -26
  40. package/src/components/diagnose/launch.ts +1 -1
  41. package/src/components/dock/PodDebugSession.test.tsx +66 -0
  42. package/src/components/dock/PodDebugSession.tsx +3 -1
  43. package/src/components/dock/TerminalTab.test.tsx +43 -3
  44. package/src/components/dock/TerminalTab.tsx +10 -1
  45. package/src/components/helm/HelmReleaseDrawer.tsx +1 -1
  46. package/src/components/helm/InstallWizard.tsx +1 -1
  47. package/src/components/home/NetworkPolicyCoverageCard.test.tsx +37 -0
  48. package/src/components/home/NetworkPolicyCoverageCard.tsx +26 -2
  49. package/src/components/home/mcpToolCatalog.ts +1 -1
  50. package/src/components/resources/PodEvictAction.test.tsx +951 -0
  51. package/src/components/resources/PodEvictAction.tsx +167 -0
  52. package/src/components/resources/ResourcesView.tsx +3 -0
  53. package/src/components/resources/renderers/TraefikIngressRouteRenderer.test.tsx +23 -0
  54. package/src/components/resources/renderers/TraefikIngressRouteRenderer.tsx +23 -0
  55. package/src/components/resources/renderers/TraefikMiddlewareRenderer.test.tsx +23 -0
  56. package/src/components/resources/renderers/TraefikMiddlewareRenderer.tsx +29 -0
  57. package/src/components/resources/renderers/WorkloadRenderer.tsx +3 -0
  58. package/src/components/settings/LocalConnectionSettings.tsx +4 -4
  59. package/src/components/settings/SettingsDialog.tsx +23 -18
  60. package/src/components/settings/integrationQueries.test.ts +98 -0
  61. package/src/components/settings/integrationQueries.ts +36 -0
  62. package/src/components/traffic/TrafficConnectionsTable.test.tsx +23 -0
  63. package/src/components/traffic/TrafficConnectionsTable.tsx +5 -4
  64. package/src/components/traffic/TrafficFilterSidebar.test.tsx +14 -0
  65. package/src/components/traffic/TrafficFilterSidebar.tsx +17 -0
  66. package/src/components/traffic/TrafficFlowList.tsx +5 -5
  67. package/src/components/traffic/TrafficGraph.test.tsx +11 -0
  68. package/src/components/traffic/TrafficGraph.tsx +31 -19
  69. package/src/components/traffic/TrafficView.reconnect.test.tsx +229 -0
  70. package/src/components/traffic/TrafficView.tsx +108 -41
  71. package/src/components/traffic/traffic-export.test.ts +8 -0
  72. package/src/components/traffic/traffic-export.ts +7 -4
  73. package/src/components/traffic/trafficFilters.test.ts +51 -1
  74. package/src/components/traffic/trafficFilters.ts +39 -11
  75. package/src/components/ui/Markdown.test.tsx +37 -0
  76. package/src/components/ui/Markdown.tsx +15 -2
  77. package/src/components/ui/command-items-crd.test.tsx +23 -8
  78. package/src/components/useContextSwitchFlow.test.tsx +27 -2
  79. package/src/components/useContextSwitchFlow.tsx +20 -22
  80. package/src/components/whats-new/releaseNotes.ts +75 -1
  81. package/src/components/workload/WorkloadView.tsx +16 -3
  82. package/src/integrations/resourceHosts.test.tsx +1 -1
  83. package/src/integrations/resourceHosts.tsx +3 -0
@@ -27,7 +27,16 @@ export function NetworkPolicyCoverageCard({ data, onNavigate }: NetworkPolicyCov
27
27
  // projection without any staged policies.
28
28
  const stagedDeltaPercentage = hasStagedPolicies ? Math.abs(percentageIfStaged - percentage) : 0
29
29
  const hasPolicies = data.totalPolicies > 0
30
- const accentColor = !hasPolicies
30
+ const ignoredNamespaceWorkloads = data.ignoredNamespaceWorkloads ?? 0
31
+ const hostNetworkWorkloads = data.hostNetworkWorkloads ?? 0
32
+ const notCounted = ignoredNamespaceWorkloads + hostNetworkWorkloads
33
+ const notCountedReasons = [
34
+ ignoredNamespaceWorkloads > 0 && `${ignoredNamespaceWorkloads} in namespaces ignored in Checks settings.`,
35
+ hostNetworkWorkloads > 0 && `${hostNetworkWorkloads} on the host network, where network policies may not apply.`,
36
+ ].filter(Boolean).join(' ')
37
+ // With nothing to count, 0% would read as a coverage failure.
38
+ const hasWorkloads = data.totalWorkloads > 0
39
+ const accentColor = !hasPolicies || !hasWorkloads
31
40
  ? 'text-theme-text-tertiary'
32
41
  : percentage >= 75
33
42
  ? 'text-green-500'
@@ -59,6 +68,11 @@ export function NetworkPolicyCoverageCard({ data, onNavigate }: NetworkPolicyCov
59
68
  <ShieldCheck className="w-8 h-8 text-theme-text-tertiary/40" />
60
69
  <span className="text-xs text-theme-text-tertiary">No network policies configured</span>
61
70
  </div>
71
+ ) : !hasWorkloads ? (
72
+ <div className="flex flex-col items-center justify-center text-center gap-2">
73
+ <ShieldCheck className="w-8 h-8 text-theme-text-tertiary/40" />
74
+ <span className="text-xs text-theme-text-tertiary">No workloads counted</span>
75
+ </div>
62
76
  ) : (
63
77
  <>
64
78
  <div className="flex items-center gap-3 w-full">
@@ -118,7 +132,17 @@ export function NetworkPolicyCoverageCard({ data, onNavigate }: NetworkPolicyCov
118
132
  )}
119
133
  </div>
120
134
 
121
- <div className="px-4 py-1.5 border-t border-theme-border/50 flex items-center justify-end">
135
+ <div className={clsx(
136
+ 'px-4 py-1.5 border-t border-theme-border/50 flex items-center',
137
+ notCounted > 0 ? 'justify-between' : 'justify-end',
138
+ )}>
139
+ {notCounted > 0 && (
140
+ <Tooltip content={`Workloads not counted: ${notCountedReasons}`}>
141
+ <span className="text-[10px] text-theme-text-tertiary">
142
+ {notCounted} not counted
143
+ </span>
144
+ </Tooltip>
145
+ )}
122
146
  <span className={clsx(
123
147
  'flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wider transition-colors',
124
148
  accentColor,
@@ -59,7 +59,7 @@ export const MCP_TOOL_CATALOG: MCPToolInfo[] = [
59
59
  { arg: 'name', required: true, desc: 'resource name' },
60
60
  { arg: 'namespace', desc: 'omit for cluster-scoped kinds (Node, ClusterRole, IngressClass, etc.)' },
61
61
  { arg: 'group', desc: 'API group when the kind is ambiguous (e.g. serving.knative.dev for Knative Service vs core Service)' },
62
- { arg: 'include', desc: 'events, metrics, changes, issues, drain-plan (Node pod/PDB estimate), revisions (rollback targets for Deployment/StatefulSet/DaemonSet/Rollout)' },
62
+ { arg: 'include', desc: 'identity (observed UID and resourceVersion), events, metrics, changes, issues, drain-plan (Node pod/PDB estimate), revisions (rollback targets for Deployment/StatefulSet/DaemonSet/Rollout)' },
63
63
  { arg: 'context', desc: 'resourceContext tier: basic (default) or none' },
64
64
  { arg: 'relationship', desc: 'one relationship field a partial-preview warning named (e.g. dependents), returned with up to 200 entries' },
65
65
  ],