mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
12216 review changes
This commit is contained in:
parent
22f92417a8
commit
f6e6e7778b
@ -103,9 +103,9 @@ class CircuitTypeBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
model = CircuitType
|
model = CircuitType
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, ('color', 'description',)),
|
(None, ('color', 'description')),
|
||||||
)
|
)
|
||||||
nullable_fields = ('color', 'description',)
|
nullable_fields = ('color', 'description')
|
||||||
|
|
||||||
|
|
||||||
class CircuitBulkEditForm(NetBoxModelBulkEditForm):
|
class CircuitBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
|
@ -182,7 +182,7 @@ class CableTraceSVG:
|
|||||||
if hasattr(instance, 'role'):
|
if hasattr(instance, 'role'):
|
||||||
# Device
|
# Device
|
||||||
return instance.role.color
|
return instance.role.color
|
||||||
elif instance._meta.model_name == 'circuit':
|
elif instance._meta.model_name == 'circuit' and instance.type.color:
|
||||||
return instance.type.color
|
return instance.type.color
|
||||||
else:
|
else:
|
||||||
# Other parent object
|
# Other parent object
|
||||||
|
@ -32,7 +32,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Color" %}</th>
|
<th scope="row">{% trans "Color" %}</th>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge color-label" style="background-color: #{{ object.color }}"> </span>
|
{% if object.color %}
|
||||||
|
<span class="badge color-label" style="background-color: #{{ object.color }}"> </span>
|
||||||
|
{% else %}
|
||||||
|
{{ ''|placeholder }}
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user