UI Anpassungen
This commit is contained in:
@@ -59,7 +59,8 @@ namespace Watcher.Controllers
|
||||
Containers = await _context.Containers
|
||||
.OrderBy(s => s.Name)
|
||||
.ToListAsync(),
|
||||
NetworkStatus = _DashboardStore.NetworkStatus
|
||||
NetworkStatus = _DashboardStore.NetworkStatus,
|
||||
DatabaseStatus = _DashboardStore.DatabaseStatus
|
||||
};
|
||||
//ViewBag.NetworkConnection = _NetworkCheckStore.NetworkStatus;
|
||||
return View(viewModel);
|
||||
@@ -92,7 +93,8 @@ namespace Watcher.Controllers
|
||||
Containers = await _context.Containers
|
||||
.OrderBy(s => s.Name)
|
||||
.ToListAsync(),
|
||||
NetworkStatus = _DashboardStore.NetworkStatus
|
||||
NetworkStatus = _DashboardStore.NetworkStatus,
|
||||
DatabaseStatus = _DashboardStore.DatabaseStatus
|
||||
};
|
||||
|
||||
return PartialView("_DashboardStats", model);
|
||||
|
@@ -16,7 +16,7 @@ public class DatabaseCheck : BackgroundService
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
var timer = new PeriodicTimer(TimeSpan.FromSeconds(1800));
|
||||
var timer = new PeriodicTimer(TimeSpan.FromSeconds(30));
|
||||
|
||||
while (await timer.WaitForNextTickAsync(stoppingToken))
|
||||
{
|
||||
|
@@ -15,6 +15,7 @@ namespace Watcher.ViewModels
|
||||
public List<Container> Containers { get; set; } = new();
|
||||
|
||||
public String? NetworkStatus { get; set; } = "?";
|
||||
public String? DatabaseStatus { get; set; } = "?";
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -81,10 +81,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span>Datenbank</span>
|
||||
<span class="badge bg-success">OK</span>
|
||||
</div>
|
||||
@if (!Model.DatabaseStatus.IsNullOrEmpty())
|
||||
{
|
||||
@if (Model.DatabaseStatus == "$ok")
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span>Datenbank</span>
|
||||
<span class="badge bg-success">OK</span>
|
||||
</div>
|
||||
} else
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span>Datenbank</span>
|
||||
<span class="badge bg-danger">Big Problem</span>
|
||||
</div>
|
||||
}
|
||||
} else
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span>Datenbank</span>
|
||||
|
||||
<span class="badge bg-primary">Missing Data</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div class="progress mb-3" style="height: 6px;">
|
||||
<div class="progress-bar bg-success w-100"></div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user