Browse Source

HUE-9113 [hive] Show the view icon for materialized views in the left assist

Johan Ahlen 5 năm trước cách đây
mục cha
commit
2c201186fe
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      desktop/core/src/desktop/js/catalog/dataCatalogEntry.js

+ 9 - 1
desktop/core/src/desktop/js/catalog/dataCatalogEntry.js

@@ -21,6 +21,7 @@ import apiHelper from 'api/apiHelper';
 import CancellablePromise from 'api/cancellablePromise';
 import catalogUtils from 'catalog/catalogUtils';
 import huePubSub from 'utils/huePubSub';
+import I18n from 'utils/i18n';
 
 /**
  * Helper function to reload the source meta for the given entry
@@ -1196,6 +1197,12 @@ class DataCatalogEntry {
       if (type) {
         title += ' (' + type + ')';
       }
+    } else if (
+      self.definition &&
+      self.definition.type &&
+      self.definition.type.toLowerCase() === 'materialized_view'
+    ) {
+      title += ' (' + I18n('Materialized') + ')';
     }
     if (includeComment && self.hasResolvedComment() && self.getResolvedComment()) {
       title += ' - ' + self.getResolvedComment();
@@ -1302,7 +1309,8 @@ class DataCatalogEntry {
       ((self.sourceMeta && self.sourceMeta.is_view) ||
         (self.definition &&
           self.definition.type &&
-          self.definition.type.toLowerCase() === 'view') ||
+          (self.definition.type.toLowerCase() === 'view' ||
+            self.definition.type.toLowerCase() === 'materialized_view')) ||
         (self.analysis &&
           self.analysis.details &&
           self.analysis.details.properties &&