You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
7 years ago
|
{% extends "layout.html" %}
|
||
|
{% block header %}
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.css">
|
||
|
{% endblock %}
|
||
|
{% block body %}
|
||
|
<div class="discover">
|
||
|
<h2>{{_('Tasks list')}}</h2>
|
||
|
<table class="table table-no-bordered" id="table" data-url="{{'/ajax/emailstat'}}">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
{% if g.user.role_admin() %}
|
||
|
<th data-field="user">{{_('User')}}</th>
|
||
|
{% endif %}
|
||
|
<th data-field="type">{{_('Task')}}</th>
|
||
|
<th data-field="status">{{_('Status')}}</th>
|
||
|
<th data-field="progress">{{_('Progress')}}</th>
|
||
|
<th data-field="runtime">{{_('Runtime')}}</th>
|
||
|
<th data-field="starttime">{{_('Starttime')}}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
</table>
|
||
|
<!--div class="btn btn-default" id="tasks_delete">{{_('Delete finished tasks')}}</div>
|
||
|
<div class="btn btn-default" id="tasks_hide">{{_('Hide all tasks')}}</div-->
|
||
|
</div>
|
||
|
{% endblock %}
|
||
|
{% block js %}
|
||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.js"></script>
|
||
|
<script>
|
||
|
$('#table').bootstrapTable({
|
||
|
formatNoMatches: function () {
|
||
|
return '';
|
||
|
},
|
||
|
striped: true
|
||
|
});
|
||
|
setInterval(function() {
|
||
|
$.ajax({
|
||
|
method:"get",
|
||
|
url: "{{'/ajax/emailstat'}}",
|
||
|
async: true,
|
||
|
timeout: 900,
|
||
|
success:function(data){
|
||
|
$('#table').bootstrapTable("load", data);
|
||
|
}
|
||
|
});
|
||
|
}, 1000);
|
||
|
</script>
|
||
|
|
||
|
{% endblock %}
|