@page @model EonaCat.LogStack.Status.Pages.IncidentsModel @{ ViewData["Title"] = "Incidents"; ViewData["Page"] = "incidents"; }
Incident History @Model.Incidents.Count total
@if (!Model.Incidents.Any()) {
No incidents recorded - all systems nominal.
} @foreach (var inc in Model.Incidents) { var headerClass = inc.Severity switch { IncidentSeverity.Critical => "down", IncidentSeverity.Major => "warn", _ => "info" }; var statusBadge = inc.Status == IncidentStatus.Resolved ? "badge-up" : "badge-warn";
@inc.Title @inc.Status @inc.Severity
@inc.CreatedAt.ToString("yyyy-MM-dd HH:mm") UTC @if (inc.ResolvedAt.HasValue) { - resolved @inc.ResolvedAt.Value.ToString("yyyy-MM-dd HH:mm") }
@if (!string.IsNullOrEmpty(inc.Body)) {

@inc.Body

} @if (inc.Monitor != null) {
Affected service: @inc.Monitor.Name
} @if (inc.Updates.Any()) {
@foreach (var u in inc.Updates.OrderByDescending(u => u.PostedAt)) {
@u.PostedAt.ToString("yyyy-MM-dd HH:mm") @u.Status
@u.Message
}
}
}