X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/79ed2176e804ca03dd6555cd58f91770c6f0b042..f2e07243d0746dfbc7fb516c62134d03fd465eb5:/index.php diff --git a/index.php b/index.php index 632580c..ee74214 100644 --- a/index.php +++ b/index.php @@ -1,26 +1,57 @@ query("stats.get", []); ?> +
+

Network Overview

+ +
+Network Overview +/* What if someone wants to add their own stats... */ +Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats); -
+/* This makes sure that a plugin which called the parameter + * by reference can add/update the stats for display here. +*/ +$stats = (object) $array_of_stats; +$userlist = []; +Hook::run(HOOKTYPE_GET_USER_LIST, $userlist); +$num_of_panel_admins = count($userlist); -
-
+?> + +
+ +
+
- - user->record; ?> + +
-

user->total - $stats->user->ulined; ?>

+

@@ -29,22 +60,22 @@ $stats = $rpc->query("stats.get", []);
Users Online
- +
-
+
- +
-

channel->total; ?>

+

@@ -53,20 +84,20 @@ $stats = $rpc->query("stats.get", []);
Channels
- +
-
+
- +
-

user->oper - $stats->user->ulined; ?>

+

@@ -75,22 +106,21 @@ $stats = $rpc->query("stats.get", []);
Opers
- - +
-
+
- +
-

server->total; ?>

+

@@ -99,25 +129,25 @@ $stats = $rpc->query("stats.get", []);
Servers
- +
-
+
-
+
- +
-

server_ban->server_ban; ?>

+

@@ -126,20 +156,20 @@ $stats = $rpc->query("stats.get", []);
Server Bans
- +
-
+
- +
-

server_ban->spamfilter; ?>

+

@@ -148,20 +178,20 @@ $stats = $rpc->query("stats.get", []);
Spamfilter
- +
-
+
- +
-

server_ban->server_ban_exception; ?>

+

@@ -171,33 +201,24 @@ $stats = $rpc->query("stats.get", []);
Server Ban Exceptions
- +
server->ulined) { - $bg = "bg-success"; - - /* honestly can't think of a case where there would actually be only one uline... but... well here we are, worrying over the small stuff =] */ - $user_noun = ($stats->user->ulined == 1) ? "user" : "users"; // use "users" even if 0, sounds better. - $is_are = ($stats->user->ulined == 1) ? "is" : "are"; - $server_noun = ($stats->server->ulined == 1) ? "server" : "servers"; - $tooltip = "There $is_are " . $stats->user->ulined . " U-Lined $user_noun over " . $stats->server->ulined . " U-Lined $server_noun"; - } - else - $bg = "bg-warning"; + $bg = "bg-success"; // FIXME: this isn't dynamic ?> -
+
- +
-

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

+ +

@@ -206,7 +227,7 @@ $stats = $rpc->query("stats.get", []);
Services Online
- +
@@ -215,6 +236,123 @@ $stats = $rpc->query("stats.get", []);
+ + + +
+ +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Accounts
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Plugins
+
+ +
+
+
+
+
+