Bladeren bron

HUE-5006 [assist] Only show the active filter in the editor

Johan Ahlen 9 jaren geleden
bovenliggende
commit
6c2eeb6

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

@@ -113,7 +113,7 @@
     var nestedFilter = {
       query: ko.observable("").extend({ rateLimit: { timeout: 250, method: 'notifyWhenChangesStop' } }),
       showTables: ko.observable(true),
-      enableActiveFilter: typeof window.Worker !== 'undefined',
+      enableActiveFilter: self.navigationSettings.enableActiveFilter && typeof window.Worker !== 'undefined',
       showActive: ko.observable(false),
       showViews: ko.observable(true),
       activeEditorTables: ko.observableArray([])

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

@@ -788,7 +788,7 @@ from metadata.conf import has_navigator
       <div>
         <label class="checkbox inline-block margin-left-5"><input type="checkbox" data-bind="checked: filter.showTables" />${_('Tables')}</label>
         <label class="checkbox inline-block margin-left-10"><input type="checkbox" data-bind="checked: filter.showViews" />${_('Views')}</label>
-        <label class="checkbox inline-block margin-left-10"><input type="checkbox" data-bind="visible: filter.enableActiveFilter, checked: filter.showActive" />${_('Active')}</label>
+        <!-- ko if: filter.enableActiveFilter --><label class="checkbox inline-block margin-left-10"><input type="checkbox" data-bind="checked: filter.showActive" />${_('Active')}</label><!-- /ko -->
       </div>
       <div><input id="searchInput" class="clearable" type="text" placeholder="${ _('Table name...') }" style="width:90%;" data-bind="hasFocus: editingSearch, clearable: filter.query, value: filter.query, valueUpdate: 'afterkeydown'"/></div>
     </div>

+ 1 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -977,6 +977,7 @@ ${ hueIcons.symbols() }
             sourceTypes: sqlSourceTypes,
             activeSourceType: activeSqlSourceType,
             navigationSettings: {
+              enableActiveFilter: editorMode(),
               openDatabase: false,
               openItem: false,
               showStats: true,