diff options
| author | Mohammad Amoush <51237606+jameshu111@users.noreply.github.com> | 2023-04-08 16:57:02 -0400 |
|---|---|---|
| committer | Mohammad Amoush <51237606+jameshu111@users.noreply.github.com> | 2023-04-08 16:57:02 -0400 |
| commit | 0a38e3f91f4f85f07fdbb7575ceb678032dcdfe9 (patch) | |
| tree | ab08e92a3e94f4e29a9e4e7bcb36c2b47bbc546c /views/stats.pug | |
| parent | d51a57e1d0823fc08a90b73d427ab5e35b72422f (diff) | |
Clean code and Comments
Diffstat (limited to 'views/stats.pug')
| -rw-r--r-- | views/stats.pug | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/views/stats.pug b/views/stats.pug index 54c017e70..16c28087e 100644 --- a/views/stats.pug +++ b/views/stats.pug @@ -1,22 +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") Current Connections: #{numConnections} + + p(class="stats-content" id="connection-count") Current Connections: #{numConnections} div(class="stats-content stats-server-status-container") p Server Status: - div(class="stats-server-status-item stats-server-status-" + serverTraffic) + 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 - each username in connectedUsers - li(class="none")= username + ul(id="connected-user-list")
\ No newline at end of file |
