2018-07-30 18:12:41 +00:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block header %}
|
2018-08-18 15:35:23 +00:00
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap-table.min.css') }}" rel="stylesheet">
|
2018-07-30 18:12:41 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
2020-02-03 03:22:00 +00:00
|
|
|
<h2>{{_('Tasks')}}</h2>
|
2022-04-26 12:44:55 +00:00
|
|
|
<table class="table table-no-bordered" id="tasktable" data-url="{{ url_for('tasks.get_email_status_json') }}" data-sort-name="starttime" data-sort-order="asc" data-locale="{{ g.user.locale }}">
|
2018-07-30 18:12:41 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
{% if g.user.role_admin() %}
|
2018-08-12 07:29:57 +00:00
|
|
|
<th data-halign="right" data-align="right" data-field="user" data-sortable="true">{{_('User')}}</th>
|
2018-07-30 18:12:41 +00:00
|
|
|
{% endif %}
|
2018-10-03 19:58:37 +00:00
|
|
|
<th data-halign="right" data-align="right" data-field="taskMessage" data-sortable="true">{{_('Task')}}</th>
|
2018-08-12 07:29:57 +00:00
|
|
|
<th data-halign="right" data-align="right" data-field="status" data-sortable="true">{{_('Status')}}</th>
|
|
|
|
<th data-halign="right" data-align="right" data-field="progress" data-sortable="true" data-sorter="elementSorter">{{_('Progress')}}</th>
|
2020-02-03 03:22:00 +00:00
|
|
|
<th data-halign="right" data-align="right" data-field="runtime" data-sortable="true" data-sort-name="rt">{{_('Run Time')}}</th>
|
|
|
|
<th data-halign="right" data-align="right" data-field="starttime" data-sortable="true" data-sort-name="id">{{_('Start Time')}}</th>
|
2021-09-29 07:40:12 +00:00
|
|
|
{% if g.user.role_admin() %}
|
|
|
|
<th data-halign="right" data-align="right" data-formatter="TaskActions" data-switchable="false">{{_('Actions')}}</th>
|
|
|
|
{% endif %}
|
2018-08-12 07:29:57 +00:00
|
|
|
<th data-field="id" data-visible="false"></th>
|
|
|
|
<th data-field="rt" data-visible="false"></th>
|
2018-07-30 18:12:41 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2021-09-29 07:40:12 +00:00
|
|
|
{% block modal %}
|
|
|
|
{{ delete_book() }}
|
|
|
|
{% if g.user.role_admin() %}
|
|
|
|
<div class="modal fade" id="cancelTaskModal" role="dialog" aria-labelledby="metaCancelTaskLabel">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header bg-danger text-center">
|
|
|
|
<span>{{_('Are you really sure?')}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body text-center">
|
|
|
|
<p>
|
|
|
|
<span>{{_('This task will be cancelled. Any progress made by this task will be saved.')}}</span>
|
|
|
|
<span>{{_('If this is a scheduled task, it will be re-ran during the next scheduled time.')}}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<input type="button" class="btn btn-danger" value="{{_('Ok')}}" name="cancel_task_confirm" id="cancel_task_confirm" data-dismiss="modal">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Cancel')}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2018-07-30 18:12:41 +00:00
|
|
|
{% block js %}
|
2018-08-18 15:35:23 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}"></script>
|
2021-09-30 12:09:02 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-locale-all.min.js') }}"></script>
|
2021-08-27 12:27:35 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/table.js') }}"></script>
|
2018-07-30 18:12:41 +00:00
|
|
|
|
|
|
|
{% endblock %}
|