Skip to content

Commit 9604aed

Browse files
committed
Making sourceRef linkable
1 parent dd53a1b commit 9604aed

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

web/src/HelmRevisionWidget.jsx

+10-13
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,35 @@ export function HelmRevisionWidget(props) {
2525
const reconciling = reconcilingCondition && reconcilingConditions[0].status === "True"
2626

2727
const sourceRef = helmRelease.spec.chart ? helmRelease.spec.chart.spec.sourceRef : helmRelease.spec.chartRef
28-
2928
const namespace = sourceRef.namespace ? sourceRef.namespace : helmRelease.metadata.namespace
3029
const navigationHandler = () => handleNavigationSelect("Sources", namespace, sourceRef.name, sourceRef.kind)
3130

3231
return (
3332
<>
3433
{!ready && reconciling && !stalled &&
3534
<span>
36-
{helmRelease.spec.chart &&
37-
<>
3835
<span>Reconciling new version: </span>
36+
<NavigationButton handleNavigation={navigationHandler}>
37+
{helmRelease.spec.chart &&
3938
<span>{helmRelease.spec.chart.spec.version}@{helmRelease.spec.chart.spec.chart}</span>
40-
</>
4139
}
42-
{!helmRelease.spec.chart &&
43-
<span>Reconciling new version..</span> // chartRef doesn't have version info
40+
{helmRelease.spec.chartRef &&
41+
<span>{`${helmRelease.spec.chartRef.namespace}/${helmRelease.spec.chartRef.name}`}</span>
4442
}
43+
</NavigationButton>
4544
</span>
4645
}
4746
{!ready && stalled &&
4847
<span className='bg-orange-400'>
48+
<span>Reconciliation stalled: </span>
49+
<NavigationButton handleNavigation={navigationHandler}>
4950
{helmRelease.spec.chart &&
50-
<>
51-
<span>Last Attempted: </span>
5251
<span>{helmRelease.spec.chart.spec.version}@{helmRelease.spec.chart.spec.chart}</span>
53-
</>
5452
}
55-
{!helmRelease.spec.chart &&
56-
<>
57-
<span>Reconciliation stalled..</span> // chartRef doesn't have version info
58-
</>
53+
{helmRelease.spec.chartRef &&
54+
<span>{`${helmRelease.spec.chartRef.namespace}/${helmRelease.spec.chartRef.name}`}</span>
5955
}
56+
</NavigationButton>
6057
</span>
6158
}
6259
<span className={`block ${ready || reconciling ? '' : 'font-normal text-neutral-600'} field`}>

0 commit comments

Comments
 (0)