Skip to content

Commit 138f1b3

Browse files
authored
Add version and revision info to Helm detail pages (#2783)
* add chart version info to detail pages * pesky console log * revision -> current revision
1 parent 3977758 commit 138f1b3

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

ui/components/HelmChartDetail.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function HelmChartDetail({ className, helmChart }: Props) {
3434
info={[
3535
["Type", Kind.HelmChart],
3636
["Chart", helmChart.chart],
37+
["Version", helmChart.version],
38+
["Current Revision", helmChart.revision],
3739
["Ref", helmChart.sourceRef?.name],
3840
["Last Updated", <Timestamp time={helmChart.lastUpdatedAt} />],
3941
["Interval", <Interval interval={helmChart.interval} />],

ui/components/HelmReleaseDetail.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ function HelmReleaseDetail({ helmRelease, className, customTabs }: Props) {
7070
info={[
7171
["Source", helmChartLink(helmRelease)],
7272
["Chart", helmRelease?.helmChart.chart],
73+
["Chart Version", helmRelease.helmChart.version],
74+
["Last Applied Revision", helmRelease.lastAppliedRevision],
75+
["Last Attempted Revision", helmRelease.lastAttemptedRevision],
7376
...clusterInfo,
7477
...tenancyInfo,
7578
["Interval", <Interval interval={helmRelease?.interval} />],

ui/lib/objects.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ export class HelmChart extends FluxObject {
131131
get chart(): string {
132132
return this.obj.spec?.chart || "";
133133
}
134+
135+
get version(): string {
136+
return this.obj.spec?.version || "";
137+
}
138+
139+
get revision(): string {
140+
return this.obj.status.artifact.revision;
141+
}
134142
}
135143

136144
export class Bucket extends FluxObject {
@@ -251,6 +259,14 @@ export class HelmRelease extends FluxObject {
251259
get sourceRef(): ObjectRef | undefined {
252260
return this.helmChart?.sourceRef;
253261
}
262+
263+
get lastAppliedRevision(): string {
264+
return this.obj.status.lastAppliedRevision || "";
265+
}
266+
267+
get lastAttemptedRevision(): string {
268+
return this.obj.status.lastAttemptedRevision || "";
269+
}
254270
}
255271

256272
export class Provider extends FluxObject {

0 commit comments

Comments
 (0)