mirror of https://github.com/h44z/wg-portal.git
				
				
				
			Fix not loading stats on interface change (#294)
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 <tim.dithmer@suresecure.de>
This commit is contained in:
		
							parent
							
								
									deff2334ac
								
							
						
					
					
						commit
						e3d05a4678
					
				|  | @ -94,7 +94,7 @@ onMounted(async () => { | ||||||
|           <button class="input-group-text btn btn-primary" :title="$t('interfaces.button-add-interface')" @click.prevent="editInterfaceId='#NEW#'"> |           <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> |             <i class="fa-solid fa-plus-circle"></i> | ||||||
|           </button> |           </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-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> |             <option v-for="iface in interfaces.All" :key="iface.Identifier" :value="iface.Identifier">{{ calculateInterfaceName(iface.Identifier,iface.DisplayName) }}</option> | ||||||
|           </select> |           </select> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue