Browse Source

[oozie] Improve examples description

Fix some i18n
Move add coordinator dataset warning into the popup
User admin now displaying notification
Romain Rigaux 13 years ago
parent
commit
97ce533

+ 10 - 10
apps/oozie/src/oozie/fixtures/initial_data.json

@@ -2,7 +2,7 @@
     {
         "fields": {
             "deployment_dir": "/user/hue/oozie/examples/sleep",
-            "description": "Run a Sleep MapReduce job",
+            "description": "MapReduce job that sleeps",
             "is_shared": true,
             "last_modified": "2012-08-31 16:07:32",
             "name": "Sleep",
@@ -16,7 +16,7 @@
     {
         "fields": {
             "deployment_dir": "/user/hue/oozie/examples/sleep",
-            "description": "Sleep each day for the date of the day milliseconds",
+            "description": "Daily sleep increasing every day",
             "is_shared": true,
             "last_modified": "2012-08-20 13:56:53",
             "name": "DailySleep",
@@ -30,7 +30,7 @@
     {
         "fields": {
             "deployment_dir": "/user/hue/oozie/examples/terasort",
-            "description": "Generate data and sort",
+            "description": "Generate data then sort it",
             "is_shared": true,
             "last_modified": "2012-08-31 16:07:21",
             "name": "TeraSort",
@@ -460,7 +460,7 @@
     },
     {
         "fields": {
-            "description": "",
+            "description": "Generate N number of records",
             "name": "TeraGenWorkflow",
             "node_type": "java",
             "workflow": 7
@@ -470,7 +470,7 @@
     },
     {
         "fields": {
-            "description": "",
+            "description": "Sort the records",
             "name": "TeraSort",
             "node_type": "java",
             "workflow": 7
@@ -510,7 +510,7 @@
     },
     {
         "fields": {
-            "description": "Sleep for some time",
+            "description": "Sleep for 1 second",
             "name": "Sleep-1",
             "node_type": "mapreduce",
             "workflow": 8
@@ -520,7 +520,7 @@
     },
     {
         "fields": {
-            "description": "Sleep for some time",
+            "description": "Sleep for 5 seconds",
             "name": "Sleep-5",
             "node_type": "mapreduce",
             "workflow": 8
@@ -550,7 +550,7 @@
     },
     {
         "fields": {
-            "description": "Sleep for some time",
+            "description": "Sleep for 4 seconds",
             "name": "Sleep-4",
             "node_type": "mapreduce",
             "workflow": 8
@@ -560,7 +560,7 @@
     },
     {
         "fields": {
-            "description": "Sleep for some time",
+            "description": "Sleep for 3 seconds",
             "name": "Sleep-3",
             "node_type": "mapreduce",
             "workflow": 8
@@ -590,7 +590,7 @@
     },
     {
         "fields": {
-            "description": "Sleep for some time",
+            "description": "Sleep for 10 seconds",
             "name": "Sleep-10",
             "node_type": "mapreduce",
             "workflow": 8

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

@@ -148,9 +148,9 @@ class Job(models.Model):
   @property
   def status(self):
     if self.is_shared:
-      return 'shared'
+      return _('shared')
     else:
-      return 'personal'
+      return _('personal')
 
   def find_all_parameters(self):
     params = dict([(param, '') for param in self.find_parameters()])

+ 3 - 4
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['workflow']) }
                ${ utils.render_field(coordinator_form['is_shared']) }
 
                <div class="control-group ">
@@ -71,6 +70,7 @@ ${ layout.menubar(section='coordinators') }
                </div>
 
                <div id="advanced-container" class="hide">
+                 ${ utils.render_field(coordinator_form['workflow']) }
                  ${ properties.print_key_value(coordinator_form['parameters'], 'parameters', parameters) }
                  ${ utils.render_field(coordinator_form['timeout']) }
                  <div class="row-fluid">
@@ -234,9 +234,6 @@ ${ layout.menubar(section='coordinators') }
                   </tr>
                 </thead>
                 <tbody>
-                  <tr>
-                    <td class="alert-error"><b>Warning</b>: Save your coordinator before creating a new dataset!</td>
-                  </tr>
                   <tr>
                     <td><a class="btn" data-toggle="modal" href="#add-dataset-modal">${ _('Create') }</a></td>
                   </tr>
@@ -359,6 +356,8 @@ ${ layout.menubar(section='coordinators') }
       <div class="modal-header">
         <button class="close" data-dismiss="modal">&times;</button>
         <h3>${ _('Create a dataset') }</h3>
+        <hr/>
+        <div class="alert alert-warning"><b>${ _('Warning') }</b>: ${ _('Save your modifications before creating a new dataset!') }</div>
       </div>
 
       <div class="modal-body" id="add-dataset-body">

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

@@ -97,7 +97,7 @@ ${ layout.menubar(section='workflows') }
                 <a href="javascript:void(0);" title="${ _('Click to add to the end') }" class="btn modalWindow"
                   data-modal-url="${ url('oozie:import_action', workflow=workflow.id, parent_action_id=workflow.end.get_parents()[0].id) }"
                   data-modal-id="#modal-window">
-                  <i class="icon-plus"></i> ${ _('Import Jobsub') }
+                  <i class="icon-plus"></i> ${ _('Job Design') }
                 </a>
                 <p/>
               </div>

+ 0 - 4
apps/oozie/src/oozie/templates/editor/gen/workflow-common.xml.mako

@@ -13,10 +13,6 @@
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
-##
-##
-## no spaces in this method please; we're declaring a CSS class, and ART uses this value for stuff, and it splits on spaces, and
-## multiple spaces and line breaks cause issues
 
 <%!
 import posixpath

+ 1 - 1
apps/oozie/src/oozie/tests.py

@@ -741,7 +741,7 @@ class TestEditor:
     try:
       response = client_not_me.get(reverse('oozie:edit_coordinator', args=[coord.id]))
       assert_false('Permission denied' in response.content, response.content)
-      assert_false('Save' in response.content, response.content)
+      assert_false('value="Save"' in response.content, response.content)
     finally:
       finish()
     finish = SHARE_JOBS.set_for_testing(False)

+ 1 - 1
apps/useradmin/src/useradmin/templates/confirm.mako

@@ -25,4 +25,4 @@ ${commonheader(title, "useradmin")}
 		<input type="submit" value="${_('Yes')}">
 	</form>
 </div>
-${commonfooter()}
+${commonfooter(messages)}

+ 17 - 15
apps/useradmin/src/useradmin/templates/edit_group.mako

@@ -73,19 +73,21 @@ ${layout.menubar(section='groups', _=_)}
 			<a href="/useradmin/groups" class="btn">${_('Cancel')}</a>
 		</div>
 	</form>
+</div>
 
-	<script type="text/javascript" charset="utf-8">
-		$(document).ready(function(){
-			$("#id_members").jHueSelector({
-                width:400,
-                selectAllLabel: "${_('Select all')}",
-                searchPlaceholder: "${_('Search')}"
-            });
-			$("#id_permissions").jHueSelector({
-                width:400,
-                selectAllLabel: "${_('Select all')}",
-                searchPlaceholder: "${_('Search')}"
-            });
-		});
-	</script>
-${commonfooter()}
+<script type="text/javascript" charset="utf-8">
+	$(document).ready(function(){
+		$("#id_members").jHueSelector({
+            width:400,
+            selectAllLabel: "${_('Select all')}",
+            searchPlaceholder: "${_('Search')}"
+        });
+		$("#id_permissions").jHueSelector({
+            width:400,
+            selectAllLabel: "${_('Select all')}",
+            searchPlaceholder: "${_('Search')}"
+        });
+	});
+</script>
+
+${commonfooter(messages)}

+ 1 - 1
apps/useradmin/src/useradmin/templates/edit_permissions.mako

@@ -64,4 +64,4 @@ ${layout.menubar(section='permissions', _=_)}
         });
 	});
 </script>
-${commonfooter()}
+${commonfooter(messages)}

+ 1 - 1
apps/useradmin/src/useradmin/templates/edit_user.mako

@@ -79,4 +79,4 @@ ${layout.menubar(section='users', _=_)}
         });
 	});
 </script>
-${commonfooter()}
+${commonfooter(messages)}

+ 1 - 1
apps/useradmin/src/useradmin/templates/list_groups.mako

@@ -122,4 +122,4 @@ ${layout.menubar(section='groups', _=_)}
         });
     </script>
 
-${commonfooter()}
+${commonfooter(messages)}

+ 1 - 1
apps/useradmin/src/useradmin/templates/list_permissions.mako

@@ -95,4 +95,4 @@ ${layout.menubar(section='permissions', _=_)}
     });
 </script>
 
-${commonfooter()}
+${commonfooter(messages)}