We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent2f5f408 commitabc053bCopy full SHA for abc053b
Coder Desktop/Coder Desktop/VPNMenuState.swift
@@ -18,10 +18,7 @@ struct Agent: Identifiable, Equatable, Comparable {
18
return lhs.wsName.localizedCompare(rhs.wsName)==.orderedAscending
19
}
20
21
- // Choose the shortest hostname, and remove trailing dot if present
22
-varprimaryHost:String?{ fqdns.min(by:{ $0.count< $1.count})
23
-.map{ $0.hasSuffix(".")?String($0.dropLast()): $0}
24
-}
+varprimaryHost:String?{ fqdns.min(by:{ $0.count< $1.count})}
25
26
27
enumAgentStatus:Int,Equatable,Comparable{
@@ -72,7 +69,8 @@ struct VPNMenuState {
72
69
name: agent.name,
73
70
// If last handshake was not within last five minutes, the agent is unhealthy
74
71
status: agent.lastHandshake.date>Date.now.addingTimeInterval(-300)?.okay:.warn,
75
- fqdns: agent.fqdn,
+ // Remove trailing dot if present
+ fqdns: agent.fqdn.map{ $0.hasSuffix(".")?String($0.dropLast()): $0},
76
wsName: wsName,
77
wsID: wsID
78
)