|
|
|
@ -251,15 +251,15 @@ new Vue({ |
|
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
|
}, |
|
|
|
addNewIP() { |
|
|
|
let address = this.userInputIP.slice(0,4).join('.'); |
|
|
|
let allowedIPs = this.clientEditAllowedIPs.allowedIPs; |
|
|
|
let obj = {type:'ipv4', address, cidr: this.userInputIP[4]}; |
|
|
|
const address = this.userInputIP.slice(0, 4).join('.'); |
|
|
|
const allowedIPs = [...this.clientEditAllowedIPs.allowedIPs]; |
|
|
|
const obj = { type: 'ipv4', address, cidr: this.userInputIP[4] }; |
|
|
|
allowedIPs.push(obj); |
|
|
|
this.clientEditAllowedIPs.allowedIPs = allowedIPs; |
|
|
|
this.userInputIP = [0, 0, 0, 0, 0]; |
|
|
|
}, |
|
|
|
removeIP(index) { |
|
|
|
let allowedIPs = this.clientEditAllowedIPs.allowedIPs; |
|
|
|
const allowedIPs = [...this.clientEditAllowedIPs.allowedIPs]; |
|
|
|
allowedIPs.splice(index, 1); |
|
|
|
this.clientEditAllowedIPs.allowedIPs = allowedIPs; |
|
|
|
}, |
|
|
|
|