diff --git a/src/static/app/src/components/configurationComponents/peerList.vue b/src/static/app/src/components/configurationComponents/peerList.vue index 8aa2aea..71b80c5 100644 --- a/src/static/app/src/components/configurationComponents/peerList.vue +++ b/src/static/app/src/components/configurationComponents/peerList.vue @@ -212,9 +212,10 @@ export default { { label: 'Data Sent', data: [...this.historySentData.datasets[0].data, - ((sent - this.historyDataSentDifference[this.historyDataSentDifference.length - 1])*1000).toFixed(4)], + ((sent - this.historyDataSentDifference[this.historyDataSentDifference.length - 1])*1000) + .toFixed(4)], fill: false, - borderColor: ' #198754', + borderColor: '#198754', tension: 0 } ], @@ -237,6 +238,15 @@ export default { fill: false, borderColor: '#0d6efd', tension: 0 + }, + { + label: 'Data Sent', + data: [...this.historySentData.datasets[0].data, + ((sent - this.historyDataSentDifference[this.historyDataSentDifference.length - 1])*1000) + .toFixed(4)], + fill: false, + borderColor: '#198754', + tension: 0 } ], } diff --git a/src/static/app/src/components/configurationList.vue b/src/static/app/src/components/configurationList.vue index eb50577..80dfd60 100644 --- a/src/static/app/src/components/configurationList.vue +++ b/src/static/app/src/components/configurationList.vue @@ -8,7 +8,6 @@ export default { components: {ConfigurationCard}, async setup(){ const wireguardConfigurationsStore = WireguardConfigurationsStore(); - return {wireguardConfigurationsStore} }, data(){ @@ -19,6 +18,13 @@ export default { async mounted() { await this.wireguardConfigurationsStore.getConfigurations(); this.configurationLoaded = true; + + this.wireguardConfigurationsStore.ConfigurationListInterval = setInterval(() => { + this.wireguardConfigurationsStore.getConfigurations() + }, 10000) + }, + beforeUnmount() { + clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval) } } @@ -40,8 +46,8 @@ export default {
You don't have any WireGuard configurations yet. Please check the configuration folder or change it in "Settings". By default the folder is "/etc/wireguard".
-