Skip to content

Commit b8db273

Browse files
committed
fix: add helm install desc
1 parent 068ed3d commit b8db273

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

store/helm.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ type HelmChartSummary struct {
4040
}
4141

4242
type HelmReleaseSummary struct {
43-
Name string `json:"name"`
44-
Namespace string `json:"namespace"`
45-
Revision string `json:"revision"`
46-
Updated string `json:"updated"`
47-
Status string `json:"status"`
48-
Chart string `json:"chart"`
49-
AppVersion string `json:"app_version"`
43+
Name string `json:"name"`
44+
Namespace string `json:"namespace"`
45+
Revision string `json:"revision"`
46+
Updated string `json:"updated"`
47+
Status string `json:"status"`
48+
Chart string `json:"chart"`
49+
AppVersion string `json:"app_version"`
50+
Description string `json:"description"`
5051
}
5152

5253
type HelmReleaseHistory struct {
@@ -263,13 +264,14 @@ func relToSummary(r *release.Release) HelmReleaseSummary {
263264
appVersion = r.Chart.Metadata.AppVersion
264265
}
265266
return HelmReleaseSummary{
266-
Name: r.Name,
267-
Namespace: r.Namespace,
268-
Revision: fmt.Sprintf("%d", r.Version),
269-
Updated: r.Info.LastDeployed.UTC().Format(time.RFC3339),
270-
Status: string(r.Info.Status),
271-
Chart: chartStr,
272-
AppVersion: appVersion,
267+
Name: r.Name,
268+
Namespace: r.Namespace,
269+
Revision: fmt.Sprintf("%d", r.Version),
270+
Updated: r.Info.LastDeployed.UTC().Format(time.RFC3339),
271+
Status: string(r.Info.Status),
272+
Chart: chartStr,
273+
AppVersion: appVersion,
274+
Description: r.Info.Description,
273275
}
274276
}
275277

web/src/HelmReleasePage.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,17 @@ export default function HelmReleasePage() {
123123
{
124124
title: t("helm:Status"),
125125
dataIndex: "status",
126-
render: (v) => statusBadge(v),
126+
render: (v, record) => {
127+
const badge = statusBadge(v);
128+
if (v === "failed" && record.description) {
129+
return (
130+
<Tooltip title={record.description} color="red">
131+
{badge}
132+
</Tooltip>
133+
);
134+
}
135+
return badge;
136+
},
127137
},
128138
{
129139
title: t("helm:App version"),

0 commit comments

Comments
 (0)