Fixes #2877: Fixed device role label display on light background color

This commit is contained in:
Jeremy Stretch 2019-02-13 10:06:56 -05:00
parent 5da9d6b46b
commit dfa4dfa4a4
2 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@ v2.5.6 (FUTURE)
* [#2857](https://github.com/digitalocean/netbox/issues/2857) - Add `display_name` to DeviceType API serializer; fix DeviceType list for bulk device edit
* [#2862](https://github.com/digitalocean/netbox/issues/2862) - Follow return URL when connecting a cable
* [#2864](https://github.com/digitalocean/netbox/issues/2864) - Correct display of VRF name when no RD is assigned
* [#2877](https://github.com/digitalocean/netbox/issues/2877) - Fixed device role label display on light background color
---

View File

@ -136,7 +136,8 @@ PLATFORM_ACTIONS = """
"""
DEVICE_ROLE = """
<label class="label" style="background-color: #{{ record.device_role.color }}">{{ value }}</label>
{% load helpers %}
<label class="label" style="color: {{ record.device_role.color|fgcolor }}; background-color: #{{ record.device_role.color }}">{{ value }}</label>
"""
STATUS_LABEL = """