aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/stats.pug22
-rw-r--r--views/stylesheets/statsview.css56
2 files changed, 78 insertions, 0 deletions
diff --git a/views/stats.pug b/views/stats.pug
new file mode 100644
index 000000000..54c017e70
--- /dev/null
+++ b/views/stats.pug
@@ -0,0 +1,22 @@
+extends ./layout
+
+block content
+ style
+ include ./stylesheets/authentication.css
+ include ./stylesheets/statsview.css
+ .outermost
+ .stats-container
+ h1 Dash Stats
+ p(class="stats-content") Current Connections: #{numConnections}
+ div(class="stats-content stats-server-status-container")
+ p Server Status:
+ div(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
+
+
+ \ No newline at end of file
diff --git a/views/stylesheets/statsview.css b/views/stylesheets/statsview.css
new file mode 100644
index 000000000..c018bedfc
--- /dev/null
+++ b/views/stylesheets/statsview.css
@@ -0,0 +1,56 @@
+.outermost {
+ background-color: #251f1f;
+ display: flex;
+ flex-direction: row;
+ height: 98vh;
+ width: 99vw;
+ justify-content: center;
+ position: relative;
+}
+
+.stats-container {
+ background-color: white;
+
+ padding: 1rem;
+ width: 80vw;
+ border-radius: 8px;
+}
+
+.stats-content {
+ font-size: 1.25em;
+
+}
+
+.stats-server-status-container {
+ display: flex;
+ flex-direction: row;
+}
+
+.stats-server-status-item {
+ margin-left: 0.25rem;
+ padding: 0px 5px;
+
+ border-radius: 3px;
+ width: 8rem;
+ text-align: center;
+}
+
+.stats-server-status-0 {
+ /* not busy */
+ border: 3px green solid;
+}
+
+.stats-server-status-1 {
+ /* busy */
+ border: 3px #ffcc00 solid;
+}
+
+.stats-server-status-2 {
+ /* very busy */
+ border: 3px red solid;
+}
+
+.stats-connected-users {
+ max-height: 70vh;
+ overflow-y: auto;
+} \ No newline at end of file