InvenTree/InvenTree/templates/stats.html
2021-05-16 18:20:32 +02:00

105 lines
3.1 KiB
HTML

{% load static %}
{% load inventree_extras %}
{% load i18n %}
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td colspan="3"><b>{% trans "Server" %}</b></td>
</tr>
<tr>
<td><span class='fas fa-server'></span></td>
<td>{% trans "Instance Name" %}</td>
<td>{% inventree_instance_name %}</td>
</tr>
<tr>
<td><span class='fas fa-database'></span></td>
<td>{% trans "Database" %}</td>
<td>{% inventree_db_engine %}</td>
</tr>
{% inventree_in_debug_mode as debug_mode %}
{% if debug_mode %}
<tr>
<td><span class='fas fa-laptop-code'></span></td>
<td>{% trans "Debug Mode" %}</td>
<td>{% trans "Server is running in debug mode" %}</td>
</tr>
{% endif %}
{% inventree_docker_mode as docker_mode %}
{% if docker_mode %}
<tr>
<td><span class='fab fa-docker'></span></td>
<td>{% trans "Docker Mode" %}</td>
<td>{% trans "Server is deployed using docker" %}</td>
</tr>
{% endif %}
{% if user.is_staff %}
<tr>
<td><span class='fas fa-server'></span></td>
<td>{% trans "Server status" %}</td>
<td>
{% if system_healthy %}
<span class='label label-green'>{% trans "Healthy" %}</span>
{% else %}
<span class='label label-red'>{% trans "Issues detected" %}</span>
{% endif %}
</td>
</tr>
{% if not django_q_running %}
<tr>
<td><span class='fas fa-tasks'></span></td>
<td>{% trans "Background Worker" %}</td>
<td>
<a href='https://inventree.readthedocs.io/en/latest/admin/tasks'>
<span class='label label-red'>{% trans "Background worker not running" %}</span>
</a>
</td>
</tr>
{% endif %}
{% if not email_configured %}
<tr>
<td><span class='fas fa-envelope'></span></td>
<td>{% trans "Email Settings" %}</td>
<td>
<a href='https://inventree.readthedocs.io/en/latest/admin/email'>
<span class='label label-red'>{% trans "Email settings not configured" %}</span>
</a>
</td>
</tr>
{% endif %}
{% endif %}
{% if not system_healthy %}
{% for issue in system_issues %}
<!-- TODO - Enumerate system issues here! -->
{% endfor %}
{% endif %}
<tr>
<td colspan='3'><b>{% trans "Parts" %}</b></td>
</tr>
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Part Categories" %}</td>
<td>{{ part_cat_count }}</td>
</tr>
<tr>
<td><span class='fas fa-shapes'></span></td>
<td>{% trans "Parts" %}</td>
<td>{{ part_count }}</td>
</tr>
<tr>
<td colspan="3"><b>{% trans "Stock Items" %}</b></td>
</tr>
<tr>
<td><span class='fas fa-map-marker-alt'></span></td>
<td>{% trans "Stock Locations" %}</td>
<td>{{ stock_loc_count }}</td>
</tr>
<tr>
<td><span class='fas fa-boxes'></span></td>
<td>{% trans "Stock Items" %}</td>
<td>{{ stock_item_count }}</td>
</tr>
</table>