diff --git a/pkg/dashboard/static/details-view.js b/pkg/dashboard/static/details-view.js index 7144a7cc..36c35321 100644 --- a/pkg/dashboard/static/details-view.js +++ b/pkg/dashboard/static/details-view.js @@ -165,8 +165,8 @@ function showResources(namespace, chart, revision) {
-
-
Getting status...
+
+
Getting status...
`) @@ -189,10 +189,10 @@ function showResources(namespace, chart, revision) { } else { badge.addClass("bg-danger") } - const statusBlock = resBlock.find(".res-status"); statusBlock.empty().append(badge).attr("title", data.status.phase) - resBlock.find(".res-statusmsg").html("" + (data.status.message ? data.status.message : '') + "") + const statusMessage = getStatusMessage(data.status) + resBlock.find(".res-statusmsg").html("" + (statusMessage ? statusMessage : '') + "") if (badge.text() !== "NotFound" && revision == $("#specRev").data("last-rev")) { resBlock.find(".res-actions") @@ -216,6 +216,16 @@ function showResources(namespace, chart, revision) { }) } +function getStatusMessage(status) { + if (!status) { + return + } + if (status.conditions) { + return status.conditions[0].message || status.conditions[0].reason + } + return status.message || status.reason +} + function showDescribe(ns, kind, name, badge) { $("#describeModal .offcanvas-header p").text(kind) $("#describeModalLabel").text(name).append(badge.addClass("ms-3 small fw-normal")) diff --git a/pkg/dashboard/static/index.html b/pkg/dashboard/static/index.html index 35b71734..5535d32a 100644 --- a/pkg/dashboard/static/index.html +++ b/pkg/dashboard/static/index.html @@ -268,7 +268,7 @@

Name

style="text-transform: uppercase">
Resource Type
Name
-
Status
+
Status
Status Message