mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-04 17:31:17 +00:00
force Default AllowedIPs for all existing clients issue #37
This commit is contained in:
parent
e5ca62018c
commit
c829995a42
@ -3,11 +3,9 @@
|
|||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-card dark>
|
<v-card dark>
|
||||||
<v-list-item>
|
<v-card-title>
|
||||||
<v-list-item-content>
|
Server's interface configuration
|
||||||
<v-list-item-title class="headline">Server's interface configuration</v-list-item-title>
|
</v-card-title>
|
||||||
</v-list-item-content>
|
|
||||||
</v-list-item>
|
|
||||||
<div class="d-flex flex-no-wrap justify-space-between">
|
<div class="d-flex flex-no-wrap justify-space-between">
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
@ -50,11 +48,17 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-card dark>
|
<v-card dark>
|
||||||
<v-list-item>
|
<v-card-title>
|
||||||
<v-list-item-content>
|
Client's global configuration
|
||||||
<v-list-item-title class="headline">Client's global configuration</v-list-item-title>
|
<v-spacer></v-spacer>
|
||||||
</v-list-item-content>
|
<v-btn
|
||||||
</v-list-item>
|
color="warning"
|
||||||
|
@click="applyGlobals"
|
||||||
|
>
|
||||||
|
Apply globals to all clients
|
||||||
|
<v-icon right dark>mdi-update</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</v-card-title>
|
||||||
<div class="d-flex flex-no-wrap justify-space-between">
|
<div class="d-flex flex-no-wrap justify-space-between">
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
@ -125,11 +129,9 @@
|
|||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-card dark>
|
<v-card dark>
|
||||||
<v-list-item>
|
<v-card-title>
|
||||||
<v-list-item-content>
|
Interface configuration hooks
|
||||||
<v-list-item-title class="headline">Interface configuration hooks</v-list-item-title>
|
</v-card-title>
|
||||||
</v-list-item-content>
|
|
||||||
</v-list-item>
|
|
||||||
<div class="d-flex flex-no-wrap justify-space-between">
|
<div class="d-flex flex-no-wrap justify-space-between">
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
@ -190,6 +192,7 @@
|
|||||||
...mapGetters({
|
...mapGetters({
|
||||||
server: 'server/server',
|
server: 'server/server',
|
||||||
config: 'server/config',
|
config: 'server/config',
|
||||||
|
clients: 'client/clients',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -204,6 +207,19 @@
|
|||||||
updateServer: 'update',
|
updateServer: 'update',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
...mapActions('client', {
|
||||||
|
updateClient: 'update',
|
||||||
|
}),
|
||||||
|
|
||||||
|
applyGlobals(){
|
||||||
|
this.update()
|
||||||
|
|
||||||
|
this.clients.forEach(client => {
|
||||||
|
client.allowedips = this.server.allowedips
|
||||||
|
this.updateClient(client)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
// convert int values
|
// convert int values
|
||||||
this.server.listenPort = parseInt(this.server.listenPort, 10);
|
this.server.listenPort = parseInt(this.server.listenPort, 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user