|
|
@ -36,10 +36,13 @@ new Vue({ |
|
|
clientDelete: null, |
|
|
clientDelete: null, |
|
|
clientCreate: null, |
|
|
clientCreate: null, |
|
|
clientCreateName: '', |
|
|
clientCreateName: '', |
|
|
|
|
|
clientCreateAllowedIps: '', |
|
|
clientEditName: null, |
|
|
clientEditName: null, |
|
|
clientEditNameId: null, |
|
|
clientEditNameId: null, |
|
|
clientEditAddress: null, |
|
|
clientEditAddress: null, |
|
|
clientEditAddressId: null, |
|
|
clientEditAddressId: null, |
|
|
|
|
|
clientEditAllowIPS: null, |
|
|
|
|
|
clientEditAllowIPSId: null, |
|
|
qrcode: null, |
|
|
qrcode: null, |
|
|
|
|
|
|
|
|
currentRelease: null, |
|
|
currentRelease: null, |
|
|
@ -208,9 +211,10 @@ new Vue({ |
|
|
}, |
|
|
}, |
|
|
createClient() { |
|
|
createClient() { |
|
|
const name = this.clientCreateName; |
|
|
const name = this.clientCreateName; |
|
|
|
|
|
const allowedGWIPs = this.clientCreateAllowedIps; |
|
|
if (!name) return; |
|
|
if (!name) return; |
|
|
|
|
|
|
|
|
this.api.createClient({ name }) |
|
|
this.api.createClient({ name, allowedGWIPs }) |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
}, |
|
|
}, |
|
|
@ -239,6 +243,11 @@ new Vue({ |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
}, |
|
|
}, |
|
|
|
|
|
updateClientAllowIPS(client, allowedGWIPs) { |
|
|
|
|
|
this.api.updateClientAllowIPS({ clientId: client.id, allowedGWIPs }) |
|
|
|
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
|
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
filters: { |
|
|
filters: { |
|
|
bytes, |
|
|
bytes, |
|
|
|