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);
|
||||
|
||||
initView(); // can only do it after loading cluster list
|
||||
})
|
||||
|
||||
$.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/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/scanners").fail(function (xhr) {
|
||||
reportError("Failed to get list of scanners", xhr)
|
||||
}).done(function (data) {
|
||||
|
||||
Reference in New Issue
Block a user