web: show how long a line has been out of contact
The Backend now keeps the time since a link's control layer was last up, because retries move the control state in and out of backoff and its own timestamp keeps resetting. The overview exposes it as control_down_since and the card shows it next to the lost-contact notice.
This commit is contained in:
1 parent
5245f03a78
commit
57acecdb86
7 files changed
+41
-8
No files matched your search
@@ -53,7 +53,7 @@ public static class Mappers
|
||||
QuicState.Retrying => "retry_wait",
|
||||
QuicState.Idle => "idle",
|
||||
_ => "connecting",
|
||||
}, quic.RetryAttempt, quic.RetryInMs, ControlStateName(link.Control.State));
|
||||
}, quic.RetryAttempt, quic.RetryInMs, ControlStateName(link.Control.State), Time(snapshot.DownSinceMs));
|
||||
}
|
||||
|
||||
private static string ControlStateName(ControlState state) => state switch
|
||||
|
||||
@@ -52,7 +52,8 @@ public sealed record QuicLineHealthDto(
|
||||
string State = "connecting",
|
||||
int RetryAttempt = 0,
|
||||
long? RetryInMs = null,
|
||||
string ControlState = "dialing");
|
||||
string ControlState = "dialing",
|
||||
DateTimeOffset? ControlDownSince = null);
|
||||
|
||||
public sealed record OverviewDto(string Range, DateTimeOffset From, DateTimeOffset To, string Step, string Source, bool Degraded, IReadOnlyList<OverviewLineDto> Lines);
|
||||
|
||||
|
||||
Reference in new issue
Block a user