aboutsummaryrefslogtreecommitdiff
path: root/views/stats.pug
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-17 11:14:59 -0400
committerGitHub <noreply@github.com>2023-04-17 11:14:59 -0400
commit740272abb7fe2f477ee4d53363e04f8c77ed1819 (patch)
tree9b6b59832e9830c9fa9dcb30ad48dcd3163c0e02 /views/stats.pug
parent8127616d06b4db2b29de0b13068810fd19e77b5e (diff)
parentc2ee641e1f6a8003e961d03550aaffeb668f2545 (diff)
Merge pull request #164 from brown-dash/james-server-stats
Server Stats Endpoint and Frontend View
Diffstat (limited to 'views/stats.pug')
-rw-r--r--views/stats.pug30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/stats.pug b/views/stats.pug
new file mode 100644
index 000000000..16c28087e
--- /dev/null
+++ b/views/stats.pug
@@ -0,0 +1,30 @@
+extends ./layout
+
+//- stats.pug is the frontend for the stats page
+block content
+ style
+ include ./stylesheets/authentication.css
+ include ./stylesheets/statsview.css
+ script(src=`http://localhost:4321/socket.io/socket.io.js`)
+ script
+ include ./resources/statsviewcontroller.js
+ script.
+ var socket = io.connect("http://localhost:4321");
+ socket.on("connect", () => console.log("connected to socket"));
+
+ socket.on("a2cf757f-abd7-537b-953e-ef2f4f798f7e", (data) => handleStatsUpdate(data));
+ .outermost
+ .stats-container
+ h1 Dash Stats
+
+ p(class="stats-content" id="connection-count") Current Connections: #{numConnections}
+ div(class="stats-content stats-server-status-container")
+ p Server Status:
+ div(id="stats-traffic-message" class="stats-server-status-item stats-server-status-" + serverTraffic)
+ p #{serverTrafficMessage}
+ div(class="stats-content stats-connected-users")
+ p Connected Users:
+ ul(id="connected-user-list")
+
+
+ \ No newline at end of file