router.html: only show br-client on top of netif list

While we can have both br-client and br-mesh on top of the netif
list, we can only pre-load the data for one of them. This led to
the situation where br-mesh was shown as selected, but no data was
displayed.

Thus, let's just put the new br-client at that priviledged position,
and having br-mesh deselected by default. This should make the
situation more understandable.

Fixes: bd8d0280f6 ("treewide: add support for br-client")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2021-02-26 17:31:13 +01:00
parent 543117cb00
commit 6c34f7c0de
1 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@
</div>
<ul class="list-group" id="netif-list">
{# make sure that br-client is on top of the list #}
{%- for netif in router.netifs if netif.netif in ('br-client','br-mesh') %}
{%- for netif in router.netifs if netif.netif == 'br-client' %}
<li class="list-group-item active" data-name="{{ netif.netif|replace('.', '')|replace('$', '') }}">
<div class="row">
<div class="col-xs-7 col-sm-7"><h4 class="list-group-item-heading">{{ netif.netif }}: <span class="netifdesc">Client Bridge</span></h4></div>
@ -314,7 +314,7 @@
</div>
</li>
{%- endfor %}
{%- for netif in router.netifs if not netif.netif in ('br-client','br-mesh') %}
{%- for netif in router.netifs if netif.netif != 'br-client' %}
<li class="list-group-item" data-name="{{ netif.netif|replace('.', '')|replace('$', '') }}">
<div class="row">
<div class="col-xs-7 col-sm-7"><h4 class="list-group-item-heading" style="{%- if netif.color -%}color:{{ netif.color }}{%- endif -%}">{{ netif.netif }}{%- if netif.description -%}: <span class="netifdesc">{{ netif.description }}</span>{%- endif %}</h4></div>