@skyhook-io/radar-app 1.16.3 → 1.17.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.
- package/README.md +1 -1
- package/package.json +3 -3
- package/src/App.tsx +138 -93
- package/src/RadarApp.tsx +27 -17
- package/src/api/actions.errorCode.test.ts +40 -0
- package/src/api/actions.test.ts +48 -0
- package/src/api/actions.ts +79 -0
- package/src/api/apiResources.navigation.test.tsx +232 -0
- package/src/api/apiResources.ts +46 -3
- package/src/api/client.goneResource.test.ts +49 -0
- package/src/api/client.helmSource.test.ts +39 -0
- package/src/api/client.namespaceSwitch.hook.test.tsx +54 -0
- package/src/api/client.namespaceSwitch.test.ts +107 -0
- package/src/api/client.ts +381 -47
- package/src/api/cnpg-ha.live.test.ts +140 -0
- package/src/api/cnpg-ha.test.ts +78 -0
- package/src/api/cnpg-ha.ts +19 -0
- package/src/api/cnpg-history.ts +123 -0
- package/src/api/cnpg-inspect.ts +102 -0
- package/src/api/cnpg-protection.ts +112 -0
- package/src/api/cnpg-recovery.test.tsx +60 -0
- package/src/api/cnpg-recovery.ts +262 -0
- package/src/api/cnpg-sessions.ts +175 -0
- package/src/api/cnpg-storage.ts +138 -0
- package/src/api/cnpg.legacy-reads.test.ts +43 -0
- package/src/api/cnpg.pooler-runtime.test.ts +15 -0
- package/src/api/cnpg.ts +428 -10
- package/src/api/diagnose.test.ts +40 -0
- package/src/api/diagnose.ts +12 -1
- package/src/api/radarFeatures.render.test.tsx +65 -3
- package/src/api/radarFeatures.ts +6 -0
- package/src/api/reviewedActionMutation.test.tsx +164 -0
- package/src/api/reviewedActionMutation.ts +66 -0
- package/src/api/timelineSource.test.ts +9 -0
- package/src/api/timelineSource.ts +8 -0
- package/src/api/traffic.sources.test.ts +55 -0
- package/src/api/traffic.ts +173 -14
- package/src/components/applications/ApplicationsView.tsx +3 -0
- package/src/components/audit/AuditView.tsx +9 -0
- package/src/components/capacity/CapacityActivity.tsx +3 -31
- package/src/components/capacity/CapacityDemand.tsx +4 -36
- package/src/components/capacity/CapacityOverview.tsx +217 -56
- package/src/components/capacity/CapacityPoolDetail.tsx +24 -62
- package/src/components/capacity/CapacityView.test.tsx +354 -1
- package/src/components/capacity/ClusterSchedulingCard.tsx +2 -10
- package/src/components/capacity/certaintyGlyph.test.tsx +2 -9
- package/src/components/capacity/routes.ts +42 -0
- package/src/components/capacity/shared.tsx +23 -150
- package/src/components/capacity/workspaceRoute.ts +18 -0
- package/src/components/cnpg/CNPGActionHost.compatibility.test.tsx +30 -0
- package/src/components/cnpg/CNPGArchivingRepair.tsx +191 -0
- package/src/components/cnpg/CNPGBlockingSessions.test.tsx +50 -0
- package/src/components/cnpg/CNPGBlockingSessions.tsx +333 -0
- package/src/components/cnpg/CNPGClusterActivity.test.tsx +11 -0
- package/src/components/cnpg/CNPGClusterActivity.tsx +18 -9
- package/src/components/cnpg/CNPGClusterLogs.compatibility.test.tsx +130 -0
- package/src/components/cnpg/CNPGClusterLogs.empty.test.tsx +29 -0
- package/src/components/cnpg/CNPGClusterLogs.test.ts +9 -0
- package/src/components/cnpg/CNPGClusterLogs.tsx +81 -24
- package/src/components/cnpg/CNPGClusterTabs.test.tsx +152 -0
- package/src/components/cnpg/CNPGClusterTabs.tsx +187 -0
- package/src/components/cnpg/CNPGClustersKindView.tsx +46 -0
- package/src/components/cnpg/CNPGConfiguration.test.tsx +223 -0
- package/src/components/cnpg/CNPGConfiguration.tsx +190 -0
- package/src/components/cnpg/CNPGCreateClusterDialog.test.tsx +113 -0
- package/src/components/cnpg/CNPGCreateClusterDialog.tsx +74 -0
- package/src/components/cnpg/CNPGDeclarations.test.ts +107 -0
- package/src/components/cnpg/CNPGDeclarations.tsx +236 -78
- package/src/components/cnpg/CNPGDetailPage.test.tsx +62 -0
- package/src/components/cnpg/CNPGDetailPage.tsx +159 -98
- package/src/components/cnpg/CNPGDrawerTrail.tsx +2 -2
- package/src/components/cnpg/CNPGInvestigationAction.test.tsx +30 -0
- package/src/components/cnpg/CNPGOperator.test.tsx +34 -0
- package/src/components/cnpg/CNPGOperator.tsx +78 -30
- package/src/components/cnpg/CNPGOperatorBanner.tsx +39 -0
- package/src/components/cnpg/CNPGOperatorConditions.test.tsx +45 -0
- package/src/components/cnpg/CNPGOperatorConditions.tsx +16 -0
- package/src/components/cnpg/CNPGOperatorConfig.test.tsx +27 -0
- package/src/components/cnpg/CNPGOperatorDiagnosis.tsx +247 -0
- package/src/components/cnpg/CNPGOverview.test.tsx +171 -0
- package/src/components/cnpg/CNPGOverview.tsx +238 -63
- package/src/components/cnpg/CNPGParametersInEffect.test.tsx +51 -0
- package/src/components/cnpg/CNPGParametersInEffect.tsx +120 -0
- package/src/components/cnpg/CNPGPerformance.prerequisite.test.tsx +48 -0
- package/src/components/cnpg/CNPGPerformance.test.tsx +73 -0
- package/src/components/cnpg/CNPGPerformance.tsx +477 -0
- package/src/components/cnpg/CNPGPooling.test.tsx +89 -0
- package/src/components/cnpg/CNPGPooling.tsx +97 -40
- package/src/components/cnpg/CNPGProtection.test.tsx +145 -0
- package/src/components/cnpg/CNPGProtection.tsx +230 -124
- package/src/components/cnpg/CNPGReplicationTab.test.tsx +87 -0
- package/src/components/cnpg/CNPGReplicationTab.tsx +212 -0
- package/src/components/cnpg/CNPGReplicationView.tsx +264 -0
- package/src/components/cnpg/CNPGStorage.test.tsx +140 -0
- package/src/components/cnpg/CNPGStorage.tsx +619 -0
- package/src/components/cnpg/CNPGSummaryHost.overview.test.tsx +44 -0
- package/src/components/cnpg/CNPGSummaryHost.test.tsx +23 -0
- package/src/components/cnpg/CNPGSummaryHost.tsx +228 -54
- package/src/components/cnpg/CNPGTrends.denied.test.tsx +33 -0
- package/src/components/cnpg/CNPGTrends.missing.test.tsx +69 -0
- package/src/components/cnpg/CNPGTrends.test.ts +38 -0
- package/src/components/cnpg/CNPGTrends.tsx +702 -0
- package/src/components/cnpg/CNPGView.tsx +34 -21
- package/src/components/cnpg/CNPGWorkspace.compatibility.test.tsx +90 -0
- package/src/components/cnpg/actions/CNPGClusterActions.dialog.test.tsx +79 -0
- package/src/components/cnpg/actions/CNPGClusterActions.test.tsx +142 -0
- package/src/components/cnpg/actions/CNPGClusterActions.tsx +853 -0
- package/src/components/cnpg/actions/CNPGConnectButton.read.test.tsx +40 -0
- package/src/components/cnpg/actions/CNPGConnectButton.test.ts +25 -0
- package/src/components/cnpg/actions/CNPGConnectButton.tsx +131 -0
- package/src/components/cnpg/actions/CNPGDestroyInstanceDialog.tsx +185 -0
- package/src/components/cnpg/actions/CNPGInstanceActions.test.tsx +38 -0
- package/src/components/cnpg/actions/CNPGInstanceActions.tsx +74 -0
- package/src/components/cnpg/actions/CNPGMaintenanceBanner.tsx +53 -0
- package/src/components/cnpg/actions/CNPGPoolerActions.test.tsx +35 -0
- package/src/components/cnpg/actions/CNPGPoolerActions.tsx +79 -0
- package/src/components/cnpg/actions/CNPGReportDialog.test.tsx +12 -0
- package/src/components/cnpg/actions/CNPGReportDialog.tsx +91 -0
- package/src/components/cnpg/actions/CNPGScheduleActions.run.test.tsx +58 -0
- package/src/components/cnpg/actions/CNPGScheduleActions.test.tsx +54 -0
- package/src/components/cnpg/actions/CNPGScheduleActions.tsx +208 -0
- package/src/components/cnpg/actions/actionModel.test.ts +111 -0
- package/src/components/cnpg/actions/actionModel.ts +127 -0
- package/src/components/cnpg/actions/renderCNPGHeaderActions.tsx +60 -0
- package/src/components/cnpg/actions/useCNPGWriteGuard.tsx +58 -0
- package/src/components/cnpg/actions/useOpenCNPGPsql.ts +22 -0
- package/src/components/cnpg/archivingRepair.test.ts +104 -0
- package/src/components/cnpg/archivingRepair.ts +145 -0
- package/src/components/cnpg/baseBackup.test.ts +36 -0
- package/src/components/cnpg/baseBackup.ts +36 -0
- package/src/components/cnpg/blocking.test.ts +59 -0
- package/src/components/cnpg/blocking.ts +131 -0
- package/src/components/cnpg/coverageText.test.ts +27 -0
- package/src/components/cnpg/creation/CNPGTargetFields.tsx +110 -0
- package/src/components/cnpg/creation/targetModel.test.ts +137 -0
- package/src/components/cnpg/creation/targetModel.ts +149 -0
- package/src/components/cnpg/fleetStatus.test.ts +46 -0
- package/src/components/cnpg/fleetStatus.ts +43 -0
- package/src/components/cnpg/formFields.ts +2 -0
- package/src/components/cnpg/grantText.test.tsx +11 -0
- package/src/components/cnpg/host.test.tsx +24 -0
- package/src/components/cnpg/host.tsx +101 -0
- package/src/components/cnpg/inspectModel.test.ts +120 -0
- package/src/components/cnpg/inspectModel.ts +140 -0
- package/src/components/cnpg/logicalSlots.test.ts +30 -0
- package/src/components/cnpg/logicalSlots.ts +29 -0
- package/src/components/cnpg/lsn.test.ts +40 -0
- package/src/components/cnpg/lsn.ts +43 -0
- package/src/components/cnpg/operations/CNPGFleetOperation.tsx +30 -0
- package/src/components/cnpg/operations/CNPGOperationTracker.test.tsx +247 -0
- package/src/components/cnpg/operations/CNPGOperationTracker.tsx +255 -0
- package/src/components/cnpg/operations/model.test.ts +510 -0
- package/src/components/cnpg/operations/model.ts +499 -0
- package/src/components/cnpg/operations/presentation.test.ts +80 -0
- package/src/components/cnpg/operations/presentation.ts +84 -0
- package/src/components/cnpg/operations/store.ts +98 -0
- package/src/components/cnpg/operatorStatus.test.ts +134 -0
- package/src/components/cnpg/operatorStatus.ts +194 -0
- package/src/components/cnpg/paths.test.ts +54 -0
- package/src/components/cnpg/paths.ts +47 -4
- package/src/components/cnpg/protection/CNPGAttachArchiveDialog.tsx +185 -0
- package/src/components/cnpg/protection/CNPGCreateScheduleDialog.tsx +196 -0
- package/src/components/cnpg/protection/CNPGProtectionSetup.test.tsx +121 -0
- package/src/components/cnpg/protection/CNPGProtectionSetup.tsx +452 -0
- package/src/components/cnpg/protection/CNPGScheduleInput.tsx +115 -0
- package/src/components/cnpg/protection/CNPGScheduleRepairButton.tsx +120 -0
- package/src/components/cnpg/protection/scheduleModel.test.ts +19 -0
- package/src/components/cnpg/protection/scheduleModel.ts +16 -0
- package/src/components/cnpg/recovery/CNPGRecoveryPoint.tsx +220 -0
- package/src/components/cnpg/recovery/CNPGRestoreButton.test.tsx +29 -0
- package/src/components/cnpg/recovery/CNPGRestoreButton.tsx +26 -0
- package/src/components/cnpg/recovery/CNPGRestoreChecks.test.tsx +23 -0
- package/src/components/cnpg/recovery/CNPGRestoreChecks.tsx +153 -0
- package/src/components/cnpg/recovery/CNPGRestoreDialog.back.test.tsx +149 -0
- package/src/components/cnpg/recovery/CNPGRestoreDialog.test.tsx +46 -0
- package/src/components/cnpg/recovery/CNPGRestoreDialog.tsx +333 -0
- package/src/components/cnpg/recovery/CNPGRestoreProgress.tsx +182 -0
- package/src/components/cnpg/recovery/CNPGRestoreValidation.tsx +216 -0
- package/src/components/cnpg/recovery/restoreModel.test.ts +709 -0
- package/src/components/cnpg/recovery/restoreModel.ts +685 -0
- package/src/components/cnpg/recovery/restoreOperation.ts +56 -0
- package/src/components/cnpg/refresh.test.ts +38 -0
- package/src/components/cnpg/refresh.ts +17 -0
- package/src/components/cnpg/refreshNotice.test.tsx +29 -0
- package/src/components/cnpg/routes.test.ts +34 -3
- package/src/components/cnpg/routes.ts +60 -48
- package/src/components/cnpg/runtimeAssessment.ts +198 -0
- package/src/components/cnpg/runtimeModel.test.ts +175 -0
- package/src/components/cnpg/runtimeModel.ts +196 -0
- package/src/components/cnpg/runtimeParts.test.tsx +17 -0
- package/src/components/cnpg/runtimeParts.tsx +79 -0
- package/src/components/cnpg/shared.test.tsx +59 -0
- package/src/components/cnpg/shared.tsx +100 -182
- package/src/components/cnpg/storageModel.test.ts +107 -0
- package/src/components/cnpg/storageModel.ts +101 -0
- package/src/components/cnpg/trendSamples.test.ts +148 -0
- package/src/components/cnpg/trendSamples.ts +222 -0
- package/src/components/cnpg/useCNPGClusterAssessment.ts +30 -0
- package/src/components/cnpg/useCNPGKubectlContext.test.tsx +45 -0
- package/src/components/cnpg/useCNPGKubectlContext.ts +13 -0
- package/src/components/cnpg/useCNPGNavigate.test.tsx +58 -0
- package/src/components/cnpg/useCNPGNavigate.ts +21 -0
- package/src/components/cnpg/useCNPGPoolerLive.ts +46 -0
- package/src/components/cnpg/useCNPGScreenParams.ts +24 -0
- package/src/components/cnpg/useCNPGSidebarWorkspace.ts +66 -16
- package/src/components/cnpg/workspaceRoute.ts +23 -0
- package/src/components/cost/ApplicationCostTab.test.ts +7 -0
- package/src/components/cost/ApplicationCostTab.tsx +7 -7
- package/src/components/cost/CostView.test.ts +2 -1
- package/src/components/cost/CostView.tsx +0 -2
- package/src/components/cost/WorkloadCostTab.tsx +2 -4
- package/src/components/cost/errors.ts +3 -1
- package/src/components/cost/source.test.ts +10 -0
- package/src/components/cost/source.ts +5 -1
- package/src/components/diagnose/AgentSetupNotice.test.tsx +58 -0
- package/src/components/diagnose/AgentSetupNotice.tsx +142 -51
- package/src/components/diagnose/ApplyDialog.ack.test.tsx +47 -0
- package/src/components/diagnose/ApplyDialog.test.tsx +59 -6
- package/src/components/diagnose/ApplyDialog.tsx +26 -28
- package/src/components/diagnose/DiagnoseContext.test.ts +43 -0
- package/src/components/diagnose/DiagnoseContext.tsx +136 -54
- package/src/components/diagnose/DiagnoseSurface.tsx +16 -3
- package/src/components/diagnose/InvestigationView.tsx +39 -2
- package/src/components/diagnose/LocalDiagnoseAction.tsx +40 -20
- package/src/components/diagnose/agentCatalog.ts +2 -2
- package/src/components/diagnose/diagnoseEvidenceTypes.ts +2 -0
- package/src/components/diagnose/investigationEvidence/adapters/issues.ts +8 -0
- package/src/components/diagnose/investigationEvidence/projection.test.ts +16 -0
- package/src/components/dock/BottomDock.tsx +2 -0
- package/src/components/dock/TerminalTab.test.tsx +17 -0
- package/src/components/dock/TerminalTab.tsx +7 -3
- package/src/components/dock/TrafficFlowListTab.tsx +27 -6
- package/src/components/execution/BatchExecutionView.tsx +11 -11
- package/src/components/gitops/ArgoResourceDiffLoader.tsx +4 -2
- package/src/components/gitops/GitOpsView.tsx +16 -23
- package/src/components/helm/ChartBrowser.tsx +3 -3
- package/src/components/helm/HelmCompareRoute.test.tsx +59 -0
- package/src/components/helm/HelmCompareRoute.tsx +57 -26
- package/src/components/helm/HelmReleaseDrawer.test.ts +55 -3
- package/src/components/helm/HelmReleaseDrawer.tsx +50 -12
- package/src/components/helm/RevisionHistory.tsx +3 -2
- package/src/components/helm/TrackChartSourceDialog.render.test.tsx +120 -0
- package/src/components/helm/TrackChartSourceDialog.test.ts +50 -0
- package/src/components/helm/TrackChartSourceDialog.tsx +153 -176
- package/src/components/helm/ValuesViewer.test.tsx +301 -0
- package/src/components/helm/ValuesViewer.tsx +169 -78
- package/src/components/home/ActivitySummary.tsx +2 -1
- package/src/components/home/ClusterHealthCard.tsx +7 -0
- package/src/components/home/HomeView.tsx +20 -9
- package/src/components/home/ProblemsPanel.test.tsx +81 -0
- package/src/components/home/TopologyPreview.tsx +2 -2
- package/src/components/home/mcpToolCatalog.ts +1 -1
- package/src/components/issues/IssuesPane.render.test.tsx +122 -0
- package/src/components/issues/IssuesPane.test.ts +65 -1
- package/src/components/issues/IssuesPane.tsx +188 -25
- package/src/components/issues/uncheckedSources.ts +21 -0
- package/src/components/resource/PVCUsageBar.render.test.tsx +32 -0
- package/src/components/resource/PVCUsageBar.test.tsx +24 -0
- package/src/components/resource/PVCUsageBar.tsx +15 -6
- package/src/components/resource/WorkloadMetricsHelpDialog.test.tsx +3 -1
- package/src/components/resource/WorkloadMetricsHelpDialog.tsx +1 -1
- package/src/components/resources/CompositeRenderer.tsx +4 -4
- package/src/components/resources/ResourceDetailDrawer.tsx +2 -2
- package/src/components/resources/ResourcesView.tsx +26 -12
- package/src/components/resources/renderers/KyvernoPolicyQueued.tsx +2 -1
- package/src/components/resources/renderers/NodeRenderer.tsx +7 -1
- package/src/components/resources/renderers/ServiceRenderer.test.tsx +81 -0
- package/src/components/resources/renderers/ServiceRenderer.tsx +19 -14
- package/src/components/settings/LocalIntegrationStatus.test.tsx +52 -0
- package/src/components/settings/LocalIntegrationStatus.tsx +3 -4
- package/src/components/settings/SettingsDialog.tsx +150 -34
- package/src/components/shared/LargeClusterNamespacePicker.tsx +11 -5
- package/src/components/timeline/TimelineList.tsx +25 -24
- package/src/components/timeline/TimelineLoadError.test.tsx +62 -0
- package/src/components/timeline/TimelineLoadError.tsx +96 -0
- package/src/components/timeline/TimelineRetentionNote.test.tsx +49 -0
- package/src/components/timeline/TimelineRetentionNote.tsx +20 -0
- package/src/components/timeline/TimelineView.tsx +25 -45
- package/src/components/timeline/ViewModeToggle.tsx +20 -0
- package/src/components/timeline/useStickyError.test.tsx +47 -0
- package/src/components/timeline/useStickyError.ts +15 -0
- package/src/components/traffic/TrafficConnectionsTable.tsx +144 -0
- package/src/components/traffic/TrafficFilterSidebar.tsx +22 -1
- package/src/components/traffic/TrafficFlowListContext.tsx +12 -4
- package/src/components/traffic/TrafficFocusSearch.tsx +172 -0
- package/src/components/traffic/TrafficGraph.tsx +109 -26
- package/src/components/traffic/TrafficGraphTooLarge.tsx +150 -0
- package/src/components/traffic/TrafficView.tsx +582 -149
- package/src/components/traffic/trafficFilters.test.ts +398 -1
- package/src/components/traffic/trafficFilters.ts +408 -0
- package/src/components/ui/DiagnosticsOverlay.tsx +34 -2
- package/src/components/ui/Markdown.test.tsx +65 -0
- package/src/components/ui/Markdown.tsx +144 -127
- package/src/components/whats-new/releaseNotes.ts +63 -1
- package/src/components/workload/WorkloadView.test.ts +11 -1
- package/src/components/workload/WorkloadView.tsx +162 -529
- package/src/components/workspace/layout.test.tsx +29 -0
- package/src/components/workspace/layout.tsx +259 -0
- package/src/components/workspace/table.ts +7 -0
- package/src/context/TimelineCustomization.tsx +15 -0
- package/src/contexts/CapabilitiesContext.tsx +1 -1
- package/src/hooks/useGitOpsWriteGuard.test.tsx +457 -0
- package/src/hooks/useGitOpsWriteGuard.ts +193 -0
- package/src/hooks/useResolvedGitOpsOwner.ts +256 -0
- package/src/integrations/resourceHost.test.tsx +55 -0
- package/src/integrations/resourceHost.ts +99 -0
- package/src/integrations/resourceHosts.test.tsx +141 -0
- package/src/integrations/resourceHosts.tsx +119 -0
- package/src/integrations/workspaceRoute.ts +20 -0
- package/src/integrations/workspaceRoutes.test.ts +40 -0
- package/src/integrations/workspaceRoutes.ts +22 -0
- package/src/integrations/workspaceScreens.tsx +14 -0
- package/src/utils/drawer-trail.ts +35 -0
- package/src/utils/kindFilterStore.test.ts +147 -0
- package/src/utils/kindFilterStore.ts +91 -0
- package/src/utils/navigation.test.ts +13 -1
- package/src/utils/navigation.ts +39 -2
- package/src/utils/page-links.ts +21 -0
- package/src/utils/tabStorage.ts +40 -0
- package/src/utils/viewMemory.test.ts +78 -0
- package/src/utils/viewMemory.ts +54 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createContext, useContext, useMemo } from 'react'
|
|
2
|
+
import ReactMarkdown, { type Components } from 'react-markdown'
|
|
2
3
|
import remarkGfm from 'remark-gfm'
|
|
3
4
|
import { clsx } from 'clsx'
|
|
4
5
|
|
|
5
6
|
import type { ReactNode } from 'react'
|
|
6
7
|
|
|
7
|
-
interface
|
|
8
|
-
children: string
|
|
9
|
-
className?: string
|
|
8
|
+
interface MarkdownHooks {
|
|
10
9
|
/**
|
|
11
10
|
* Intercepts links before the default anchor renders. Return null to fall
|
|
12
11
|
* through. Lets a caller turn a reserved href (an in-page evidence
|
|
@@ -16,132 +15,150 @@ interface MarkdownProps {
|
|
|
16
15
|
codeActions?: (code: string) => ReactNode
|
|
17
16
|
}
|
|
18
17
|
|
|
18
|
+
interface MarkdownProps extends MarkdownHooks {
|
|
19
|
+
children: string
|
|
20
|
+
className?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const MarkdownHooksContext = createContext<MarkdownHooks>({})
|
|
24
|
+
|
|
25
|
+
const REMARK_PLUGINS = [remarkGfm]
|
|
26
|
+
|
|
27
|
+
// Module-level so every render hands react-markdown the same component types.
|
|
28
|
+
// A fresh map per render makes React unmount and remount the whole rendered
|
|
29
|
+
// tree whenever the parent re-renders; WebKit then moves the scroll position
|
|
30
|
+
// of any pane the text sits in. Per-call hooks arrive through context instead.
|
|
31
|
+
const COMPONENTS: Components = {
|
|
32
|
+
h1: ({ children }) => (
|
|
33
|
+
<h1 className="text-lg font-bold text-theme-text-primary mt-4 mb-2 first:mt-0">{children}</h1>
|
|
34
|
+
),
|
|
35
|
+
h2: ({ children }) => (
|
|
36
|
+
<h2 className="text-base font-semibold text-theme-text-primary mt-4 mb-2 first:mt-0">{children}</h2>
|
|
37
|
+
),
|
|
38
|
+
h3: ({ children }) => (
|
|
39
|
+
<h3 className="text-sm font-semibold text-theme-text-primary mt-3 mb-1.5">{children}</h3>
|
|
40
|
+
),
|
|
41
|
+
h4: ({ children }) => (
|
|
42
|
+
<h4 className="text-sm font-medium text-theme-text-primary mt-2 mb-1">{children}</h4>
|
|
43
|
+
),
|
|
44
|
+
p: ({ children }) => (
|
|
45
|
+
<p className="text-theme-text-secondary my-2 leading-relaxed">{children}</p>
|
|
46
|
+
),
|
|
47
|
+
a: function MarkdownLink({ href, children }) {
|
|
48
|
+
const { linkRenderer } = useContext(MarkdownHooksContext)
|
|
49
|
+
const custom = linkRenderer?.(href, children)
|
|
50
|
+
if (custom !== null && custom !== undefined) return <>{custom}</>
|
|
51
|
+
return (
|
|
52
|
+
<a
|
|
53
|
+
href={href}
|
|
54
|
+
target="_blank"
|
|
55
|
+
rel="noopener noreferrer"
|
|
56
|
+
className="text-blue-400 hover:text-blue-300 underline underline-offset-2"
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
</a>
|
|
60
|
+
)
|
|
61
|
+
},
|
|
62
|
+
ul: ({ children }) => (
|
|
63
|
+
<ul className="list-disc list-outside pl-4 my-2 space-y-1 text-theme-text-secondary">{children}</ul>
|
|
64
|
+
),
|
|
65
|
+
ol: ({ children }) => (
|
|
66
|
+
<ol className="list-decimal list-outside pl-4 my-2 space-y-1 text-theme-text-secondary">{children}</ol>
|
|
67
|
+
),
|
|
68
|
+
li: ({ children }) => (
|
|
69
|
+
<li className="leading-relaxed">{children}</li>
|
|
70
|
+
),
|
|
71
|
+
code: function MarkdownCode({ className, children }) {
|
|
72
|
+
const { codeActions } = useContext(MarkdownHooksContext)
|
|
73
|
+
const isInline = !className
|
|
74
|
+
if (isInline) {
|
|
75
|
+
const actions = codeActions?.(String(children))
|
|
76
|
+
if (actions) {
|
|
77
|
+
return (
|
|
78
|
+
<span className="inline-flex max-w-full items-start gap-1 align-middle">
|
|
79
|
+
<code className="inline-code min-w-0">{children}</code>
|
|
80
|
+
{actions}
|
|
81
|
+
</span>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
return (
|
|
85
|
+
<code className="inline-code">
|
|
86
|
+
{children}
|
|
87
|
+
</code>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
return (
|
|
91
|
+
<code className="block font-mono text-theme-text-secondary">{children}</code>
|
|
92
|
+
)
|
|
93
|
+
},
|
|
94
|
+
pre: function MarkdownPre({ children, node }) {
|
|
95
|
+
const { codeActions } = useContext(MarkdownHooksContext)
|
|
96
|
+
const code = node?.children[0]
|
|
97
|
+
const text = code?.type === 'element'
|
|
98
|
+
? code.children.filter(child => child.type === 'text').map(child => child.value).join('')
|
|
99
|
+
: ''
|
|
100
|
+
const actions = codeActions?.(text)
|
|
101
|
+
if (actions) {
|
|
102
|
+
// Render the code directly so an unlabelled fence does not also
|
|
103
|
+
// receive the inline-code action. Only the code scrolls, not Copy.
|
|
104
|
+
return (
|
|
105
|
+
<pre className="my-3 flex items-start gap-2 rounded-lg bg-theme-elevated p-3 text-xs font-mono text-theme-text-secondary">
|
|
106
|
+
<code className="min-w-0 flex-1 overflow-x-auto">{text}</code>
|
|
107
|
+
{actions}
|
|
108
|
+
</pre>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
return (
|
|
112
|
+
<pre className="my-3 p-3 bg-theme-elevated rounded-lg overflow-x-auto text-xs font-mono text-theme-text-secondary">
|
|
113
|
+
{children}
|
|
114
|
+
</pre>
|
|
115
|
+
)
|
|
116
|
+
},
|
|
117
|
+
blockquote: ({ children }) => (
|
|
118
|
+
<blockquote className="border-l-2 border-theme-border pl-3 my-2 text-theme-text-tertiary italic">
|
|
119
|
+
{children}
|
|
120
|
+
</blockquote>
|
|
121
|
+
),
|
|
122
|
+
table: ({ children }) => (
|
|
123
|
+
<div className="my-3 overflow-x-auto">
|
|
124
|
+
<table className="min-w-full border-collapse text-sm">{children}</table>
|
|
125
|
+
</div>
|
|
126
|
+
),
|
|
127
|
+
thead: ({ children }) => (
|
|
128
|
+
<thead className="bg-theme-elevated">{children}</thead>
|
|
129
|
+
),
|
|
130
|
+
tbody: ({ children }) => (
|
|
131
|
+
<tbody className="divide-y divide-theme-border">{children}</tbody>
|
|
132
|
+
),
|
|
133
|
+
tr: ({ children }) => (
|
|
134
|
+
<tr className="border-b border-theme-border">{children}</tr>
|
|
135
|
+
),
|
|
136
|
+
th: ({ children }) => (
|
|
137
|
+
<th className="px-3 py-2 text-left text-theme-text-primary font-medium border border-theme-border">
|
|
138
|
+
{children}
|
|
139
|
+
</th>
|
|
140
|
+
),
|
|
141
|
+
td: ({ children }) => (
|
|
142
|
+
<td className="px-3 py-2 text-theme-text-secondary border border-theme-border">{children}</td>
|
|
143
|
+
),
|
|
144
|
+
hr: () => <hr className="my-4 border-theme-border" />,
|
|
145
|
+
strong: ({ children }) => (
|
|
146
|
+
<strong className="font-semibold text-theme-text-primary">{children}</strong>
|
|
147
|
+
),
|
|
148
|
+
em: ({ children }) => (
|
|
149
|
+
<em className="italic">{children}</em>
|
|
150
|
+
),
|
|
151
|
+
}
|
|
152
|
+
|
|
19
153
|
export function Markdown({ children, className, linkRenderer, codeActions }: MarkdownProps) {
|
|
154
|
+
const hooks = useMemo(() => ({ linkRenderer, codeActions }), [linkRenderer, codeActions])
|
|
20
155
|
return (
|
|
21
156
|
<div className={clsx('markdown-content', className)}>
|
|
22
|
-
<
|
|
23
|
-
remarkPlugins={
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
h2: ({ children }) => (
|
|
29
|
-
<h2 className="text-base font-semibold text-theme-text-primary mt-4 mb-2 first:mt-0">{children}</h2>
|
|
30
|
-
),
|
|
31
|
-
h3: ({ children }) => (
|
|
32
|
-
<h3 className="text-sm font-semibold text-theme-text-primary mt-3 mb-1.5">{children}</h3>
|
|
33
|
-
),
|
|
34
|
-
h4: ({ children }) => (
|
|
35
|
-
<h4 className="text-sm font-medium text-theme-text-primary mt-2 mb-1">{children}</h4>
|
|
36
|
-
),
|
|
37
|
-
p: ({ children }) => (
|
|
38
|
-
<p className="text-theme-text-secondary my-2 leading-relaxed">{children}</p>
|
|
39
|
-
),
|
|
40
|
-
a: ({ href, children }) => {
|
|
41
|
-
const custom = linkRenderer?.(href, children)
|
|
42
|
-
if (custom !== null && custom !== undefined) return <>{custom}</>
|
|
43
|
-
return (
|
|
44
|
-
<a
|
|
45
|
-
href={href}
|
|
46
|
-
target="_blank"
|
|
47
|
-
rel="noopener noreferrer"
|
|
48
|
-
className="text-blue-400 hover:text-blue-300 underline underline-offset-2"
|
|
49
|
-
>
|
|
50
|
-
{children}
|
|
51
|
-
</a>
|
|
52
|
-
)
|
|
53
|
-
},
|
|
54
|
-
ul: ({ children }) => (
|
|
55
|
-
<ul className="list-disc list-outside pl-4 my-2 space-y-1 text-theme-text-secondary">{children}</ul>
|
|
56
|
-
),
|
|
57
|
-
ol: ({ children }) => (
|
|
58
|
-
<ol className="list-decimal list-outside pl-4 my-2 space-y-1 text-theme-text-secondary">{children}</ol>
|
|
59
|
-
),
|
|
60
|
-
li: ({ children }) => (
|
|
61
|
-
<li className="leading-relaxed">{children}</li>
|
|
62
|
-
),
|
|
63
|
-
code: ({ className, children }) => {
|
|
64
|
-
const isInline = !className
|
|
65
|
-
if (isInline) {
|
|
66
|
-
const actions = codeActions?.(String(children))
|
|
67
|
-
if (actions) {
|
|
68
|
-
return (
|
|
69
|
-
<span className="inline-flex max-w-full items-start gap-1 align-middle">
|
|
70
|
-
<code className="inline-code min-w-0">{children}</code>
|
|
71
|
-
{actions}
|
|
72
|
-
</span>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
return (
|
|
76
|
-
<code className="inline-code">
|
|
77
|
-
{children}
|
|
78
|
-
</code>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
return (
|
|
82
|
-
<code className="block font-mono text-theme-text-secondary">{children}</code>
|
|
83
|
-
)
|
|
84
|
-
},
|
|
85
|
-
pre: ({ children, node }) => {
|
|
86
|
-
const code = node?.children[0]
|
|
87
|
-
const text = code?.type === 'element'
|
|
88
|
-
? code.children.filter(child => child.type === 'text').map(child => child.value).join('')
|
|
89
|
-
: ''
|
|
90
|
-
const actions = codeActions?.(text)
|
|
91
|
-
if (actions) {
|
|
92
|
-
// Render the code directly so an unlabelled fence does not also
|
|
93
|
-
// receive the inline-code action. Only the code scrolls, not Copy.
|
|
94
|
-
return (
|
|
95
|
-
<pre className="my-3 flex items-start gap-2 rounded-lg bg-theme-elevated p-3 text-xs font-mono text-theme-text-secondary">
|
|
96
|
-
<code className="min-w-0 flex-1 overflow-x-auto">{text}</code>
|
|
97
|
-
{actions}
|
|
98
|
-
</pre>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
return (
|
|
102
|
-
<pre className="my-3 p-3 bg-theme-elevated rounded-lg overflow-x-auto text-xs font-mono text-theme-text-secondary">
|
|
103
|
-
{children}
|
|
104
|
-
</pre>
|
|
105
|
-
)
|
|
106
|
-
},
|
|
107
|
-
blockquote: ({ children }) => (
|
|
108
|
-
<blockquote className="border-l-2 border-theme-border pl-3 my-2 text-theme-text-tertiary italic">
|
|
109
|
-
{children}
|
|
110
|
-
</blockquote>
|
|
111
|
-
),
|
|
112
|
-
table: ({ children }) => (
|
|
113
|
-
<div className="my-3 overflow-x-auto">
|
|
114
|
-
<table className="min-w-full border-collapse text-sm">{children}</table>
|
|
115
|
-
</div>
|
|
116
|
-
),
|
|
117
|
-
thead: ({ children }) => (
|
|
118
|
-
<thead className="bg-theme-elevated">{children}</thead>
|
|
119
|
-
),
|
|
120
|
-
tbody: ({ children }) => (
|
|
121
|
-
<tbody className="divide-y divide-theme-border">{children}</tbody>
|
|
122
|
-
),
|
|
123
|
-
tr: ({ children }) => (
|
|
124
|
-
<tr className="border-b border-theme-border">{children}</tr>
|
|
125
|
-
),
|
|
126
|
-
th: ({ children }) => (
|
|
127
|
-
<th className="px-3 py-2 text-left text-theme-text-primary font-medium border border-theme-border">
|
|
128
|
-
{children}
|
|
129
|
-
</th>
|
|
130
|
-
),
|
|
131
|
-
td: ({ children }) => (
|
|
132
|
-
<td className="px-3 py-2 text-theme-text-secondary border border-theme-border">{children}</td>
|
|
133
|
-
),
|
|
134
|
-
hr: () => <hr className="my-4 border-theme-border" />,
|
|
135
|
-
strong: ({ children }) => (
|
|
136
|
-
<strong className="font-semibold text-theme-text-primary">{children}</strong>
|
|
137
|
-
),
|
|
138
|
-
em: ({ children }) => (
|
|
139
|
-
<em className="italic">{children}</em>
|
|
140
|
-
),
|
|
141
|
-
}}
|
|
142
|
-
>
|
|
143
|
-
{children}
|
|
144
|
-
</ReactMarkdown>
|
|
157
|
+
<MarkdownHooksContext.Provider value={hooks}>
|
|
158
|
+
<ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>
|
|
159
|
+
{children}
|
|
160
|
+
</ReactMarkdown>
|
|
161
|
+
</MarkdownHooksContext.Provider>
|
|
145
162
|
</div>
|
|
146
163
|
)
|
|
147
164
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react'
|
|
2
|
-
import { Bot, GitCompareArrows, Layers, Network, RefreshCcw, Scale, ScrollText, SlidersHorizontal } from 'lucide-react'
|
|
2
|
+
import { Bot, Database, GitCompareArrows, HardDrive, Hourglass, Layers, Network, RefreshCcw, Scale, ScrollText, SlidersHorizontal, Undo2 } from 'lucide-react'
|
|
3
3
|
import { compareVersions } from '../../utils/version'
|
|
4
4
|
|
|
5
5
|
export interface ReleaseHighlight {
|
|
@@ -47,6 +47,68 @@ export const CHANGELOG_URL = 'https://radarhq.io/changelog'
|
|
|
47
47
|
// major release must have its own entry: scripts/check-whats-new.sh refuses to
|
|
48
48
|
// release one without it.
|
|
49
49
|
export const RELEASE_NOTES: ReleaseNotes[] = [
|
|
50
|
+
{
|
|
51
|
+
version: 'v1.17.0',
|
|
52
|
+
highlights: [
|
|
53
|
+
{
|
|
54
|
+
id: 'cloudnative-pg',
|
|
55
|
+
icon: Database,
|
|
56
|
+
title: 'CloudNativePG, end to end',
|
|
57
|
+
description: 'See which Postgres cluster needs attention and why, whether its backups would restore, and switch over, fence or restore with a review first.',
|
|
58
|
+
leadDescription: 'New views for CloudNativePG show which Postgres cluster needs attention and why, what each instance is doing, and whether its backups would actually let you restore. Create, restore, back up, switch over, fence and hibernate from Radar: you review exactly what will be written, then Radar follows the operation until it sees the outcome.',
|
|
59
|
+
importance: 9,
|
|
60
|
+
path: '/cnpg',
|
|
61
|
+
cta: 'Open CloudNativePG',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'live-traffic-large-clusters',
|
|
65
|
+
icon: Network,
|
|
66
|
+
title: 'Live Traffic on large Cilium clusters',
|
|
67
|
+
description: 'Traffic is drawn per workload and stays fast on big clusters. Focus on one workload, or get a connection list when the map is too big.',
|
|
68
|
+
importance: 7,
|
|
69
|
+
path: '/traffic',
|
|
70
|
+
cta: 'Open Live Traffic',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'gitops-revert-warnings',
|
|
74
|
+
icon: Undo2,
|
|
75
|
+
title: 'Know before an edit gets reverted',
|
|
76
|
+
description: 'Before Radar edits an object owned by Argo CD, Flux or Helm, it tells you whether the owner will undo the change.',
|
|
77
|
+
importance: 6,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'stuck-deletion-issues',
|
|
81
|
+
icon: Hourglass,
|
|
82
|
+
title: 'Issues for stuck deletions',
|
|
83
|
+
description: "Helm uninstalls and custom resources stuck deleting raise issues, and so do volumes that can't attach to their node's machine type.",
|
|
84
|
+
importance: 6,
|
|
85
|
+
path: '/issues',
|
|
86
|
+
cta: 'Open Issues',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'audit-unused-storage',
|
|
90
|
+
icon: HardDrive,
|
|
91
|
+
title: 'Cluster Audit finds unused storage',
|
|
92
|
+
description: 'Claims nothing uses, claims Pending for over a day, and Released PersistentVolumes, with their size and storage class.',
|
|
93
|
+
// Below v1.16's headline at its 0.75 weight, so an upgrade from v1.15
|
|
94
|
+
// still shows that card.
|
|
95
|
+
importance: 4,
|
|
96
|
+
path: '/checks',
|
|
97
|
+
cta: 'Open Checks',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
improvements: [
|
|
101
|
+
// The grid fills row by row: pair lines of similar length.
|
|
102
|
+
"Capacity explains why a node pool isn't scaling down",
|
|
103
|
+
'Nodes being removed show as removed, not failed',
|
|
104
|
+
'Helm actions on Flux releases change the right objects',
|
|
105
|
+
'Flux Sync with source matches flux reconcile --with-source',
|
|
106
|
+
'Topology links Services only to the Pods they select',
|
|
107
|
+
'Namespaces stuck Terminating show what holds them',
|
|
108
|
+
'Filters stay put when you switch kinds or sections',
|
|
109
|
+
'Skip an audit check per resource with an annotation',
|
|
110
|
+
],
|
|
111
|
+
},
|
|
50
112
|
{
|
|
51
113
|
version: 'v1.16.0',
|
|
52
114
|
highlights: [
|
|
@@ -2,7 +2,8 @@ import { describe, expect, it } from 'vitest'
|
|
|
2
2
|
|
|
3
3
|
import { gitOpsOwnerFromRelationships } from '@skyhook-io/k8s-ui'
|
|
4
4
|
import type { Relationships } from '../../types'
|
|
5
|
-
import {
|
|
5
|
+
import { collectServingRefs, supportsBatchExecution } from './WorkloadView'
|
|
6
|
+
import { findInheritedGitOpsLookupRef } from '../../hooks/useResolvedGitOpsOwner'
|
|
6
7
|
|
|
7
8
|
describe('findInheritedGitOpsLookupRef', () => {
|
|
8
9
|
it('follows a referenced ReplicaSet to its parent workload for inherited ownership', () => {
|
|
@@ -74,3 +75,12 @@ describe('supportsBatchExecution', () => {
|
|
|
74
75
|
expect(supportsBatchExecution('CronJob', 'cronjobs', 'batch')).toBe(true)
|
|
75
76
|
})
|
|
76
77
|
})
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
describe('collectServingRefs', () => {
|
|
81
|
+
it('loads moved upstream resources while retaining exact API groups', () => {
|
|
82
|
+
const broker = { kind: 'Broker', group: 'eventing.knative.dev', namespace: 'demo', name: 'messages' }
|
|
83
|
+
const other = { ...broker, group: 'other.example' }
|
|
84
|
+
expect(collectServingRefs({ routedFrom: [broker, broker, other] })).toEqual([broker, other])
|
|
85
|
+
})
|
|
86
|
+
})
|