diff --git a/core/scripts/webpanel/templates/index.html b/core/scripts/webpanel/templates/index.html index 1f966ab..15c648c 100644 --- a/core/scripts/webpanel/templates/index.html +++ b/core/scripts/webpanel/templates/index.html @@ -15,7 +15,6 @@
-
@@ -55,27 +54,46 @@
-
+
- Download / Upload Speed - -- / -- + Network Speed +
+ 🔽 Download: -- + 🔼 Upload: -- +
-
+
- TCP / UDP Connections - -- / -- + Active Connections +
+ TCP: -- + UDP: -- +
+
+
+
+
+
+ +
+ Server IPs + + +
+ IPv4: -- + IPv6: -- +
-
@@ -121,7 +139,6 @@
-
@@ -178,22 +195,23 @@ fetch('{{ url_for("server_status_api") }}') .then(response => response.json()) .then(data => { - // Core Stats document.getElementById('cpu-usage').textContent = data.cpu_usage; document.getElementById('ram-usage').textContent = `${data.ram_usage} / ${data.total_ram}`; document.getElementById('online-users').textContent = data.online_users; document.getElementById('uptime').textContent = data.uptime; - // Network Stats - document.getElementById('network-speed').innerHTML = `🔽 ${data.download_speed} / 🔼 ${data.upload_speed}`; - document.getElementById('network-connections').textContent = `${data.tcp_connections} / ${data.udp_connections}`; + document.getElementById('server-ipv4').textContent = `IPv4: ${data.server_ipv4 || 'N/A'}`; + document.getElementById('server-ipv6').textContent = `IPv6: ${data.server_ipv6 || 'N/A'}`; + + document.getElementById('download-speed').textContent = `🔽 Download: ${data.download_speed}`; + document.getElementById('upload-speed').textContent = `🔼 Upload: ${data.upload_speed}`; + document.getElementById('tcp-connections').textContent = `TCP: ${data.tcp_connections}`; + document.getElementById('udp-connections').textContent = `UDP: ${data.udp_connections}`; - // Traffic Since Reboot document.getElementById('reboot-uploaded-traffic').textContent = data.reboot_uploaded_traffic; document.getElementById('reboot-downloaded-traffic').textContent = data.reboot_downloaded_traffic; document.getElementById('reboot-total-traffic').textContent = data.reboot_total_traffic; - // User Traffic (All Time) document.getElementById('user-uploaded-traffic').textContent = data.user_uploaded_traffic; document.getElementById('user-downloaded-traffic').textContent = data.user_downloaded_traffic; document.getElementById('user-total-traffic').textContent = data.user_total_traffic; @@ -234,6 +252,16 @@ updateServiceStatuses(); setInterval(updateServerInfo, 2000); setInterval(updateServiceStatuses, 10000); + + const toggleIpBtn = document.getElementById('toggle-ip-visibility'); + const ipAddressesDiv = document.getElementById('ip-addresses'); + toggleIpBtn.addEventListener('click', function(e) { + e.preventDefault(); + const isBlurred = ipAddressesDiv.style.filter === 'blur(5px)'; + ipAddressesDiv.style.filter = isBlurred ? 'none' : 'blur(5px)'; + toggleIpBtn.querySelector('i').classList.toggle('fa-eye'); + toggleIpBtn.querySelector('i').classList.toggle('fa-eye-slash'); + }); }); {% endblock %} \ No newline at end of file