Преглед изворни кода

[oozie] Examples owned by wrong user

The owner id of the example is the Leet code: 1100713
Add some icons to the Editors
Romain Rigaux пре 13 година
родитељ
комит
4dd8c24

+ 11 - 11
apps/oozie/src/oozie/fixtures/initial_oozie_examples.json

@@ -9,8 +9,8 @@
       "deployment_dir": "/user/hue/oozie/workspaces/sleep",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
-      "description": "MapReduce job that sleeps"
+      "owner": 1100713,
+      "description": "Example of MapReduce action that sleeps"
     }
   },
   {
@@ -23,7 +23,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/sleep",
       "schema_version": "uri:oozie:coordinator:0.2",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of MapReduce action"
     }
   },
@@ -37,7 +37,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/terasort",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of sequential Java actions"
     }
   },
@@ -51,7 +51,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/sleepfork",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of multiple forks"
     }
   },
@@ -65,7 +65,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/hive",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of Hive action"
     }
   },
@@ -79,7 +79,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/pig",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of Pig action"
     }
   },
@@ -93,7 +93,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/sqoop",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of Sqoop action"
     }
   },
@@ -107,7 +107,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/ssh",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of Ssh action"
     }
   },
@@ -121,7 +121,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/shell",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 2,
+      "owner": 1100713,
       "description": "Example of Shell action"
     }
   },
@@ -135,7 +135,7 @@
       "deployment_dir": "/user/hue/oozie/workspaces/distcp",
       "schema_version": "uri:oozie:workflow:0.4",
       "last_modified": "2012-11-05 00:00:00",
-      "owner": 1,
+      "owner": 1100713,
       "description": "Example of DistCp action"
     }
   },

+ 3 - 3
apps/oozie/src/oozie/management/commands/oozie_setup.py

@@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
 class Command(NoArgsCommand):
   def handle_noargs(self, **options):
     fs = cluster.get_hdfs()
-    remote_dir = create_data_dir(fs)
+    remote_dir = create_directories(fs)
 
     # Copy examples binaries
     for name in os.listdir(LOCAL_SAMPLE_DIR.get()):
@@ -57,10 +57,10 @@ class Command(NoArgsCommand):
     sample, created = User.objects.get_or_create(username='sample')
     management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2)
     from oozie.models import Job
-    Job.objects.filter(owner__id=1, pk__lte=16).update(owner=sample)
+    Job.objects.filter(owner__id=1100713).update(owner=sample) # 11OOZIE
 
 
-def create_data_dir(fs):
+def create_directories(fs):
   # If needed, create the remote home, deployment and data directories
   directories = (REMOTE_DEPLOYMENT_DIR.get(), REMOTE_SAMPLE_DIR.get())
 

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

@@ -31,7 +31,7 @@ ${ layout.menubar(section='coordinators') }
 
   <div class="well hueWell">
     <div class="btn-group pull-right">
-      <a href="${ url('oozie:create_coordinator') }" class="btn">${ _('Create') }</a>
+      <a href="${ url('oozie:create_coordinator') }" class="btn"><i class="icon-plus-sign"></i> ${ _('Create') }</a>
     </div>
 
     <div class="row-fluid">

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

@@ -31,9 +31,9 @@ ${ layout.menubar(section='workflows') }
 
   <div class="well hueWell">
     <div class="btn-group pull-right">
-      <a href="${ url('oozie:create_workflow') }" class="btn">${ _('Create') }</a>
+      <a href="${ url('oozie:create_workflow') }" class="btn"><i class="icon-plus-sign"></i> ${ _('Create') }</a>
       % if currentuser.is_superuser:
-        <a href="#installSamples" data-toggle="modal" class="btn">${ _('Setup App') }</a>
+        <a href="#installSamples" data-toggle="modal" class="btn"><i class="icon-download-alt"></i> ${ _('Setup Examples') }</a>
       % endif
     </div>
 
@@ -68,7 +68,7 @@ ${ layout.menubar(section='workflows') }
       </tr>
     </thead>
     <tbody>
-      %for workflow in jobs:
+      % for workflow in jobs:
         <tr class="action-row">
           <td class=".btn-large action-column" data-row-selector-exclude="true" style="background-color: white;">
             <input type="radio" name="action" data-row-selector-exclude="true"
@@ -97,7 +97,7 @@ ${ layout.menubar(section='workflows') }
           </td>
           <td>${ workflow.owner.username }</td>
         </tr>
-      %endfor
+      % endfor
     </tbody>
   </table>