Skip to content

Commit b5d8e65

Browse files
committed
Fixes netbox-community#16523: Restore highlighting of current device in virtual chassis members panel
1 parent 67983c6 commit b5d8e65

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

netbox/templates/dcim/device.html

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -125,28 +125,30 @@ <h5 class="card-header">
125125
</div>
126126
</h5>
127127
<table class="table table-hover attr-table">
128-
<tr>
129-
<th>{% trans "Device" %}</th>
130-
<th>{% trans "Position" %}</th>
131-
<th>{% trans "Master" %}</th>
132-
<th>{% trans "Priority" %}</th>
128+
<thead>
129+
<tr class="border-bottom">
130+
<th>{% trans "Device" %}</th>
131+
<th>{% trans "Position" %}</th>
132+
<th>{% trans "Master" %}</th>
133+
<th>{% trans "Priority" %}</th>
133134
</tr>
135+
</thead>
136+
<tbody>
134137
{% for vc_member in vc_members %}
135-
<tr{% if vc_member == object %} class="info"{% endif %}>
136-
<td>
137-
{{ vc_member|linkify }}
138-
</td>
139-
<td>
140-
{% badge vc_member.vc_position show_empty=True %}
141-
</td>
142-
<td>
143-
{% if object.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %}
144-
</td>
145-
<td>
146-
{{ vc_member.vc_priority|placeholder }}
147-
</td>
148-
</tr>
138+
<tr{% if vc_member == object %} class="table-primary"{% endif %}>
139+
<td>{{ vc_member|linkify }}</td>
140+
<td>{% badge vc_member.vc_position show_empty=True %}</td>
141+
<td>
142+
{% if object.virtual_chassis.master == vc_member %}
143+
{% checkmark True %}
144+
{% else %}
145+
{{ ''|placeholder }}
146+
{% endif %}
147+
</td>
148+
<td>{{ vc_member.vc_priority|placeholder }}</td>
149+
</tr>
149150
{% endfor %}
151+
</tbody>
150152
</table>
151153
</div>
152154
{% endif %}

0 commit comments

Comments
 (0)