fix(overview): expose each health check state in text
This commit is contained in:
@@ -77,8 +77,9 @@
|
||||
@foreach (var entry in Entries)
|
||||
{
|
||||
<div class="check-row">
|
||||
<span class="check-dot @DotClass(entry.Value.Status)"></span>
|
||||
<span class="check-dot @DotClass(entry.Value.Status)" aria-hidden="true"></span>
|
||||
<span class="check-name">@entry.Key</span>
|
||||
<span class="check-state s-@DotClass(entry.Value.Status)">@CheckStatusLabel(entry.Value.Status)</span>
|
||||
<span class="check-desc">@entry.Value.Description</span>
|
||||
</div>
|
||||
}
|
||||
@@ -391,6 +392,12 @@
|
||||
/// </summary>
|
||||
private string? HistorianPoolClass => HistorianPools.Any(p => p.Failures > 0) ? "bad" : null;
|
||||
|
||||
private static string CheckStatusLabel(string? status) => status switch
|
||||
{
|
||||
"Healthy" or "Degraded" or "Unhealthy" => status,
|
||||
_ => "Unknown",
|
||||
};
|
||||
|
||||
private static string DotClass(string? status) => status switch
|
||||
{
|
||||
"Healthy" => "ok",
|
||||
|
||||
Reference in New Issue
Block a user