mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 05:28:16 -06:00
Fix badge background colors in table content
This commit is contained in:
parent
ee4842e08d
commit
cdbf1950a6
@ -21,16 +21,16 @@ WEIGHT = """
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
DEVICE_LINK = """
|
DEVICE_LINK = """
|
||||||
{{ value|default:'<span class="badge bg-info">Unnamed device</span>' }}
|
{{ value|default:'<span class="badge text-bg-info">Unnamed device</span>' }}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DEVICEBAY_STATUS = """
|
DEVICEBAY_STATUS = """
|
||||||
{% if record.installed_device_id %}
|
{% if record.installed_device_id %}
|
||||||
<span class="badge bg-{{ record.installed_device.get_status_color }}">
|
<span class="badge text-bg-{{ record.installed_device.get_status_color }}">
|
||||||
{{ record.installed_device.get_status_display }}
|
{{ record.installed_device.get_status_display }}
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-secondary">Vacant</span>
|
<span class="badge text-bg-secondary">Vacant</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ INTERFACE_IPADDRESSES = """
|
|||||||
<div class="table-badge-group">
|
<div class="table-badge-group">
|
||||||
{% for ip in value.all %}
|
{% for ip in value.all %}
|
||||||
{% if ip.status != 'active' %}
|
{% if ip.status != 'active' %}
|
||||||
<a href="{{ ip.get_absolute_url }}" class="table-badge badge bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
<a href="{{ ip.get_absolute_url }}" class="table-badge badge text-bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -18,7 +18,7 @@ __all__ = (
|
|||||||
'RoleTable',
|
'RoleTable',
|
||||||
)
|
)
|
||||||
|
|
||||||
AVAILABLE_LABEL = mark_safe('<span class="badge bg-success">Available</span>')
|
AVAILABLE_LABEL = mark_safe('<span class="badge text-bg-success">Available</span>')
|
||||||
|
|
||||||
AGGREGATE_COPY_BUTTON = """
|
AGGREGATE_COPY_BUTTON = """
|
||||||
{% copy_content record.pk prefix="aggregate_" %}
|
{% copy_content record.pk prefix="aggregate_" %}
|
||||||
|
@ -18,7 +18,7 @@ __all__ = (
|
|||||||
'VLANVirtualMachinesTable',
|
'VLANVirtualMachinesTable',
|
||||||
)
|
)
|
||||||
|
|
||||||
AVAILABLE_LABEL = mark_safe('<span class="badge bg-success">Available</span>')
|
AVAILABLE_LABEL = mark_safe('<span class="badge text-bg-success">Available</span>')
|
||||||
|
|
||||||
VLAN_LINK = """
|
VLAN_LINK = """
|
||||||
{% if record.pk %}
|
{% if record.pk %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SEARCH_RESULT_ATTRS = """
|
SEARCH_RESULT_ATTRS = """
|
||||||
{% for name, value in record.display_attrs.items %}
|
{% for name, value in record.display_attrs.items %}
|
||||||
<span class="badge bg-secondary"
|
<span class="badge text-bg-secondary"
|
||||||
{% if value|length > 40 %} data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ value }}"{% endif %}
|
{% if value|length > 40 %} data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ value }}"{% endif %}
|
||||||
>
|
>
|
||||||
{{ name|bettertitle }}:
|
{{ name|bettertitle }}:
|
||||||
|
Loading…
Reference in New Issue
Block a user