@skyhook-io/k8s-ui 1.8.10 → 1.8.12
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/package.json +7 -6
- package/src/assets/gitops/argocd.png +0 -0
- package/src/assets/gitops/flux.svg +7 -0
- package/src/components/applications/AppChips.tsx +10 -0
- package/src/components/applications/ApplicationDetail.test.tsx +697 -0
- package/src/components/applications/ApplicationDetail.tsx +3269 -474
- package/src/components/applications/ApplicationsView.tsx +62 -10
- package/src/components/applications/applications-view.test.tsx +47 -0
- package/src/components/applications/index.ts +1 -1
- package/src/components/audit/AuditAlerts.tsx +14 -10
- package/src/components/checks/ChecksView.tsx +2 -3
- package/src/components/checks/severity.ts +14 -10
- package/src/components/cluster-switcher/ClusterSwitcher.tsx +2 -2
- package/src/components/compare/CompareResourcePicker.tsx +2 -2
- package/src/components/gitops/GitOpsDetailLayout.tsx +13 -3
- package/src/components/gitops/GitOpsGraphFilterRail.tsx +2 -1
- package/src/components/gitops/GitOpsTableView.tsx +13 -6
- package/src/components/gitops/ManagedResourcesList.tsx +8 -11
- package/src/components/gitops/SyncCountdown.tsx +26 -17
- package/src/components/gitops/SyncOptionsDialog.test.ts +48 -0
- package/src/components/gitops/SyncOptionsDialog.tsx +190 -46
- package/src/components/gitops/insights/ArgoResourceDiff.tsx +172 -0
- package/src/components/gitops/insights/GitOpsInsightViews.tsx +474 -121
- package/src/components/gitops/insights/index.ts +1 -0
- package/src/components/gitops/insights/insights-helpers.test.ts +102 -1
- package/src/components/gitops/insights/insights-helpers.ts +74 -1
- package/src/components/gitops/tree/GitOpsTreeGraph.tsx +10 -2
- package/src/components/issues/IssuesView.tsx +91 -52
- package/src/components/issues/ResourceIssuesSection.test.tsx +39 -6
- package/src/components/issues/ResourceIssuesSection.tsx +46 -144
- package/src/components/issues/index.ts +3 -0
- package/src/components/issues/issue-timing.ts +53 -0
- package/src/components/issues/issues.test.ts +102 -1
- package/src/components/issues/severity.ts +3 -0
- package/src/components/logs/LogCore.tsx +14 -4
- package/src/components/logs/WorkloadLogsViewer.tsx +31 -6
- package/src/components/logs/useLogStream.ts +8 -1
- package/src/components/namespace-switcher/NamespacePicker.tsx +86 -107
- package/src/components/resources/ResourcesSidebar.test.tsx +71 -0
- package/src/components/resources/ResourcesSidebar.tsx +46 -46
- package/src/components/resources/ResourcesView.selected-kind.test.ts +143 -0
- package/src/components/resources/ResourcesView.tsx +233 -51
- package/src/components/resources/renderers/AWSMachineRenderer.tsx +3 -2
- package/src/components/resources/renderers/AWSManagedClusterRenderer.tsx +3 -2
- package/src/components/resources/renderers/AWSManagedControlPlaneRenderer.tsx +3 -2
- package/src/components/resources/renderers/AWSManagedMachinePoolRenderer.tsx +3 -2
- package/src/components/resources/renderers/AzureMachineRenderer.tsx +3 -2
- package/src/components/resources/renderers/AzureManagedControlPlaneRenderer.tsx +3 -2
- package/src/components/resources/renderers/AzureManagedMachinePoolRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIClusterRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIKubeadmControlPlaneRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIMachineDeploymentRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIMachineHealthCheckRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIMachinePoolRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIMachineRenderer.tsx +3 -2
- package/src/components/resources/renderers/CAPIMachineSetRenderer.tsx +3 -2
- package/src/components/resources/renderers/CertificateRenderer.tsx +3 -2
- package/src/components/resources/renderers/CertificateRequestRenderer.tsx +3 -2
- package/src/components/resources/renderers/ClusterComplianceReportRenderer.tsx +2 -2
- package/src/components/resources/renderers/CompositeRenderer.tsx +3 -2
- package/src/components/resources/renderers/CronWorkflowRenderer.tsx +99 -0
- package/src/components/resources/renderers/ExternalSecretRenderer.tsx +3 -2
- package/src/components/resources/renderers/GCPMachineRenderer.tsx +3 -2
- package/src/components/resources/renderers/GCPManagedControlPlaneRenderer.tsx +3 -2
- package/src/components/resources/renderers/GCPManagedMachinePoolRenderer.tsx +3 -2
- package/src/components/resources/renderers/GRPCRouteRenderer.tsx +7 -3
- package/src/components/resources/renderers/GatewayClassRenderer.tsx +3 -2
- package/src/components/resources/renderers/HTTPRouteRenderer.tsx +7 -3
- package/src/components/resources/renderers/JobRenderer.tsx +3 -1
- package/src/components/resources/renderers/KarpenterEC2NodeClassRenderer.tsx +3 -2
- package/src/components/resources/renderers/KarpenterNodeClaimRenderer.tsx +3 -2
- package/src/components/resources/renderers/KarpenterNodePoolRenderer.tsx +3 -2
- package/src/components/resources/renderers/KedaScaledJobRenderer.tsx +3 -2
- package/src/components/resources/renderers/KedaScaledObjectRenderer.tsx +3 -2
- package/src/components/resources/renderers/ManagedResourceRenderer.tsx +3 -2
- package/src/components/resources/renderers/PVCRenderer.tsx +3 -2
- package/src/components/resources/renderers/PrometheusRuleRenderer.tsx +2 -2
- package/src/components/resources/renderers/SbomReportRenderer.tsx +2 -2
- package/src/components/resources/renderers/SealedSecretRenderer.tsx +3 -2
- package/src/components/resources/renderers/SecretRenderer.tsx +2 -0
- package/src/components/resources/renderers/SecretStoreRenderer.tsx +3 -2
- package/src/components/resources/renderers/ServiceRenderer.tsx +58 -40
- package/src/components/resources/renderers/SimpleRouteRenderer.tsx +7 -3
- package/src/components/resources/renderers/VulnerabilityReportRenderer.tsx +2 -2
- package/src/components/resources/renderers/WorkflowRenderer.test.tsx +43 -0
- package/src/components/resources/renderers/WorkflowRenderer.tsx +60 -78
- package/src/components/resources/renderers/index.ts +1 -0
- package/src/components/resources/resource-utils-argo.test.ts +18 -1
- package/src/components/resources/resource-utils-argo.ts +8 -0
- package/src/components/resources/resource-utils-capi.ts +1 -1
- package/src/components/resources/resource-utils.ts +31 -0
- package/src/components/shared/DetailShell.tsx +2 -2
- package/src/components/shared/ResourceActionsBar.tsx +142 -111
- package/src/components/shared/ResourceRendererDispatch.tsx +33 -4
- package/src/components/shared/UnifiedDiff.tsx +51 -0
- package/src/components/shared/index.ts +1 -0
- package/src/components/timeline/TimelineList.tsx +375 -354
- package/src/components/timeline/TimelineStrip.test.tsx +194 -0
- package/src/components/timeline/TimelineStrip.tsx +836 -0
- package/src/components/timeline/TimelineSwimlanes.test.tsx +1028 -0
- package/src/components/timeline/TimelineSwimlanes.tsx +2498 -593
- package/src/components/timeline/TimelineToolbar.test.tsx +320 -0
- package/src/components/timeline/TimelineToolbar.tsx +759 -0
- package/src/components/timeline/TimelineToolbarState.test.tsx +88 -0
- package/src/components/timeline/index.ts +23 -0
- package/src/components/timeline/scrubber-math.test.ts +235 -0
- package/src/components/timeline/scrubber-math.ts +249 -0
- package/src/components/timeline/shared.test.tsx +219 -0
- package/src/components/timeline/shared.tsx +232 -447
- package/src/components/timeline/timeline-filters.test.ts +196 -0
- package/src/components/timeline/timeline-filters.ts +180 -0
- package/src/components/timeline/timeline-lane-sort.test.ts +97 -0
- package/src/components/timeline/timeline-lane-sort.ts +77 -0
- package/src/components/timeline/timeline-live.test.ts +131 -0
- package/src/components/timeline/timeline-live.ts +77 -0
- package/src/components/topology/GroupNode.tsx +9 -2
- package/src/components/topology/K8sResourceNode.test.ts +11 -0
- package/src/components/topology/K8sResourceNode.tsx +387 -243
- package/src/components/topology/TopologyBreadcrumb.tsx +30 -0
- package/src/components/topology/TopologyControls.tsx +3 -1
- package/src/components/topology/TopologyFilterSidebar.tsx +9 -0
- package/src/components/topology/TopologyGraph.tsx +149 -90
- package/src/components/topology/TopologyOverlayBar.tsx +30 -0
- package/src/components/topology/TopologySearch.tsx +25 -17
- package/src/components/topology/index.ts +2 -0
- package/src/components/topology/layout.ts +10 -2
- package/src/components/topology/topology.css +0 -92
- package/src/components/ui/Badge.tsx +6 -1
- package/src/components/ui/CodeViewer.tsx +2 -2
- package/src/components/ui/Collapse.tsx +59 -0
- package/src/components/ui/ConfirmDialog.tsx +7 -3
- package/src/components/ui/DialogPortal.tsx +31 -9
- package/src/components/ui/Input.tsx +24 -0
- package/src/components/ui/MultiSelectPicker.test.tsx +101 -0
- package/src/components/ui/MultiSelectPicker.tsx +167 -0
- package/src/components/ui/PaneLoader.tsx +10 -2
- package/src/components/ui/ResourceBar.tsx +68 -25
- package/src/components/ui/SearchBox.tsx +18 -4
- package/src/components/ui/SearchPillInput.tsx +2 -2
- package/src/components/ui/SelectMenu.tsx +81 -0
- package/src/components/ui/drawer-components.tsx +48 -32
- package/src/components/ui/index.ts +6 -0
- package/src/components/ui/severity-tone.ts +11 -4
- package/src/components/workload/ResourceDetailDrawer.tsx +6 -2
- package/src/components/workload/WorkloadView.tsx +2706 -475
- package/src/components/workload/index.ts +1 -1
- package/src/theme/tailwind-theme.css +1 -0
- package/src/theme/variables.css +2 -1
- package/src/types/core.ts +57 -4
- package/src/types/gitops-insights.ts +69 -1
- package/src/types/gitops.ts +3 -3
- package/src/utils/application-history.test.ts +538 -0
- package/src/utils/application-history.ts +257 -0
- package/src/utils/application-topology.test.ts +198 -0
- package/src/utils/application-topology.ts +261 -0
- package/src/utils/applications.test.ts +201 -1
- package/src/utils/applications.ts +1182 -393
- package/src/utils/index.ts +3 -0
- package/src/utils/navigation.test.ts +32 -1
- package/src/utils/navigation.ts +70 -0
- package/src/utils/resource-hierarchy.test.ts +1024 -1
- package/src/utils/resource-hierarchy.ts +925 -267
- package/src/utils/resource-icons.ts +2 -0
- package/src/utils/topology-neighborhood.test.ts +202 -1
- package/src/utils/topology-neighborhood.ts +194 -13
- package/src/utils/workflow-execution.test.ts +556 -0
- package/src/utils/workflow-execution.ts +814 -0
- package/src/utils/workload-colors.ts +2 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Server, Cpu, Settings } from 'lucide-react'
|
|
2
2
|
import { clsx } from 'clsx'
|
|
3
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
3
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
4
4
|
import { kindToPlural } from '../../../utils/navigation'
|
|
5
5
|
import { CAPACITY_TYPE_BADGE, BADGE_INACTIVE } from '../../../utils/badge-colors'
|
|
6
6
|
import {
|
|
@@ -40,6 +40,7 @@ export function KarpenterNodeClaimRenderer({ data, onNavigate }: KarpenterNodeCl
|
|
|
40
40
|
|
|
41
41
|
const claimStatus = getNodeClaimStatus(data)
|
|
42
42
|
const isNotReady = claimStatus.level === 'unhealthy'
|
|
43
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
43
44
|
const readyCond = conditions.find((c: any) => c.type === 'Ready')
|
|
44
45
|
const capacity = getNodeClaimCapacity(data)
|
|
45
46
|
const requirements = getNodeClaimRequirements(data)
|
|
@@ -61,7 +62,7 @@ export function KarpenterNodeClaimRenderer({ data, onNavigate }: KarpenterNodeCl
|
|
|
61
62
|
return (
|
|
62
63
|
<>
|
|
63
64
|
{/* Problem alert */}
|
|
64
|
-
{isNotReady && (
|
|
65
|
+
{isNotReady && !operationalIssuesShown && (
|
|
65
66
|
<AlertBanner
|
|
66
67
|
variant="error"
|
|
67
68
|
title="NodeClaim Not Ready"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Server, Settings, Shield, Cpu, Tag, BarChart3 } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
3
3
|
import { kindToPlural } from '../../../utils/navigation'
|
|
4
4
|
import {
|
|
5
5
|
getNodePoolStatus,
|
|
@@ -31,6 +31,7 @@ export function KarpenterNodePoolRenderer({ data, onNavigate }: KarpenterNodePoo
|
|
|
31
31
|
|
|
32
32
|
const poolStatus = getNodePoolStatus(data)
|
|
33
33
|
const isNotReady = poolStatus.level === 'unhealthy'
|
|
34
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
34
35
|
const readyCond = conditions.find((c: any) => c.type === 'Ready')
|
|
35
36
|
const requirements = getNodePoolRequirements(data)
|
|
36
37
|
const weight = getNodePoolWeight(data)
|
|
@@ -45,7 +46,7 @@ export function KarpenterNodePoolRenderer({ data, onNavigate }: KarpenterNodePoo
|
|
|
45
46
|
return (
|
|
46
47
|
<>
|
|
47
48
|
{/* Problem alert */}
|
|
48
|
-
{isNotReady && (
|
|
49
|
+
{isNotReady && !operationalIssuesShown && (
|
|
49
50
|
<AlertBanner
|
|
50
51
|
variant="error"
|
|
51
52
|
title="NodePool Not Ready"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cpu } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
3
3
|
import {
|
|
4
4
|
getScaledJobStatus,
|
|
5
5
|
getScaledJobTarget,
|
|
@@ -18,13 +18,14 @@ export function KedaScaledJobRenderer({ data }: KedaScaledJobRendererProps) {
|
|
|
18
18
|
|
|
19
19
|
const jobStatus = getScaledJobStatus(data)
|
|
20
20
|
const isNotReady = jobStatus.level === 'unhealthy'
|
|
21
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
21
22
|
const readyCond = conditions.find((c: any) => c.type === 'Ready')
|
|
22
23
|
const triggers = getScaledJobTriggers(data)
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<>
|
|
26
27
|
{/* Problem alert */}
|
|
27
|
-
{isNotReady && (
|
|
28
|
+
{isNotReady && !operationalIssuesShown && (
|
|
28
29
|
<AlertBanner
|
|
29
30
|
variant="error"
|
|
30
31
|
title="ScaledJob Not Ready"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cpu, Settings } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink, useOperationalIssuesShown} from '../../ui/drawer-components'
|
|
3
3
|
import { kindToPlural } from '../../../utils/navigation'
|
|
4
4
|
import {
|
|
5
5
|
getScaledObjectStatus,
|
|
@@ -39,6 +39,7 @@ export function KedaScaledObjectRenderer({ data, onNavigate }: KedaScaledObjectR
|
|
|
39
39
|
const isPaused = soStatus.text === 'Paused'
|
|
40
40
|
const isFallback = soStatus.text === 'Fallback'
|
|
41
41
|
const isNotReady = soStatus.level === 'unhealthy'
|
|
42
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
42
43
|
|
|
43
44
|
const readyCond = conditions.find((c: any) => c.type === 'Ready')
|
|
44
45
|
const fallbackCond = conditions.find((c: any) => c.type === 'Fallback')
|
|
@@ -53,7 +54,7 @@ export function KedaScaledObjectRenderer({ data, onNavigate }: KedaScaledObjectR
|
|
|
53
54
|
message={fallbackCond?.message || 'KEDA is using fallback replicas because triggers are failing.'}
|
|
54
55
|
/>
|
|
55
56
|
)}
|
|
56
|
-
{isNotReady && !isFallback && (
|
|
57
|
+
{isNotReady && !isFallback && !operationalIssuesShown && (
|
|
57
58
|
<AlertBanner
|
|
58
59
|
variant="error"
|
|
59
60
|
title="ScaledObject Not Ready"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box, Settings, Cloud, ScrollText, Pause, Layers } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink, useOperationalIssuesShown} from '../../ui/drawer-components'
|
|
3
3
|
import { CodeViewer } from '../../ui/CodeViewer'
|
|
4
4
|
import {
|
|
5
5
|
getCrossplaneStatus,
|
|
@@ -41,6 +41,7 @@ export function ManagedResourceRenderer({ data, onNavigate }: ManagedResourceRen
|
|
|
41
41
|
const atProvider = data?.status?.atProvider
|
|
42
42
|
|
|
43
43
|
const alertVariant = status.level === 'unhealthy' || status.level === 'alert' ? status.level : null
|
|
44
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
47
|
<>
|
|
@@ -53,7 +54,7 @@ export function ManagedResourceRenderer({ data, onNavigate }: ManagedResourceRen
|
|
|
53
54
|
/>
|
|
54
55
|
)}
|
|
55
56
|
|
|
56
|
-
{alertVariant && statusReason && (
|
|
57
|
+
{alertVariant && statusReason && !operationalIssuesShown && (
|
|
57
58
|
<AlertBanner
|
|
58
59
|
variant={alertVariant === 'unhealthy' ? 'error' : 'warning'}
|
|
59
60
|
title={status.text}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
2
|
import { HardDrive } from 'lucide-react'
|
|
3
3
|
import { clsx } from 'clsx'
|
|
4
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
4
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceLink, useOperationalIssuesShown} from '../../ui/drawer-components'
|
|
5
5
|
|
|
6
6
|
interface PVCRendererProps {
|
|
7
7
|
data: any
|
|
@@ -38,11 +38,12 @@ export function PVCRenderer({ data, onNavigate, extraSections }: PVCRendererProp
|
|
|
38
38
|
const selectedNode = annotations['volume.kubernetes.io/selected-node']
|
|
39
39
|
const bindCompleted = annotations['pv.kubernetes.io/bind-completed']
|
|
40
40
|
const hasProvisionerInfo = provisioner || selectedNode || bindCompleted
|
|
41
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<>
|
|
44
45
|
{/* Problem alerts */}
|
|
45
|
-
{isLost && (
|
|
46
|
+
{isLost && !operationalIssuesShown && (
|
|
46
47
|
<AlertBanner
|
|
47
48
|
variant="error"
|
|
48
49
|
title="Issues Detected"
|
|
@@ -2,6 +2,7 @@ import { useState, useMemo } from 'react'
|
|
|
2
2
|
import { Bell, Search, ChevronRight } from 'lucide-react'
|
|
3
3
|
import { clsx } from 'clsx'
|
|
4
4
|
import { Section, PropertyList, Property, ConditionsSection } from '../../ui/drawer-components'
|
|
5
|
+
import { Input } from '../../ui/Input'
|
|
5
6
|
import { BADGE_SEVERITY_COLORS } from '../../ui/Badge'
|
|
6
7
|
import {
|
|
7
8
|
getPrometheusRuleGroups,
|
|
@@ -190,8 +191,7 @@ export function PrometheusRuleRenderer({ data }: PrometheusRuleRendererProps) {
|
|
|
190
191
|
{totalRules > 5 && (
|
|
191
192
|
<div className="relative mb-3">
|
|
192
193
|
<Search className="absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-theme-text-tertiary" />
|
|
193
|
-
<
|
|
194
|
-
type="text"
|
|
194
|
+
<Input
|
|
195
195
|
placeholder="Filter rules by name or expression..."
|
|
196
196
|
value={searchTerm}
|
|
197
197
|
onChange={(e) => setSearchTerm(e.target.value)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useMemo } from 'react'
|
|
2
2
|
import { Package, ChevronDown, ChevronRight, Search } from 'lucide-react'
|
|
3
3
|
import { Section, PropertyList, Property } from '../../ui/drawer-components'
|
|
4
|
+
import { Input } from '../../ui/Input'
|
|
4
5
|
import { formatAge } from '../resource-utils'
|
|
5
6
|
import { formatTrivyImage } from './trivy-shared'
|
|
6
7
|
|
|
@@ -74,8 +75,7 @@ export function SbomReportRenderer({ data }: SbomReportRendererProps) {
|
|
|
74
75
|
<div className="flex items-center gap-2 mb-2 px-1">
|
|
75
76
|
<div className="relative flex-1">
|
|
76
77
|
<Search className="absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-theme-text-tertiary" />
|
|
77
|
-
<
|
|
78
|
-
type="text"
|
|
78
|
+
<Input
|
|
79
79
|
placeholder="Filter by name, type, or purl..."
|
|
80
80
|
value={searchTerm}
|
|
81
81
|
onChange={(e) => { setSearchTerm(e.target.value); setShowAll(false) }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Lock, Key, FileText } from 'lucide-react'
|
|
2
2
|
import { clsx } from 'clsx'
|
|
3
|
-
import { Section, PropertyList, Property, ConditionsSection, KeyValueBadgeList, AlertBanner, ResourceLink } from '../../ui/drawer-components'
|
|
3
|
+
import { Section, PropertyList, Property, ConditionsSection, KeyValueBadgeList, AlertBanner, ResourceLink, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
4
4
|
|
|
5
5
|
interface SealedSecretRendererProps {
|
|
6
6
|
data: any
|
|
@@ -32,6 +32,7 @@ export function SealedSecretRenderer({ data, onNavigate }: SealedSecretRendererP
|
|
|
32
32
|
const syncedCond = conditions.find((c: any) => c.type === 'Synced')
|
|
33
33
|
const isSynced = syncedCond?.status === 'True'
|
|
34
34
|
const isNotSynced = syncedCond?.status === 'False'
|
|
35
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
35
36
|
|
|
36
37
|
const hasTemplateMetadata =
|
|
37
38
|
(templateLabels && Object.keys(templateLabels).length > 0) ||
|
|
@@ -40,7 +41,7 @@ export function SealedSecretRenderer({ data, onNavigate }: SealedSecretRendererP
|
|
|
40
41
|
return (
|
|
41
42
|
<>
|
|
42
43
|
{/* Problem detection alert */}
|
|
43
|
-
{isNotSynced && (
|
|
44
|
+
{isNotSynced && !operationalIssuesShown && (
|
|
44
45
|
<AlertBanner
|
|
45
46
|
variant="error"
|
|
46
47
|
title="Secret is not synced"
|
|
@@ -217,6 +217,8 @@ export function SecretRenderer({ data, certificateInfo, resourceData, onSaveSecr
|
|
|
217
217
|
ref={textareaRef}
|
|
218
218
|
value={editValue}
|
|
219
219
|
onChange={(e) => setEditValue(e.target.value)}
|
|
220
|
+
autoCorrect="off"
|
|
221
|
+
autoCapitalize="off"
|
|
220
222
|
className="w-full bg-theme-base rounded p-2 text-xs text-theme-text-secondary font-mono border border-blue-500/50 focus:border-blue-500 focus:outline-none resize-none overflow-hidden whitespace-pre-wrap"
|
|
221
223
|
style={{ minHeight: '60px' }}
|
|
222
224
|
disabled={isSaving}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShieldCheck } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
3
3
|
import {
|
|
4
4
|
getSecretStoreStatus,
|
|
5
5
|
getSecretStoreProviderType,
|
|
@@ -41,11 +41,12 @@ export function SecretStoreRenderer({ data }: SecretStoreRendererProps) {
|
|
|
41
41
|
// Problem detection
|
|
42
42
|
const readyCond = conditions.find((c: any) => c.type === 'Ready')
|
|
43
43
|
const isNotReady = readyCond?.status === 'False'
|
|
44
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
47
|
<>
|
|
47
48
|
{/* Alert if not ready */}
|
|
48
|
-
{isNotReady && (
|
|
49
|
+
{isNotReady && !operationalIssuesShown && (
|
|
49
50
|
<AlertBanner
|
|
50
51
|
variant="error"
|
|
51
52
|
title="Store Not Ready"
|
|
@@ -3,6 +3,15 @@ import { Globe, Clock, Radio } from 'lucide-react'
|
|
|
3
3
|
import { Section, PropertyList, Property, KeyValueBadgeList, CopyHandler, AlertBanner } from '../../ui/drawer-components'
|
|
4
4
|
import type { ResourceRef } from '../../../types'
|
|
5
5
|
|
|
6
|
+
export interface ServicePortRenderProps {
|
|
7
|
+
namespace: string
|
|
8
|
+
serviceName: string
|
|
9
|
+
port: number
|
|
10
|
+
protocol: string
|
|
11
|
+
name?: string
|
|
12
|
+
appProtocol?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
6
15
|
interface ServiceRendererProps {
|
|
7
16
|
data: any
|
|
8
17
|
onCopy: CopyHandler
|
|
@@ -10,11 +19,8 @@ interface ServiceRendererProps {
|
|
|
10
19
|
endpointSlices?: any[]
|
|
11
20
|
endpointSlicesLoading?: boolean
|
|
12
21
|
onNavigate?: (ref: ResourceRef) => void
|
|
13
|
-
renderPortAction?: (props:
|
|
14
|
-
|
|
15
|
-
* (e.g. an inline probe panel). Lets a host attach a port-scoped panel in the
|
|
16
|
-
* drawer flow rather than as a separate overlay. */
|
|
17
|
-
renderPortPanel?: (props: { namespace: string; serviceName: string; port: number; protocol: string; name?: string; appProtocol?: string }) => ReactNode
|
|
22
|
+
renderPortAction?: (props: ServicePortRenderProps) => ReactNode
|
|
23
|
+
renderPortPanel?: (props: ServicePortRenderProps) => ReactNode
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
function endpointSliceAddressCount(slice: any): number {
|
|
@@ -37,7 +43,6 @@ export function ServiceRenderer({ data, onCopy, copied, endpointSlices, endpoint
|
|
|
37
43
|
const ports = spec.ports || []
|
|
38
44
|
const lbIngress = data.status?.loadBalancer?.ingress || []
|
|
39
45
|
const namespace = data.metadata?.namespace
|
|
40
|
-
const serviceName = data.metadata?.name
|
|
41
46
|
|
|
42
47
|
const isLoadBalancer = spec.type === 'LoadBalancer'
|
|
43
48
|
const isExternalName = spec.type === 'ExternalName'
|
|
@@ -96,40 +101,7 @@ export function ServiceRenderer({ data, onCopy, copied, endpointSlices, endpoint
|
|
|
96
101
|
|
|
97
102
|
{ports.length > 0 && (
|
|
98
103
|
<Section title="Ports" defaultExpanded>
|
|
99
|
-
<
|
|
100
|
-
{ports.map((port: any, i: number) => (
|
|
101
|
-
<div key={`${port.port}-${port.protocol || 'TCP'}`} className="card-inner text-sm">
|
|
102
|
-
<div className="flex items-center justify-between gap-2">
|
|
103
|
-
<div className="flex items-baseline gap-x-2 gap-y-0.5 min-w-0 flex-wrap">
|
|
104
|
-
<span className="text-theme-text-primary font-medium">{port.name || `port-${i + 1}`}</span>
|
|
105
|
-
<span className="text-xs text-theme-text-tertiary">{port.protocol || 'TCP'}</span>
|
|
106
|
-
<span className="text-xs text-theme-text-secondary font-mono">
|
|
107
|
-
{port.port}{port.targetPort != null && port.targetPort !== port.port ? ` → ${port.targetPort}` : ''}
|
|
108
|
-
{port.nodePort ? ` (NodePort: ${port.nodePort})` : ''}
|
|
109
|
-
</span>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="flex items-center gap-2 shrink-0">
|
|
112
|
-
{renderPortAction?.({
|
|
113
|
-
namespace,
|
|
114
|
-
serviceName,
|
|
115
|
-
port: port.port,
|
|
116
|
-
protocol: port.protocol || 'TCP',
|
|
117
|
-
name: port.name,
|
|
118
|
-
appProtocol: port.appProtocol,
|
|
119
|
-
})}
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
{renderPortPanel?.({
|
|
123
|
-
namespace,
|
|
124
|
-
serviceName,
|
|
125
|
-
port: port.port,
|
|
126
|
-
protocol: port.protocol || 'TCP',
|
|
127
|
-
name: port.name,
|
|
128
|
-
appProtocol: port.appProtocol,
|
|
129
|
-
})}
|
|
130
|
-
</div>
|
|
131
|
-
))}
|
|
132
|
-
</div>
|
|
104
|
+
<ServicePortCards service={data} renderPortAction={renderPortAction} renderPortPanel={renderPortPanel} />
|
|
133
105
|
</Section>
|
|
134
106
|
)}
|
|
135
107
|
|
|
@@ -184,3 +156,49 @@ export function ServiceRenderer({ data, onCopy, copied, endpointSlices, endpoint
|
|
|
184
156
|
</>
|
|
185
157
|
)
|
|
186
158
|
}
|
|
159
|
+
|
|
160
|
+
export function ServicePortCards({
|
|
161
|
+
service,
|
|
162
|
+
renderPortAction,
|
|
163
|
+
renderPortPanel,
|
|
164
|
+
}: {
|
|
165
|
+
service: any
|
|
166
|
+
renderPortAction?: (props: ServicePortRenderProps) => ReactNode
|
|
167
|
+
renderPortPanel?: (props: ServicePortRenderProps) => ReactNode
|
|
168
|
+
}) {
|
|
169
|
+
const ports = service?.spec?.ports || []
|
|
170
|
+
const namespace = service?.metadata?.namespace || ''
|
|
171
|
+
const serviceName = service?.metadata?.name || ''
|
|
172
|
+
return (
|
|
173
|
+
<div className="space-y-2">
|
|
174
|
+
{ports.map((port: any, i: number) => {
|
|
175
|
+
const props: ServicePortRenderProps = {
|
|
176
|
+
namespace,
|
|
177
|
+
serviceName,
|
|
178
|
+
port: port.port,
|
|
179
|
+
protocol: port.protocol || 'TCP',
|
|
180
|
+
name: port.name,
|
|
181
|
+
appProtocol: port.appProtocol,
|
|
182
|
+
}
|
|
183
|
+
return (
|
|
184
|
+
<div key={`${serviceName}-${port.name || i}-${port.port}-${port.protocol || 'TCP'}`} className="card-inner text-sm">
|
|
185
|
+
<div className="flex items-center justify-between gap-2">
|
|
186
|
+
<div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5">
|
|
187
|
+
<span className="font-medium text-theme-text-primary">{port.name || `port-${i + 1}`}</span>
|
|
188
|
+
<span className="text-xs text-theme-text-tertiary">{port.protocol || 'TCP'}</span>
|
|
189
|
+
<span className="font-mono text-xs text-theme-text-secondary">
|
|
190
|
+
{port.port}{port.targetPort != null && port.targetPort !== port.port ? ` → ${port.targetPort}` : ''}
|
|
191
|
+
{port.nodePort ? ` (NodePort: ${port.nodePort})` : ''}
|
|
192
|
+
</span>
|
|
193
|
+
</div>
|
|
194
|
+
<div className="flex shrink-0 items-center gap-2">
|
|
195
|
+
{renderPortAction?.(props)}
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
{renderPortPanel?.(props)}
|
|
199
|
+
</div>
|
|
200
|
+
)
|
|
201
|
+
})}
|
|
202
|
+
</div>
|
|
203
|
+
)
|
|
204
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Globe, ArrowRight, Network } from 'lucide-react'
|
|
2
|
-
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceRefBadge } from '../../ui/drawer-components'
|
|
2
|
+
import { Section, PropertyList, Property, ConditionsSection, AlertBanner, ResourceRefBadge, useOperationalIssuesShown } from '../../ui/drawer-components'
|
|
3
3
|
import { Badge } from '../../ui/Badge'
|
|
4
4
|
import type { ResourceRef } from '../../../types'
|
|
5
5
|
|
|
@@ -26,6 +26,10 @@ export function SimpleRouteRenderer({ data, kind, onNavigate }: SimpleRouteRende
|
|
|
26
26
|
const unresolvedRefsParents = parentStatuses.filter((p: any) =>
|
|
27
27
|
(p.conditions || []).some((c: any) => c.type === 'ResolvedRefs' && c.status === 'False')
|
|
28
28
|
)
|
|
29
|
+
// The Operational Issues section (when the host shows it) already reports these
|
|
30
|
+
// Accepted/ResolvedRefs failures with richer cause + next-step context, so drop
|
|
31
|
+
// the renderer's own banners to avoid showing the same failure twice.
|
|
32
|
+
const operationalIssuesShown = useOperationalIssuesShown()
|
|
29
33
|
|
|
30
34
|
const firstParentConditions = parentStatuses.length > 0
|
|
31
35
|
? parentStatuses[0].conditions
|
|
@@ -50,7 +54,7 @@ export function SimpleRouteRenderer({ data, kind, onNavigate }: SimpleRouteRende
|
|
|
50
54
|
|
|
51
55
|
return (
|
|
52
56
|
<>
|
|
53
|
-
{notAcceptedParents.length > 0 && (
|
|
57
|
+
{notAcceptedParents.length > 0 && !operationalIssuesShown && (
|
|
54
58
|
<AlertBanner
|
|
55
59
|
variant="error"
|
|
56
60
|
title="Route Not Accepted"
|
|
@@ -64,7 +68,7 @@ export function SimpleRouteRenderer({ data, kind, onNavigate }: SimpleRouteRende
|
|
|
64
68
|
/>
|
|
65
69
|
)}
|
|
66
70
|
|
|
67
|
-
{unresolvedRefsParents.length > 0 && (
|
|
71
|
+
{unresolvedRefsParents.length > 0 && !operationalIssuesShown && (
|
|
68
72
|
<AlertBanner
|
|
69
73
|
variant="warning"
|
|
70
74
|
title="Unresolved References"
|
|
@@ -2,6 +2,7 @@ import { useState, useMemo } from 'react'
|
|
|
2
2
|
import { Shield, Package, ChevronDown, ChevronRight, ChevronUp, ExternalLink, Search, ArrowUpDown, Wrench } from 'lucide-react'
|
|
3
3
|
import { clsx } from 'clsx'
|
|
4
4
|
import { Section, PropertyList, Property } from '../../ui/drawer-components'
|
|
5
|
+
import { Input } from '../../ui/Input'
|
|
5
6
|
import { formatAge } from '../resource-utils'
|
|
6
7
|
import { SEVERITY_BADGE_COLORS, SEVERITY_BAR_COLORS, SEVERITY_TEXT_COLORS, SEVERITY_ORDER, TrivyAlertBanner, formatTrivyImage } from './trivy-shared'
|
|
7
8
|
|
|
@@ -222,8 +223,7 @@ export function VulnerabilityReportRenderer({ data }: VulnerabilityReportRendere
|
|
|
222
223
|
<div className="flex items-center gap-2 mb-2 px-1">
|
|
223
224
|
<div className="relative flex-1">
|
|
224
225
|
<Search className="absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-theme-text-tertiary" />
|
|
225
|
-
<
|
|
226
|
-
type="text"
|
|
226
|
+
<Input
|
|
227
227
|
placeholder="Filter by CVE or package..."
|
|
228
228
|
value={searchTerm}
|
|
229
229
|
onChange={(e) => { setSearchTerm(e.target.value); setShowAll(false) }}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { renderToString } from 'react-dom/server'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { WorkflowRenderer } from './WorkflowRenderer'
|
|
5
|
+
|
|
6
|
+
describe('WorkflowRenderer', () => {
|
|
7
|
+
it('does not turn retained failed attempts into a failed workflow', () => {
|
|
8
|
+
const html = renderToString(<WorkflowRenderer data={{
|
|
9
|
+
metadata: { name: 'retry-workflow' },
|
|
10
|
+
status: {
|
|
11
|
+
phase: 'Succeeded',
|
|
12
|
+
nodes: {
|
|
13
|
+
root: { name: 'retry-workflow', displayName: 'retry-workflow', templateName: 'main', type: 'Retry', phase: 'Succeeded', children: ['attempt'] },
|
|
14
|
+
attempt: { displayName: 'retry-workflow(0)', type: 'Pod', phase: 'Failed', message: 'first attempt failed' },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}} />)
|
|
18
|
+
|
|
19
|
+
expect(html).toContain('Workflow Completed Successfully')
|
|
20
|
+
expect(html).not.toContain('Workflow Issues')
|
|
21
|
+
expect(html).toContain('Execution (2 nodes)')
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('lists every failed node and bounds long problem summaries', () => {
|
|
25
|
+
const longMessage = 'x'.repeat(500)
|
|
26
|
+
const html = renderToString(<WorkflowRenderer data={{
|
|
27
|
+
metadata: { name: 'failed-workflow' },
|
|
28
|
+
status: {
|
|
29
|
+
phase: 'Failed',
|
|
30
|
+
message: 'workflow failed',
|
|
31
|
+
nodes: {
|
|
32
|
+
root: { name: 'failed-workflow', displayName: 'failed-workflow', templateName: 'main', type: 'DAG', phase: 'Failed', children: ['with-message', 'without-message'] },
|
|
33
|
+
'with-message': { displayName: 'prepare', type: 'Pod', phase: 'Failed', message: longMessage },
|
|
34
|
+
'without-message': { displayName: 'publish', type: 'Pod', phase: 'Failed' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}} />)
|
|
38
|
+
|
|
39
|
+
expect(html).toContain('Workflow Issues')
|
|
40
|
+
expect(html).toContain('publish failed')
|
|
41
|
+
expect(html).toContain(`prepare: ${'x'.repeat(290)}…`)
|
|
42
|
+
})
|
|
43
|
+
})
|