Explorar o código

HUE-5377 [assist] Don’t show the assist link in the context popover opened from the assist

Johan Ahlen %!s(int64=9) %!d(string=hai) anos
pai
achega
f28a06d

+ 1 - 0
desktop/core/src/desktop/static/desktop/js/assist/assistDbEntry.js

@@ -175,6 +175,7 @@ var AssistDbEntry = (function () {
         type: type,
         identifierChain: $.map(self.getHierarchy(), function (name) { return { name: name }})
       },
+      showInAssistEnabled: false,
       orientation: 'right',
       sourceType: self.sourceType,
       defaultDatabase: self.databaseName,

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

@@ -149,7 +149,7 @@ from metadata.conf import has_navigator
   <script type="text/html" id="sql-context-footer">
     <div class="sql-context-flex-bottom-links">
       <div class="sql-context-link-row">
-        <a class="inactive-action pointer" data-bind="visible: isTable || isColumn, click: function() { huePubSub.publish('sql.context.popover.show.in.assist') }"><i style="font-size: 11px;" title="${ _("Show in Assist...") }" class="fa fa-search"></i> ${ _("Assist") }</a>
+        <a class="inactive-action pointer" data-bind="visible: showInAssistEnabled && (isTable || isColumn), click: function() { huePubSub.publish('sql.context.popover.show.in.assist') }"><i style="font-size: 11px;" title="${ _("Show in Assist...") }" class="fa fa-search"></i> ${ _("Assist") }</a>
         <a class="inactive-action pointer" data-bind="visible: isTable, click: function() { huePubSub.publish('sql.context.popover.open.in.metastore') }"><i style="font-size: 11px;" title="${ _("Open in Metastore...") }" class="fa fa-external-link"></i> ${ _("Metastore") }</a>
         <a class="inactive-action pointer" data-bind="visible: isHdfs, click: function() { huePubSub.publish('sql.context.popover.replace.in.editor') }"><i style="font-size: 11px;" title="${ _("Replace the editor content...") }" class="fa fa-pencil"></i> ${ _("Insert in the editor") }</a>
         <a class="inactive-action pointer" data-bind="visible: isHdfs, click: function() { huePubSub.publish('sql.context.popover.open.in.file.browser') }"><i style="font-size: 11px;" title="${ _("Open in File Browser...") }" class="fa fa-external-link"></i> ${ _("File Browser") }</a>
@@ -1094,6 +1094,8 @@ from metadata.conf import has_navigator
         self.left = ko.observable(0);
         self.top = ko.observable(0);
 
+        self.showInAssistEnabled = typeof params.showInAssistEnabled !== 'undefined' ? params.showInAssistEnabled : true;
+
         var popoverSize = apiHelper.getFromTotalStorage('assist', 'popover.size', {
           width: 450,
           height: 400