/usr/share/flower/templates/dashboard.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 94 95 96 97 98 99 100 101 102 103 104 | {% extends "base.html" %}
{% block navbar %}
{% module Template("navbar.html", active_tab="dashboard") %}
{% end %}
{% block container %}
<div class="container-fluid">
<div class="btn-group btn-group-justified">
<a id="btn-active" class="btn btn-default btn-large" href="/tasks?limit=100&state=STARTED">Active: {{ sum(map(lambda x:x.get('active') or 0, workers.values() )) }}</a>
<a id="btn-processed" class="btn btn-default btn-large" href="/tasks?limit=100">Processed: {{ sum(map(lambda x:x.get('task-received') or 0, workers.values() )) }}</a>
<a id="btn-failed" class="btn btn-default btn-large" href="/tasks?limit=100&state=FAILURE">Failed: {{ sum(map(lambda x:x.get('task-failed') or 0, workers.values() )) }}</a>
<a id="btn-succeeded" class="btn btn-default btn-large" href="/tasks?limit=100&state=SUCCESS">Succeeded: {{ sum(map(lambda x:x.get('task-succeeded') or 0, workers.values() )) }}</a>
<a id="btn-retried" class="btn btn-default btn-large" href="/tasks?limit=100&state=RETRY">Retried: {{ sum(map(lambda x:x.get('task-retried') or 0, workers.values() )) }}</a>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="btn-toolbar">
<div class="btn-group">
<button class="btn" onclick="flower.toggle_selected_workers(event);">
<input id="select-workers-toggler" type="checkbox" style="margin: 0;">
</button>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" onclick="flower.select_all_workers(event);">All</a></li>
<li><a href="#" onclick="flower.select_none_workers(event);">None</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn" onclick="flower.shutdown_selected(event);">Shut Down</button>
<button class="btn dropdown-toggle" data-toggle="dropdown"><span
class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#" onclick="flower.shutdown_selected(event);">Shut Down</a></li>
<li><a href="#" onclick="flower.restart_selected(event);">Restart Pool</a></li>
<li><a href="#" onclick="flower.refresh_selected(event);">Refresh</a></li>
</ul>
</div>
</div>
<table id="workers-table" class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 15px; min-width: 15px;"></th>
<th>Worker Name</th>
<th>Status</th>
<th>Active</th>
<th>Processed</th>
<th>Failed</th>
<th>Succeeded</th>
<th>Retried</th>
<th>Load Average</th>
</tr>
</thead>
<tbody>
{% for name, info in workers.items() %}
<tr id="{{ url_escape(name) }}">
<td class="is_selected"><input type="checkbox"></td>
<td><a href="{{ '/worker/' + name }}">{{ name }}</a></td>
<td>
{% if info.get('status', None) %}
<span class="label label-success">Online</span>
{% else %}
<span class="label label-important">Offline</span>
{% end %}
</td>
<td>{{ info.get('active', 0) }}</td>
<td>{{ info.get('task-received', 0) }}</td>
<td>{{ info.get('task-failed', 0) }}</td>
<td>{{ info.get('task-succeeded', 0) }}</td>
<td>{{ info.get('task-retried', 0) }}</td>
<td>{{ humanize(info.get('loadavg', 'N/A')) }}</td>
</tr>
{% end %}
</tbody>
</table>
</div>
</div>
</div>
<div class="hidden">
<table>
<tr id="workers-table-row">
<td class="is_selected"><input type="checkbox"></td>
<td><a href=""></a></td>
<td><span class="label label-success">Online</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
{% end %}
|