瀏覽代碼

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

Johan Ahlen 7 年之前
父節點
當前提交
0d16263d85
共有 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,