فهرست منبع

HUE-5908 [oozie] The Impala action should list the impala queries

Enrico Berti 8 سال پیش
والد
کامیت
443cbbafdf

+ 2 - 2
apps/oozie/src/oozie/models2.py

@@ -2266,9 +2266,9 @@ class ImpalaDocumentAction(HiveDocumentAction):
   }
   FIELDS['uuid'] = {
       'name': 'uuid',
-      'label': _('Hive query'),
+      'label': _('Impala query'),
       'value': '',
-      'help_text': _('Select a saved Hive query you want to schedule.'),
+      'help_text': _('Select a saved Impala query you want to schedule.'),
       'type': 'impala'
   }
 

+ 5 - 4
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -635,7 +635,7 @@
 </script>
 
 <script type="text/html" id="common-document-widget">
-  <div data-bind="visible: ! $root.isEditing()">
+  <div data-bind="visible: !$root.isEditing()">
       <span data-bind="template: { name: 'logs-icon' }"></span>
       <!-- ko if: associatedDocumentLoading -->
         <i class="fa fa-spinner fa-spin muted"></i>
@@ -648,15 +648,16 @@
     </div>
 
     <div data-bind="visible: $root.isEditing">
-      <div data-bind="visible: ! $parent.ooziePropertiesExpanded()" class="nowrap">
+      <div data-bind="visible: !$parent.ooziePropertiesExpanded()" class="nowrap">
         <div class="selectize-wrapper" style="width: 300px;">
-          <select placeholder="${ _('Search your documents...') }" data-bind="documentChooser: { loading: associatedDocumentLoading, value: associatedDocumentUuid, document: associatedDocument }"></select>
+          <select placeholder="${ _('Search your documents...') }" data-bind="documentChooser: { loading: associatedDocumentLoading, value: associatedDocumentUuid, document: associatedDocument, type: type }"></select>
         </div>
         <!-- ko if: associatedDocument -->
           <a href="#" data-bind="attr: { href: associatedDocument().absoluteUrl }" target="_blank" title="${ _('Open') }">
             <i class="fa fa-external-link-square"></i>
           </a>
-          <div data-bind='text: associatedDocument().description' style="padding: 3px; margin-top: 2px" class="muted"></div>
+          <div class="clearfix"></div>
+          <div data-bind='text: associatedDocument().description' style="padding-left: 3px;" class="muted"></div>
         <!-- /ko -->
         <div class="row-fluid">
           <div class="span6" data-bind="template: { name: 'common-properties-parameters' }"></div>

+ 16 - 3
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -5009,10 +5009,23 @@
         'sqoop': 'query-sqoop1',
         'distcp-doc': 'query-distcp',
         'mapreduce-doc': 'query-mapreduce',
-      }
-      var type = 'query-impala'; // tmp
+        'hive-document-widget': 'query-hive',
+        'impala-document-widget': 'query-impala',
+        'java-document-widget': 'query-java',
+        'spark-document-widget': 'query-spark2',
+        'pig-document-widget': 'query-pig',
+        'sqoop-document-widget': 'query-sqoop1',
+        'distcp-document-widget': 'query-distcp',
+        'shell-document-widget': 'query-shell',
+        'mapreduce-document-widget': 'query-mapreduce',
+      }
+      var type = 'query-hive';
       if (options.type) {
-        type = TYPE_MAP[options.type()] ? TYPE_MAP[options.type()] : options.type();
+        var tempType = options.type();
+        if (tempType === 'function') {
+          tempType = tempType();
+        }
+        type = TYPE_MAP[tempType] ? TYPE_MAP[tempType] : tempType;
       }
       var firstLoad = false;
       $(element).selectize({