Sfoglia il codice sorgente

HUE-5447 [assist] Use the autocomplete timeout for fetching popular tables

Johan Ahlen 9 anni fa
parent
commit
908b448

+ 1 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -1218,7 +1218,7 @@ var autocompleter = new Autocompleter({
   user: HIVE_AUTOCOMPLETE_USER,
   oldEditor: true,
   optEnabled: false,
-  timeout: ${ conf.EDITOR_AUTOCOMPLETE_TIMEOUT.get() },
+  timeout: AUTOCOMPLETE_TIMEOUT,
   useNewAutocompleter: false
 });
 

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

@@ -124,6 +124,7 @@ var AssistDbSource = (function () {
           sourceType: self.sourceType,
           database: db.definition.name,
           silenceErrors: true,
+          timeout: AUTOCOMPLETE_TIMEOUT,
           successCallback: function (data) {
             var popularityIndex = {};
             data.top_tables.forEach(function (topTable) {

+ 2 - 0
desktop/core/src/desktop/templates/common_header.mako

@@ -115,6 +115,8 @@ if USE_NEW_EDITOR.get():
       optimizer: ${ OPTIMIZER.CACHEABLE_TTL.get() }
     };
 
+    var AUTOCOMPLETE_TIMEOUT = ${ conf.EDITOR_AUTOCOMPLETE_TIMEOUT.get() }
+
     // jHue plugins global configuration
     jHueFileChooserGlobals = {
       labels: {

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

@@ -3140,7 +3140,7 @@ ${ hueIcons.symbols() }
       % if conf.USE_NEW_AUTOCOMPLETER.get():
       useNewAutocompleter: true,
       % endif
-      autocompleteTimeout: ${ conf.EDITOR_AUTOCOMPLETE_TIMEOUT.get() },
+      autocompleteTimeout: AUTOCOMPLETE_TIMEOUT,
       snippetViewSettings: {
         default: {
           placeHolder: '${ _("Example: SELECT * FROM tablename, or press CTRL + space") }',

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_m.mako

@@ -195,7 +195,7 @@ ${ assist.assistJSModels() }
     % if conf.USE_NEW_AUTOCOMPLETER.get():
       useNewAutocompleter: true,
     % endif
-    autocompleteTimeout: ${ conf.EDITOR_AUTOCOMPLETE_TIMEOUT.get() },
+    autocompleteTimeout: AUTOCOMPLETE_TIMEOUT,
     snippetViewSettings: {
       default: {
         placeHolder: '${ _("Example: SELECT * FROM tablename, or press CTRL + space") }',