From: Valerie Pond Date: Thu, 6 Apr 2023 23:50:38 +0000 (+0100) Subject: Overview now displays live stats X-Git-Tag: 0.9~245 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/5616422143594630a6e83ca3efbcb9b8d0cfbffe?hp=f2c7ac010249e5412059257c9b36b3a4e554c0ff Overview now displays live stats The overview will now display live stats updated every second, so you can be sure the numbers you're looking at are current without having to refresh the page. This goes for everything except the Services and Panel Access cards, though I will make these live in the near future. --- diff --git a/api/overview.php b/api/overview.php new file mode 100644 index 0000000..303aba0 --- /dev/null +++ b/api/overview.php @@ -0,0 +1,11 @@ +query("stats.get", []); +echo json_encode($stats); \ No newline at end of file diff --git a/index.php b/index.php index d6ee842..c3acf6a 100644 --- a/index.php +++ b/index.php @@ -37,7 +37,7 @@ $num_of_panel_admins = count($userlist);
-

user->total; ?>

+

user->total; ?>

@@ -61,7 +61,7 @@ $num_of_panel_admins = count($userlist);
-

channel->total; ?>

+

channel->total; ?>

@@ -83,7 +83,7 @@ $num_of_panel_admins = count($userlist);
-

user->oper; ?>

+

user->oper; ?>

@@ -106,7 +106,7 @@ $num_of_panel_admins = count($userlist);
-

server->total; ?>

+

server->total; ?>

@@ -133,7 +133,7 @@ $num_of_panel_admins = count($userlist);
-

server_ban->server_ban; ?>

+

server_ban->server_ban; ?>

@@ -155,7 +155,7 @@ $num_of_panel_admins = count($userlist);
-

server_ban->spamfilter; ?>

+

server_ban->spamfilter; ?>

@@ -177,7 +177,7 @@ $num_of_panel_admins = count($userlist);
-

server_ban->server_ban_exception; ?>

+

server_ban->server_ban_exception; ?>

@@ -213,7 +213,8 @@ $num_of_panel_admins = count($userlist);
-

user->ulined; ?>/server->ulined; ?>

+ +

user->ulined; ?>/server->ulined; ?>

@@ -230,6 +231,31 @@ $num_of_panel_admins = count($userlist); + + + +