| 1 |
{% extends "wagtailadmin/base.html" %} |
| 2 |
{% load i18n %} |
| 3 |
|
| 4 |
|
| 5 |
{% block titletag %}{% trans "uWSGI Status" %}{% endblock %} |
| 6 |
{% block bodyclass %}uwsgi{% endblock %} |
| 7 |
|
| 8 |
{% block content %} |
| 9 |
|
| 10 |
<ul class="breadcrumb"> |
| 11 |
<li class="home"><a href="{% url 'wagtailadmin_home' %}" class="icon icon-home text-replace">{% trans 'Home' %}</a></li> |
| 12 |
<li><a href="#">{% trans "Settings" %}</a></li> |
| 13 |
<li><a href="{{ page.url }}">{% trans "uWSGI Status" %}</a></li> |
| 14 |
</ul> |
| 15 |
|
| 16 |
{% if unavailable %} |
| 17 |
{% trans 'ERROR: uWSGI is not available!' as uwsgi_header %} |
| 18 |
{% include "wagtailadmin/shared/header.html" with title=uwsgi_header icon="cogs" %} |
| 19 |
{% else %} |
| 20 |
{% trans "uWSGI Status" as uwsgi_header %} |
| 21 |
{% include "wagtailadmin/shared/header.html" with title=uwsgi_header subtitle=version icon="cogs" tabbed="true" merged="true" %} |
| 22 |
|
| 23 |
|
| 24 |
<ul class="tab-nav merged"> |
| 25 |
<li class="active"><a href="#stats" class="active">{% trans "Information" %}</a></li> |
| 26 |
<li><a href="#options">{% trans "Options" %}</a></li> |
| 27 |
<li><a href="#magic">{% trans "Magic Table" %}</a></li> |
| 28 |
<li><a href="#workers" class="errors" data-count="{{ uwsgi.numproc }}">{% trans "Workers" %}</a></li> |
| 29 |
<li><a href="#applications">{% trans "Applications" %}</a></li> |
| 30 |
{% if uwsgi.spooler_jobs %} |
| 31 |
<li><a href="#spooler">{% trans "Spooler" %}</a></li> |
| 32 |
{% endif %} |
| 33 |
<li><a href="#actions">{% trans "Actions" %}</a></li> |
| 34 |
</ul> |
| 35 |
<div class="tab-content nice-padding"> |
| 36 |
<section id="stats" class="active"> |
| 37 |
<header class="nice-padding"><h2>{% trans 'Information' %}</h2></header> |
| 38 |
<table class="listing chooser"> |
| 39 |
<thead> |
| 40 |
<tr> |
| 41 |
<th>{% trans "Option" %}</th> |
| 42 |
<th>{% trans "Value" %}</th> |
| 43 |
</tr> |
| 44 |
</thead> |
| 45 |
<tbody> |
| 46 |
{% for key, value in stats %} |
| 47 |
<tr> |
| 48 |
<td class="title" scope="row">{{ key }}</td> |
| 49 |
<td>{{ value }}</td> |
| 50 |
</tr> |
| 51 |
{% endfor %} |
| 52 |
</tbody> |
| 53 |
</table> |
| 54 |
</section> |
| 55 |
<section id="options"> |
| 56 |
<header class="nice-padding"> |
| 57 |
<h2>{% trans 'Options' %} (<a href="http://uwsgi-docs.readthedocs.org/en/latest/Options.html">read docs</a>)</h2> |
| 58 |
</header> |
| 59 |
<table class="listing chooser"> |
| 60 |
<thead> |
| 61 |
<tr> |
| 62 |
<th>{% trans "Option" %}</th> |
| 63 |
<th>{% trans "Value" %}</th> |
| 64 |
</tr> |
| 65 |
</thead> |
| 66 |
<tbody> |
| 67 |
{% for key, value in uwsgi.opt.items %} |
| 68 |
<tr> |
| 69 |
<td class="title" scope="row"> |
| 70 |
<h2> |
| 71 |
<a href="http://uwsgi-docs.readthedocs.org/en/latest/Options.html#{{ key }}">{{ key }}</a> |
| 72 |
</h2> |
| 73 |
</td> |
| 74 |
{# uWSGI allows to use options without values if value = true #} |
| 75 |
<td>{% if value %}{{ value }}{% else %}true{% endif %}</td> |
| 76 |
</tr> |
| 77 |
{% endfor %} |
| 78 |
</tbody> |
| 79 |
</table> |
| 80 |
</section> |
| 81 |
<section id="magic"> |
| 82 |
<header class="nice-padding"> |
| 83 |
<h2>{% trans 'Magic table' %} (<a href="http://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables">read docs</a>)</h2> |
| 84 |
</header> |
| 85 |
<table class="listing chooser"> |
| 86 |
<thead> |
| 87 |
<tr> |
| 88 |
<th>{% trans "Option" %}</th> |
| 89 |
<th>{% trans "Value" %}</th> |
| 90 |
</tr> |
| 91 |
</thead> |
| 92 |
<tbody> |
| 93 |
{% for key, value in uwsgi.magic_table.items %} |
| 94 |
<tr> |
| 95 |
<td class="title" scope="row"> |
| 96 |
<h2> |
| 97 |
{{ key }} |
| 98 |
</h2> |
| 99 |
</td> |
| 100 |
<td>{{ value }}</td> |
| 101 |
</tr> |
| 102 |
{% endfor %} |
| 103 |
</tbody> |
| 104 |
</table> |
| 105 |
</section> |
| 106 |
<section id="workers"> |
| 107 |
<header class="nice-padding"> |
| 108 |
<h2>{% trans 'Workers' %}</h2> |
| 109 |
</header> |
| 110 |
<table class="listing chooser"> |
| 111 |
<thead> |
| 112 |
<tr> |
| 113 |
<th>{% trans "id" %}</th> |
| 114 |
<th>{% trans "pid" %}</th> |
| 115 |
<th>{% trans "status" %}</th> |
| 116 |
<th>{% trans "requests" %}</th> |
| 117 |
<th>{% trans "exceptions" %}</th> |
| 118 |
<th>{% trans "signals" %}</th> |
| 119 |
<th>{% trans "running time(ms)" %}</th> |
| 120 |
<th>{% trans "avg response time(ms)" %}</th> |
| 121 |
<th>{% trans "load" %}</th> |
| 122 |
<th>{% trans "last spawn" %}</th> |
| 123 |
<th>{% trans "respawn count" %}</th> |
| 124 |
{% if 'memory-report' in uwsgi.opt %} |
| 125 |
<th>{% trans "address space (vsz)" %}</th> |
| 126 |
<th>{% trans "resident memory (rss)" %}</th> |
| 127 |
{% endif %} |
| 128 |
</tr> |
| 129 |
</thead> |
| 130 |
<tbody> |
| 131 |
{% for w in workers %} |
| 132 |
<tr> |
| 133 |
<td>{{ w.id }}</td> |
| 134 |
<td>{{ w.pid }}</td> |
| 135 |
<td>{{ w.status }}</td> |
| 136 |
<td>{{ w.requests }}</td> |
| 137 |
<td>{{ w.exceptions }}</td> |
| 138 |
<td>{{ w.signals }}</td> |
| 139 |
<td>{{ w.running_time }}</td> |
| 140 |
<td>{{ w.avg_rt }}</td> |
| 141 |
<td>{{ w.load|floatformat:2 }} %</td> |
| 142 |
<td>{{ w.last_spawn }}</td> |
| 143 |
<td>{{ w.respawn_count }}</td> |
| 144 |
{% if 'memory-report' in uwsgi.opt %} |
| 145 |
<td>{{ w.vsz|filesizeformat }}</td> |
| 146 |
<td>{{ w.rss|filesizeformat }}</td> |
| 147 |
{% endif %} |
| 148 |
</tr> |
| 149 |
{% endfor %} |
| 150 |
</tbody> |
| 151 |
</table> |
| 152 |
</section> |
| 153 |
<section id="applications"> |
| 154 |
<header class="nice-padding"> |
| 155 |
<h2>{% trans 'Applications' %}</h2> |
| 156 |
</header> |
| 157 |
<table class="listing chooser"> |
| 158 |
<thead> |
| 159 |
<tr> |
| 160 |
<th>{% trans "#" %}</th> |
| 161 |
<th>{% trans "modifier1" %}</th> |
| 162 |
<th>{% trans "mountpoint" %}</th> |
| 163 |
<th>{% trans "interpreter" %}</th> |
| 164 |
<th>{% trans "callable" %}</th> |
| 165 |
<th>{% trans "chdir" %}</th> |
| 166 |
<th>{% trans "requests" %}</th> |
| 167 |
<th>{% trans "exceptions" %}</th> |
| 168 |
</tr> |
| 169 |
</thead> |
| 170 |
<tbody> |
| 171 |
{% for w in uwsgi.workers %} |
| 172 |
{% for app in w.apps %} |
| 173 |
<tr> |
| 174 |
<td>{{ app.id }}</td> |
| 175 |
<td>{{ app.modifier1 }}</td> |
| 176 |
<td>{{ app.mountpoint }}</td> |
| 177 |
<td>{{ app.interpreter }}</td> |
| 178 |
<td>{{ app.callable }}</td> |
| 179 |
<td>{{ app.chdir }}</td> |
| 180 |
<td>{{ app.requests }}</td> |
| 181 |
<td>{{ app.exceptions }}</td> |
| 182 |
</tr> |
| 183 |
{% endfor %} |
| 184 |
{% endfor %} |
| 185 |
</tbody> |
| 186 |
</table> |
| 187 |
</section> |
| 188 |
{% if uwsgi.spooler_jobs %} |
| 189 |
<section id="spooler"> |
| 190 |
<header class="nice-padding"> |
| 191 |
<h2>{% trans 'Spooler' %}</h2> |
| 192 |
</header> |
| 193 |
<table class="listing chooser"> |
| 194 |
<thead> |
| 195 |
<tr> |
| 196 |
<th>{% trans "job filename" %}</th> |
| 197 |
<th>{% trans "environment" %}</th> |
| 198 |
</tr> |
| 199 |
</thead> |
| 200 |
<tbody> |
| 201 |
{% for job in jobs %} |
| 202 |
<tr> |
| 203 |
<td align="left">{{ job.file }}</td> |
| 204 |
<td align="left">{{ job.env }}</td> |
| 205 |
</tr> |
| 206 |
{% endfor %} |
| 207 |
</tbody> |
| 208 |
</table> |
| 209 |
</section> |
| 210 |
{% endif %} |
| 211 |
<section id="actions"> |
| 212 |
<header class="nice-padding"><h2>{% trans 'Actions' %}</h2></header> |
| 213 |
<form action="{% url 'uwsgi_signal' %}" method="post"> |
| 214 |
{% csrf_token %} |
| 215 |
<ul class="fields"> |
| 216 |
<li class="required"> |
| 217 |
<div class="field char_field text_input"> |
| 218 |
<label for="signal_number">{% trans 'Signal number' %}</label> |
| 219 |
<div class="field-content"> |
| 220 |
<div class="input"> |
| 221 |
<input id="signal_number" type="text" size="3" name="signal_number" required> |
| 222 |
<span></span> |
| 223 |
</div> |
| 224 |
<p class="help">{% trans 'Signal number' %}</p> |
| 225 |
</div> |
| 226 |
</div> |
| 227 |
</li> |
| 228 |
<li> |
| 229 |
<input type="submit" class="button" value="{% trans 'Send' %}"> |
| 230 |
</li> |
| 231 |
</ul> |
| 232 |
</form> |
| 233 |
<form action="{% url 'uwsgi_log' %}" method="post"> |
| 234 |
{% csrf_token %} |
| 235 |
<ul class="fields"> |
| 236 |
<li class="required"> |
| 237 |
<div class="field char_field text_input"> |
| 238 |
<label for="log_message">{% trans 'Log message' %}</label> |
| 239 |
<div class="field-content"> |
| 240 |
<div class="input"> |
| 241 |
<input id="log_message" type="text" size="72" name="log_message" required> |
| 242 |
<span></span> |
| 243 |
</div> |
| 244 |
<p class="help">{% trans 'Log message' %}</p> |
| 245 |
</div> |
| 246 |
</div> |
| 247 |
</li> |
| 248 |
<li> |
| 249 |
<input type="submit" class="button" value="{% trans 'Send' %}"> |
| 250 |
</li> |
| 251 |
</ul> |
| 252 |
</form> |
| 253 |
</section> |
| 254 |
</div> |
| 255 |
<footer> |
| 256 |
<ul> |
| 257 |
{% if uwsgi.masterpid %} |
| 258 |
<li class="actions"> |
| 259 |
<a class="button no bicolor icon icon-repeat" href="{% url 'uwsgi_reload' %}">{% trans 'Gracefully reload uWSGI' %}</a> |
| 260 |
</li> |
| 261 |
<li class="actions preview"> |
| 262 |
<a class="button bicolor icon icon-bin" href="{% url 'uwsgi_cache_clear' %}">{% trans 'Clear uWSGI cache' %}</a> |
| 263 |
</li> |
| 264 |
{% endif %} |
| 265 |
<li class="meta"> |
| 266 |
<p class="modified"> |
| 267 |
<a target="_blank" href="https://github.com/unbit/uwsgi" class="underlined">{% trans "uWSGI version" %} {{ uwsgi.version }}</a> running @ {{ uwsgi.hostname }}</p> |
| 268 |
</li> |
| 269 |
</ul> |
| 270 |
</footer> |
| 271 |
{% endif %} |
| 272 |
{% endblock %} |