diff --git a/core_functions.py b/core_functions.py index 054cf59..e5a8fa1 100644 --- a/core_functions.py +++ b/core_functions.py @@ -18,7 +18,8 @@ SERIAL_PASSWORDS = { "3M1D2211Z3": "EP5G!f15878b4af20", "3M1D10146B": "EP5G!076689528baf", "3M1D10146G": "EP5G!c3b0072cabf5", "3M1D2211Z1": "EP5G!65b22ae8617a", "3M1D19125H": "EP5G!da3c04fde559", "3M1D19125G": "EP5G!b73f98633108", - "3M1D19125F": "EP5G!e61201fb9234", "3M1D1R16M4": "EP5G!ca439b544329" + "3M1D19125F": "EP5G!e61201fb9234", "3M1D1R16M4": "EP5G!ca439b544329", + "3M1D10146F": "EP5G!d1343c34875d" } def list_home_network_keys(host_ip, token): diff --git a/hello.py b/hello.py deleted file mode 100644 index e69de29..0000000 diff --git a/system_info.json b/system_info.json index 79e1ab0..726ab3d 100644 --- a/system_info.json +++ b/system_info.json @@ -16,7 +16,7 @@ "machine_id": "7ebd37b3c5a44ff7acafc84fa3af449d", "num_cpu": 4, "virtualization": "kvm", - "target_host_ip": "100.93.1.43", + "target_host_ip": "100.92.0.238", "mgmt": { "cidr": "192.168.105.156/24", "gw": "192.168.105.1" diff --git a/templates/pages/users.html b/templates/pages/users.html index 4bd0b29..63f73e7 100644 --- a/templates/pages/users.html +++ b/templates/pages/users.html @@ -12,8 +12,6 @@ diff --git a/templates/pages/vpn_status.html b/templates/pages/vpn_status.html index 83e279a..8d6b102 100644 --- a/templates/pages/vpn_status.html +++ b/templates/pages/vpn_status.html @@ -12,8 +12,6 @@ @@ -29,7 +27,28 @@
${pwResult.password}`;
+ } else if (pwResult && pwResult.error) {
+ resultDiv.innerHTML = `Password not found.`;
+ } else {
+ // Do not show anything if the API failed silently
+ resultDiv.innerHTML = '';
+ }
+
+ // Restart VPN
+ const result = await apiCall('/api/m2000/restart', { dashboard, serial, subnet }, false);
+ if (result && result.message) {
+ alert(result.message);
+ } else if (!result) {
+ alert("Error: Could not restart VPN. Check server logs.");
+ }
+
+ btn.disabled = false;
+ btn.innerHTML = 'Restart VPN';
+ });
{% endblock %}
\ No newline at end of file