Add namespace dropdown (#67)

* add get namespace endpoint

* add namespace dropdown

* misc fix
This commit is contained in:
Duy Nguyen
2022-11-06 15:19:32 +02:00
committed by GitHub
parent ef31263797
commit 612352d69f
6 changed files with 61 additions and 11 deletions

View File

@@ -71,6 +71,18 @@ function popUpUpgrade(elm, ns, name, verCur, lastRev) {
$("#upgradeModal .rel-ns").prop("disabled", false).val("")
}
$.getJSON("/api/kube/namespaces").fail(function (xhr) {
reportError("Failed to get namespaces", xhr)
}).done(function(res) {
const ns = res.items.map(i => i.metadata.name)
$.each(ns, function(i, item) {
$("#upgradeModal #ns-datalist").append($("<option>", {
value: item,
text: item
}))
})
})
$.getJSON("/api/helm/repo/search?name=" + elm.name).fail(function (xhr) {
reportError("Failed to find chart in repo", xhr)
}).done(function (vers) {