Эх сурвалжийг харах

HUE-6221 [assist] Remove active from the filter bar

Enrico Berti 8 жил өмнө
parent
commit
8d246ac

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

@@ -80,27 +80,11 @@ var AssistDbEntry = (function () {
     });
 
     self.filteredEntries = ko.pureComputed(function () {
-      if (self.filter == null || (self.filter.showTables && self.filter.showTables() && self.filter.showViews() && !self.filter.showActive() && self.filter.query().length === 0)) {
+      if (self.filter == null || (self.filter.showTables && self.filter.showTables() && self.filter.showViews() && self.filter.query().length === 0)) {
         return self.entries();
       }
       var result = [];
       $.each(self.entries(), function (index, entry) {
-        if (self.filter.showActive()) {
-          var found = false;
-          for (var i = 0; i < self.filter.activeEditorTables().length; i++) {
-            var activeTable = self.filter.activeEditorTables()[i];
-            if (activeTable.db && self.definition.name !== activeTable.db) {
-              continue;
-            }
-            if (activeTable.table === entry.definition.name) {
-              found = true;
-              break;
-            }
-          }
-          if (!found) {
-            return;
-          }
-        }
         if ((entry.definition.isTable && !self.filter.showTables()) || (entry.definition.isView && !self.filter.showViews()) ) {
           return;
         }

+ 0 - 2
desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

@@ -179,8 +179,6 @@ var AssistDbSource = (function () {
     var nestedFilter = {
       query: ko.observable("").extend({ rateLimit: { timeout: 250, method: 'notifyWhenChangesStop' } }),
       showTables: ko.observable(true),
-      enableActiveFilter: typeof window.Worker !== 'undefined',
-      showActive: ko.observable(false),
       showViews: ko.observable(true),
       activeEditorTables: ko.observableArray([])
     };

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

@@ -771,7 +771,6 @@ from notebook.conf import get_ordered_interpreters
       <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-5"><input type="checkbox" data-bind="checked: filter.showViews" />${_('Views')}</label>
-        <!-- ko if: filter.enableActiveFilter --><label class="checkbox inline-block margin-left-5"><input type="checkbox" data-bind="checked: filter.showActive" />${_('Active')}</label><!-- /ko -->
         <!-- ko if: $parent.activeSort -->
         <a class="assist-sort inactive-action" style="position: absolute;" data-toggle="dropdown" href="javascript:void(0)">
           <i class="pointer fa fa-sort" title="${_('Sort')}"></i> ${_('Sort')}

+ 0 - 1
desktop/core/src/desktop/templates/assist_m.mako

@@ -53,7 +53,6 @@ ${ assist.assistPanel() }
       user: '${user.username}',
       sql: {
         navigationSettings: {
-          enableActiveFilter: true,
           openDatabase: false,
           openItem: false,
           showStats: false,

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

@@ -460,7 +460,6 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
             sourceTypes: sqlSourceTypes,
             activeSourceType: activeSqlSourceType,
             navigationSettings: {
-              enableActiveFilter: editorMode(),
               openDatabase: false,
               openItem: false,
               showStats: true,