2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 03:56:43 +00:00

Hide system alert for non-staff users, introduced orange icon for less severe alert than background workers not running (like missing email config)

This commit is contained in:
eeintech 2021-04-16 12:22:13 -04:00
parent d4529ec1c4
commit 2b4723cc32
2 changed files with 18 additions and 4 deletions

View File

@ -185,6 +185,10 @@
color: #c55; color: #c55;
} }
.icon-orange {
color: #fcba03;
}
.icon-green { .icon-green {
color: #43bb43; color: #43bb43;
} }

View File

@ -59,11 +59,17 @@
{% endif %} {% endif %}
<li class='dropdown'> <li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href="#"> <a class='dropdown-toggle' data-toggle='dropdown' href="#">
{% if user.is_staff %}
{% if not system_healthy %} {% if not system_healthy %}
<span class='fas fa-exclamation-triangle icon-red'></span> {% if not django_q_running %}
<span class='fas fa-exclamation-triangle icon-red'></span>
{% else %}
<span class='fas fa-exclamation-triangle icon-orange'></span>
{% endif %}
{% elif not up_to_date %} {% elif not up_to_date %}
<span class='fas fa-info-circle icon-green'></span> <span class='fas fa-info-circle icon-green'></span>
{% endif %} {% endif %}
{% endif %}
<span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a> <span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a>
<ul class='dropdown-menu'> <ul class='dropdown-menu'>
{% if user.is_authenticated %} {% if user.is_authenticated %}
@ -77,10 +83,14 @@
<hr> <hr>
<li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li> <li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>
<li id='launch-stats'><a href='#'> <li id='launch-stats'><a href='#'>
{% if system_healthy %} {% if system_healthy or not user.is_staff %}
<span class='fas fa-server'> <span class='fas fa-server'></span>
{% else %} {% else %}
<span class='fas fa-server icon-red'> {% if not django_q_running %}
<span class='fas fa-server icon-red'></span>
{% else %}
<span class='fas fa-server icon-orange'></span>
{% endif %}
{% endif %} {% endif %}
</span> {% trans "System Information" %} </span> {% trans "System Information" %}
</a></li> </a></li>