Source

django-uwsgi-admin-grappelli / uwsgi_admin / templates / admin / uwsgi.html

{% extends "admin/base_site.html" %}

{% load i18n %}


{% block breadcrumbs %}
<div id="breadcrumbs">
    <a href="../">{% trans 'Home' %}</a> &rsaquo;
    {{ title }}
</div>
{% endblock %}


{% block content %}
<div id="content-main">
<b>Master PID:</b> {{masterpid}}<br/>
<b>Started on:</b> {{started_on}}<br/>
<b>Buffer size:</b> {{buffer_size}}<br/>
<b>Workers:</b> {{numproc}}<br/>
<b>Total requests:</b> {{total_requests}}<br/>

<br/>

<div class="module" style="width:860px">
<h2>Workers</h2>
<table style="width:860px">
    <thead>
        <tr>
            <th scope="col">ID</th>
            <th scope="col">PID</th>
            <th scope="col">Requests</th>
            <th scope="col">Running time (ms)</th>
            <th scope="col">Load</th>
            <th scope="col">Last spawn</th>
            <th scope="col">Respawn count</th>
            <th scope="col">Address space (VSZ)</th>
            <th scope="col">Resident memory (RSS)</th>
        </tr>
    </thead>
    <tbody>
{% for w in workers %}
    <tr>
        <td align="center">{{w.id}}</td>
        <td align="center">{{w.pid}}</td>
        <td align="right">{{w.requests}}</td>
        <td align="right">{{w.running_time}}</td>
        <td align="right">{{w.load|floatformat:2}} %</td>
        <td align="right">{{w.last_spawn_str}}</td>
        <td align="right">{{w.respawn_count}}</td>
        <td align="right">{{w.vsz|filesizeformat}}</td>
        <td align="right">{{w.rss|filesizeformat}}</td>
    </tr>
{% endfor %}
    </tbody>
</table>
</div>

<div class="module" style="width:860px">
<h2>Spooler jobs</h2>
<table style="width:860px">
    <thead>
        <tr>
            <th scope="row">Job filename</th>
            <th scope="row">Environment</th>
        </tr>
    </thead>
    <tbody>
{% for j in jobs %}
    <tr>
        <td align="left">{{j.file}}</td>
        <td align="left">{{j.env}}</td>
    </tr>
{% endfor %}
    </tbody>
</table>
</div>

{% if masterpid %}
<br/>
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="reload/" method="post">
{% csrf_token %}
<div class="module submit-row">
    <ul class="submit-row">
        <li>
            <input type="submit" class="default" value="Gracefully reload uWSGI" name="_reload"/>
        </li>
    </ul>
</div>
</form>
{% endif %}

</div>

{% endblock %}