Răsfoiți Sursa

HUE-2645 [oozie] More intuitive adding of a PySpark action

Romain Rigaux 9 ani în urmă
părinte
comite
97ecc597bb

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

@@ -1835,7 +1835,7 @@ class SparkAction(Action):
           'name': 'files',
           'label': _('Files'),
           'value': [],
-          'help_text': _('Path to files put in the running directory.'),
+          'help_text': _('Path to file to put in the running directory.'),
           'type': ''
      },
     'class': {
@@ -1847,10 +1847,10 @@ class SparkAction(Action):
      },
      'jars': {
           'name': 'jars',
-          'label': _('Jar/py names'),
+          'label': _('Jar/py name'),
           'value': '',
-          'help_text': _('Comma separated list of filenames.'),
-          'type': ''
+          'help_text': _('Name of main file added in Files.'),
+          'type': 'text'
      },
      'spark_opts': {
           'name': 'spark_opts',
@@ -1903,7 +1903,7 @@ class SparkAction(Action):
 
   @classmethod
   def get_mandatory_fields(cls):
-    return [cls.FIELDS['jars'], cls.FIELDS['files']]
+    return [cls.FIELDS['files'], cls.FIELDS['jars']]
 
 
 class KillAction(Action):

+ 1 - 2
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -812,8 +812,7 @@
 
         <div class="airy">
           <span class="widget-label" data-bind="text: $root.workflow_properties.jars.label"></span>
-          <input type="text" class="filechooser-input" data-bind="filechooser: properties.jars, valueUpdate:'afterkeydown', filechooserOptions: globalFilechooserOptions, hdfsAutocomplete: properties.jars, attr: { placeholder:  $root.workflow_properties.jars.help_text }" validate="nonempty"/>
-          <span data-bind='template: { name: "common-fs-link", data: {path: properties.jars(), with_label: false}}'></span>
+          <input type="text" data-bind="value: properties.jars, valueUpdate:'afterkeydown', attr: { placeholder:  $root.workflow_properties.jars.help_text }" validate="nonempty"/>
         </div>
 
         <div class="airy" data-bind="visible: $.grep( properties.jars().split(','), function(val, index) { return val.toLowerCase().endsWith('.jar'); }).length > 0">