Skip to content

Commit

Permalink
Fix not loading stats on interface change (#294)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Tim Dithmer <[email protected]>
  • Loading branch information
dithmer and Tim Dithmer authored Sep 22, 2024
1 parent deff233 commit e3d05a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/views/InterfaceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit e3d05a4

Please sign in to comment.