diff --git a/main.go b/main.go index f0ba970..a053cfd 100644 --- a/main.go +++ b/main.go @@ -53,7 +53,12 @@ func main() { } func parseFlags() options { - opts := options{Namespace: os.Getenv("HELM_NAMESPACE")} + ns := os.Getenv("HELM_NAMESPACE") + if ns == "default" { + ns = "" + } + + opts := options{Namespace: ns} args, err := flags.Parse(&opts) if err != nil { if e, ok := err.(*flags.Error); ok { diff --git a/pkg/dashboard/static/scripts.js b/pkg/dashboard/static/scripts.js index 56eae8b..9d4a4bb 100644 --- a/pkg/dashboard/static/scripts.js +++ b/pkg/dashboard/static/scripts.js @@ -29,7 +29,9 @@ $(function () { reportError("Failed to get tool version", xhr) }).done(function (data) { fillToolVersion(data) - $("#limitNamespace").show().find("span").text(data.LimitedToNamespace) + if (data.LimitedToNamespace) { + $("#limitNamespace").show().find("span").text(data.LimitedToNamespace) + } }) }) diff --git a/plugin.yaml b/plugin.yaml index b2f17ea..4872968 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,5 +1,5 @@ name: "dashboard" -version: "0.2.5" +version: "0.2.6" usage: "A simplified way of working with Helm" description: "View HELM situation in nice web UI" command: "$HELM_PLUGIN_DIR/bin/helm-dashboard"