|
|
@@ -26,318 +26,341 @@
|
|
|
${ commonheader(_("Coordinator Dashboard"), "oozie", user) | n,unicode }
|
|
|
${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
|
|
|
+<link rel="stylesheet" href="/oozie/static/css/coordinator.css" type="text/css" />
|
|
|
+
|
|
|
<div class="container-fluid">
|
|
|
-<div class="card card-small">
|
|
|
- <div class="card-body">
|
|
|
- <p>
|
|
|
-
|
|
|
-<div class="row-fluid">
|
|
|
- <div class="span2">
|
|
|
- <div class="sidebar-nav">
|
|
|
- <ul class="nav nav-list" style="border:none">
|
|
|
- <li class="nav-header">${ _('Coordinator') }</li>
|
|
|
- % if coordinator is not None:
|
|
|
- <li><a href="${ coordinator.get_absolute_url() }">${ oozie_coordinator.appName }</a></li>
|
|
|
- % else:
|
|
|
- <li class="white">${ oozie_coordinator.appName }</li>
|
|
|
- % endif
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Submitter') }</li>
|
|
|
- <li class="white">${ oozie_coordinator.user }</li>
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Status') }</li>
|
|
|
- <li class="white" id="status"><span class="label ${ utils.get_status(oozie_coordinator.status) }">${ oozie_coordinator.status }</span></li>
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Progress') }</li>
|
|
|
- <li class="white" id="progress">
|
|
|
- <div class="progress">
|
|
|
- <div class="bar" style="width: 0">${ oozie_coordinator.get_progress() }%</div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Frequency') }</li>
|
|
|
- % if enable_cron_scheduling:
|
|
|
- <li class="white cron-frequency">${ oozie_coordinator.human_frequency }</li>
|
|
|
- % else:
|
|
|
- <li class="white">${ oozie_coordinator.frequency } ${ oozie_coordinator.timeUnit }</li>
|
|
|
- % endif
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Next Materialized Time') }</li>
|
|
|
- <li class="white" id="nextTime">${ utils.format_time(oozie_coordinator.nextMaterializedTime) }</li>
|
|
|
-
|
|
|
- <li class="nav-header">${ _('Id') }</li>
|
|
|
- <li class="white">${ oozie_coordinator.id }</li>
|
|
|
-
|
|
|
- % if coordinator:
|
|
|
- <li class="nav-header">${ _('Datasets') }</li>
|
|
|
- % for dataset in coordinator.dataset_set.all():
|
|
|
- <li rel="tooltip" title="${ dataset.name } : ${ dataset.uri }" class="white"><i class="fa fa-eye"></i> <span class="dataset">${ dataset.name }</span></li>
|
|
|
- % endfor
|
|
|
- % if not coordinator.dataset_set.all():
|
|
|
- <li class="white">${ _('No available datasets') }</li>
|
|
|
- % endif
|
|
|
- % endif
|
|
|
-
|
|
|
- % if has_job_edition_permission(oozie_coordinator, user):
|
|
|
- <li class="nav-header">${ _('Manage') }</li>
|
|
|
- <li class="white">
|
|
|
- <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-message="${ _('Are you sure you\'d like to kill this job?') }" style="margin-bottom: 5px">
|
|
|
- ${_('Kill')}
|
|
|
- </button>
|
|
|
- <button class="btn btn-small
|
|
|
- % if oozie_coordinator.is_running() or oozie_coordinator.status in ('KILLED', 'FAILED'):
|
|
|
- hide
|
|
|
- % endif
|
|
|
- "
|
|
|
- id="rerun-btn"
|
|
|
- data-rerun-url="${ url('oozie:rerun_oozie_coord', job_id=oozie_coordinator.id, app_path=oozie_coordinator.coordJobPath) }"
|
|
|
- style="margin-bottom: 5px">
|
|
|
- ${ _('Rerun') }
|
|
|
- </button>
|
|
|
- <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-message="${ _('Are you sure you\'d like to suspend this job?') }"
|
|
|
- class="btn btn-small confirmationModal
|
|
|
- % if not oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
- % endif
|
|
|
- " rel="tooltip" data-placement="right" style="margin-bottom: 5px">
|
|
|
- ${ _('Suspend') }
|
|
|
- </button>
|
|
|
- <button title="${ _('Resume the coordinator') }" id="resume-btn"
|
|
|
- data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='resume') }"
|
|
|
- data-confirmation-message="${ _('Are you sure you\'d like to resume this job?') }"
|
|
|
- class="btn btn-small confirmationModal
|
|
|
- % if oozie_coordinator.is_running():
|
|
|
- hide
|
|
|
- % endif
|
|
|
- " style="margin-bottom: 5px">
|
|
|
- ${ _('Resume') }
|
|
|
- </button>
|
|
|
- </li>
|
|
|
- % endif
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="span10">
|
|
|
- <h1 class="card-heading simple card-heading-nopadding card-heading-noborder card-heading-blue" style="margin-bottom: 10px">
|
|
|
- % if oozie_bundle:
|
|
|
- ${ _('Bundle') } <a href="${ oozie_bundle.get_absolute_url() }">${ oozie_bundle.appName }</a> :
|
|
|
- % endif
|
|
|
- ${ _('Coordinator') } ${ oozie_coordinator.appName }
|
|
|
- </h1>
|
|
|
-
|
|
|
- <ul class="nav nav-tabs">
|
|
|
- <li class="active"><a href="#calendar" data-toggle="tab">${ _('Calendar') }</a></li>
|
|
|
- <li><a href="#actions" data-toggle="tab">${ _('Actions') }</a></li>
|
|
|
- <li><a href="#details" data-toggle="tab">${ _('Details') }</a></li>
|
|
|
- <li><a href="#configuration" data-toggle="tab">${ _('Configuration') }</a></li>
|
|
|
- <li><a href="#log" data-toggle="tab">${ _('Log') }</a></li>
|
|
|
- <li><a href="#definition" data-toggle="tab">${ _('Definition') }</a></li>
|
|
|
- % if oozie_coordinator.has_sla:
|
|
|
- <li><a href="#sla" data-toggle="tab">${ _('SLA') }</a></li>
|
|
|
- % endif
|
|
|
- </ul>
|
|
|
-
|
|
|
- <div class="tab-content" style="min-height:200px">
|
|
|
- <div class="tab-pane active" id="calendar">
|
|
|
- <table class="table table-striped table-condensed">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th width="200">${ _('Day') }</th>
|
|
|
- <th>${ _('Comment') }</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody data-bind="template: {name: 'calendarTemplate', foreach: actions, afterRender: function(){ setupjHueRowSelector(); }}">
|
|
|
- </tbody>
|
|
|
- <tfoot>
|
|
|
- <tr>
|
|
|
- <td data-bind="visible: !isLoading() && paginate()" colspan="10">
|
|
|
- </br>
|
|
|
- <div class="alert">
|
|
|
- ${ _('There are older actions to be shown:') }
|
|
|
- <a class="btn" href="${ oozie_coordinator.get_absolute_url() }?show_all_actions=true">${ _('Expand') }</a>
|
|
|
+ <div class="card card-small">
|
|
|
+ <div class="card-body">
|
|
|
+
|
|
|
+ <div class="row-fluid">
|
|
|
+ <div class="span2">
|
|
|
+ <div class="sidebar-nav">
|
|
|
+ <ul class="nav nav-list" style="border:none">
|
|
|
+ <li class="nav-header">${ _('Coordinator') }</li>
|
|
|
+ % if coordinator is not None:
|
|
|
+ <li><a href="${ coordinator.get_absolute_url() }">${ oozie_coordinator.appName }</a></li>
|
|
|
+ % else:
|
|
|
+ <li class="white">${ oozie_coordinator.appName }</li>
|
|
|
+ % endif
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Submitter') }</li>
|
|
|
+ <li class="white">${ oozie_coordinator.user }</li>
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Status') }</li>
|
|
|
+ <li class="white" id="status"><span class="label ${ utils.get_status(oozie_coordinator.status) }">${ oozie_coordinator.status }</span></li>
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Progress') }</li>
|
|
|
+ <li class="white" id="progress">
|
|
|
+ <div class="progress">
|
|
|
+ <div class="bar" style="width: 0">${ oozie_coordinator.get_progress() }%</div>
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr data-bind="visible: isLoading()">
|
|
|
- <td colspan="2" class="left">
|
|
|
- <img src="/static/art/spinner.gif" />
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr data-bind="visible: actions().length == 0 && !isLoading()">
|
|
|
- <td colspan="2">
|
|
|
- <div class="alert">
|
|
|
- ${ _('There are no actions to be shown.') }
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Frequency') }</li>
|
|
|
+ % if enable_cron_scheduling:
|
|
|
+ <li class="white cron-frequency">${ oozie_coordinator.human_frequency }</li>
|
|
|
+ % else:
|
|
|
+ <li class="white">${ oozie_coordinator.frequency } ${ oozie_coordinator.timeUnit }</li>
|
|
|
+ % endif
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Next Materialized Time') }</li>
|
|
|
+ <li class="white" id="nextTime">${ utils.format_time(oozie_coordinator.nextMaterializedTime) }</li>
|
|
|
+
|
|
|
+ <li class="nav-header">${ _('Id') }</li>
|
|
|
+ <li class="white">${ oozie_coordinator.id }</li>
|
|
|
+
|
|
|
+ % if coordinator:
|
|
|
+ <li class="nav-header">${ _('Datasets') }</li>
|
|
|
+ % for dataset in coordinator.dataset_set.all():
|
|
|
+ <li rel="tooltip" title="${ dataset.name } : ${ dataset.uri }" class="white"><i class="fa fa-eye"></i> <span class="dataset">${ dataset.name }</span></li>
|
|
|
+ % endfor
|
|
|
+ % if not coordinator.dataset_set.all():
|
|
|
+ <li class="white">${ _('No available datasets') }</li>
|
|
|
+ % endif
|
|
|
+
|
|
|
+ % if has_job_edition_permission(oozie_coordinator, user):
|
|
|
+ <li class="nav-header">${ _('Manage') }</li>
|
|
|
+ <li class="white">
|
|
|
+ <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-message="${ _('Are you sure you\'d like to kill this job?') }" style="margin-bottom: 5px">
|
|
|
+ ${_('Kill')}
|
|
|
+ </button>
|
|
|
+ <button data-bind="enable: selectedActions().length > 0" class="btn btn-small
|
|
|
+ % if oozie_coordinator.is_running() or oozie_coordinator.status in ('KILLED', 'FAILED'):
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ "
|
|
|
+ id="rerun-btn"
|
|
|
+ data-rerun-url="${ url('oozie:rerun_oozie_coord', job_id=oozie_coordinator.id, app_path=oozie_coordinator.coordJobPath) }"
|
|
|
+ style="margin-bottom: 5px">
|
|
|
+ ${ _('Rerun') }
|
|
|
+ </button>
|
|
|
+ <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-message="${ _('Are you sure you\'d like to suspend this job?') }"
|
|
|
+ class="btn btn-small confirmationModal
|
|
|
+ % if not oozie_coordinator.is_running():
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ " rel="tooltip" data-placement="right" style="margin-bottom: 5px">
|
|
|
+ ${ _('Suspend') }
|
|
|
+ </button>
|
|
|
+ <button title="${ _('Resume the coordinator') }" id="resume-btn"
|
|
|
+ data-url="${ url('oozie:manage_oozie_jobs', job_id=oozie_coordinator.id, action='resume') }"
|
|
|
+ data-confirmation-message="${ _('Are you sure you\'d like to resume this job?') }"
|
|
|
+ class="btn btn-small confirmationModal
|
|
|
+ % if oozie_coordinator.is_running():
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ " style="margin-bottom: 5px">
|
|
|
+ ${ _('Resume') }
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
+ % endif
|
|
|
+ % endif
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="span10">
|
|
|
+ <h1 class="card-heading simple card-heading-nopadding card-heading-noborder card-heading-blue" style="margin-bottom: 10px">
|
|
|
+ % if oozie_bundle:
|
|
|
+ ${ _('Bundle') } <a href="${ oozie_bundle.get_absolute_url() }">${ oozie_bundle.appName }</a> :
|
|
|
+ % endif
|
|
|
+ ${ _('Coordinator') } ${ oozie_coordinator.appName }
|
|
|
+ </h1>
|
|
|
+
|
|
|
+ <ul class="nav nav-tabs">
|
|
|
+ <li class="active"><a href="#calendar" data-toggle="tab">${ _('Calendar') }</a></li>
|
|
|
+ <li><a href="#actions" data-toggle="tab">${ _('Actions') }</a></li>
|
|
|
+ <li><a href="#details" data-toggle="tab">${ _('Details') }</a></li>
|
|
|
+ <li><a href="#configuration" data-toggle="tab">${ _('Configuration') }</a></li>
|
|
|
+ <li><a href="#log" data-toggle="tab">${ _('Log') }</a></li>
|
|
|
+ <li><a href="#definition" data-toggle="tab">${ _('Definition') }</a></li>
|
|
|
+ % if oozie_coordinator.has_sla:
|
|
|
+ <li><a href="#sla" data-toggle="tab">${ _('SLA') }</a></li>
|
|
|
+ % endif
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ <div class="tab-content" style="min-height:200px">
|
|
|
+ <div class="tab-pane active" id="calendar">
|
|
|
+ <div class="clearfix" style="margin-bottom: 1em;">
|
|
|
+ <div class="pull-left">
|
|
|
+ <input type="text" data-bind="textInput: searchFilter, value: searchFilter, valueUpdate: 'input'" class="input-large search-query" placeholder="${_('Filter results')}" style="margin-right: 1em; position: relative; top: -1px;">
|
|
|
+ % if has_job_edition_permission(oozie_coordinator, user):
|
|
|
+ <button data-bind="enable: selectedActions().length > 0" class="btn btn-primary rerun-btn
|
|
|
+ % if oozie_coordinator.is_running() or oozie_coordinator.status in ('KILLED', 'FAILED'):
|
|
|
+ hide
|
|
|
+ % endif
|
|
|
+ "
|
|
|
+ data-rerun-url="${ url('oozie:rerun_oozie_coord', job_id=oozie_coordinator.id, app_path=oozie_coordinator.coordJobPath) }"
|
|
|
+ style="margin-bottom: 5px">
|
|
|
+ ${ _('Rerun') }
|
|
|
+ </button>
|
|
|
+ % endif
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tfoot>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <script id="calendarTemplate" type="text/html">
|
|
|
- <tr data-bind="css: { disabled: url == '' }">
|
|
|
- <td data-bind="css: { disabled: url == '' }">
|
|
|
- <a data-bind="attr: {href: url != '' ? url : 'javascript:void(0)', title: url ? '' : '${ _('Workflow not available or instantiated yet') }' }, css: { disabled: url == '' }" data-row-selector="true">
|
|
|
- <span data-bind="text: title, attr: {'class': statusClass, 'id': 'date-' + $index()}"></span>
|
|
|
- </a>
|
|
|
- </td>
|
|
|
- <td data-bind="css: { disabled: url == '' }"><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url == ''">${ _('Workflow not available or instantiated yet') }</em><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url != ''">${_('-')}</em> <span data-bind="visible: errorMessage != null && errorMessage != '', text: errorMessage"></span> <span data-bind="visible:missingDependencies !='' && missingDependencies != null, text: '${ _('Missing')} ' + missingDependencies"></span></td>
|
|
|
- </tr>
|
|
|
- </script>
|
|
|
-
|
|
|
-
|
|
|
- <div class="tab-pane" id="actions">
|
|
|
- <table class="table table-striped table-condensed" cellpadding="0" cellspacing="0">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>${ _('Number') }</th>
|
|
|
- <th>${ _('Nominal Time') }</th>
|
|
|
-
|
|
|
- <th>${ _('Type') }</th>
|
|
|
- <th>${ _('Status') }</th>
|
|
|
-
|
|
|
- <th>${ _('Error Code') }</th>
|
|
|
- <th>${ _('Error Message') }</th>
|
|
|
- <th>${ _('Missing Dependencies') }</th>
|
|
|
-
|
|
|
- <th>${ _('Created Time') }</th>
|
|
|
- <th>${ _('Last Modified') }</th>
|
|
|
-
|
|
|
- <th>${ _('Id') }</th>
|
|
|
- <th>${ _('External Id') }</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
-
|
|
|
- <tbody data-bind="template: {name: 'actionTemplate', foreach: actions}">
|
|
|
- </tbody>
|
|
|
-
|
|
|
- <tfoot>
|
|
|
- <tr data-bind="visible: isLoading()">
|
|
|
- <td colspan="10" class="left">
|
|
|
- <img src="/static/art/spinner.gif" />
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr data-bind="visible: !isLoading() && actions().length == 0">
|
|
|
- <td colspan="10">
|
|
|
- <div class="alert">
|
|
|
- ${ _('There are no actions to be shown.') }
|
|
|
+ <span class="btn-group pull-right" style="margin-right: 20px">
|
|
|
+ <a class="btn btn-status btn-success" data-value="success" data-bind="click: function () { setFilter('succeeded'); }">${ _('Succeeded') }</a>
|
|
|
+ <a class="btn btn-status btn-warning" data-value="warning" data-bind="click: function () { setFilter('running'); }">${ _('Running') }</a>
|
|
|
+ <a class="btn btn-status btn-danger disable-feedback" data-value="important" data-bind="click: function () { setFilter('failed'); }">${ _('Failed') }</a>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tfoot>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <script id="actionTemplate" type="text/html">
|
|
|
- <tr>
|
|
|
- <td data-bind="text: number"></td>
|
|
|
- <td data-bind="text: nominalTime"></td>
|
|
|
- <td data-bind="text: type"></td>
|
|
|
- <td><span data-bind="text: status, attr: {'class': statusClass}"></span></td>
|
|
|
- <td data-bind="text: errorCode"></td>
|
|
|
- <td data-bind="text: errorMessage"></td>
|
|
|
- <td data-bind="text: missingDependencies"></td>
|
|
|
- <td data-bind="text: createdTime"></td>
|
|
|
- <td data-bind="text: lastModifiedTime"></td>
|
|
|
- <td>
|
|
|
- <a data-bind="visible:externalId !='', attr: {href: url}, text: id" data-row-selector"true"></a>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <a data-bind="visible:externalId !='', attr: {href: externalIdUrl}, text: externalId"></a>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </script>
|
|
|
-
|
|
|
- <div class="tab-pane" id="details">
|
|
|
- <table class="table table-condensed">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td>${ _('Start time') }</td>
|
|
|
- <td>${ utils.format_time(oozie_coordinator.startTime) }</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>${ _('End time') }</td>
|
|
|
- <td>${ utils.format_time(oozie_coordinator.endTime) }</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="tab-pane" id="configuration">
|
|
|
- ${ utils.display_conf(oozie_coordinator.conf_dict) }
|
|
|
- </div>
|
|
|
|
|
|
- <div class="tab-pane" id="log">
|
|
|
- <pre></pre>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="tab-pane" id="definition">
|
|
|
- <textarea id="definitionEditor">${ oozie_coordinator.definition.decode('utf-8', 'replace') }</textarea>
|
|
|
- </div>
|
|
|
+ <table class="table table-striped table-condensed">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="3%"><div data-bind="click: selectAll, css: { 'fa-check': allSelected }" class="hueCheckbox fa"></div></th>
|
|
|
+ <th width="200">${ _('Day') }</th>
|
|
|
+ <th>${ _('Comment') }</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody data-bind="template: { name: 'calendarTemplate', foreach: filteredActions}" >
|
|
|
+ </tbody>
|
|
|
+ <tfoot>
|
|
|
+ <tr>
|
|
|
+ <td data-bind="visible: !isLoading() && paginate()" colspan="10">
|
|
|
+ </br>
|
|
|
+ <div class="alert">
|
|
|
+ ${ _('There are older actions to be shown:') }
|
|
|
+ <a class="btn" href="${ oozie_coordinator.get_absolute_url() }?show_all_actions=true">${ _('Expand') }</a>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr data-bind="visible: isLoading()">
|
|
|
+ <td colspan="2" class="left">
|
|
|
+ <img src="/static/art/spinner.gif" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr data-bind="visible: actions().length == 0 && !isLoading()">
|
|
|
+ <td colspan="2">
|
|
|
+ <div class="alert">
|
|
|
+ ${ _('There are no actions to be shown.') }
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tfoot>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <script id="calendarTemplate" type="text/html">
|
|
|
+ <tr data-bind="css: { disabled: url == '' }">
|
|
|
+ <td data-bind="click: handleSelect"><div data-bind="css: { 'fa-check': selected }" class="hueCheckbox fa"></div></td>
|
|
|
+ <td data-bind="css: { disabled: url == '' }">
|
|
|
+ <a data-bind="attr: {href: url != '' ? url : 'javascript:void(0)', title: url ? '' : '${ _('Workflow not available or instantiated yet') }' }, css: { disabled: url == '' }" data-row-selector="true">
|
|
|
+ <span data-bind="text: title, attr: {'class': statusClass, 'id': 'date-' + $index()}"></span>
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td data-bind="css: { disabled: url == '' }"><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url == ''">${ _('Workflow not available or instantiated yet') }</em><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url != ''">${_('-')}</em> <span data-bind="visible: errorMessage != null && errorMessage != '', text: errorMessage"></span> <span data-bind="visible:missingDependencies !='' && missingDependencies != null, text: '${ _('Missing')} ' + missingDependencies"></span></td>
|
|
|
+ </tr>
|
|
|
+ </script>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="tab-pane" id="actions">
|
|
|
+ <table class="table table-striped table-condensed" cellpadding="0" cellspacing="0">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>${ _('Number') }</th>
|
|
|
+ <th>${ _('Nominal Time') }</th>
|
|
|
+
|
|
|
+ <th>${ _('Type') }</th>
|
|
|
+ <th>${ _('Status') }</th>
|
|
|
+
|
|
|
+ <th>${ _('Error Code') }</th>
|
|
|
+ <th>${ _('Error Message') }</th>
|
|
|
+ <th>${ _('Missing Dependencies') }</th>
|
|
|
+
|
|
|
+ <th>${ _('Created Time') }</th>
|
|
|
+ <th>${ _('Last Modified') }</th>
|
|
|
+
|
|
|
+ <th>${ _('Id') }</th>
|
|
|
+ <th>${ _('External Id') }</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody data-bind="template: {name: 'actionTemplate', foreach: actions}">
|
|
|
+ </tbody>
|
|
|
+
|
|
|
+ <tfoot>
|
|
|
+ <tr data-bind="visible: isLoading()">
|
|
|
+ <td colspan="10" class="left">
|
|
|
+ <img src="/static/art/spinner.gif" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr data-bind="visible: !isLoading() && actions().length == 0">
|
|
|
+ <td colspan="10">
|
|
|
+ <div class="alert">
|
|
|
+ ${ _('There are no actions to be shown.') }
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tfoot>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <script id="actionTemplate" type="text/html">
|
|
|
+ <tr>
|
|
|
+ <td data-bind="text: number"></td>
|
|
|
+ <td data-bind="text: nominalTime"></td>
|
|
|
+ <td data-bind="text: type"></td>
|
|
|
+ <td><span data-bind="text: status, attr: {'class': statusClass}"></span></td>
|
|
|
+ <td data-bind="text: errorCode"></td>
|
|
|
+ <td data-bind="text: errorMessage"></td>
|
|
|
+ <td data-bind="text: missingDependencies"></td>
|
|
|
+ <td data-bind="text: createdTime"></td>
|
|
|
+ <td data-bind="text: lastModifiedTime"></td>
|
|
|
+ <td>
|
|
|
+ <a data-bind="visible:externalId !='', attr: {href: url}, text: id" data-row-selector"true"></a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <a data-bind="visible:externalId !='', attr: {href: externalIdUrl}, text: externalId"></a>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <div class="tab-pane" id="details">
|
|
|
+ <table class="table table-condensed">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>${ _('Start time') }</td>
|
|
|
+ <td>${ utils.format_time(oozie_coordinator.startTime) }</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>${ _('End time') }</td>
|
|
|
+ <td>${ utils.format_time(oozie_coordinator.endTime) }</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-pane" id="configuration">
|
|
|
+ ${ utils.display_conf(oozie_coordinator.conf_dict) }
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-pane" id="log">
|
|
|
+ <pre></pre>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-pane" id="definition">
|
|
|
+ <textarea id="definitionEditor">${ oozie_coordinator.definition.decode('utf-8', 'replace') }</textarea>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ % if oozie_coordinator.has_sla:
|
|
|
+ <div class="tab-pane" id="sla" style="padding-left: 20px">
|
|
|
+ <div id="yAxisLabel" class="hide">${_('Time since Nominal Time in min')}</div>
|
|
|
+ <div id="slaChart"></div>
|
|
|
+ <table id="slaTable" class="table table-striped table-condensed hide">
|
|
|
+ <thead>
|
|
|
+ <th>${_('Status')}</th>
|
|
|
+ <th>${_('Nominal Time')}</th>
|
|
|
+ <th>${_('Expected Start')}</th>
|
|
|
+ <th>${_('Actual Start')}</th>
|
|
|
+ <th>${_('Expected End')}</th>
|
|
|
+ <th>${_('Actual End')}</th>
|
|
|
+ <th>${_('Expected Duration')}</th>
|
|
|
+ <th>${_('Actual Duration')}</th>
|
|
|
+ <th>${_('SLA')}</th>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ %for sla in oozie_slas:
|
|
|
+ <tr>
|
|
|
+ <td class="slaStatus">${sla['slaStatus']}</td>
|
|
|
+ <td><span class="nominalTime">${sla['nominalTime']}</span></td>
|
|
|
+ <td><span class="expectedStart">${sla['expectedStart']}</span></td>
|
|
|
+ <td><span class="actualStart">${sla['actualStart']}</span></td>
|
|
|
+ <td><span class="expectedEnd">${sla['expectedEnd']}</span></td>
|
|
|
+ <td><span class="actualEnd">${sla['actualEnd']}</span></td>
|
|
|
+ <td>${sla['expectedDuration']}</td>
|
|
|
+ <td>${sla['actualDuration']}</td>
|
|
|
+ <td><a href="${ url('oozie:list_oozie_sla') }#${ sla['id'] }"></a></td>
|
|
|
+ </tr>
|
|
|
+ %endfor
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ % endif
|
|
|
+ </div>
|
|
|
|
|
|
- % if oozie_coordinator.has_sla:
|
|
|
- <div class="tab-pane" id="sla" style="padding-left: 20px">
|
|
|
- <div id="yAxisLabel" class="hide">${_('Time since Nominal Time in min')}</div>
|
|
|
- <div id="slaChart"></div>
|
|
|
- <table id="slaTable" class="table table-striped table-condensed hide">
|
|
|
- <thead>
|
|
|
- <th>${_('Status')}</th>
|
|
|
- <th>${_('Nominal Time')}</th>
|
|
|
- <th>${_('Expected Start')}</th>
|
|
|
- <th>${_('Actual Start')}</th>
|
|
|
- <th>${_('Expected End')}</th>
|
|
|
- <th>${_('Actual End')}</th>
|
|
|
- <th>${_('Expected Duration')}</th>
|
|
|
- <th>${_('Actual Duration')}</th>
|
|
|
- <th>${_('SLA')}</th>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- %for sla in oozie_slas:
|
|
|
- <tr>
|
|
|
- <td class="slaStatus">${sla['slaStatus']}</td>
|
|
|
- <td><span class="nominalTime">${sla['nominalTime']}</span></td>
|
|
|
- <td><span class="expectedStart">${sla['expectedStart']}</span></td>
|
|
|
- <td><span class="actualStart">${sla['actualStart']}</span></td>
|
|
|
- <td><span class="expectedEnd">${sla['expectedEnd']}</span></td>
|
|
|
- <td><span class="actualEnd">${sla['actualEnd']}</span></td>
|
|
|
- <td>${sla['expectedDuration']}</td>
|
|
|
- <td>${sla['actualDuration']}</td>
|
|
|
- <td><a href="${ url('oozie:list_oozie_sla') }#${ sla['id'] }"></a></td>
|
|
|
- </tr>
|
|
|
- %endfor
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="pull-left" style="margin-bottom: 16px">
|
|
|
+ <a href="${ url('oozie:list_oozie_coordinators') }" class="btn">${ _('Back') }</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- % endif
|
|
|
</div>
|
|
|
-
|
|
|
- <div style="margin-bottom: 16px">
|
|
|
- <a href="${ url('oozie:list_oozie_coordinators') }" class="btn">${ _('Back') }</a>
|
|
|
- </div>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- </p>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-</div>
|
|
|
-
|
|
|
<div id="confirmation" class="modal hide">
|
|
|
<div class="modal-header">
|
|
|
<a href="#" class="close" data-dismiss="modal">×</a>
|
|
|
@@ -364,35 +387,6 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
<script src="/static/js/jquery.blueprint.js"></script>
|
|
|
% endif
|
|
|
|
|
|
-
|
|
|
-<style type="text/css">
|
|
|
- .CodeMirror.cm-s-default {
|
|
|
- height:500px;
|
|
|
- }
|
|
|
-
|
|
|
- #sla th {
|
|
|
- vertical-align: middle !important;
|
|
|
- }
|
|
|
-
|
|
|
- #yAxisLabel {
|
|
|
- -webkit-transform: rotate(270deg);
|
|
|
- -moz-transform: rotate(270deg);
|
|
|
- -o-transform: rotate(270deg);
|
|
|
- writing-mode: lr-tb;
|
|
|
- margin-left: -110px;
|
|
|
- margin-top: 130px;
|
|
|
- position: absolute;
|
|
|
- }
|
|
|
-
|
|
|
- #slaTable {
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .disabled {
|
|
|
- cursor: default;
|
|
|
- }
|
|
|
-</style>
|
|
|
-
|
|
|
<script>
|
|
|
|
|
|
var setupjHueRowSelector = function () {
|
|
|
@@ -415,19 +409,107 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
lastModifiedTime: action.lastModifiedTime,
|
|
|
errorMessage: action.errorMessage,
|
|
|
errorCode: action.errorCode,
|
|
|
- missingDependencies: action.missingDependencies
|
|
|
+ missingDependencies: action.missingDependencies,
|
|
|
+ selected: ko.observable(false),
|
|
|
+ handleSelect: function (row, e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.selected(! this.selected());
|
|
|
+ viewModel.allSelected(false);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var RunningCoordinatorActionsModel = function (actions) {
|
|
|
var self = this;
|
|
|
- self.isLoading = ko.observable(true);
|
|
|
- self.actions = ko.observableArray(ko.utils.arrayMap(actions), function (action) {
|
|
|
+ this.isLoading = ko.observable(true);
|
|
|
+
|
|
|
+ this.actions = ko.observableArray(ko.utils.arrayMap(actions), function (action) {
|
|
|
return new Action(action);
|
|
|
});
|
|
|
- self.paginate = ko.computed(function(){
|
|
|
+
|
|
|
+ this.paginate = ko.computed(function(){
|
|
|
return self.actions().length >= ${ MAX_COORD_ACTIONS } && ${ "false" if show_all_actions else 'true' | n,unicode };
|
|
|
});
|
|
|
+
|
|
|
+ this.allSelected = ko.observable(false);
|
|
|
+
|
|
|
+ this.selectAll = function () {
|
|
|
+ self.allSelected(! self.allSelected());
|
|
|
+
|
|
|
+ ko.utils.arrayForEach(self.actions(), function (action) {
|
|
|
+ if (action.id) {
|
|
|
+ action.selected(self.allSelected());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return true;
|
|
|
+ };
|
|
|
+
|
|
|
+ this.selectedActions = ko.computed(function () {
|
|
|
+ var actionlist = [];
|
|
|
+
|
|
|
+ ko.utils.arrayFilter(self.actions(), function (action) {
|
|
|
+ if (action.selected()) {
|
|
|
+ actionlist.push(action.number.toString());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return actionlist;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.filter = ko.observable('');
|
|
|
+
|
|
|
+ this.searchFilter = ko.observable('');
|
|
|
+
|
|
|
+ this.clearSelections = function () {
|
|
|
+ ko.utils.arrayFilter(self.actions(), function (action) {
|
|
|
+ action.selected(false);
|
|
|
+ });
|
|
|
+ self.allSelected(false);
|
|
|
+ };
|
|
|
+
|
|
|
+ this.searchFilter.subscribe(function () {
|
|
|
+ // clear out original selections
|
|
|
+ self.clearSelections();
|
|
|
+ self.filter(self.searchFilter());
|
|
|
+ });
|
|
|
+
|
|
|
+ this.setFilter = function (filter) {
|
|
|
+ // checks to see if a button is toggled
|
|
|
+ if (filter === self.filter()) {
|
|
|
+ self.clearSelections();
|
|
|
+ self.filter('');
|
|
|
+ } else {
|
|
|
+ self.filter(filter);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ this.filteredActions = ko.computed(function () {
|
|
|
+ var actions = [],
|
|
|
+ filter = self.filter(),
|
|
|
+ regexp;
|
|
|
+
|
|
|
+ if (filter === '') {
|
|
|
+ return self.actions();
|
|
|
+ }
|
|
|
+
|
|
|
+ ko.utils.arrayFilter(self.actions(), function (action) {
|
|
|
+ if ($.inArray(filter, ['succeeded', 'running', 'failed']) !== -1) {
|
|
|
+ if (action.status.toLowerCase() === filter) {
|
|
|
+ self.allSelected(true);
|
|
|
+ action.selected(true);
|
|
|
+ actions.push(action);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ regexp = new RegExp(filter);
|
|
|
+ if (regexp.test(action.title.toLowerCase())) {
|
|
|
+ self.allSelected(true);
|
|
|
+ action.selected(true);
|
|
|
+ actions.push(action);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return actions;
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
var viewModel = new RunningCoordinatorActionsModel([]);
|
|
|
@@ -538,15 +620,14 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
- $('#rerun-btn').click(function() {
|
|
|
+ $('#rerun-btn, .rerun-btn').click(function() {
|
|
|
var _action = $(this).data("rerun-url");
|
|
|
|
|
|
$.get(_action, function(response) {
|
|
|
- $('#rerun-coord-modal').html(response);
|
|
|
- $('#rerun-coord-modal').modal('show');
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
+ $('#rerun-coord-modal').html(response);
|
|
|
+ $('#rerun-coord-modal').modal('show');
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
resizeLogs();
|
|
|
refreshView();
|