Don't offer to describe historical revisions

This commit is contained in:
Andrei Pohilko
2022-10-27 15:31:57 +01:00
parent 0c486e76c0
commit 2262445b75
3 changed files with 13 additions and 5 deletions

View File

@@ -172,7 +172,7 @@ function showResources(namespace, chart, revision) {
//reportError("Failed to get list of resources") //reportError("Failed to get list of resources")
}).done(function (data) { }).done(function (data) {
const badge = $("<span class='badge me-2 fw-normal'></span>").text(data.status.phase); const badge = $("<span class='badge me-2 fw-normal'></span>").text(data.status.phase);
if (["Available", "Active", "Established", "Bound"].includes(data.status.phase)) { if (["Available", "Active", "Established", "Bound", "Ready"].includes(data.status.phase)) {
badge.addClass("bg-success text-dark") badge.addClass("bg-success text-dark")
} else if (["Exists"].includes(data.status.phase)) { } else if (["Exists"].includes(data.status.phase)) {
badge.addClass("bg-success text-dark bg-opacity-50") badge.addClass("bg-success text-dark bg-opacity-50")
@@ -186,7 +186,7 @@ function showResources(namespace, chart, revision) {
statusBlock.empty().append(badge).attr("title", data.status.phase) statusBlock.empty().append(badge).attr("title", data.status.phase)
resBlock.find(".res-statusmsg").html("<span class='text-muted small'>" + (data.status.message ? data.status.message : '') + "</span>") resBlock.find(".res-statusmsg").html("<span class='text-muted small'>" + (data.status.message ? data.status.message : '') + "</span>")
if (badge.text() !== "NotFound") { if (badge.text() !== "NotFound" && revision == $("#specRev").data("last-rev")) {
resBlock.find(".res-actions") resBlock.find(".res-actions")
const btn = $("<button class=\"btn btn-sm btn-white border-secondary\">Describe</button>"); const btn = $("<button class=\"btn btn-sm btn-white border-secondary\">Describe</button>");

View File

@@ -48,14 +48,14 @@ function fillChartHistory(data, namespace, name) {
if (elm.description.startsWith("Rollback to ")) { if (elm.description.startsWith("Rollback to ")) {
//rev.find(".rev-status").append(" <span class='small fw-normal text-lowercase'>(rollback)</span>") //rev.find(".rev-status").append(" <span class='small fw-normal text-lowercase'>(rollback)</span>")
rev.find(".rev-status").append(" <i class='bi-arrow-counterclockwise text-muted' title='"+elm.description+"'></i>") rev.find(".rev-status").append(" <i class='bi-arrow-counterclockwise text-muted' title='" + elm.description + "'></i>")
} }
const nxt = data[x + 1]; const nxt = data[x + 1];
if (nxt && isNewerVersion(elm.chart_ver, nxt.chart_ver)) { if (nxt && isNewerVersion(elm.chart_ver, nxt.chart_ver)) {
rev.find(".rev-changes").html("<span class='strike'>" + nxt.chart_ver + "</span> <i class='text-danger bi-arrow-down-right'></i> " + elm.chart_ver) rev.find(".rev-changes").html("<span class='strike'>" + nxt.chart_ver + "</span> <i class='bi-arrow-down-right'></i> " + elm.chart_ver)
} else if (nxt && isNewerVersion(nxt.chart_ver, elm.chart_ver)) { } else if (nxt && isNewerVersion(nxt.chart_ver, elm.chart_ver)) {
rev.find(".rev-changes").html("<span class='strike'>" + nxt.chart_ver + "</span> <i class='text-success bi-arrow-up-right'></i> " + elm.chart_ver) rev.find(".rev-changes").html("<span class='strike'>" + nxt.chart_ver + "</span> <i class='bi-arrow-up-right'></i> " + elm.chart_ver)
} }
rev.data("elm", elm) rev.data("elm", elm)

View File

@@ -160,6 +160,10 @@ body > .container-fluid {
color: #3B3D45 !important; color: #3B3D45 !important;
} }
#topNav .nav-link.text-danger {
color: #FC1683 !important;
}
#topNav .nav-link.active { #topNav .nav-link.active {
background: #EBEFFF; background: #EBEFFF;
border-radius: 2px; border-radius: 2px;
@@ -238,6 +242,10 @@ span.link {
text-decoration: underline; text-decoration: underline;
} }
#installedList .body .row div {
overflow: hidden;
}
#installedList .rel-name { #installedList .rel-name {
padding-left: 5.5rem; padding-left: 5.5rem;
background-image: url("helm-gray-50.svg"); background-image: url("helm-gray-50.svg");