mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
chore: sort DERP regions by latencies on workspace page (#9063)
This commit is contained in:
@@ -66,11 +66,10 @@ export const AgentLatency: FC<{ agent: WorkspaceAgent }> = ({ agent }) => {
|
||||
This is the latency overhead on non peer to peer connections. The
|
||||
first row is the preferred relay.
|
||||
</HelpTooltipText>
|
||||
|
||||
<HelpTooltipText>
|
||||
<Stack direction="column" spacing={1} className={styles.regions}>
|
||||
{Object.entries(agent.latency)
|
||||
.sort(([, a], [, b]) => (a.preferred ? -1 : b.preferred ? 1 : 0))
|
||||
.sort(([, a], [, b]) => a.latency_ms - b.latency_ms)
|
||||
.map(([regionName, region]) => (
|
||||
<Stack
|
||||
direction="row"
|
||||
|
||||
Reference in New Issue
Block a user