mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Move DeviceInterfaceTable coloring logic into CSS
Preparatory work for simplifying toggle button code for cable status.
This commit is contained in:
		@@ -30,3 +30,23 @@
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
{% endblock bulk_extra_controls %}
 | 
			
		||||
 | 
			
		||||
{% block head %}
 | 
			
		||||
    {{ block.super }}
 | 
			
		||||
    <style>
 | 
			
		||||
        {% for status, color in table.Meta.cable_status_styles %}
 | 
			
		||||
        tr[data-cable-status={{ status }}] {
 | 
			
		||||
            background-color: var(--nbx-color-{{ color }}-a15);
 | 
			
		||||
        }
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
        tr[data-mark-connected=true] {
 | 
			
		||||
            background-color: var(--nbx-color-success-a15);
 | 
			
		||||
        }
 | 
			
		||||
        tr[data-virtual=true] {
 | 
			
		||||
            background-color: var(--nbx-color-primary-a15);
 | 
			
		||||
        }
 | 
			
		||||
        tr[data-enabled=disabled] {
 | 
			
		||||
            background-color: var(--nbx-color-danger-a15);
 | 
			
		||||
        }
 | 
			
		||||
    </style>
 | 
			
		||||
{% endblock %} 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user