Pārlūkot izejas kodu

HUE-8600 [tb] Limit Table Browser namespace selection to namespaces with active computes

Johan Ahlen 7 gadi atpakaļ
vecāks
revīzija
0d16263

+ 2 - 1
apps/metastore/src/metastore/static/metastore/js/metastore.model.js

@@ -158,7 +158,8 @@ var MetastoreSource = (function () {
     var self = this;
     self.loading(true);
     ContextCatalog.getNamespaces({ sourceType: self.type }).done(function (context) {
-      self.namespaces($.map(context.namespaces, function (namespace) {
+      var namespacesWithComputes = context.namespaces.filter(function (namespace) { return namespace.computes.length });
+      self.namespaces($.map(namespacesWithComputes, function (namespace) {
         return new MetastoreNamespace({
           metastoreViewModel: self.metastoreViewModel,
           sourceType: self.type,