mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18: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 = """
|
||||
{{ value|default:'<span class="badge bg-info">Unnamed device</span>' }}
|
||||
{{ value|default:'<span class="badge text-bg-info">Unnamed device</span>' }}
|
||||
"""
|
||||
|
||||
DEVICEBAY_STATUS = """
|
||||
{% 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 }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Vacant</span>
|
||||
<span class="badge text-bg-secondary">Vacant</span>
|
||||
{% endif %}
|
||||
"""
|
||||
|
||||
@ -38,7 +38,7 @@ INTERFACE_IPADDRESSES = """
|
||||
<div class="table-badge-group">
|
||||
{% for ip in value.all %}
|
||||
{% 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 %}
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
||||
{% endif %}
|
||||
|
@ -18,7 +18,7 @@ __all__ = (
|
||||
'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 = """
|
||||
{% copy_content record.pk prefix="aggregate_" %}
|
||||
|
@ -18,7 +18,7 @@ __all__ = (
|
||||
'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 = """
|
||||
{% if record.pk %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
SEARCH_RESULT_ATTRS = """
|
||||
{% 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 %}
|
||||
>
|
||||
{{ name|bettertitle }}:
|
||||
|
Loading…
Reference in New Issue
Block a user