Fix not loading stats on interface change

To fix that, the method peers.LoadStats() is simply also called together
with peers.LoadPeers() when the @change handler is activated on the
interface selector element.
This commit is contained in:
Tim Dithmer 2024-08-19 15:27:33 +02:00
parent a46dabc1d3
commit 156b2b5b7d

View File

@ -94,7 +94,7 @@ onMounted(async () => {
<button class="input-group-text btn btn-primary" :title="$t('interfaces.button-add-interface')" @click.prevent="editInterfaceId='#NEW#'">
<i class="fa-solid fa-plus-circle"></i>
</button>
<select v-model="interfaces.selected" :disabled="interfaces.Count===0" class="form-select" @change="peers.LoadPeers()">
<select v-model="interfaces.selected" :disabled="interfaces.Count===0" class="form-select" @change="() => { peers.LoadPeers(); peers.LoadStats() }">
<option v-if="interfaces.Count===0" value="nothing">{{ $t('interfaces.no-interface.default-selection') }}</option>
<option v-for="iface in interfaces.All" :key="iface.Identifier" :value="iface.Identifier">{{ calculateInterfaceName(iface.Identifier,iface.DisplayName) }}</option>
</select>