소스 검색

HUE-5792 [search] Change Hivechooser to use ApiHelper and the correct engine

Enrico Berti 8 년 전
부모
커밋
2f5fecdef1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

+ 2 - 1
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -105,7 +105,7 @@ from desktop.views import commonheader, commonfooter, _ko
 
     <!-- ko if: $root.collection.engine() != 'solr' -->
       <!-- ko if: columns().length == 0 -->
-        <input type="text" class="no-margin" data-bind="value: $root.collection.name, hivechooser: $root.collection.name, skipColumns: true" placeholder="${ _('Table name or <database>.<table>') }">
+        <input type="text" class="no-margin" data-bind="value: $root.collection.name, hivechooser: $root.collection.name, skipColumns: true, apiHelperUser: '${ user }', apiHelperType: $root.collection.engine()" placeholder="${ _('Table name or <database>.<table>') }">
       <!-- /ko -->
     <!-- /ko -->
 
@@ -2779,6 +2779,7 @@ ${ dashboard.import_layout(True) }
 <script src="${ static('desktop/ext/js/selectize.min.js') }"></script>
 <script src="${ static('desktop/js/ko.selectize.js') }"></script>
 <script src="${ static('dashboard/js/search.ko.js') }" type="text/javascript" charset="utf-8"></script>
+<script src="${ static('desktop/js/apiHelper.js') }" type="text/javascript" charset="utf-8"></script>
 
 ${ dashboard.import_bindings() }
 ${ dashboard.import_charts() }