Browse Source

[oozie] Critical UX improvements

Datadet selects were not updated
Add note about using UTC time only for coordinators
Fixing regression of miscoloring READY actions
Removing loading text on the next button of the coordinator wizard
Romain Rigaux 13 years ago
parent
commit
d14deea3b0

+ 6 - 1
apps/oozie/src/oozie/templates/editor/create_coordinator_dataset.mako

@@ -26,7 +26,13 @@
 <fieldset>
   ${ utils.render_field_no_popover(dataset_form['name']) }
   ${ utils.render_field_no_popover(dataset_form['description']) }
+  <div class="row-fluid">
+      <div class="alert alert-warning">
+        ${ _('UTC time only! (e.g. if you want 10pm PST (UTC+8) set it 8 hours later to 6am the next day.') }
+      </div>
+  </div>
   ${ utils.render_field_no_popover(dataset_form['start']) }
+  ${ utils.render_field_no_popover(dataset_form['timezone']) }
 
   <div class="row-fluid">
     <div class="span6">
@@ -51,6 +57,5 @@
 
   <%include file="dataset_utils.mako" args="base_id='#id_create-'"/>
 
-  ${ utils.render_field_no_popover(dataset_form['timezone']) }
   ${ utils.render_field_no_popover(dataset_form['done_flag']) }
 </fieldset>

+ 19 - 13
apps/oozie/src/oozie/templates/editor/edit_coordinator.mako

@@ -130,6 +130,11 @@ ${ layout.menubar(section='coordinators') }
               </div>
             </div>
             <div class="fieldWrapper">
+              <div class="row-fluid">
+                  <div class="alert alert-warning">
+                    ${ _('UTC time only! (e.g. if you want 10pm PST (UTC+8) set it 8 hours later to 6am the next day.') }
+                  </div>
+              </div>
               <div class="row-fluid">
                 <div class="span6">
                 ${ utils.render_field_no_popover(coordinator_form['start']) }
@@ -267,7 +272,7 @@ ${ layout.menubar(section='coordinators') }
 
         <div class="form-actions">
           <a id="backBtn" class="btn disabled">${ _('Back') }</a>
-          <a id="nextBtn" class="btn btn-primary">${ _('Next') }</a>
+          <a id="nextBtn" class="btn btn-primary disable-feedback">${ _('Next') }</a>
           % if coordinator.is_editable(user):
             <a class="btn btn-primary save" data-bind="visible: isSaveVisible()" style="margin-left: 30px">${ _('Save coordinator') }</a>
           % endif
@@ -528,20 +533,21 @@ ${ layout.menubar(section='coordinators') }
         $("#edit-dataset-form").empty();
         window.viewModel.updateInstance();
         $("#edit-dataset-body").find("input, select").each(function () {
-          $(this).clone().appendTo($("#edit-dataset-form"));
+          // Don't clone as it is duplicating ids.
+          $(this).appendTo($("#edit-dataset-form"));
         });
         $.post($("#edit-dataset-body").data("url"),
-                $("#edit-dataset-form").serialize(),
-                function (response) {
-                  if (response['status'] != 0) {
-                    $("#edit-dataset-form").empty();
-                    $('#edit-dataset-body').html(response['data']);
-                    decorateDateTime();
-                  } else {
-                    window.location.replace(response['data']);
-                    window.location.reload();
-                  }
-                }
+            $("#edit-dataset-form").serialize(),
+            function (response) {
+              if (response['status'] != 0) {
+                $("#edit-dataset-form").empty();
+                $('#edit-dataset-body').html(response['data']);
+                decorateDateTime();
+              } else {
+                window.location.replace(response['data']);
+                window.location.reload();
+              }
+            }
         );
       });
 

+ 2 - 2
apps/oozie/src/oozie/views/editor.py

@@ -41,9 +41,9 @@ from oozie.decorators import check_job_access_permission, check_job_edition_perm
                              check_dataset_access_permission, check_dataset_edition_permission
 from oozie.import_workflow import import_workflow as _import_workflow
 from oozie.management.commands import oozie_setup
-from oozie.models import Job, Workflow, History, Coordinator,\
+from oozie.models import Workflow, History, Coordinator,\
                          Dataset, DataInput, DataOutput,\
-                         ACTION_TYPES, _STD_PROPERTIES_JSON
+                         ACTION_TYPES
 from oozie.forms import WorkflowForm, CoordinatorForm, DatasetForm,\
   DataInputForm, DataOutputForm, LinkForm,\
   DefaultLinkForm, design_form_by_type, ParameterForm,\

+ 2 - 5
apps/oozie/static/js/utils.js

@@ -32,12 +32,9 @@ function getStatusClass(status, prefix){
   if (['SUCCEEDED', 'OK'].indexOf(status) > -1){
     klass = prefix + "success";
   }
-  else if (['RUNNING', 'PREP', 'WAITING', 'SUSPENDED', 'PREPSUSPENDED', 'PREPPAUSED', 'PAUSED'].indexOf(status) > -1){
+  else if (['RUNNING', 'READY', 'PREP', 'WAITING', 'SUSPENDED', 'PREPSUSPENDED', 'PREPPAUSED', 'PAUSED', 'SUSPENDEDWITHERROR', 'PAUSEDWITHERROR'].indexOf(status) > -1){
     klass = prefix + "warning";
   }
-  else if (status == 'READY'){
-    klass = prefix + "success";
-  }
   else {
     klass = prefix + "important";
     if (prefix == "bar-"){
@@ -45,4 +42,4 @@ function getStatusClass(status, prefix){
     }
   }
   return klass;
-}
+}