Browse Source

Update app.js

pull/400/head
wingsman2 4 years ago
committed by GitHub
parent
commit
9212b5244d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/www/js/app.js

11
src/www/js/app.js

@ -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,

Loading…
Cancel
Save