Pārlūkot izejas kodu

HUE-2451 [dashboard] Don't use the Solr query autocomplete when engines other than Solr are used

Johan Ahlen 8 gadi atpakaļ
vecāks
revīzija
dc789bc1db

+ 5 - 0
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -105,7 +105,12 @@ from dashboard.conf import USE_GRIDSTER, HAS_REPORT_ENABLED
           </div>
           <div class="search-bar-query" data-bind="foreach: query.qs">
 
+            <!-- ko if: $root.collection.engine() === 'solr' -->
             <div data-bind="component: { name: 'hue-simple-ace-editor', params: { value: q, placeHolder: '${ _ko('Example: field:value, or press CTRL + space') }', autocomplete: { type: 'solrQuery', support: { collection: $root.collection } }, singleLine: true } }"></div>
+            <!-- /ko -->
+            <!-- ko if: $root.collection.engine() !== 'solr' -->
+            <div data-bind="component: { name: 'hue-simple-ace-editor', params: { value: q, placeHolder: '${ _ko('Example: col = value') }', singleLine: true } }"></div>
+            <!-- /ko -->
 ##             <input data-bind="clearable: q, valueUpdate:'afterkeydown', typeahead: { target: q, nonBindableSource: queryTypeahead, multipleValues: true, multipleValuesSeparator: ':', extraKeywords: 'AND OR TO', completeSolrRanges: true }, css: {'input-small': $root.query.qs().length > 1, 'flat-left': $index() === 0, 'input-xlarge': $root.collection.supportAnalytics()}" maxlength="4096" type="text" class="search-query">
             <!-- ko if: $index() >= 1 -->
               <a class="btn flat-left" href="javascript:void(0)" data-bind="click: $root.query.removeQ"><i class="fa fa-minus"></i></a>