mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Merge pull request #1470 from eeintech/hide_system_alert_nostaff
Hide system alert for non-staff users
This commit is contained in:
		| @@ -185,6 +185,10 @@ | ||||
|     color: #c55; | ||||
| } | ||||
|  | ||||
| .icon-orange { | ||||
|     color: #fcba03; | ||||
| } | ||||
|  | ||||
| .icon-green { | ||||
|     color: #43bb43; | ||||
| } | ||||
|   | ||||
| @@ -59,11 +59,17 @@ | ||||
|           {% endif %} | ||||
|           <li class='dropdown'> | ||||
|             <a class='dropdown-toggle' data-toggle='dropdown' href="#"> | ||||
|               {% if user.is_staff %} | ||||
|               {% 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 %} | ||||
|               <span class='fas fa-info-circle icon-green'></span> | ||||
|               {% endif %} | ||||
|               {% endif %} | ||||
|               <span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a> | ||||
|             <ul class='dropdown-menu'> | ||||
|                 {% if user.is_authenticated %} | ||||
| @@ -77,10 +83,14 @@ | ||||
|                 <hr> | ||||
|                 <li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li> | ||||
|                 <li id='launch-stats'><a href='#'> | ||||
|                   {% if system_healthy %} | ||||
|                   <span class='fas fa-server'> | ||||
|                   {% if system_healthy or not user.is_staff %} | ||||
|                   <span class='fas fa-server'></span> | ||||
|                   {% 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 %} | ||||
|                   </span> {% trans "System Information" %} | ||||
|                 </a></li> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user