|
|
@@ -93,32 +93,45 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
% endif
|
|
|
% endif
|
|
|
|
|
|
- % if has_job_edition_permission(oozie_coordinator, user) and oozie_coordinator.status not in ('KILLED', 'SUCCEEDED'):
|
|
|
- <li class="nav-header">${ _('Manage') }</li>
|
|
|
- <li class="white">
|
|
|
- <div id="rerun-coord-modal" class="modal hide"></div>
|
|
|
- <button title="${ _('Suspend the coordinator after finishing the current running actions') }" id="suspend-btn"
|
|
|
- data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='suspend') }"
|
|
|
- data-confirmation-header="${ _('Are you sure you want to suspend this job?') }"
|
|
|
- data-confirmation-footer="normal"
|
|
|
- class="btn btn-small confirmationModal
|
|
|
- % if not oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
- % endif
|
|
|
- " rel="tooltip" data-placement="right" style="margin-bottom: 5px">
|
|
|
- ${ _('Suspend') }
|
|
|
- </button>
|
|
|
+ <li class="nav-header">${ _('Manage') }</li>
|
|
|
+ <li class="white">
|
|
|
+ % if has_job_edition_permission(oozie_coordinator, user) and oozie_coordinator.status not in ('KILLED', 'SUCCEEDED'):
|
|
|
+ <div id="rerun-coord-modal" class="modal hide"></div>
|
|
|
+ <div class="btn-group action-button-group" style="display: block; margin-bottom: 10px">
|
|
|
<button title="${ _('Resume the coordinator') }" id="resume-btn"
|
|
|
- data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='resume') }"
|
|
|
- data-confirmation-header="${ _('Are you sure you want to resume this job?') }"
|
|
|
- data-confirmation-footer="normal"
|
|
|
- class="btn btn-small confirmationModal
|
|
|
- % if oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
- % endif
|
|
|
- " style="margin-bottom: 5px">
|
|
|
- ${ _('Resume') }
|
|
|
- </button>
|
|
|
+ data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='resume') }"
|
|
|
+ data-confirmation-header="${ _('Are you sure you want to resume this job?') }"
|
|
|
+ data-confirmation-footer="normal"
|
|
|
+ class="btn btn-small confirmationModal
|
|
|
+ % if oozie_coordinator.is_running():
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ ">${ _('Resume') }</button>
|
|
|
+ <button title="${ _('Suspend the coordinator after finishing the current running actions') }" id="suspend-btn"
|
|
|
+ data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='suspend') }"
|
|
|
+ data-confirmation-header="${ _('Are you sure you want to suspend this job?') }"
|
|
|
+ data-confirmation-footer="normal"
|
|
|
+ class="btn btn-small confirmationModal
|
|
|
+ % if not oozie_coordinator.is_running():
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ " rel="tooltip" data-placement="right">${ _('Suspend') }</button>
|
|
|
+ <button title="${_('Kill %(coordinator)s') % dict(coordinator=oozie_coordinator.id)}" id="kill-btn"
|
|
|
+ alt="${ _('Are you sure you want to kill coordinator %s?') % oozie_coordinator.id }"
|
|
|
+ href="javascript:void(0)"
|
|
|
+ data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='kill') }"
|
|
|
+ data-message="${ _('The coordinator was killed!') }"
|
|
|
+ data-confirmation-footer="danger"
|
|
|
+ data-confirmation-header="${ _('Are you sure you want to kill this job?') }"
|
|
|
+ class="btn btn-small btn-danger disable-feedback confirmationModal
|
|
|
+ % if not oozie_coordinator.is_running():
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ ">${_('Kill')}</button>
|
|
|
+ </div>
|
|
|
+ % endif
|
|
|
+ <div class="btn-group" style="margin-left: 0; margin-bottom: 5px">
|
|
|
+ % if has_job_edition_permission(oozie_coordinator, user) and oozie_coordinator.status not in ('KILLED', 'SUCCEEDED'):
|
|
|
<button title="${ _('Update Coordinator Job properties') }" id="edit-coord-btn"
|
|
|
data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='change') }"
|
|
|
data-message="${ _('Successfully updated Coordinator Job Properties') }"
|
|
|
@@ -126,35 +139,14 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
data-confirmation-footer="update"
|
|
|
class="btn btn-small confirmationModal
|
|
|
% if not oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
+ hide
|
|
|
% endif
|
|
|
- " style="margin-bottom: 5px">
|
|
|
- ${ _('Edit') }
|
|
|
- </button>
|
|
|
- <br/>
|
|
|
- <button title="${_('Kill %(coordinator)s') % dict(coordinator=oozie_coordinator.id)}"
|
|
|
- id="kill-btn"
|
|
|
- class="btn btn-small btn-danger disable-feedback confirmationModal
|
|
|
- % if not oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
- % endif
|
|
|
- "
|
|
|
- alt="${ _('Are you sure you want to kill coordinator %s?') % oozie_coordinator.id }"
|
|
|
- href="javascript:void(0)"
|
|
|
- data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='kill') }"
|
|
|
- data-message="${ _('The coordinator was killed!') }"
|
|
|
- data-confirmation-footer="danger"
|
|
|
- data-confirmation-header="${ _('Are you sure you want to kill this job?') }" style="margin-bottom: 5px">
|
|
|
- ${_('Kill')}
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- % endif
|
|
|
- <li class="white">
|
|
|
- <button title="${ _('Sync Workflow') }" id="sync-wf-btn"
|
|
|
+ ">${ _('Edit') }</button>
|
|
|
+ % endif
|
|
|
+ <button title="${ _('Sync Workflow') }" id="sync-wf-btn"
|
|
|
data-sync-url="${ url('oozie:sync_coord_workflow', job_id=oozie_coordinator.id) }"
|
|
|
- class="btn btn-small sync-wf-btn" style="margin-bottom: 5px">
|
|
|
- ${ _('Sync Workflow') }
|
|
|
- </button>
|
|
|
+ class="btn btn-small sync-wf-btn">${ _('Sync Workflow') }</button>
|
|
|
+ </div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -1027,6 +1019,13 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
$("#resume-btn").hide();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ if ($(".action-button-group").find(".btn:visible").length > 0) {
|
|
|
+ $(".action-button-group").show();
|
|
|
+ } else {
|
|
|
+ $(".action-button-group").hide();
|
|
|
+ }
|
|
|
+
|
|
|
$("#progress .bar").text(data.progress + "%").css("width", data.progress + "%").attr("class", "bar " + getStatusClass(data.status, "bar-"));
|
|
|
|
|
|
if (data.status != "RUNNING" && data.status != "PREP"){
|