Browse Source

HUE-8330 [frontend] Don't show namespaces without a name

Johan Ahlen 7 years ago
parent
commit
302f54d117
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/core/src/desktop/static/desktop/js/contextCatalog.js

+ 3 - 1
desktop/core/src/desktop/static/desktop/js/contextCatalog.js

@@ -113,7 +113,9 @@ var ContextCatalog = (function () {
             var namespaces = namespaces[options.sourceType];
             var dynamic = true; //namespaces.hasMultiCluster;
             if (namespaces) {
-              self.namespaces[options.sourceType] = { namespaces: namespaces, dynamic: dynamic };
+              self.namespaces[options.sourceType] = { namespaces: namespaces.filter(function (namespace) {
+                return namespace.name; // Only include namespaces with a name.
+              }), dynamic: dynamic };
               deferred.resolve(self.namespaces[options.sourceType]);
               if (notifyForRefresh) {
                 huePubSub.publish('context.catalog.namespaces.refreshed', options.sourceType);