@skyhook-io/radar-app 1.21.6 → 1.21.7
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 +7 -7
- package/src/App.tsx +19 -1
- package/src/RadarApp.tsx +8 -2
- package/src/api/client.discoverMetrics.test.tsx +69 -0
- package/src/api/client.issueCorrelation.test.tsx +244 -0
- package/src/api/client.issueRowChanges.test.tsx +129 -0
- package/src/api/client.pendingOwnership.test.tsx +197 -0
- package/src/api/client.prometheusStatus.test.ts +4 -0
- package/src/api/client.restartError.test.ts +36 -1
- package/src/api/client.stopWorkflow.test.tsx +133 -0
- package/src/api/client.submitWorkflowTemplate.test.tsx +127 -0
- package/src/api/client.ts +572 -111
- package/src/api/connectionBinding.test.tsx +3 -1
- package/src/api/connectionBinding.ts +14 -2
- package/src/api/gitOpsPermissions.render.test.tsx +155 -0
- package/src/api/gitOpsPermissions.test.ts +90 -0
- package/src/api/gitOpsPermissions.ts +51 -0
- package/src/api/httpErrors.test.ts +30 -1
- package/src/api/httpErrors.ts +17 -0
- package/src/api/openobserveSetup.ts +85 -0
- package/src/api/podDebug.test.tsx +137 -0
- package/src/api/podDebug.ts +82 -0
- package/src/api/prometheusCharts.test.ts +23 -0
- package/src/api/prometheusCharts.ts +25 -0
- package/src/api/radarFeatures.render.test.tsx +43 -2
- package/src/api/radarFeatures.test.ts +18 -1
- package/src/api/radarFeatures.ts +17 -4
- package/src/api/reviewedActionMutation.ts +9 -2
- package/src/api/workloadMetrics.ts +2 -0
- package/src/components/applications/ApplicationsView.openResource.test.tsx +137 -11
- package/src/components/applications/ApplicationsView.tsx +56 -31
- package/src/components/cnpg/host.test.tsx +1 -1
- package/src/components/cnpg/host.tsx +0 -2
- package/src/components/dock/BottomDock.tsx +7 -3
- package/src/components/dock/MissingShellDebug.test.tsx +193 -0
- package/src/components/dock/MissingShellDebug.tsx +114 -0
- package/src/components/dock/PodDebugSession.test.tsx +60 -0
- package/src/components/dock/PodDebugSession.tsx +96 -0
- package/src/components/dock/TerminalTab.test.tsx +48 -4
- package/src/components/dock/TerminalTab.tsx +47 -25
- package/src/components/dock/WorkloadLogsTab.test.tsx +24 -1
- package/src/components/dock/WorkloadLogsTab.tsx +16 -0
- package/src/components/execution/BatchExecutionView.command.test.tsx +69 -0
- package/src/components/execution/BatchExecutionView.tsx +88 -5
- package/src/components/execution/BatchExecutionView.workflow-stop.test.tsx +69 -0
- package/src/components/execution/WorkflowRunStopAction.tsx +8 -0
- package/src/components/gitops/GitOpsPermissionRowActions.test.tsx +100 -0
- package/src/components/gitops/GitOpsPermissionRowActions.tsx +27 -0
- package/src/components/gitops/GitOpsView.identity.test.tsx +1 -0
- package/src/components/gitops/GitOpsView.permissions.test.tsx +102 -0
- package/src/components/gitops/GitOpsView.syncRequest.test.tsx +95 -7
- package/src/components/gitops/GitOpsView.tsx +93 -32
- package/src/components/helm/OwnedResources.tsx +1 -0
- package/src/components/home/mcpToolCatalog.ts +1 -0
- package/src/components/issues/IssuesPane.render.test.tsx +1 -1
- package/src/components/issues/IssuesPane.tsx +11 -0
- package/src/components/issues/useIssueExpansion.ts +91 -0
- package/src/components/resource/MetricsNotConnected.test.tsx +50 -0
- package/src/components/resource/MetricsNotConnected.tsx +114 -0
- package/src/components/resource/PVCUsageBar.tsx +2 -1
- package/src/components/resource/PrometheusCharts.render.test.tsx +47 -0
- package/src/components/resource/PrometheusCharts.tsx +14 -2
- package/src/components/resource/PrometheusChartsGrid.render.test.tsx +91 -1
- package/src/components/resource/PrometheusChartsGrid.tsx +28 -52
- package/src/components/resource/RestartChart.tsx +4 -3
- package/src/components/resource/RightsizingPanel.source.test.tsx +34 -0
- package/src/components/resource/RightsizingStrip.tsx +5 -3
- package/src/components/resource/WorkloadMetricsSection.render.test.tsx +6 -0
- package/src/components/resource/WorkloadMetricsSection.tsx +14 -11
- package/src/components/resource/nameMatchedScope.ts +9 -3
- package/src/components/resources/EmptyNamespaceHint.tsx +42 -0
- package/src/components/resources/PodDebugAction.test.tsx +157 -0
- package/src/components/resources/PodDebugAction.tsx +207 -0
- package/src/components/resources/PodDebugPermission.tsx +21 -0
- package/src/components/resources/ResourcesView.empty-hint.test.tsx +132 -0
- package/src/components/resources/ResourcesView.tsx +39 -5
- package/src/components/resources/namespaceHint.test.ts +34 -0
- package/src/components/resources/namespaceHint.ts +19 -0
- package/src/components/resources/renderers/AdmissionPolicyRenderers.tsx +135 -0
- package/src/components/resources/renderers/NodeRenderer.tsx +2 -1
- package/src/components/resources/renderers/PodRenderer.tsx +12 -5
- package/src/components/resources/renderers/ValidatingAdmissionPolicyRenderer.test.tsx +24 -1
- package/src/components/settings/LocalIntegrationStatus.tsx +14 -3
- package/src/components/settings/MetricsBackendSwitch.tsx +167 -0
- package/src/components/settings/OpenObserveSetup.test.tsx +343 -0
- package/src/components/settings/OpenObserveSetup.tsx +358 -0
- package/src/components/settings/SettingsDialog.tsx +21 -7
- package/src/components/settings/openobserveStatus.test.ts +34 -0
- package/src/components/settings/openobserveStatus.ts +55 -0
- package/src/components/timeline/TimelineList.selection.test.tsx +40 -0
- package/src/components/timeline/TimelineList.test.ts +18 -0
- package/src/components/timeline/TimelineList.tsx +19 -5
- package/src/components/timeline/TimelineView.tsx +2 -0
- package/src/components/workload/WorkloadView.pendingOwnership.test.tsx +34 -0
- package/src/components/workload/WorkloadView.tabUrl.test.tsx +44 -0
- package/src/components/workload/WorkloadView.tsx +95 -10
- package/src/context/TimelineNavigation.test.ts +59 -0
- package/src/context/TimelineNavigation.tsx +86 -0
- package/src/contexts/CapabilitiesContext.tsx +3 -1
- package/src/hooks/useResourceCounts.ts +2 -1
- package/src/hooks/useWorkflowStopAction.ts +31 -0
- package/src/index.css +1 -0
- package/src/integrations/resourceHosts.test.tsx +2 -2
- package/src/integrations/resourceHosts.tsx +4 -2
- package/src/k8s-ui-exports.test.ts +10 -0
- package/src/components/resources/renderers/ValidatingAdmissionPolicyRenderer.tsx +0 -128
|
@@ -14,7 +14,7 @@ export interface ResourceCountsResponse {
|
|
|
14
14
|
// Lightweight per-kind counts for the Resources sidebar badges. Shared by the
|
|
15
15
|
// Resources view and any surface that renders the same sidebar standalone, so
|
|
16
16
|
// both read one cache entry.
|
|
17
|
-
export function useResourceCounts(namespaces: string[]) {
|
|
17
|
+
export function useResourceCounts(namespaces: string[], options?: { enabled?: boolean }) {
|
|
18
18
|
const { connection } = useConnection()
|
|
19
19
|
const namespacesParam = namespaces.join(',')
|
|
20
20
|
return useQuery({
|
|
@@ -34,6 +34,7 @@ export function useResourceCounts(namespaces: string[]) {
|
|
|
34
34
|
})
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
+
enabled: options?.enabled ?? true,
|
|
37
38
|
staleTime: 10000,
|
|
38
39
|
// SSE invalidation isn't running while connecting, and mid-sync counts
|
|
39
40
|
// are what unlatch guarded kinds as their informers finish — poll fast
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { canStopWorkflow, type WorkflowStopActionProps } from '@skyhook-io/k8s-ui'
|
|
2
|
+
import { isWorkflowStopTargetGone, useRadarFeature, useStopWorkflow } from '../api/client'
|
|
3
|
+
import { useNamespacedCapabilities } from '../contexts/CapabilitiesContext'
|
|
4
|
+
|
|
5
|
+
type WorkflowStopHostProps = Pick<WorkflowStopActionProps, 'onStopWorkflow' | 'isStoppingWorkflow' | 'workflowStopUpgrade'>
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wires Stop / Terminate for an Argo Workflow in `namespace`: offered only when
|
|
9
|
+
* the Radar serves the stop endpoint and the caller may patch Workflows there.
|
|
10
|
+
*/
|
|
11
|
+
export function useWorkflowStopAction(kind: string, group: string | undefined, namespace: string | undefined): WorkflowStopHostProps {
|
|
12
|
+
const { workloadWrites, workloadWritesPending } = useNamespacedCapabilities(namespace)
|
|
13
|
+
const { support, upgrade } = useRadarFeature('workflowStop')
|
|
14
|
+
const mutation = useStopWorkflow()
|
|
15
|
+
const allowed = !workloadWritesPending && canStopWorkflow({ name: kind, group }, workloadWrites, support === 'supported')
|
|
16
|
+
return {
|
|
17
|
+
// mutateAsync, not mutate: the stop dialog stays open when this rejects.
|
|
18
|
+
// A run that is gone or replaced has nothing left to retry, so those
|
|
19
|
+
// resolve and close it; the mutation meta has already reported them.
|
|
20
|
+
onStopWorkflow: allowed
|
|
21
|
+
? (params) => mutation.mutateAsync(params).catch((error: unknown) => {
|
|
22
|
+
if (isWorkflowStopTargetGone(error)) return
|
|
23
|
+
throw error
|
|
24
|
+
})
|
|
25
|
+
: undefined,
|
|
26
|
+
isStoppingWorkflow: mutation.isPending,
|
|
27
|
+
// Only a Radar known to lack the endpoint gets the upgrade note; a failed
|
|
28
|
+
// capabilities probe is not evidence of an old Radar.
|
|
29
|
+
workflowStopUpgrade: kind === 'workflows' && group === 'argoproj.io' && support === 'unsupported' ? upgrade : null,
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/index.css
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
@container metrics (min-width: 1200px) {
|
|
38
38
|
.metrics-chart-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
39
|
+
.metrics-chart-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
39
40
|
.metrics-chart-wide { grid-column: auto; }
|
|
40
41
|
}
|
|
41
42
|
.investigation-assessment {
|
|
@@ -55,7 +55,7 @@ describe('application resource hosts', () => {
|
|
|
55
55
|
'RolloutRenderer', 'KyvernoPolicyCoverage', 'KyvernoPolicyQueued', 'CNPGObjectStoreRenderer',
|
|
56
56
|
'VeleroBSLRenderer', 'VeleroBackupRenderer', 'VeleroRestoreRenderer', 'CNPGClusterRenderer',
|
|
57
57
|
'CNPGDatabaseRenderer', 'CNPGPublicationRenderer', 'CNPGSubscriptionRenderer', 'CNPGImageCatalogRenderer',
|
|
58
|
-
'FluxHelmReleaseRenderer', 'OpenTelemetryCollectorRenderer', 'ValidatingAdmissionPolicyRenderer', 'ValidatingAdmissionPolicyBindingRenderer', 'SecretProviderClassRenderer', 'UpgradePlanRenderer', 'SealedSecretRenderer', 'K3sHelmChartRenderer',
|
|
58
|
+
'FluxHelmReleaseRenderer', 'OpenTelemetryCollectorRenderer', 'ValidatingAdmissionPolicyRenderer', 'ValidatingAdmissionPolicyBindingRenderer', 'MutatingAdmissionPolicyRenderer', 'MutatingAdmissionPolicyBindingRenderer', 'SecretProviderClassRenderer', 'UpgradePlanRenderer', 'SealedSecretRenderer', 'K3sHelmChartRenderer',
|
|
59
59
|
].sort())
|
|
60
60
|
const inherited = [{ id: 'local', label: 'Local', render: () => null }]
|
|
61
61
|
expect(resourceDetailSlots({ kind: 'Pod', group: '', namespace: 'db', name: 'pg-1' }, inherited).extraTabs).toEqual(inherited)
|
|
@@ -74,7 +74,7 @@ describe('application resource hosts', () => {
|
|
|
74
74
|
const path = resourceDetailRedirect({ ...cluster, kind: 'clusters' }, search)!
|
|
75
75
|
const url = new URL(path, 'http://radar.test')
|
|
76
76
|
expect(url.pathname).toBe('/cnpg/clusters/db/pg')
|
|
77
|
-
expect(Object.fromEntries(url.searchParams)).toEqual({ ctx: 'kind-demo', tab: '
|
|
77
|
+
expect(Object.fromEntries(url.searchParams)).toEqual({ ctx: 'kind-demo', tab: 'events', drawer: 'pods:pg-1', 'ai-run': 'run' })
|
|
78
78
|
expect(search.get('tab')).toBe('events')
|
|
79
79
|
expect(search.get('apiGroup')).toBe('postgresql.cnpg.io')
|
|
80
80
|
})
|
|
@@ -44,9 +44,11 @@ import { SealedSecretRenderer } from '../components/resources/renderers/SealedSe
|
|
|
44
44
|
import { K3sHelmChartRenderer } from '../components/resources/renderers/K3sHelmChartRenderer'
|
|
45
45
|
import { UpgradePlanRenderer } from '../components/resources/renderers/UpgradePlanRenderer'
|
|
46
46
|
import {
|
|
47
|
+
MutatingAdmissionPolicyBindingRenderer,
|
|
48
|
+
MutatingAdmissionPolicyRenderer,
|
|
47
49
|
ValidatingAdmissionPolicyBindingRenderer,
|
|
48
50
|
ValidatingAdmissionPolicyRenderer,
|
|
49
|
-
} from '../components/resources/renderers/
|
|
51
|
+
} from '../components/resources/renderers/AdmissionPolicyRenderers'
|
|
50
52
|
|
|
51
53
|
export const resourceHosts: readonly ResourceHost[] = [
|
|
52
54
|
{ id: 'kubernetes', renderers: { PodRenderer, NodeRenderer, ServiceRenderer, WorkloadRenderer, HPARenderer, PVCRenderer } },
|
|
@@ -74,7 +76,7 @@ export const resourceHosts: readonly ResourceHost[] = [
|
|
|
74
76
|
{ id: 'longhorn', renderers: { LonghornVolumeRenderer } },
|
|
75
77
|
{ id: 'flux', renderers: { FluxHelmReleaseRenderer } },
|
|
76
78
|
{ id: 'secrets-store-csi', renderers: { SecretProviderClassRenderer } },
|
|
77
|
-
{ id: 'admission-policy', renderers: { ValidatingAdmissionPolicyRenderer, ValidatingAdmissionPolicyBindingRenderer } },
|
|
79
|
+
{ id: 'admission-policy', renderers: { ValidatingAdmissionPolicyRenderer, ValidatingAdmissionPolicyBindingRenderer, MutatingAdmissionPolicyRenderer, MutatingAdmissionPolicyBindingRenderer } },
|
|
78
80
|
cnpgResourceHost,
|
|
79
81
|
crdResourceHost,
|
|
80
82
|
]
|
|
@@ -3,6 +3,7 @@ import { describe, expect, test } from 'vitest'
|
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
|
|
4
4
|
import { dirname, join, resolve } from 'node:path'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
|
+
import { compareVersions } from './utils/version'
|
|
6
7
|
|
|
7
8
|
// Radar's own build aliases @skyhook-io/k8s-ui to its source, so a deep
|
|
8
9
|
// import that the package's `exports` map can't serve still builds here and
|
|
@@ -50,6 +51,15 @@ function sourceFiles(dir: string): string[] {
|
|
|
50
51
|
})
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
test('radar-app requires a k8s-ui peer that types workflowStop and workloadRestartPreconditions', () => {
|
|
55
|
+
const manifest = JSON.parse(readFileSync(resolve(here, '../package.json'), 'utf8'))
|
|
56
|
+
const lock = JSON.parse(readFileSync(resolve(here, '../../package-lock.json'), 'utf8'))
|
|
57
|
+
const range = manifest.peerDependencies['@skyhook-io/k8s-ui']
|
|
58
|
+
expect(lock.packages.web.peerDependencies['@skyhook-io/k8s-ui']).toBe(range)
|
|
59
|
+
expect(range).toMatch(/^>=/)
|
|
60
|
+
expect(compareVersions(range.slice(2), '1.21.7')).toBeGreaterThanOrEqual(0)
|
|
61
|
+
})
|
|
62
|
+
|
|
53
63
|
describe('@skyhook-io/k8s-ui deep imports', () => {
|
|
54
64
|
const imports = new Set<string>()
|
|
55
65
|
for (const file of sourceFiles(here)) {
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { Link2 } from 'lucide-react'
|
|
2
|
-
import {
|
|
3
|
-
RelationshipGroup,
|
|
4
|
-
ResourceLink,
|
|
5
|
-
Section,
|
|
6
|
-
type ResourceRef,
|
|
7
|
-
} from '@skyhook-io/k8s-ui'
|
|
8
|
-
import { LookupFailureNote } from '@skyhook-io/k8s-ui/components/resources/renderers/LookupFailureNote'
|
|
9
|
-
import {
|
|
10
|
-
ValidatingAdmissionPolicyBindingRenderer as BaseBindingRenderer,
|
|
11
|
-
ValidatingAdmissionPolicyRenderer as BasePolicyRenderer,
|
|
12
|
-
} from '@skyhook-io/k8s-ui/components/resources/renderers/ValidatingAdmissionPolicyRenderers'
|
|
13
|
-
import { useResources, useResourceWithRelationships } from '../../../api/client'
|
|
14
|
-
|
|
15
|
-
const ADMISSION_REGISTRATION_GROUP = 'admissionregistration.k8s.io'
|
|
16
|
-
|
|
17
|
-
export function ValidatingAdmissionPolicyRenderer({
|
|
18
|
-
data,
|
|
19
|
-
onNavigate,
|
|
20
|
-
}: {
|
|
21
|
-
data: any
|
|
22
|
-
onNavigate?: (ref: ResourceRef) => void
|
|
23
|
-
}) {
|
|
24
|
-
const name = data?.metadata?.name
|
|
25
|
-
const query = useResources<any>(
|
|
26
|
-
'validatingadmissionpolicybindings',
|
|
27
|
-
undefined,
|
|
28
|
-
ADMISSION_REGISTRATION_GROUP,
|
|
29
|
-
{ enabled: Boolean(name), refetchInterval: 30000 },
|
|
30
|
-
)
|
|
31
|
-
const bindings = (query.data ?? []).filter(binding => binding?.spec?.policyName === name)
|
|
32
|
-
const bindingLookupComplete = query.coverage?.status === 'complete' && !query.error
|
|
33
|
-
const bindingTitle = bindingLookupComplete
|
|
34
|
-
? `Bindings (${bindings.length})`
|
|
35
|
-
: bindings.length > 0 ? `Bindings (${bindings.length}+)` : 'Bindings'
|
|
36
|
-
const refs = bindings.map(binding => ({
|
|
37
|
-
kind: 'ValidatingAdmissionPolicyBinding',
|
|
38
|
-
namespace: '',
|
|
39
|
-
name: binding?.metadata?.name ?? '',
|
|
40
|
-
group: ADMISSION_REGISTRATION_GROUP,
|
|
41
|
-
}))
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<BasePolicyRenderer
|
|
45
|
-
data={data}
|
|
46
|
-
onNavigate={onNavigate}
|
|
47
|
-
bindings={
|
|
48
|
-
<Section title={bindingTitle} icon={Link2} defaultExpanded>
|
|
49
|
-
{query.isLoading ? (
|
|
50
|
-
<div className="text-sm text-theme-text-tertiary">Looking for readable bindings…</div>
|
|
51
|
-
) : query.error && bindings.length === 0 ? (
|
|
52
|
-
<LookupFailureNote errors={[query.error]} what="which bindings select this policy" />
|
|
53
|
-
) : bindings.length === 0 && bindingLookupComplete ? (
|
|
54
|
-
<div className="text-sm text-theme-text-tertiary">
|
|
55
|
-
No readable bindings select this policy; this policy has no effect.
|
|
56
|
-
</div>
|
|
57
|
-
) : bindings.length === 0 ? (
|
|
58
|
-
<div className="text-sm text-theme-text-tertiary">
|
|
59
|
-
Binding availability could not be established; this policy may still have readable bindings.
|
|
60
|
-
</div>
|
|
61
|
-
) : (
|
|
62
|
-
<div className="space-y-2">
|
|
63
|
-
{!bindingLookupComplete && !query.error && (
|
|
64
|
-
<div className="text-sm text-theme-text-tertiary">
|
|
65
|
-
This list may be incomplete; binding coverage could not be confirmed.
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
<LookupFailureNote
|
|
69
|
-
errors={[query.error]}
|
|
70
|
-
what="which bindings select this policy"
|
|
71
|
-
incomplete
|
|
72
|
-
/>
|
|
73
|
-
<RelationshipGroup label="Select this policy" refs={refs} onNavigate={onNavigate} />
|
|
74
|
-
</div>
|
|
75
|
-
)}
|
|
76
|
-
</Section>
|
|
77
|
-
}
|
|
78
|
-
/>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function ValidatingAdmissionPolicyBindingRenderer({
|
|
83
|
-
data,
|
|
84
|
-
onNavigate,
|
|
85
|
-
}: {
|
|
86
|
-
data: any
|
|
87
|
-
onNavigate?: (ref: ResourceRef) => void
|
|
88
|
-
}) {
|
|
89
|
-
const policyName = data?.spec?.policyName ?? ''
|
|
90
|
-
const query = useResourceWithRelationships<any>(
|
|
91
|
-
'validatingadmissionpolicies',
|
|
92
|
-
'',
|
|
93
|
-
policyName,
|
|
94
|
-
ADMISSION_REGISTRATION_GROUP,
|
|
95
|
-
)
|
|
96
|
-
const status = typeof query.error === 'object' && query.error !== null && 'status' in query.error
|
|
97
|
-
? (query.error as { status?: unknown }).status
|
|
98
|
-
: undefined
|
|
99
|
-
const reference = query.isLoading ? (
|
|
100
|
-
<ReferenceState name={policyName} note="Checking policy availability…" />
|
|
101
|
-
) : status === 404 ? (
|
|
102
|
-
<ReferenceState name={policyName} note="Referenced policy was not found." />
|
|
103
|
-
) : status === 403 ? (
|
|
104
|
-
<ReferenceState name={policyName} note="Not permitted to check policy availability." />
|
|
105
|
-
) : query.error ? (
|
|
106
|
-
<ReferenceState name={policyName} note="Could not check policy availability." />
|
|
107
|
-
) : query.data ? (
|
|
108
|
-
<ResourceLink
|
|
109
|
-
name={policyName}
|
|
110
|
-
kind="validatingadmissionpolicies"
|
|
111
|
-
namespace=""
|
|
112
|
-
group={ADMISSION_REGISTRATION_GROUP}
|
|
113
|
-
onNavigate={onNavigate}
|
|
114
|
-
/>
|
|
115
|
-
) : (
|
|
116
|
-
<ReferenceState name={policyName} note="Policy availability was not checked." />
|
|
117
|
-
)
|
|
118
|
-
return <BaseBindingRenderer data={data} onNavigate={onNavigate} policyReference={reference} />
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function ReferenceState({ name, note }: { name: string; note: string }) {
|
|
122
|
-
return (
|
|
123
|
-
<span className="space-y-0.5">
|
|
124
|
-
<span className="block">{name || 'Not specified'}</span>
|
|
125
|
-
<span className="block text-xs text-theme-text-tertiary">{note}</span>
|
|
126
|
-
</span>
|
|
127
|
-
)
|
|
128
|
-
}
|