mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-07 12:22:11 +00:00
Adds framework for "server health" display
- Adds global context object "system_healthy" (boolean) - Framework for running system health checks - Updated system info forms - Displays warning next to user menu if system health errors exist (cherry picked from commit ce6d626ab39147fc389de90815ca8baae2385d82)
This commit is contained in:
@@ -52,7 +52,11 @@
|
||||
</button>
|
||||
</li>
|
||||
<li class='dropdown'>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href="#"><span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
|
||||
{% if not system_healthy %}
|
||||
<span title='{% trans "InvenTree server issues detected" %}' class='fas fa-exclamation-triangle icon-red'></span>
|
||||
{% endif %}
|
||||
<span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a>
|
||||
<ul class='dropdown-menu'>
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_staff %}
|
||||
@@ -65,8 +69,15 @@
|
||||
<li><a href="{% url 'login' %}"><span class="fas fa-sign-in-alt"></span> {% trans "Login" %}</a></li>
|
||||
{% endif %}
|
||||
<hr>
|
||||
<li id='launch-stats'><a href='#'>
|
||||
{% if system_healthy %}
|
||||
<span class='fas fa-server'>
|
||||
{% else %}
|
||||
<span class='fas fa-exclamation-triangle icon-red'>
|
||||
{% endif %}
|
||||
</span> {% trans "System Information" %}
|
||||
</a></li>
|
||||
<li id='launch-about'><a href='#'><span class="fas fa-info-circle"></span> {% trans "About InvenTree" %}</a></li>
|
||||
<li id='launch-stats'><a href='#'><span class='fas fa-chart-pie'></span> {% trans "Statistics" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user