Skip to content

Commit 1629a2a

Browse files
authored
chore: sort DERP regions by latencies on workspace page (#9063)
1 parent abe17b1 commit 1629a2a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

site/src/components/Resources/AgentLatency.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ export const AgentLatency: FC<{ agent: WorkspaceAgent }> = ({ agent }) => {
6666
This is the latency overhead on non peer to peer connections. The
6767
first row is the preferred relay.
6868
</HelpTooltipText>
69-
7069
<HelpTooltipText>
7170
<Stack direction="column" spacing={1} className={styles.regions}>
7271
{Object.entries(agent.latency)
73-
.sort(([, a], [, b]) => (a.preferred ? -1 : b.preferred ? 1 : 0))
72+
.sort(([, a], [, b]) => a.latency_ms - b.latency_ms)
7473
.map(([regionName, region]) => (
7574
<Stack
7675
direction="row"

0 commit comments

Comments
 (0)