FE+BE: cleanup

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-12-18 17:16:17 +11:00
parent 70c65a17b3
commit 5cd4139d01
11 changed files with 382 additions and 616 deletions

View File

@@ -31,12 +31,6 @@ function getExternalIp() {
// Network
// ----------------------------------------------------------
// ----------------------------------------------------
// Network Stats (General)
// ----------------------------------------------------
// External IP
$externalIp = getExternalIp();
@@ -58,12 +52,9 @@ $network_referer = !empty($_SERVER['HTTP_REFERER'])
// ----------------------------------------------------
// Network Hardware Stats (FAST VERSION)
// Network Hardware Stats
// ----------------------------------------------------
// ----------------------------------------------------
// Network Stats (General)
// ----------------------------------------------------
// External IP
$externalIp = getExternalIp();
@@ -345,12 +336,13 @@ function formatDataSize(bytes) {
function loadInterfaces() {
const apiToken = getSetting("API_TOKEN");
const apiToken = getSetting("API_TOKEN");
const host = window.location.hostname;
const protocol = window.location.protocol;
const port = getSetting("GRAPHQL_PORT");
$.ajax({
url: "http://" + host + ":" + port + "/nettools/interfaces",
url: `${protocol}//${host}:${port}/nettools/interfaces`,
type: "GET",
headers: {
"Authorization": "Bearer " + apiToken,