Browse Source

[oozie] Longer input fields for action forms

Remove schema version selection boxes for Workflow/Coordinator
Romain Rigaux 13 years ago
parent
commit
0006024335

+ 13 - 9
apps/oozie/src/oozie/forms.py

@@ -40,16 +40,13 @@ class WorkflowForm(forms.ModelForm):
       'description': forms.TextInput(attrs={'class': 'span5'}),
       'deployment_dir': forms.TextInput(attrs={'class': 'pathChooser', 'style': "width:535px"}),
       'parameters': forms.widgets.HiddenInput(),
-      'job_xml': forms.widgets.HiddenInput(),
+      'job_xml': forms.widgets.HiddenInput(attrs={'class': 'span5'}),
       'job_properties': forms.widgets.HiddenInput(),
+      'schema_version': forms.widgets.HiddenInput(),
     }
 
   def __init__(self, *args, **kwargs):
     super(WorkflowForm, self).__init__(*args, **kwargs)
-    self.fields['schema_version'].widget = forms.Select(choices=(('uri:oozie:workflow:0.1', '0.1'),
-                                                                 ('uri:oozie:workflow:0.2', '0.2'),
-                                                                 ('uri:oozie:workflow:0.3', '0.3'),
-                                                                 ('uri:oozie:workflow:0.4', '0.4')))
 
 
 class ImportJobsubDesignForm(forms.Form):
@@ -77,6 +74,10 @@ class JavaForm(forms.ModelForm):
       'archives': forms.HiddenInput(),
       'jar_path': forms.TextInput(attrs={'class': 'pathChooser span5'}),
       'description': forms.TextInput(attrs={'class': 'span5'}),
+      'main_class': forms.TextInput(attrs={'class': 'span5'}),
+      'args': forms.TextInput(attrs={'class': 'span5'}),
+      'java_opts': forms.TextInput(attrs={'class': 'span5'}),
+      'job_xml': forms.TextInput(attrs={'class': 'span5'}),
     }
 
 
@@ -92,6 +93,7 @@ class MapreduceForm(forms.ModelForm):
       'archives': forms.HiddenInput(),
       'jar_path': forms.TextInput(attrs={'class': 'pathChooser span5'}),
       'description': forms.TextInput(attrs={'class': 'span5'}),
+      'job_xml': forms.TextInput(attrs={'class': 'span5'}),
     }
 
 
@@ -105,6 +107,9 @@ class StreamingForm(forms.ModelForm):
       'files': forms.widgets.HiddenInput(),
       'archives': forms.widgets.HiddenInput(),
       'description': forms.TextInput(attrs={'class': 'span5'}),
+      'job_xml': forms.TextInput(attrs={'class': 'span5'}),
+      'mapper': forms.TextInput(attrs={'class': 'span5'}),
+      'reducer': forms.TextInput(attrs={'class': 'span5'}),
     }
 
 
@@ -120,6 +125,7 @@ class PigForm(forms.ModelForm):
       'files': forms.widgets.HiddenInput(),
       'archives': forms.widgets.HiddenInput(),
       'description': forms.TextInput(attrs={'class': 'span5'}),
+      'job_xml': forms.TextInput(attrs={'class': 'span5'}),
     }
 
 
@@ -160,6 +166,7 @@ class CoordinatorForm(forms.ModelForm):
     widgets = {
       'description': forms.TextInput(attrs={'class': 'span5'}),
       'parameters': forms.widgets.HiddenInput(),
+      'schema_version': forms.widgets.HiddenInput(),
     }
 
   def __init__(self, *args, **kwargs):
@@ -173,10 +180,7 @@ class CoordinatorForm(forms.ModelForm):
         workflows.append(workflow.id)
     qs = qs.filter(id__in=workflows)
     self.fields['workflow'].queryset = qs
-    self.fields['schema_version'].widget = forms.Select(choices=(('uri:oozie:coordinator:0.1', '0.1'),
-                                                                 ('uri:oozie:coordinator:0.2', '0.2'),
-                                                                 ('uri:oozie:coordinator:0.3', '0.3'),
-                                                                 ('uri:oozie:coordinator:0.4', '0.4')))
+
 
 class DatasetForm(forms.ModelForm):
   start = forms.SplitDateTimeField(input_time_formats=[TIME_FORMAT],

+ 1 - 1
apps/oozie/src/oozie/templates/dashboard/list_oozie_coordinators.mako

@@ -222,7 +222,7 @@ ${layout.menubar(section='dashboard')}
 
     $("#filterInput").keyup(function() {
       runningTable.fnFilter($(this).val());
-      completedTable.fnFilter($(this).val());    
+      completedTable.fnFilter($(this).val());
 
       hash = "#";
 

+ 1 - 1
apps/oozie/src/oozie/templates/editor/create_coordinator.mako

@@ -53,7 +53,7 @@ ${ layout.menubar(section='coordinators') }
              ${ coordinator_form['parameters'] }
              <div class="hide">
                ${ utils.render_field(coordinator_form['timeout']) }
-               ${ utils.render_field(coordinator_form['schema_version']) }
+               ${ coordinator_form['schema_version'] }
              </div>
            </div>
 

+ 2 - 1
apps/oozie/src/oozie/templates/editor/create_workflow.mako

@@ -56,12 +56,13 @@ ${ layout.menubar(section='workflows') }
           </div>
 
             <div id="advanced-container" class="hide">
+              ${ utils.render_field(workflow_form['is_shared']) }
               ${ utils.render_field(workflow_form['deployment_dir']) }
-              ${ utils.render_field(workflow_form['schema_version']) }
               ${ utils.render_field(workflow_form['job_xml']) }
            </div>
 
            <div class="hide">
+             ${ workflow_form['schema_version'] }
              ${ workflow_form['job_properties'] }
              ${ workflow_form['parameters'] }
          </div>

+ 2 - 2
apps/oozie/src/oozie/templates/editor/edit_coordinator.mako

@@ -58,7 +58,6 @@ ${ layout.menubar(section='coordinators') }
              <div class="fieldWrapper">
                ${ utils.render_field(coordinator_form['name']) }
                ${ utils.render_field(coordinator_form['description']) }
-               ${ utils.render_field(coordinator_form['is_shared']) }
 
                <div class="control-group ">
                  <label class="control-label">
@@ -70,6 +69,7 @@ ${ layout.menubar(section='coordinators') }
                </div>
 
                <div id="advanced-container" class="hide">
+                 ${ utils.render_field(coordinator_form['is_shared']) }
                  ${ utils.render_field(coordinator_form['workflow']) }
                  ${ properties.print_key_value(coordinator_form['parameters'], 'parameters', parameters) }
                  ${ utils.render_field(coordinator_form['timeout']) }
@@ -82,7 +82,7 @@ ${ layout.menubar(section='coordinators') }
                    </div>
                  </div>
                  ${ utils.render_field(coordinator_form['execution']) }
-                 ${ utils.render_field(coordinator_form['schema_version']) }
+                 ${ coordinator_form['schema_version'] }
               </div>
              </div>
 

+ 1 - 1
apps/oozie/src/oozie/templates/editor/edit_workflow.mako

@@ -153,7 +153,7 @@ ${ layout.menubar(section='workflows') }
                  ${ workflow_form['parameters'] }
                  ${ properties.print_key_value(workflow_form['job_properties'], 'job_properties', job_properties) }
                  ${ workflow_form['job_properties'] }
-                 ${ utils.render_field(workflow_form['schema_version']) }
+                 ${ workflow_form['schema_version'] }
                  ${ utils.render_field(workflow_form['job_xml']) }
                </div>