Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chartref issues #134

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/src/ExpandedFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ export function ExpandedFooter(props) {
{
name: "Kustomizations",
href: "#",
count: fluxState.kustomizations.length,
count: fluxState.kustomizations?.length,
},
{
name: "Helm Releases",
href: "#",
count: fluxState.helmReleases.length,
count: fluxState.helmReleases?.length,
},
{
name: "Terraform",
href: "#",
count: fluxState.tfResources.length,
count: fluxState.tfResources?.length,
},
{ name: "Flux Runtime", href: "#", count: undefined },
{ name: "Flux Events", href: "#", count: undefined },
Expand Down
20 changes: 16 additions & 4 deletions web/src/HelmRevisionWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,35 @@ export function HelmRevisionWidget(props) {
const reconciling = reconcilingCondition && reconcilingConditions[0].status === "True"

const sourceRef = helmRelease.spec.chart ? helmRelease.spec.chart.spec.sourceRef : helmRelease.spec.chartRef

const namespace = sourceRef.namespace ? sourceRef.namespace : helmRelease.metadata.namespace
const navigationHandler = () => handleNavigationSelect("Sources", namespace, sourceRef.name, sourceRef.kind)

return (
<>
{!ready && reconciling && !stalled &&
<span>
<span>Attempting: </span>
<span>Reconciling new version: </span>
<NavigationButton handleNavigation={navigationHandler}>
{helmRelease.spec.chart &&
<span>{helmRelease.spec.chart.spec.version}@{helmRelease.spec.chart.spec.chart}</span>
}
{helmRelease.spec.chartRef &&
<span>{`${helmRelease.spec.chartRef.namespace}/${helmRelease.spec.chartRef.name}`}</span>
}
</NavigationButton>
</span>
}
{!ready && stalled &&
<span className='bg-orange-400'>
<span>Last Attempted: </span>
{/* <span>{lastAttemptedRevision}@{version.chartName}</span> */}
<span>Reconciliation stalled: </span>
<NavigationButton handleNavigation={navigationHandler}>
{helmRelease.spec.chart &&
<span>{helmRelease.spec.chart.spec.version}@{helmRelease.spec.chart.spec.chart}</span>
}
{helmRelease.spec.chartRef &&
<span>{`${helmRelease.spec.chartRef.namespace}/${helmRelease.spec.chartRef.name}`}</span>
}
</NavigationButton>
</span>
}
<span className={`block ${ready || reconciling ? '' : 'font-normal text-neutral-600'} field`}>
Expand Down
Loading