diff --git a/Makefile b/Makefile index 00ca229..b34eaf2 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ pull: ; $(info $(M) Pulling source...) @ .PHONY: build build: $(BIN) ; $(info $(M) Building executable...) @ ## Build program binary - $Q $(GO) build \ + go build \ -ldflags '-X main.version=$(VERSION) -X main.buildDate=$(DATE)' \ -o bin/dashboard . diff --git a/pkg/dashboard/handlers/kubeHandlers.go b/pkg/dashboard/handlers/kubeHandlers.go index 377bc0e..918b7b8 100644 --- a/pkg/dashboard/handlers/kubeHandlers.go +++ b/pkg/dashboard/handlers/kubeHandlers.go @@ -39,6 +39,7 @@ func (h *KubeHandler) GetResourceInfo(c *gin.Context) { return } + // custom logic to provide most meaningful status for the resource if res.Status.Phase == "Active" || res.Status.Phase == "Error" { _ = res.Name + "" } else if res.Status.Phase == "" && len(res.Status.Conditions) > 0 { diff --git a/pkg/dashboard/static/actions.js b/pkg/dashboard/static/actions.js index 11e1a25..31413cb 100644 --- a/pkg/dashboard/static/actions.js +++ b/pkg/dashboard/static/actions.js @@ -71,18 +71,6 @@ 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($("