diff --git a/cmd/httpServer.go b/cmd/httpServer.go
index 84c02a2..63de8e3 100644
--- a/cmd/httpServer.go
+++ b/cmd/httpServer.go
@@ -24,6 +24,7 @@ func WebServer() {
r := gin.Default()
LoadHTMLFromEmbedFS(r, templatesFolder, "templates/*.html")
r.StaticFileFS("/style.css", "./templates/style.css", http.FS(templatesFolder))
+ r.StaticFileFS("/htmx.js", "./templates/htmx.js", http.FS(templatesFolder))
r.GET("/", getRoot)
r.Run(":" + WebPort)
}
diff --git a/cmd/templates/index.html b/cmd/templates/index.html
index 883c3c8..a6d4368 100644
--- a/cmd/templates/index.html
+++ b/cmd/templates/index.html
@@ -2,10 +2,12 @@
- AEMET Client
+ Tiamat Dashboard
+
@@ -13,12 +15,12 @@
Hello {{ .UserAgent }}
-
Current clients
+
Current clients
{{ range .Clients }}
- Status |
+ Status |
IP |
Username |
Hostname |
@@ -26,20 +28,25 @@
Actions |
- {{ .PublicIP }} |
- {{ .Username }} |
- {{ .Hostname }} |
- {{ .OperatingSystem }} |
+
+ {{ if .IsOnline }}
+
+ OK
+
+ {{ else }}
+
+ Offline
+
+ {{ end }}
+ |
+ {{ .ClientBasicInfo.PublicIP }} |
+ {{ .ClientBasicInfo.Username }} |
+ {{ .ClientBasicInfo.Hostname }} |
+ {{ .ClientBasicInfo.OperatingSystem }} |
{{ end }}
-
-
-
-
-
-
diff --git a/cmd/templates/style.css b/cmd/templates/style.css
index c9e4858..fef579a 100644
--- a/cmd/templates/style.css
+++ b/cmd/templates/style.css
@@ -37,13 +37,13 @@ td.date {
padding-right: 5px;
}
-cold {
- color: darkcyan;
+on {
+ color: green;
font-weight: 500;
}
-hot {
- color: darkorange;
+off {
+ color: red;
font-weight: 500;
}