mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2067 from SchrodingersGat/warning-improvements
Improve 'health status' warnings
This commit is contained in:
commit
2e1277839e
@ -36,9 +36,14 @@ def health_status(request):
|
||||
'email_configured': InvenTree.status.is_email_configured(),
|
||||
}
|
||||
|
||||
# The following keys are required to denote system health
|
||||
health_keys = [
|
||||
'django_q_running',
|
||||
]
|
||||
|
||||
all_healthy = True
|
||||
|
||||
for k in status.keys():
|
||||
for k in health_keys:
|
||||
if status[k] is not True:
|
||||
all_healthy = False
|
||||
|
||||
|
@ -71,11 +71,7 @@
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
|
||||
{% if user.is_staff %}
|
||||
{% if not system_healthy %}
|
||||
{% 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 %}
|
||||
<span class='fas fa-info-circle icon-green'></span>
|
||||
{% endif %}
|
||||
@ -96,11 +92,7 @@
|
||||
{% if system_healthy or not user.is_staff %}
|
||||
<span class='fas fa-server'></span>
|
||||
{% else %}
|
||||
{% if not django_q_running %}
|
||||
<span class='fas fa-server icon-red'></span>
|
||||
{% else %}
|
||||
<span class='fas fa-server icon-orange'></span>
|
||||
{% endif %}
|
||||
<span class='fas fa-server icon-red'></span>
|
||||
{% endif %}
|
||||
</span> {% trans "System Information" %}
|
||||
</a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user