Преглед изворни кода

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

Johan Ahlen пре 7 година
родитељ
комит
0d16263
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      apps/metastore/src/metastore/static/metastore/js/metastore.model.js

+ 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,