ソースを参照

HUE-8172 [sqoop] Hide un-necessary options in the importer

Romain Rigaux 7 年 前
コミット
a862e2335a

+ 3 - 0
desktop/core/src/desktop/templates/ko_components/ko_history_panel.mako

@@ -174,6 +174,9 @@ from desktop.views import _ko
             shell: {
               snippetIcon: 'fa-terminal'
             },
+            sqoop1: {
+              sqlDialect: false
+            },
           }
         });
         self.editorViewModel.editorMode(true);

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

@@ -742,13 +742,14 @@ ${ dashboard.layout_skeleton(suffix='search') }
 
   <!-- ko if: $root.getFacetFromQuery(id()).has_data() -->
   <div class="row-fluid" data-bind="with: $root.getFacetFromQuery(id())">
-    <!-- ko if: typeof isLoading !== 'undefined' -->
+    <!-- ko if: typeof $parent.isLoading !== 'undefined' -->
     <div data-bind="visible: $root.isGridster() || $root.isEditing(), with: $root.collection.getFacetById($parent.id())" style="margin-bottom: 20px">
       <span data-bind="template: { name: 'facet-toggle2', afterRender: function(){ $root.getWidgetById($parent.id()).isLoading(false); } }">
       </span>
     </div>
-    <!-- /ko -->
     <div class="clearfix"></div>
+    <!-- /ko -->
+
     <div data-bind="with: $root.collection.getFacetById($parent.id())">
       <!-- ko if: properties.facets()[0].type() == 'field' -->
         <!-- ko if: properties.facets()[0].multiselect -->

+ 9 - 8
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -655,11 +655,6 @@ ${ assist.assistPanel() }
         <!-- ko if: $root.createWizard.source.inputFormat() == 'rdbms' && ['file', 'table', 'hbase'].indexOf(outputFormat()) != -1 -->
         <div class="card step">
           <h4>${_('Properties')}</h4>
-          <div class="control-group">
-            <label><div>${ _('Mappers') }</div>
-              <input type="number" class="form-control input-small" data-bind="value: numMappers, valueUpdate: 'afterkeydown'">
-            </label>
-          </div>
 
           <div class="card-body">
             <label class="control-label"><div>${ _('Libs') }</div>
@@ -691,6 +686,11 @@ ${ assist.assistPanel() }
           </div>
 
           <span data-bind="visible: showProperties">
+            <div class="control-group">
+              <label><div>${ _('Mappers') }</div>
+                <input type="number" class="form-control input-small" data-bind="textInput: numMappers">
+              </label>
+            </div>
             <div class="control-group">
               <label for="rdbmsSplitBy" class="control-label"><div>${ _('Split By') }</div>
                 <select id="rdbmsSplitBy" data-bind="selectize: columns, value: rdbmsSplitByColumn, optionsValue: 'name', optionsText: 'name'"></select>
@@ -907,17 +907,18 @@ ${ assist.assistPanel() }
     <label class="checkbox">
       <input type="checkbox" data-bind="checked: keep"> ${_('Keep')}
     </label>
-
   </span>
 
   <!-- ko if: operations().length == 0 -->
-  <a class="pointer margin-left-20" data-bind="click: $root.createWizard.addOperation" title="${_('Add Operation')}"><i class="fa fa-plus"></i> ${_('Operation')}</a>
+  <a class="pointer margin-left-20" data-bind="click: $root.createWizard.addOperation, visible: $root.createWizard.destination.outputFormat() == 'index'" title="${_('Add Operation')}">
+    <i class="fa fa-plus"></i> ${_('Operation')}
+  </a>
   <!-- /ko -->
 
   <div class="inline-block" data-bind="template: { name: 'field-column-example' }"></div>
 
   <div data-bind="foreach: operations">
-    <div data-bind="template: { name:'operation-template',data:{operation: $data, list: $parent.operations}}"></div>
+    <div data-bind="template: { name:'operation-template',data: { operation: $data, list: $parent.operations } }"></div>
   </div>
 
   <!-- ko if: operations().length > 0 -->

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

@@ -2765,8 +2765,6 @@ function togglePresentation(value) {};
           });
         }
       }
-
-
     }
 
     var returndDatum = [];
@@ -2777,7 +2775,6 @@ function togglePresentation(value) {};
       });
     });
 
-
     return returndDatum;
   }