From fcee0924f24fed20bff797248baa94ead57426a3 Mon Sep 17 00:00:00 2001 From: quietsy Date: Fri, 14 Jan 2022 13:27:16 +0200 Subject: [PATCH] Replace the icon and title --- root/dashboard/www/icon.svg | 42 ++++++++++++++++++++++++++++++++++++ root/dashboard/www/index.php | 9 +++++--- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 root/dashboard/www/icon.svg diff --git a/root/dashboard/www/icon.svg b/root/dashboard/www/icon.svg new file mode 100644 index 0000000..1d60dcc --- /dev/null +++ b/root/dashboard/www/icon.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Asset 1 + + + + + + + + + + + + + + + + + diff --git a/root/dashboard/www/index.php b/root/dashboard/www/index.php index 8c7d658..bf8031f 100644 --- a/root/dashboard/www/index.php +++ b/root/dashboard/www/index.php @@ -18,7 +18,7 @@ text-align: left; } td { - padding-right: 30px; + padding-right: 20px; } .green-circle { padding: 2px 10px; @@ -157,7 +157,10 @@ } $geodb = file_exists('/config/geoip2db/GeoLite2-City.mmdb') ? '--geoip-database=/config/geoip2db/GeoLite2-City.mmdb' : ''; - $access = shell_exec("goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb); + $goaccess = shell_exec("goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb); $status = GetHeader() . GetProxies() . GetF2B() . GetAnnouncements() . '
'; - echo str_replace("
", $status, $access); + $page = str_replace("
", $status, $goaccess); + $page = str_replace("Server Statistics", "<title>SWAG Dashboard", $page); + $page = preg_replace("/(<link rel='icon' )(.*?)(>)/", "<link rel='icon' type='image/svg+xml' href='/icon.svg'>", $page); + echo $page; ?>