From 4d2366b5c99d34ec46ffe4cb2ca147555223d6bf Mon Sep 17 00:00:00 2001 From: donpat1to Date: Wed, 30 Jul 2025 12:20:19 +0200 Subject: [PATCH] beinahe suizidiert --- Watcher/ViewModels/ServerDetailsViewModel.cs | 15 ---- Watcher/Views/Server/_ServerCard.cshtml | 32 ++----- Watcher/Views/Server/_ServerDetails.cshtml | 87 +++++--------------- Watcher/Views/Server/overview.cshtml | 7 +- 4 files changed, 30 insertions(+), 111 deletions(-) diff --git a/Watcher/ViewModels/ServerDetailsViewModel.cs b/Watcher/ViewModels/ServerDetailsViewModel.cs index 58b5633..34047e9 100644 --- a/Watcher/ViewModels/ServerDetailsViewModel.cs +++ b/Watcher/ViewModels/ServerDetailsViewModel.cs @@ -1,5 +1,3 @@ - - using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -28,7 +26,6 @@ public class ServerDetailsViewModel public int CpuCores { get; set; } = 0; public string? GpuType { get; set; } = string.Empty; public double RamSize { get; set; } = 0; - public string? DiskSpace { get; set; } = string.Empty; // Database @@ -39,16 +36,4 @@ public class ServerDetailsViewModel public DateTime LastSeen { get; set; } public Boolean IsVerified { get; set; } = false; - - // Display Properties for View - public string DisplayCpuType => !string.IsNullOrWhiteSpace(CpuType) ? CpuType : "-"; - public string DisplayCpuCores => CpuCores > 0 ? CpuCores.ToString() : "-"; - public string DisplayGpuType => !string.IsNullOrWhiteSpace(GpuType) ? GpuType : "-"; - public string DisplayRamSize => RamSize > 0 ? $"{RamSize} GB" : "-"; - //public string DisplayDiskSpace => !string.IsNullOrWhiteSpace(DiskSpace) ? DiskSpace : "-"; - public string DisplayCreatedAt => CreatedAt.ToLocalTime().ToString("dd.MM.yyyy HH:mm"); - public string DisplayLastSeen => LastSeen.ToLocalTime().ToString("dd.MM.yyyy HH:mm"); - public string StatusBadgeClass => IsOnline ? "bg-success" : "bg-danger"; - public string StatusIcon => IsOnline ? "bi-check-circle" : "bi-x-circle"; - public string StatusText => IsOnline ? "Online" : "Offline"; } \ No newline at end of file diff --git a/Watcher/Views/Server/_ServerCard.cshtml b/Watcher/Views/Server/_ServerCard.cshtml index 7360d85..c1d557b 100644 --- a/Watcher/Views/Server/_ServerCard.cshtml +++ b/Watcher/Views/Server/_ServerCard.cshtml @@ -4,13 +4,12 @@
@foreach (var s in Model) { -
+
\ No newline at end of file diff --git a/Watcher/Views/Server/_ServerDetails.cshtml b/Watcher/Views/Server/_ServerDetails.cshtml index f0dce0c..089c3e1 100644 --- a/Watcher/Views/Server/_ServerDetails.cshtml +++ b/Watcher/Views/Server/_ServerDetails.cshtml @@ -2,84 +2,42 @@ -
RAM Last
-
- -
-
\ No newline at end of file diff --git a/Watcher/Views/Server/overview.cshtml b/Watcher/Views/Server/overview.cshtml index ce47486..ab41c7d 100644 --- a/Watcher/Views/Server/overview.cshtml +++ b/Watcher/Views/Server/overview.cshtml @@ -7,8 +7,7 @@

Serverübersicht

- + Server hinzufügen
@@ -22,7 +21,7 @@ -} +} \ No newline at end of file