ソースを参照

HUE-2434 [oozie] coordinator rerun items that are killed should not display MANAGE section

Removed display of MANAGE section of side bar if the action was killed
Updated unit tests
Paul McCaughtry 11 年 前
コミット
2ca67a8a81

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

@@ -78,7 +78,7 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
                   <li class="white">${ _('No available datasets') }</li>
                 % endif
 
-                % if has_job_edition_permission(oozie_coordinator, user):
+                % if has_job_edition_permission(oozie_coordinator, user) and oozie_coordinator.status != 'KILLED':
                   <li class="nav-header">${ _('Manage') }</li>
                   <li class="white">
                     <button title="${_('Kill %(coordinator)s') % dict(coordinator=oozie_coordinator.id)}"

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

@@ -3149,7 +3149,7 @@ class TestDashboard(OozieMockBase):
 
   def test_rerun_coordinator(self):
     response = self.c.get(reverse('oozie:rerun_oozie_coord', args=[MockOozieApi.WORKFLOW_IDS[0], '/path']))
-    assert_true('Select actions to rerun' in response.content, response.content)
+    assert_true('Rerun' in response.content, response.content)
 
 
   def test_rerun_coordinator_permissions(self):
@@ -3175,7 +3175,7 @@ class TestDashboard(OozieMockBase):
 
   def test_rerun_bundle(self):
     response = self.c.get(reverse('oozie:rerun_oozie_coord', args=[MockOozieApi.WORKFLOW_IDS[0], '/path']))
-    assert_true('Select actions to rerun' in response.content, response.content)
+    assert_true('Rerun' in response.content, response.content)
 
 
   def test_rerun_bundle_permissions(self):