Преглед на файлове

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,