@@ -17,6 +17,7 @@ import com.coder.gateway.services.CoderRecentWorkspaceConnectionsService
17
17
import com.coder.gateway.services.CoderRestClientService
18
18
import com.coder.gateway.services.CoderSettingsService
19
19
import com.coder.gateway.util.humanizeConnectionError
20
+ import com.coder.gateway.util.toURL
20
21
import com.coder.gateway.util.withPath
21
22
import com.coder.gateway.util.withoutNull
22
23
import com.intellij.icons.AllIcons
@@ -305,7 +306,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
305
306
/* *
306
307
* Get valid connections grouped by deployment and workspace.
307
308
*/
308
- private fun getConnectionsByDeployment (filter : Boolean ): Map <URL , Map <String , List <WorkspaceProjectIDE >>> {
309
+ private fun getConnectionsByDeployment (filter : Boolean ): Map <String , Map <String , List <WorkspaceProjectIDE >>> {
309
310
return recentConnectionsService.getAllRecentConnections()
310
311
// Validate and parse connections.
311
312
.mapNotNull {
@@ -319,7 +320,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
319
320
}
320
321
.filter { ! filter || matchesFilter(it) }
321
322
// Group by the deployment.
322
- .groupBy { it.deploymentURL }
323
+ .groupBy { it.deploymentURL.toString() }
323
324
// Group the connections in each deployment by workspace.
324
325
.mapValues { (_, connections) ->
325
326
connections
@@ -373,8 +374,8 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
373
374
try {
374
375
val client = deployment.client
375
376
? : CoderRestClientService (
376
- deploymentURL,
377
- settings.token(deploymentURL)?.first,
377
+ deploymentURL.toURL() ,
378
+ settings.token(deploymentURL.toURL() )?.first,
378
379
)
379
380
380
381
// Delete connections that have no workspace.
@@ -390,7 +391,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
390
391
deployment.items = items
391
392
deployment.error = null
392
393
} catch (e: Exception ) {
393
- val msg = humanizeConnectionError(deploymentURL, settings.requireTokenAuth, e)
394
+ val msg = humanizeConnectionError(deploymentURL.toURL() , settings.requireTokenAuth, e)
394
395
deployment.items = null
395
396
deployment.error = msg
396
397
logger.error(msg, e)
0 commit comments