浏览代码

HUE-6451 [editor] Show qualified names for columns in the sql context popover title

Johan Ahlen 8 年之前
父节点
当前提交
392facf
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      desktop/core/src/desktop/templates/sql_context_popover.mako

+ 5 - 1
desktop/core/src/desktop/templates/sql_context_popover.mako

@@ -1182,7 +1182,11 @@ from metadata.conf import has_navigator
           self.iconClass = 'fa-columns'
         } else if (self.isColumn) {
           self.contents = new TableAndColumnContextTabs(self.data, self.sourceType, self.defaultDatabase, true, false);
-          self.title = self.data.identifierChain[self.data.identifierChain.length - 1].name;
+          if (self.data.identifierChain.length > 1) {
+            self.title = self.data.identifierChain[self.data.identifierChain.length - 2].name + '.' + self.data.identifierChain[self.data.identifierChain.length - 1].name;
+          } else {
+            self.title = self.data.identifierChain[self.data.identifierChain.length - 1].name;
+          }
           self.iconClass = 'fa-columns'
         } else if (self.isFunction) {
           self.contents = new FunctionContextTabs(self.data, self.sourceType);