Pārlūkot izejas kodu

HUE-7286 [editor] Move sql identifier object to the beginning of the tooltip

Romain Rigaux 8 gadi atpakaļ
vecāks
revīzija
77dfec48e5

+ 4 - 3
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -4433,14 +4433,15 @@
                       }
                     }
                     if (token.parseLocation.identifierChain) {
-                      tooltipText += ' - ' + $.map(token.parseLocation.identifierChain, function (identifier) {
+                      var sqlIdentifier = $.map(token.parseLocation.identifierChain, function (identifier) {
                           return identifier.name
                         }).join('.');
                       if (colType) {
-                        tooltipText += ' (' + colType + ')';
+                        sqlIdentifier += ' (' + colType + ')';
                       }
+                      tooltipText = sqlIdentifier + ' - ' + tooltipText;
                     } else if (token.parseLocation.function) {
-                      tooltipText += ' - ' + token.parseLocation.function;
+                      tooltipText = token.parseLocation.function + ' - ' + tooltipText;
                     }
                     contextTooltip.show(tooltipText, endCoordinates.pageX, endCoordinates.pageY + editor.renderer.lineHeight + 3);
                   }