/usr/share/flower/templates/tasks.html is in python-flower 0.8.3+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | {% extends "base.html" %}
{% block navbar %}
{% module Template("navbar.html", active_tab="tasks") %}
{% end %}
{% block extra_styles %}
<style type="text/css">
#task-filter-form, #task-filter-form .form-actions {
margin-bottom: 0;
}
#task-filter-form-accordion .accordion-inner {
padding-left: 0;
padding-right: 0;
padding-bottom: 0;
}
tr th a.sort.desc::before {
content: "↓↓";
}
tr th a.sort.asc::before {
content: "↑↑";
}
</style>
{% end %}
{% block container %}
<div class="container-fluid">
<div id="task-filter-form-accordion" class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#task-filter-form-accordion" href="#task-filter-form-container">
Filter tasks
</a>
</div>
<div id="task-filter-form-container" class="accordion-body in collapse">
<div class="accordion-inner" style="padding-left: 0; padding-right: 0;">
<form id="task-filter-form" class="form-horizontal" action="/tasks" method="GET">
<div class="filter-column left">
<div class="control-group">
<label class="control-label" for="input-limit">Limit:</label>
<div class="controls">
<input name="limit" type="text" class="input-small" id="input-limit"
value="{{ limit or '' }}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="select-worker">Workers:</label>
<div class="controls">
<select name="worker" id="select-worker">
<option>All</option>
{% for name in workers %}
<option {% if name==worker %} selected {% end %}>{{ name }}</option>
{% end %}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="select-task">Seen task types:</label>
<div class="controls">
<select name="type" id="select-task">
<option>All</option>
{% for name in task_types %}
<option {% if name==type %} selected {% end %}>{{ name }}</option>
{% end %}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="select-state">State:</label>
<div class="controls">
<select name="state" id="select-state">
<option>All</option>
{% for name in all_states %}
<option {% if name==state %} selected {% end %}>{{ name }}</option>
{% end %}
</select>
</div>
</div>
{% if sort_by %}
<input type="hidden" name="sort" value="{{ sort_by}}">
{% end %}
</div>
<div class="filter-column right">
<div class="control-group">
<label class="control-label" for="input-search">Search:</label>
<div class="controls">
<input name="search" type="text" class="input" id="input-search" value="{{ search or ''}}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-received-start">Received:</label>
<div class="controls">
<input type="text" class="input datetimepicker" name="received-start" id="input-received-start" value="{{ received_start or '' }}" data-date-format="yyyy-mm-dd hh:ii"> to
<input type="text" class="input datetimepicker" name="received-end" id="input-received-end" value="{{ received_end or '' }}" data-date-format="yyyy-mm-dd hh:ii">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-started-start">Started:</label>
<div class="controls">
<input type="text" class="input datetimepicker" name="started-start" id="input-started-start" value="{{ started_start or '' }}" data-date-format="yyyy-mm-dd hh:ii"> to
<input type="text" class="input datetimepicker" name="started-end" id="input-started-end" value="{{ started_end or '' }}" data-date-format="yyyy-mm-dd hh:ii">
</div>
</div>
</div>
<div class="filter-actions">
<div class="form-actions">
<button class="btn btn-primary" type="submit">Apply filter</button>
<button class="btn" onclick="flower.on_cancel_task_filter(event)">Cancel
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
{% if 'name' in columns %}
<th>{% raw sort_url("Name", "name", sort_by, params) %}</th>
{% end %}
{% if 'uuid' in columns %}
<th>UUID</th>
{% end %}
{% if 'state' in columns %}
<th>{% raw sort_url("State", "state", sort_by, params) %}</th>
{% end %}
{% if 'args' in columns %}
<th>args</th>
{% end %}
{% if 'kwargs' in columns %}
<th>kwargs</th>
{% end %}
{% if 'result' in columns %}
<th>Result</th>
{% end %}
{% if 'received' in columns %}
<th>{% raw sort_url("Received", "received", sort_by, params) %}</th>
{% end %}
{% if 'started' in columns %}
<th>{% raw sort_url("Started", "started", sort_by, params) %}</th>
{% end %}
{% if 'runtime' in columns %}
<th>Runtime</th>
{% end %}
</tr>
</thead>
<tbody>
{% for uuid, task in tasks %}
<tr>
{% if getattr(task, 'name', None) is None %}
{% continue %}
{% end %}
{% if 'name' in columns %}
<td>
{{ task.name }}
</td>
{% end %}
{% if 'uuid' in columns %}
<td>
<a href="{{ '/task/' + task.uuid }}">{{ task.uuid }}</a>
</td>
{% end %}
{% if 'state' in columns %}
<td>
{% if task.state == "SUCCESS" %}
<span class="label label-success">{{ task.state }}</span>
{% elif task.state == "FAILURE" %}
<span class="label label-important">{{ task.state }}</span>
{% else %}
<span class="label label-default">{{ task.state }}</span>
{% end %}
</td>
{% end %}
{% if 'args' in columns %}
<td>
{{ task.args }}
</td>
{% end %}
{% if 'kwargs' in columns %}
<td>
{{ task.kwargs }}
</td>
{% end %}
{% if 'result' in columns %}
<td>
{% if task.state == "SUCCESS" %}
{{ task.result }}
{% elif task.state == "FAILURE" %}
{{ task.exception }}
{% end %}
</td>
{% end %}
{% if 'received' in columns %}
<td>
{{ humanize(task.received, type=time) }}
</td>
{% end %}
{% if 'started' in columns %}
<td>
{{ humanize(task.received, type=time) }}
</td>
{% end %}
{% if 'runtime' in columns %}
<td>
{% if task.timestamp and task.started %}
{{ '%.2f' % humanize(task.timestamp - task.started) }} sec
{% end %}
</td>
{% end %}
{% end %}
</table>
</div>
{% end %}
{% block extra_scripts %}
<script>
$(".datetimepicker").datetimepicker({
autoclose: true,
todayBtn: true,
todayHighlight: true
});
</script>
{% end %}
|