diff --git a/Watcher/Views/Server/_ServerCard.cshtml b/Watcher/Views/Server/_ServerCard.cshtml index 447a6f2..87ecf7d 100644 --- a/Watcher/Views/Server/_ServerCard.cshtml +++ b/Watcher/Views/Server/_ServerCard.cshtml @@ -1,51 +1,169 @@ @model IEnumerable -
-
- @foreach (var s in Model) - { -
-
-
-
-
- (#@s.Id) @s.Name -
- -
-
IP: @s.IPAddress
-
Typ: @s.Type
-
- - - - @(s.IsOnline ? "Online" : "Offline") +
+ @foreach (var server in Model) + { +
+
+
+
+ + @server.Name +
+ + + @(server.IsOnline ? "Online" : "Offline") + +
+
+ +
+
+ IP: + @server.IPAddress +
+
+ Typ: + @server.Type +
+
+ CPU: + @(server.CpuCores > 0 ? $"{server.CpuCores} Cores" : "N/A") +
+
+ RAM: + + @if (server.RamSize > 0) + { + var ramGB = server.RamSize / (1024.0 * 1024.0 * 1024.0); + @($"{ramGB:F1} GB") + } + else + { + N/A + } -
- - - Bearbeiten - - - - Metrics - - -
- -
+
+
+ + @if (server.IsOnline) + { +
+
Aktuelle Last
+
+
+
+ CPU + -- +
+
+
+
+
+
+
+ RAM + -- +
+
+
+
+
+ @if (!string.IsNullOrEmpty(server.GpuType)) + { +
+
+ GPU + -- +
+
+
+
+
+ }
+ } + +
+ + Details + + + + Edit + +
+ +
+
+ +
+
+ } +
+ + \ No newline at end of file diff --git a/Watcher/Views/System/Settings.cshtml b/Watcher/Views/System/Settings.cshtml index aa4b0c5..256016d 100644 --- a/Watcher/Views/System/Settings.cshtml +++ b/Watcher/Views/System/Settings.cshtml @@ -12,107 +12,96 @@ -
+
+

+ Einstellungen +

+ + +
+
+
+ Systemeinformationen +
+
+
+ +
+
+
+ Version +
+
@ServerVersion
+
+ +
+
+ Authentifizierung +
+
@(ViewBag.IdentityProvider ?? "nicht gefunden")
+
+ +
+
+ Datenbank-Engine +
+
@(DbEngine ?? "nicht gefunden")
+
+ + @if (ViewBag.DatabaseSize != null) + { +
+
+ Datenbankgröße +
+
@ViewBag.DatabaseSize
+
+ } +
+ + + @if (DbEngine == "SQLite" || DbEngine == "Microsoft.EntityFrameworkCore.Sqlite") + { +
+
+ Datenbank-Backups +
+
+
+ +
+
+ +
+
+ } + else if (DbEngine == "Microsoft.EntityFrameworkCore.MySQL") + { +
+
+ MySQL Dump aktuell nicht möglich +
+ } + + + @if (TempData["DumpMessage"] != null) + { +
+ @TempData["DumpMessage"] +
+ } + @if (TempData["DumpError"] != null) + { +
+ @TempData["DumpError"] +
+ } +
+
+ -
-

Systemeinformationen

- -
- -
Watcher Version: @ServerVersion
- -
- -
Authentifizierungsmethode: @(ViewBag.IdentityProvider ?? "nicht gefunden")
- - -
- -
Datenbank-Engine: @(DbEngine ?? "nicht gefunden")
- - @if (ViewBag.DatabaseSize != null) - { -
Datenbankgröße: @ViewBag.DatabaseSize
- } - - - @if (DbEngine == "SQLite" || DbEngine == "Microsoft.EntityFrameworkCore.Sqlite") - { -
-
- -
- -
- -
-
- - } - else if (DbEngine == "Microsoft.EntityFrameworkCore.MySQL") - { -

MySQL Dump aktuell nicht möglich

- } - - - @if (TempData["DumpMessage"] != null) - { -
- @TempData["DumpMessage"] -
- } - @if (TempData["DumpError"] != null) - { -
- @TempData["DumpError"] -
- } - -
- -
-

Benachrichtungen

- -

Registrierte E-Mail Adresse: @(ViewBag.mail ?? "nicht gefunden")

- - -
-
-
- Benachrichtigungseinstellungen -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
-
- -
- -
diff --git a/Watcher/wwwroot/css/server-detail.css b/Watcher/wwwroot/css/server-detail.css index 2633530..49c7e4b 100644 --- a/Watcher/wwwroot/css/server-detail.css +++ b/Watcher/wwwroot/css/server-detail.css @@ -14,16 +14,25 @@ .info-label { font-size: 0.85rem; font-weight: 500; - color: var(--color-muted); + color: var(--color-muted) !important; display: flex; align-items: center; } .info-value { font-size: 0.95rem; - color: var(--color-text, #f9feff); font-weight: 400; padding-left: 1.25rem; + color: var(--color-text, #f9feff) !important; +} + +/* All text within info-value should be visible */ +.info-value, +.info-value *, +.info-value span, +.info-value .text-muted, +.info-value .text-success { + color: var(--color-text, #f9feff) !important; } .info-value .text-muted { @@ -44,6 +53,11 @@ font-size: 1rem; } +/* Description and other text-muted paragraphs */ +.card-body p.text-muted { + color: var(--color-text) !important; +} + /* Graph Container */ .graphcontainer { height: 25rem; diff --git a/Watcher/wwwroot/css/server-overview.css b/Watcher/wwwroot/css/server-overview.css index e69de29..dc7ec97 100644 --- a/Watcher/wwwroot/css/server-overview.css +++ b/Watcher/wwwroot/css/server-overview.css @@ -0,0 +1,106 @@ +/* Server Card Styling */ +.server-card { + transition: transform 0.2s ease, box-shadow 0.2s ease; + border: 1px solid rgba(0, 0, 0, 0.125); + background: var(--color-surface); + color: var(--color-text); +} + +.server-card:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; +} + +.server-card .card-header { + background-color: var(--color-bg); + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + padding: 0.75rem 1rem; +} + +.server-card .card-body { + padding: 1rem; +} + +/* Ensure all text in server-card uses light color */ +.server-card, +.server-card * { + color: var(--color-text); +} + +/* Allow Bootstrap badge colors to work */ +.server-card .badge { + color: white; +} + +/* Allow button colors to work */ +.server-card .btn { + color: inherit; +} + +/* Server Info Rows */ +.server-info { + font-size: 0.9rem; +} + +.info-row { + display: flex; + justify-content: space-between; + padding: 0.4rem 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.05); +} + +.info-row:last-child { + border-bottom: none; +} + +.info-label { + color: var(--color-muted); + font-weight: 500; +} + +.info-value { + word-break: break-all; +} + +/* Current Metrics Section */ +.current-metrics h6 { + font-size: 0.9rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.metric-bar-item { + margin-bottom: 0.5rem; +} + +.metric-bar-item:last-child { + margin-bottom: 0; +} + +.progress { + background-color: rgba(255, 255, 255, 0.1); +} + +/* Action Buttons */ +.action-buttons .btn { + font-size: 0.85rem; + padding: 0.4rem 0.6rem; +} + +/* Responsive Adjustments */ +@media (max-width: 768px) { + .action-buttons { + flex-direction: column; + } + + .action-buttons .btn { + width: 100%; + } +} + +/* Badge Styling */ +.badge { + font-size: 0.75rem; + padding: 0.35em 0.65em; +} diff --git a/Watcher/wwwroot/css/settings.css b/Watcher/wwwroot/css/settings.css index 871de0b..c870171 100644 --- a/Watcher/wwwroot/css/settings.css +++ b/Watcher/wwwroot/css/settings.css @@ -1,24 +1,158 @@ -.Settingscontainer { +/* Settings Card Styling - gleicher Stil wie Server Cards */ +.settings-card { + background: var(--color-surface); + border: 1px solid rgba(255, 255, 255, 0.1); + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.settings-card:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; +} + +.settings-card .card-header { + background-color: var(--color-bg); + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + padding: 0.75rem 1rem; +} + +.settings-card .card-header h5 { + color: var(--color-text); + font-weight: 600; + font-size: 1rem; +} + +.settings-card .card-body { + padding: 1rem; +} + +/* Info Table Layout - ähnlich wie Server Info Rows */ +.info-table { display: flex; + flex-direction: column; + gap: 0; +} + +.info-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.75rem; + border-bottom: 1px solid rgba(255, 255, 255, 0.05); + transition: background-color 0.2s ease; +} + +.info-row:last-child { + border-bottom: none; +} + +.info-row:hover { + background-color: rgba(255, 255, 255, 0.02); +} + +.info-label { + color: var(--color-muted); + font-weight: 500; + font-size: 0.9rem; + display: flex; + align-items: center; +} + +.info-label i { + color: var(--color-accent); +} + +.info-value { + color: var(--color-text); + font-weight: 600; + font-size: 0.9rem; + text-align: right; +} + +/* Subsection Headers */ +.settings-card h6 { + color: var(--color-text); + font-weight: 600; + font-size: 0.9rem; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +/* Backup Buttons */ +.backup-buttons { + display: flex; + gap: 0.75rem; flex-wrap: wrap; - /* Wichtig: erlaubt Umbruch */ - gap: 1rem; - /* optionaler Abstand */ } -.Settingscontainer>* { - flex: 1 1 calc(50% - 0.5rem); - /* 2 Elemente pro Zeile, inkl. Gap */ - box-sizing: border-box; +.backup-buttons form { + flex: 1; + min-width: 200px; } -.btn-db { - background-color: var(--color-primary); - border: none; +.backup-buttons .btn { + width: 100%; } -.btn-db:hover { - background-color: var(--color-accent); - border: none; +/* Button Styling */ +.settings-card .btn { + font-weight: 500; + font-size: 0.85rem; + padding: 0.5rem 0.75rem; + transition: all 0.2s ease; } +.settings-card .btn-outline-primary { + border-color: var(--color-accent) !important; + color: var(--color-accent) !important; + background-color: transparent !important; +} + +.settings-card .btn-outline-primary:hover { + background-color: var(--color-accent) !important; + border-color: var(--color-accent) !important; + color: white !important; + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); +} + +.settings-card .btn-outline-primary:active, +.settings-card .btn-outline-primary:focus, +.settings-card .btn-outline-primary:focus-visible { + background-color: var(--color-accent) !important; + border-color: var(--color-accent) !important; + color: white !important; +} + +/* HR Styling */ +.settings-card hr { + border-top: 1px solid rgba(255, 255, 255, 0.1); + margin: 1.5rem 0; +} + +/* Alert Styling */ +.alert { + border-radius: 0.375rem; +} + +/* Responsive */ +@media (max-width: 768px) { + .info-row { + flex-direction: column; + align-items: flex-start; + gap: 0.5rem; + padding: 0.75rem; + } + + .info-value { + text-align: left; + } + + .backup-buttons { + flex-direction: column; + } + + .backup-buttons form { + width: 100%; + } +}