diff --git a/netbox/project-static/dist/netbox-dark.css b/netbox/project-static/dist/netbox-dark.css index 3032fe467..78799839e 100644 Binary files a/netbox/project-static/dist/netbox-dark.css and b/netbox/project-static/dist/netbox-dark.css differ diff --git a/netbox/project-static/dist/netbox-light.css b/netbox/project-static/dist/netbox-light.css index 22a9c6acf..15d65dc50 100644 Binary files a/netbox/project-static/dist/netbox-light.css and b/netbox/project-static/dist/netbox-light.css differ diff --git a/netbox/project-static/dist/netbox-print.css b/netbox/project-static/dist/netbox-print.css index 3c58d79c0..bfa625b94 100644 Binary files a/netbox/project-static/dist/netbox-print.css and b/netbox/project-static/dist/netbox-print.css differ diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index b1d4ef5f0..aee9d0bdb 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -835,15 +835,6 @@ table tbody { } } -// Expose theme colors as variables. (Useful for dynamic styling of choices etc.) -// Both as opaque colour and translucent (alpha 15%) -:root { - @each $color, $value in $theme-colors { - --nbx-color-#{$color}: #{$value}; - --nbx-color-#{$color}-a15: #{rgba($value, 0.15)}; - } -} - // Style objects with statuses/roles within a table. As of implementation, used for IP addresses // assigned to interfaces. table .table-badge-group { @@ -1078,4 +1069,41 @@ html { display: none; } } -} + + // Apply row colours to interface lists + &[data-netbox-url-name='device_interfaces'] { + tr[data-cable-status=connected] { + background-color: rgba(map.get($theme-colors, "green"), 0.15); + } + + tr[data-cable-status=planned] { + background-color: rgba(map.get($theme-colors, "blue"), 0.15); + } + + tr[data-cable-status=decommissioning] { + background-color: rgba(map.get($theme-colors, "yellow"), 0.15); + } + + tr[data-mark-connected=true] { + background-color: rgba(map.get($theme-colors, "success"), 0.15); + } + + tr[data-virtual=true] { + background-color: rgba(map.get($theme-colors, "primary"), 0.15); + } + + tr[data-enabled=disabled] { + background-color: rgba(map.get($theme-colors, "danger"), 0.15); + } + + // Only show the correct button depending on the cable status + tr[data-cable-status=connected] button.mark-installed { + display: none; + } + + tr:not([data-cable-status=connected]) button.mark-planned { + display: none; + } + + } +} \ No newline at end of file diff --git a/netbox/templates/dcim/device/interfaces.html b/netbox/templates/dcim/device/interfaces.html index 9860d74ef..8b3fe3097 100644 --- a/netbox/templates/dcim/device/interfaces.html +++ b/netbox/templates/dcim/device/interfaces.html @@ -30,33 +30,3 @@ {% endif %} {% endblock bulk_extra_controls %} - -{% block head %} - {{ block.super }} - -{% endblock %}