diff --git a/src/dashboard.py b/src/dashboard.py index b4a5a5f..18b246d 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1983,7 +1983,10 @@ def API_ping_getAllPeersIpAddress(): allowed_ip = p.allowed_ip.replace(" ", "").split(",") parsed = [] for x in allowed_ip: - ip = ipaddress.ip_network(x, strict=False) + try: + ip = ipaddress.ip_network(x, strict=False) + except ValueError as e: + print(f"{p.id} - {c.Name}") if len(list(ip.hosts())) == 1: parsed.append(str(ip.hosts()[0])) endpoint = p.endpoint.replace(" ", "").replace("(none)", "") @@ -2073,7 +2076,7 @@ def API_getDashboardUpdate(): htmlUrl = data.get('html_url') if tagName is not None and htmlUrl is not None: if tagName != DASHBOARD_VERSION: - return ResponseObject(message=f"{tagName} is now avaible for update!", data=htmlUrl) + return ResponseObject(message=f"{tagName} is now available for update!", data=htmlUrl) else: return ResponseObject(message="You're on the latest version") return ResponseObject(False) diff --git a/src/static/app/package.json b/src/static/app/package.json index f6eaf0f..95e0531 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "4.0.2", + "version": "4.1.0", "private": true, "type": "module", "scripts": { diff --git a/src/static/app/src/components/configurationComponents/newPeersComponents/allowedIPsInput.vue b/src/static/app/src/components/configurationComponents/newPeersComponents/allowedIPsInput.vue index e1ac51e..39675d0 100644 --- a/src/static/app/src/components/configurationComponents/newPeersComponents/allowedIPsInput.vue +++ b/src/static/app/src/components/configurationComponents/newPeersComponents/allowedIPsInput.vue @@ -2,9 +2,12 @@ import {fetchGet} from "@/utilities/fetch.js"; import {WireguardConfigurationsStore} from "@/stores/WireguardConfigurationsStore.js"; import {DashboardConfigurationStore} from "@/stores/DashboardConfigurationStore.js"; +import LocaleText from "@/components/text/localeText.vue"; +import {GetLocale} from "@/utilities/locale.js"; export default { name: "allowedIPsInput", + components: {LocaleText}, props: { data: Object, saving: Boolean, @@ -30,6 +33,9 @@ export default { this.availableIp.filter(x => x.includes(this.availableIpSearchString) && !this.data.allowed_ips.includes(x)) : this.availableIp.filter(x => !this.data.allowed_ips.includes(x)) + }, + inputGetLocale(){ + return GetLocale("Enter IP Address/CIDR") } }, methods: { @@ -40,7 +46,7 @@ export default { return true; } this.allowedIpFormatError = true; - this.dashboardStore.newMessage('WGDashboard', 'Allowed IP is invalid', 'danger') + this.dashboardStore.newMessage('WGDashboard', 'Allowed IPs is invalid', 'danger') return false; } }, @@ -63,7 +69,11 @@ export default {