InvenTree/InvenTree/templates/stats.html
2021-10-28 17:41:40 +11:00

105 lines
3.2 KiB
HTML

{% load static %}
{% load inventree_extras %}
{% load i18n %}
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td colspan="3"><strong>{% trans "Server" %}</strong></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='badge rounded-pill bg-success'>{% trans "Healthy" %}</span>
{% else %}
<span class='badge rounded-pill bg-warning'>{% 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='{% inventree_docs_url %}/admin/tasks'>
<span class='badge rounded-pill bg-danger'>{% 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='{% inventree_docs_url %}/admin/email'>
<span class='badge rounded-pill bg-warning'>{% 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'><strong>{% trans "Parts" %}</strong></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"><strong>{% trans "Stock Items" %}</strong></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>