From 9212b5244db6b12d8561951c81c56717627ba544 Mon Sep 17 00:00:00 2001 From: wingsman2 Date: Mon, 17 Oct 2022 12:29:36 -0400 Subject: [PATCH] Update app.js --- src/www/js/app.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/www/js/app.js b/src/www/js/app.js index e22cbfe0..2ff9e69e 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -36,10 +36,13 @@ new Vue({ clientDelete: null, clientCreate: null, clientCreateName: '', + clientCreateAllowedIps: '', clientEditName: null, clientEditNameId: null, clientEditAddress: null, clientEditAddressId: null, + clientEditAllowIPS: null, + clientEditAllowIPSId: null, qrcode: null, currentRelease: null, @@ -208,9 +211,10 @@ new Vue({ }, createClient() { const name = this.clientCreateName; + const allowedGWIPs = this.clientCreateAllowedIps; if (!name) return; - this.api.createClient({ name }) + this.api.createClient({ name, allowedGWIPs }) .catch(err => alert(err.message || err.toString())) .finally(() => this.refresh().catch(console.error)); }, @@ -239,6 +243,11 @@ new Vue({ .catch(err => alert(err.message || err.toString())) .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: { bytes,