Sort resources by interesting items (#89)

* sort resources by intersting items

* add body class

* reuse the name data
This commit is contained in:
ronahk
2022-11-10 18:51:14 +02:00
committed by GitHub
parent 758b03de36
commit 3f00e8ef6d
2 changed files with 3 additions and 1 deletions

View File

@@ -143,6 +143,7 @@ $("#nav-tab [data-tab]").click(function () {
function showResources(namespace, chart, revision) {
const resBody = $("#nav-resources .body");
const interestingResources = ["STATEFULSET", "DEAMONSET", "DEPLOYMENT"];
resBody.empty().append('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>');
let qstr = "name=" + chart + "&namespace=" + namespace + "&revision=" + revision
let url = "/api/helm/charts/resources"
@@ -157,6 +158,7 @@ function showResources(namespace, chart, revision) {
}
resBody.empty();
data = data.sort(function(a, b){return interestingResources.indexOf(a.kind.toUpperCase()) - interestingResources.indexOf(b.kind.toUpperCase())}).reverse();
for (let i = 0; i < data.length; i++) {
const res = data[i]
const resBlock = $(`

View File

@@ -227,7 +227,7 @@ nav .nav-tabs .nav-link.active {
background-color: transparent;
}
#installedList .b-shadow:hover {
#installedList .body .b-shadow:hover {
box-shadow: 0 3px 15px rgba(0, 0, 0, 0.18);
}