forked from wenguonideshou/psdash_HTTPBasicAuth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocesses.html
More file actions
88 lines (88 loc) · 4.62 KB
/
processes.html
File metadata and controls
88 lines (88 loc) · 4.62 KB
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
{% if not is_xhr|default(false) %}{% extends "base.html" %}{% endif -%}
{% block content %}
{% set next_order = "desc" if order == "asc" else "asc" %}
{% if order == "asc" %}
{% set order_icon = '<span class="order-icon glyphicon glyphicon-chevron-up"></span>' %}
{% else %}
{% set order_icon = '<span class="order-icon glyphicon glyphicon-chevron-down"></span>' %}
{% endif %}
<div id="processes" class="box">
<div class="box-header">
<span>Processes</span>
</div>
<div class="box-content">
<ul class="nav nav-tabs" role="tablist">
<li {% if filter == "all" %}class="active"{% endif %}>
<a href="{{ url_for(".processes", sort=sort, order=order, filter="all") }}">
All <span class="badge all">{{ num_procs }}</span>
</a>
</li>
<li {% if filter == "user" %}class="active"{% endif %}>
<a href="{{ url_for(".processes", sort=sort, order=order, filter="user") }}">
User processes <span class="badge">{{ num_user_procs }}</span>
</a>
</li>
</ul>
<table class="table table-hover">
<thead>
<tr>
<th>
<a href="{{ url_for(".processes", sort="pid", order=next_order, filter=filter) }}">PID</a>
{{ order_icon|safe if sort == "pid"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="name", order=next_order, filter=filter) }}">Name</a>
{{ order_icon|safe if sort == "name"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="user", order=next_order, filter=filter) }}">User</a>
{{ order_icon|safe if sort == "user"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="status", order=next_order, filter=filter) }}">Status</a>
{{ order_icon|safe if sort == "status"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="created", order=next_order, filter=filter) }}">Created</a>
{{ order_icon|safe if sort == "created"}}
</th>
<th title="Resident Set Size">
<a href="{{ url_for(".processes", sort="mem_rss", order=next_order, filter=filter) }}">RSS</a>
{{ order_icon|safe if sort == "mem_rss"}}
</th>
<th title="Virtual Memory Size">
<a href="{{ url_for(".processes", sort="mem_vms", order=next_order, filter=filter) }}">VMS</a>
{{ order_icon|safe if sort == "mem_vms"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="mem_percent", order=next_order, filter=filter) }}">Memory %</a>
{{ order_icon|safe if sort == "mem_percent"}}
</th>
<th>
<a href="{{ url_for(".processes", sort="cpu_percent", order=next_order, filter=filter) }}">CPU %</a>
{{ order_icon|safe if sort == "cpu_percent"}}
</th>
</tr>
</thead>
<tbody>
{% for p in processes %}
<tr>
<td>{{ p.pid }}</td>
<td title="{{ p.cmdline.decode("utf-8") }}">
<a href="{{ url_for(".process", pid=p.pid) }}">{{ p.name.decode("utf-8") }}</a><br/>
<small>{{ p.cmdline.decode("utf-8")|truncate(110) }}</small>
</td>
<td>{{ p.user or "-" }}</td>
<td>{{ p.status }}</td>
<td>{{ p.created|fromtimestamp }}</td>
<td>{{ p.mem_rss|filesizeformat }}</td>
<td>{{ p.mem_vms|filesizeformat }}</td>
<td>{{ p.mem_percent|round }}</td>
<td>{{ p.cpu_percent }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}