소스 검색

HUE-4319 [editor] Add Impala refresh dialog to assist DB list view

This also takes care of an issue where the popover didn't close when switching to the DB list in assist.
Johan Ahlen 10 년 전
부모
커밋
51450079e7
2개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js
  2. 2 2
      desktop/core/src/desktop/templates/assist.mako

+ 7 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -558,7 +558,13 @@
         if (visible && $element.data('popover') && ! $.contains($element.data('popover').$tip[0], event.target)) {
           hidePopover();
         }
-      }
+      };
+
+      ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
+        if (visible && $element.data('popover')) {
+          hidePopover();
+        }
+      });
 
       var showPopover = function () {
         ko.renderTemplate(options.contentTemplate, viewModel, {

+ 2 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -726,10 +726,10 @@ from metadata.conf import has_navigator
       <span class="assist-tables-counter">(<span data-bind="text: filteredEntries().length"></span>)</span>
       <!-- ko ifnot: loading -->
       <a class="inactive-action" href="javascript:void(0)" data-bind="click: toggleSearch, css: { 'blue' : isSearchVisible }"><i class="pointer fa fa-search" title="${_('Search')}"></i></a>
-      <!-- ko if: sourceType === 'impala' && typeof databaseName !== 'undefined'-->
+      <!-- ko if: sourceType === 'impala' -->
       <a class="inactive-action" href="javascript:void(0)" data-bind="templatePopover : { contentTemplate: 'ask-for-invalidate-content', titleTemplate: 'ask-for-invalidate-title', trigger: 'click', minWidth: '320px' }"><i class="pointer fa fa-refresh" data-bind="css: { 'fa-spin blue' : loading }" title="${_('Manually refresh the table list')}"></i></a>
       <!-- /ko -->
-      <!-- ko if: sourceType !== 'impala' || typeof databaseName === 'undefined' -->
+      <!-- ko if: sourceType !== 'impala' -->
       <a class="inactive-action" href="javascript:void(0)" data-bind="click: triggerRefresh"><i class="pointer fa fa-refresh" data-bind="css: { 'fa-spin blue' : loading }" title="${_('Manually refresh the table list')}"></i></a>
       <!-- /ko -->
       <!-- /ko -->