web: show how long a line has been out of contact
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/e2e Pipeline failed

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:
justme committed 2026-10-21 17:16:09 +08:00
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);