|
@@ -1140,6 +1140,23 @@ from metadata.conf import has_navigator
|
|
|
self.isAsterisk = params.data.type === 'asterisk';
|
|
self.isAsterisk = params.data.type === 'asterisk';
|
|
|
self.isView = params.data.type === 'view';
|
|
self.isView = params.data.type === 'view';
|
|
|
|
|
|
|
|
|
|
+ if ((self.isColumn || self.isComplex) && self.data.tables && self.data.tables.length > 0) {
|
|
|
|
|
+ var identifierChain = self.data.identifierChain;
|
|
|
|
|
+ var foundTable = $.grep(self.data.tables, function (table) {
|
|
|
|
|
+ return (table.alias && table.alias === identifierChain[0].name) ||
|
|
|
|
|
+ (table.identifierChain && table.identifierChain[table.identifierChain.length - 1].name === identifierChain[0].name);
|
|
|
|
|
+ });
|
|
|
|
|
+ if (foundTable.length === 1 && foundTable.identifierChain) {
|
|
|
|
|
+ identifierChain.shift();
|
|
|
|
|
+ identifierChain = foundTable.identifierChain.concat(identifierChain);
|
|
|
|
|
+ delete self.data.tables;
|
|
|
|
|
+ } else if (self.data.tables.length === 1 && self.data.tables[0].identifierChain) {
|
|
|
|
|
+ identifierChain = self.data.tables[0].identifierChain.concat(identifierChain);
|
|
|
|
|
+ delete self.data.tables;
|
|
|
|
|
+ }
|
|
|
|
|
+ self.data.identifierChain = identifierChain
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
self.pinEnabled = params.pinEnabled && !self.isFunction && !self.isAsterisk && !self.isHdfs;
|
|
self.pinEnabled = params.pinEnabled && !self.isFunction && !self.isAsterisk && !self.isHdfs;
|
|
|
|
|
|
|
|
if (self.isDatabase) {
|
|
if (self.isDatabase) {
|