소스 검색

HUE-5936 [metastore] Offer manual table creation from metastore database page too

Romain Rigaux 8 년 전
부모
커밋
743bf14a84
2개의 변경된 파일5개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 1
      apps/metastore/src/metastore/templates/metastore.mako
  2. 4 7
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 1 - 1
apps/metastore/src/metastore/templates/metastore.mako

@@ -566,7 +566,7 @@ ${ components.menubar() }
       % if is_embeddable:
         <a class="inactive-action margin-left-10" data-bind="tooltip: { placement: 'bottom', delay: 750 }, click: function () { onePageViewModel.currentApp('importer') }" title="${_('Create a new table')}"><i class="fa fa-plus"></i></a>
       % elif ENABLE_NEW_CREATE_TABLE.get():
-        <a class="inactive-action margin-left-10" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '${ url('indexer:importer_prefill', source_type='file', target_type='table') }' + database().name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i></a>
+        <a class="inactive-action margin-left-10" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '${ url('indexer:importer_prefill', source_type='all', target_type='table') }' + database().name }" title="${_('Create a new table')}"><i class="fa fa-plus"></i></a>
       % else:
         <a class="inactive-action margin-left-10" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '/beeswax/create/import_wizard/' + database().name }" title="${_('Create a new table from a file')}"><span class="fa-stack fa-fw" style="width: 1.28571429em"><i class="fa fa-file-o fa-stack-1x"></i><i class="fa fa-plus-circle fa-stack-1x" style="font-size: 14px; margin-left: 5px; margin-top: 6px;"></i></span></a>
         <a class="inactive-action margin-left-10" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '/beeswax/create/create_table/' + database().name }" title="${_('Create a new table manually')}"><i class="fa fa-plus"></i></a>

+ 4 - 7
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -438,7 +438,7 @@ ${ assist.assistPanel() }
         </label>
         <span class="inline-labels" data-bind="with: createWizard.source.format, visible: createWizard.source.show">
           <span data-bind="foreach: getArguments()">
-            <!-- ko template: {name: 'arg-' + $data.type, data:{description: $data.description, value: $parent[$data.name]}}--><!-- /ko -->
+            <!-- ko template: {name: 'arg-' + $data.type, data: {description: $data.description, value: $parent[$data.name]}}--><!-- /ko -->
           </span>
         </span>
       </div>
@@ -1114,11 +1114,8 @@ ${ assist.assistPanel() }
       self.inputFormat = ko.observable('file');
       self.inputFormat.subscribe(function(val) {
         wizard.destination.columns.removeAll();
-        if (val === 'table'){
-          huePubSub.publish('assist.database.get', function (activeDBEntry) {
-            self.table(activeDBEntry.databaseName + '.');
-          });
-        }
+        self.sample.removeAll();
+        self.path('');
         resizeElements();
       });
       self.inputFormats = ko.observableArray([
@@ -1234,7 +1231,7 @@ ${ assist.assistPanel() }
       var self = this;
 
       self.name = ko.observable('').extend({throttle: 500});
-      self.name.subscribe(function (name) {
+      self.name.subscribe(function(name) {
         var exists = false;
 
         if (name.length == 0) {