From ab6f99eb6b91a3e0129e28d28f7b429f0164e3dd Mon Sep 17 00:00:00 2001 From: daniel-hbn Date: Sun, 7 Sep 2025 01:08:06 +0200 Subject: [PATCH] UI Overhaul --- Watcher/Views/Container/Overview.cshtml | 4 +- Watcher/Views/Home/Index.cshtml | 3 + Watcher/Views/Home/_DashboardStats.cshtml | 55 +++-------- Watcher/Views/Server/AddServer.cshtml | 4 + Watcher/Views/Server/Details.cshtml | 106 +++++++++++++--------- Watcher/Views/Server/_ServerCard.cshtml | 37 +++----- Watcher/Views/Server/overview.cshtml | 4 +- Watcher/Views/Shared/_Layout.cshtml | 9 +- Watcher/Views/Shared/_Layout.cshtml.css | 53 ----------- Watcher/wwwroot/css/ServerOverview.css | 1 - Watcher/wwwroot/css/main.css | 66 ++++++++++++++ Watcher/wwwroot/css/site.css | 10 +- 12 files changed, 178 insertions(+), 174 deletions(-) delete mode 100644 Watcher/Views/Shared/_Layout.cshtml.css delete mode 100644 Watcher/wwwroot/css/ServerOverview.css create mode 100644 Watcher/wwwroot/css/main.css diff --git a/Watcher/Views/Container/Overview.cshtml b/Watcher/Views/Container/Overview.cshtml index c3b1005..ccae9a4 100644 --- a/Watcher/Views/Container/Overview.cshtml +++ b/Watcher/Views/Container/Overview.cshtml @@ -2,7 +2,9 @@ @{ ViewData["Title"] = "Containerübersicht"; } - + + +
@foreach (var server in Model.Servers) { diff --git a/Watcher/Views/Home/Index.cshtml b/Watcher/Views/Home/Index.cshtml index 08bdad0..f39e9c4 100644 --- a/Watcher/Views/Home/Index.cshtml +++ b/Watcher/Views/Home/Index.cshtml @@ -3,6 +3,9 @@ ViewData["Title"] = "Dashboard"; } + + +

Dashboard

diff --git a/Watcher/Views/Home/_DashboardStats.cshtml b/Watcher/Views/Home/_DashboardStats.cshtml index 91513aa..73d3836 100644 --- a/Watcher/Views/Home/_DashboardStats.cshtml +++ b/Watcher/Views/Home/_DashboardStats.cshtml @@ -1,24 +1,23 @@ @model Watcher.ViewModels.DashboardViewModel + @{ ViewData["Title"] = "Dashboard"; } -
+ + + - -
- + +
+

test

- -
-
Server Online
+
Server Online

@Model.ActiveServers

@@ -27,7 +26,7 @@
-
Server Offline
+
Server Offline

@Model.OfflineServers

@@ -36,7 +35,7 @@
-
Services Running
+
Services Running

@Model.RunningContainers

@@ -45,7 +44,7 @@
-
Service Warnungen
+
Service Warnungen

@Model.FailedContainers

@@ -76,13 +75,6 @@
-
- API - Langsam -
-
-
-
@@ -108,7 +100,7 @@
-
+

Services

    @foreach (var service in Model.Containers) @@ -126,7 +118,7 @@
    -
    +

    Server

      @foreach (var server in Model.Servers) @@ -148,23 +140,6 @@
    -
    -
-@section Scripts { - -} + + \ No newline at end of file diff --git a/Watcher/Views/Server/AddServer.cshtml b/Watcher/Views/Server/AddServer.cshtml index 0b35625..fbecce7 100644 --- a/Watcher/Views/Server/AddServer.cshtml +++ b/Watcher/Views/Server/AddServer.cshtml @@ -3,6 +3,10 @@ ViewData["Title"] = "Neuen Server hinzufügen"; } + + + +

diff --git a/Watcher/Views/Server/Details.cshtml b/Watcher/Views/Server/Details.cshtml index 3b05245..8e91c98 100644 --- a/Watcher/Views/Server/Details.cshtml +++ b/Watcher/Views/Server/Details.cshtml @@ -16,57 +16,75 @@ @(Model.IsOnline ? "Online" : "Offline")

-
-
-
ID
-
@Model.Id
-
IP-Adresse
-
@Model.IPAddress
- -
Typ
-
@Model.Type
- -
Erstellt am
-
@Model.CreatedAt.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
- -
Zuletzt gesehen
-
@Model.LastSeen.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
-
-
- -
-
CPU Last
-
- -
-
+
+
+
ID
+
@Model.Id
-
-
RAM Last
-
- -
-
+
IP-Adresse
+
@Model.IPAddress
-
-
GPU Last
-
- -
+
Typ
+
@Model.Type
+ +
Erstellt am
+
@Model.CreatedAt.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
+ +
Zuletzt gesehen
+
@Model.LastSeen.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
+
+ +
+ +
+
CPU Last
+
+ +
+
+ +
+
RAM Last
+
+ +
+ + +
+
GPU Last
+
+ +
+ diff --git a/Watcher/Views/Server/_ServerCard.cshtml b/Watcher/Views/Server/_ServerCard.cshtml index efc6f42..5d7a087 100644 --- a/Watcher/Views/Server/_ServerCard.cshtml +++ b/Watcher/Views/Server/_ServerCard.cshtml @@ -8,34 +8,24 @@
-
- (#@s.Id) @s.Name +
+ (#@s.Id) @s.Name
+ +
+
IP: @s.IPAddress
+
Typ: @s.Type
+ +
+ + @(s.IsOnline ? "bg-success text-light" : "bg-danger text-light")"> @(s.IsOnline ? "Online" : "Offline")
-
-
-
IP: @s.IPAddress
-
Typ: @s.Type
-
Erstellt: - @s.CreatedAt.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
-
Last-Seen: - @s.LastSeen.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
-
CPU: @(s.CpuType ?? "not found")
-
CPU-Kerne: @s.CpuCores
-
GPU: @(s.GpuType ?? "not found") -
-
RAM: @(s.RamSize)
-
Disk Space: ...
-
-
- -
+
Bearbeiten @@ -46,11 +36,6 @@ Metrics - - Container - -