/usr/share/flower/templates/task.html is in python-flower 0.8.3+dfsg-3.
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 | {% extends "base.html" %}
{% block navbar %}
{% module Template("navbar.html", active_tab="tasks") %}
{% end %}
{% block container %}
<div id='task-page' class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="page-header">
<p id="taskid" class="hidden">{{ task.uuid }}</p>
<h2>{{ getattr(task, 'name', None) }}
<small>{{ task.uuid }}</small>
{% if task.state == "STARTED" %}
<button style="float: right" class="btn btn-danger" onclick="flower.on_task_terminate(event)">Terminate</button>
{% elif task.state == "RECEIVED" or task.state == "RETRY" %}
<button style="float: right" class="btn btn-danger" onclick="flower.on_task_revoke(event)">Revoke</button>
{% end %}
</h2>
</div>
<div class="row-fluid">
<div class="span6">
<table class="table table-bordered table-striped">
<caption>Basic task options</caption>
<tbody>
<tr>
<td>Name</td>
<td>{{ getattr(task, 'name', None) }}</td>
</tr>
<tr>
<td>UUID</td>
<td>{{ task.uuid }}</td>
</tr>
<tr>
<td>State</td>
<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>
</tr>
<tr>
<td>args</td>
<td>{{ task.args }}</td>
</tr>
<tr>
<td>kwargs</td>
<td>{{ task.kwargs }}</td>
</tr>
<tr>
<td>Result</td>
<td>{{ getattr(task, 'result', None) }}</td>
</tr>
</tbody>
</table>
</div>
<div class="span6">
<table class="table table-bordered table-striped">
<caption>Advanced task options</caption>
<tbody>
{% for name in task._fields %}
{% if name not in ['name', 'uuid', 'state', 'args', 'kwargs', 'result'] and getattr(task, name, None) is not None %}
<tr>
<td>{{ humanize(name) }}</td>
<td>
{% if name in ['sent', 'received', 'started', 'succeeded', 'retried', 'timestamp', 'failed'] %}
{{ humanize(getattr(task, name, None), type='time') }}
{% elif name == 'worker' %}
<a
href="{{ '/worker/' + task.worker.hostname }}">{{ task.worker.hostname }}</a>
{% elif name == 'traceback' %}
<pre>{{ getattr(task, name, None) }}</pre>
{% else %}
{{ getattr(task, name, None) }}
{% end %}
</td>
</tr>
{% end %}
{% end %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% end %}
|