Fixes #16523: Restore highlighting of current device in virtual chassis members panel

This commit is contained in:
Jeremy Stretch 2024-06-30 15:37:11 -04:00
parent 67983c6a75
commit b5d8e657ad

View File

@ -125,28 +125,30 @@
</div> </div>
</h5> </h5>
<table class="table table-hover attr-table"> <table class="table table-hover attr-table">
<tr> <thead>
<th>{% trans "Device" %}</th> <tr class="border-bottom">
<th>{% trans "Position" %}</th> <th>{% trans "Device" %}</th>
<th>{% trans "Master" %}</th> <th>{% trans "Position" %}</th>
<th>{% trans "Priority" %}</th> <th>{% trans "Master" %}</th>
<th>{% trans "Priority" %}</th>
</tr> </tr>
</thead>
<tbody>
{% for vc_member in vc_members %} {% for vc_member in vc_members %}
<tr{% if vc_member == object %} class="info"{% endif %}> <tr{% if vc_member == object %} class="table-primary"{% endif %}>
<td> <td>{{ vc_member|linkify }}</td>
{{ vc_member|linkify }} <td>{% badge vc_member.vc_position show_empty=True %}</td>
</td> <td>
<td> {% if object.virtual_chassis.master == vc_member %}
{% badge vc_member.vc_position show_empty=True %} {% checkmark True %}
</td> {% else %}
<td> {{ ''|placeholder }}
{% if object.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %} {% endif %}
</td> </td>
<td> <td>{{ vc_member.vc_priority|placeholder }}</td>
{{ vc_member.vc_priority|placeholder }} </tr>
</td>
</tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>
</div> </div>
{% endif %} {% endif %}