diff --git a/front/systeminfoNetwork.php b/front/systeminfoNetwork.php index 373e9818..9c0a63d1 100755 --- a/front/systeminfoNetwork.php +++ b/front/systeminfoNetwork.php @@ -100,7 +100,7 @@ echo '
' . lang('Systeminfo_Network_IP') . '
-
' . shell_exec("curl https://ifconfig.co") . '
+
Loading...
' . lang('Systeminfo_Network_IP_Connection') . '
@@ -274,19 +274,35 @@ function renderAvailableIpsTable(allIps, usedIps) { // INIT $(document).ready(function() { + + // available IPs fetchUsedIps(usedIps => { const allIps = inferNetworkRange(usedIps); renderAvailableIpsTable(allIps, usedIps); }); setTimeout(() => { + // Available IPs datatable $('#networkTable').DataTable({ - searching: true, - order: [[0, "desc"]], - initComplete: function(settings, json) { - hideSpinner(); // Called after the DataTable is fully initialized - } - }); + searching: true, + order: [[0, "desc"]], + initComplete: function(settings, json) { + hideSpinner(); // Called after the DataTable is fully initialized + } + }); + + // external IP + $.ajax({ + url: 'https://api64.ipify.org?format=json', + method: 'GET', + timeout: 10000, // 10 seconds timeout + success: function (response) { + $('#external-ip').text(response.ip); + }, + error: function() { + $('#external-ip').text('ERROR'); + } + }); }, 200); });