mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
fix namespaces not updating when switching cluster (#102)
This commit is contained in:
@@ -13,20 +13,21 @@ $(function () {
|
|||||||
fillClusterList(data, context);
|
fillClusterList(data, context);
|
||||||
|
|
||||||
initView(); // can only do it after loading cluster list
|
initView(); // can only do it after loading cluster list
|
||||||
})
|
|
||||||
|
$.getJSON("/api/kube/namespaces").fail(function (xhr) {
|
||||||
$.getJSON("/api/kube/namespaces").fail(function (xhr) {
|
reportError("Failed to get namespaces", xhr)
|
||||||
reportError("Failed to get namespaces", xhr)
|
}).done(function(res) {
|
||||||
}).done(function(res) {
|
const ns = res.items.map(i => i.metadata.name)
|
||||||
const ns = res.items.map(i => i.metadata.name)
|
$.each(ns, function(i, item) {
|
||||||
$.each(ns, function(i, item) {
|
$("#upgradeModal #ns-datalist").append($("<option>", {
|
||||||
$("#upgradeModal #ns-datalist").append($("<option>", {
|
value: item,
|
||||||
value: item,
|
text: item
|
||||||
text: item
|
}))
|
||||||
}))
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$.getJSON("/api/scanners").fail(function (xhr) {
|
$.getJSON("/api/scanners").fail(function (xhr) {
|
||||||
reportError("Failed to get list of scanners", xhr)
|
reportError("Failed to get list of scanners", xhr)
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user