Debian Codegraph @

django_uwsgi/templates/uwsgi/panel.html

raw
1 {% load i18n %}
2 {% if unavailable %}
3 <h4>{% trans 'ERROR: uWSGI is not available!' %}</h4>
4 {% else %}
5 <style>
6 body.app-django_uwsgi .submit-row a.button {
7 display: inline-block
8 }
9 #djDebug .submit-row {
10 padding-top: 5px;
11 padding-bottom: 5px
12 }
13 </style>
14
15 <div id="content-main" class="inline-related tabular">
16 <div class="module">
17 <table>
18 <caption>
19 <h4>{% trans 'Status' %}</h4>
20 </caption>
21 <thead>
22 <tr>
23 <th>{% trans "Option" %}</th>
24 <th>{% trans "Value" %}</th>
25 </tr>
26 </thead>
27 <tbody>
28 {% for key, value in stats %}
29 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
30 <td>{{ key }}</td>
31 <td>{{ value }}</td>
32 </tr>
33 {% endfor %}
34 </tbody>
35 </table>
36 </div>
37 <div class="module">
38 <table>
39 <caption>
40 <h4>{% trans 'Options' %} (<a href="http://uwsgi-docs.readthedocs.org/en/latest/Options.html">read docs</a>)</h4>
41 </caption>
42 <thead>
43 <tr>
44 <th>{% trans "Option" %}</th>
45 <th>{% trans "Value" %}</th>
46 </tr>
47 </thead>
48 <tbody>
49 {% for key, value in uwsgi.opt.items %}
50 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
51 <td><a href="http://uwsgi-docs.readthedocs.org/en/latest/Options.html#{{ key }}">{{ key }}</a></td>
52 {# uWSGI allows to use options without values if value = true #}
53 <td>{% if value %}{{ value }}{% else %}true{% endif %}</td>
54 </tr>
55 {% endfor %}
56 </tbody>
57 </table>
58 </div>
59 <div class="module">
60 <table>
61 <caption>
62 <h4>{% trans 'Magic table' %} (<a href="http://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#magic-variables">read docs</a>)</h4>
63 </caption>
64 <thead>
65 <tr>
66 <th>{% trans "Option" %}</th>
67 <th>{% trans "Value" %}</th>
68 </tr>
69 </thead>
70 <tbody>
71 {% for key, value in uwsgi.magic_table.items %}
72 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
73 <td>{{ key }}</td>
74 <td>{{ value }}</td>
75 </tr>
76 {% endfor %}
77 </tbody>
78 </table>
79 </div>
80 <div class="module balanced">
81 <table>
82 <caption>
83 <h4>{% trans 'Workers' %}</h4>
84 </caption>
85 <thead>
86 <tr>
87 <th>{% trans "id" %}</th>
88 <th>{% trans "pid" %}</th>
89 <th>{% trans "status" %}</th>
90 <th>{% trans "requests" %}</th>
91 <th>{% trans "exceptions" %}</th>
92 <th>{% trans "signals" %}</th>
93 <th>{% trans "running time(ms)" %}</th>
94 <th>{% trans "avg response time(ms)" %}</th>
95 <th>{% trans "load" %}</th>
96 <th>{% trans "last spawn" %}</th>
97 <th>{% trans "respawn count" %}</th>
98 <th>{% trans "address space (vsz)" %}</th>
99 <th>{% trans "resident memory (rss)" %}</th>
100 </tr>
101 </thead>
102 <tbody>
103 {% for w in workers %}
104 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
105 <td>{{ w.id }}</td>
106 <td>{{ w.pid }}</td>
107 <td>{{ w.status }}</td>
108 <td>{{ w.requests }}</td>
109 <td>{{ w.exceptions }}</td>
110 <td>{{ w.signals }}</td>
111 <td>{{ w.running_time }}</td>
112 <td>{{ w.avg_rt }}</td>
113 <td>{{ w.load|floatformat:2 }} %</td>
114 <td>{{ w.last_spawn }}</td>
115 <td>{{ w.respawn_count }}</td>
116 <td>{{ w.vsz|filesizeformat }}</td>
117 <td>{{ w.rss|filesizeformat }}</td>
118 </tr>
119 {% endfor %}
120 </tbody>
121 </table>
122 </div>
123 <div class="module balanced">
124 <table>
125 <caption>
126 <h4>{% trans 'Applications' %}</h4>
127 </caption>
128 <thead>
129 <tr>
130 <th>{% trans "#" %}</th>
131 <th>{% trans "modifier1" %}</th>
132 <th>{% trans "mountpoint" %}</th>
133 <th>{% trans "interpreter" %}</th>
134 <th>{% trans "callable" %}</th>
135 <th>{% trans "chdir" %}</th>
136 <th>{% trans "requests" %}</th>
137 <th>{% trans "exceptions" %}</th>
138 </tr>
139 </thead>
140 <tbody>
141 {% for w in workers %}
142 {% for app in w.apps %}
143 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
144 <td>{{ app.id }}</td>
145 <td>{{ app.modifier1 }}</td>
146 <td>{{ app.mountpoint }}</td>
147 <td>{{ app.interpreter }}</td>
148 <td>{{ app.callable }}</td>
149 <td>{{ app.chdir }}</td>
150 <td>{{ app.requests }}</td>
151 <td>{{ app.exceptions }}</td>
152 </tr>
153 {% endfor %}
154 {% endfor %}
155 </tbody>
156 </table>
157 </div>
158 {% if uwsgi.spooler_jobs %}
159 <div class="module balanced">
160 <table>
161 <caption>
162 <h4>{% trans 'Spooler' %}</h4>
163 </caption>
164 <thead>
165 <tr>
166 <th>{% trans "job filename" %}</th>
167 <th>{% trans "environment" %}</th>
168 </tr>
169 </thead>
170 <tbody>
171 {% for job in jobs %}
172 <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
173 <td align="left">{{ job.file }}</td>
174 <td align="left">{{ job.env }}</td>
175 </tr>
176 {% endfor %}
177 </tbody>
178 </table>
179 </div>
180 {% endif %}
181 <div class="module balanced">
182 <table>
183 <caption>
184 <h4>{% trans 'Actions' %}</h4>
185 </caption>
186 <thead>
187 <tr>
188 <th>{% trans 'Send uWSGI Signal' %}</th>
189 <th>{% trans 'Send uWSGI Log message' %}</th>
190 </tr>
191 </thead>
192 <tbody>
193 <tr class="djDebugOdd">
194 <td align="left">
195 <form action="{% url 'uwsgi_signal' %}" method="post">
196 {% csrf_token %}
197 <label for="signal_number">{% trans 'Signal number' %}</label>
198 <input id="signal_number" type="text" size="3" name="signal_number" required>
199 <input type="submit" class="button" value="{% trans 'Send' %}">
200 </form>
201 </td>
202 <td align="left">
203 <form action="{% url 'uwsgi_log' %}" method="post">
204 {% csrf_token %}
205 <label for="log_message">{% trans 'Log message' %}</label>
206 <input id="log_message" type="text" size="72" name="log_message" required>
207 <input type="submit" class="button" value="{% trans 'Send' %}">
208 </form>
209 </td>
210 </tr>
211 </tbody>
212 </table>
213 </div>
214 {% if uwsgi.masterpid %}
215 <div class="submit-row">
216 <a href="{% url 'uwsgi_reload' %}" class="button">{% trans 'Gracefully reload uWSGI' %}</a>
217 <a href="{% url 'uwsgi_cache_clear' %}" class="button">{% trans 'Clear uWSGI cache' %}</a>
218 </div>
219 {% endif %}
220 </div>
221 {% endif %}