From d0dbb4249270e49cead0f205509f898af71b58b9 Mon Sep 17 00:00:00 2001 From: ronahk <74967920+ronahk@users.noreply.github.com> Date: Wed, 16 Nov 2022 11:59:38 +0200 Subject: [PATCH] fix namespaces not updating when switching cluster (#102) --- pkg/dashboard/static/scripts.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkg/dashboard/static/scripts.js b/pkg/dashboard/static/scripts.js index ddd377a..4e9d0ba 100644 --- a/pkg/dashboard/static/scripts.js +++ b/pkg/dashboard/static/scripts.js @@ -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($("