浏览代码

[oozie] Hide default parameters in submission popups

Romain Rigaux 11 年之前
父节点
当前提交
75286ce

+ 3 - 1
apps/oozie/src/oozie/templates/editor/coordinator_editor.mako

@@ -388,6 +388,7 @@ ${ commonheader(_("Coordinator Editor"), "Oozie", user) | n,unicode }
   <div class="modal-body">
       <h4>${ _('Submission Parameters') }</h4>
       <ul data-bind="foreach: coordinator.properties.parameters" class="unstyled">
+        <!-- ko if: ['oozie.use.system.libpath', 'start_date', 'end_date'].indexOf(name()) == -1 -->
         <li>
           <input data-bind="value: name"/>
           <input data-bind="value: value"/>
@@ -395,8 +396,9 @@ ${ commonheader(_("Coordinator Editor"), "Oozie", user) | n,unicode }
             <i class="fa fa-minus"></i>
           </a>
         </li>
+        <!-- /ko -->
       </ul>
-      <a class="pointer" data-bind="click: function(){ $root.coordinator.properties.parameters.push({'name': '', 'value': ''}); }">
+      <a class="pointer" data-bind="click: function(){ $root.coordinator.properties.parameters.push(ko.mapping.fromJS({'name': '', 'value': ''})); }">
         <i class="fa fa-plus"></i> ${ _('Add parameter') }
       </a>
 

+ 4 - 4
apps/oozie/src/oozie/templates/editor/submit_job_popup2.mako

@@ -38,10 +38,10 @@
             ${ hidden | n,unicode }
           % endfor
 
-          <div class="control-group
-          % if form['name'].form.initial.get('name') == 'oozie.use.system.libpath':
-                hide
-              % endif
+          <div class="control-group"
+            % if form['name'].form.initial.get('name') == 'oozie.use.system.libpath':
+                style="display: none"
+            % endif
           ">
             <label class="control-label">${ form['name'].form.initial.get('name') }</label>
             <div class="controls">

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

@@ -1786,7 +1786,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
         </li>
         <!-- /ko -->
       </ul>
-      <a class="pointer" data-bind="click: function(){ $root.workflow.properties.parameters.push({'name': '', 'value': ''}); }">
+      <a class="pointer" data-bind="click: function(){ $root.workflow.properties.parameters.push(ko.mapping.fromJS({'name': '', 'value': ''})); }">
         <i class="fa fa-plus"></i> ${ _('Add parameter') }
       </a>