You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -18,7 +19,8 @@ class CoderGatewayConnectionProvider : GatewayConnectionProvider {
18
19
val coderUrl = parameters["coder_url"]
19
20
val workspaceName = parameters["workspace_name"]
20
21
val user = parameters["username"]
21
-
val privateSSHKey = parameters["private_ssh_key"]
22
+
val pass = parameters["password"]
23
+
val token = parameters["session_token"]
22
24
val projectPath = parameters["project_path"]
23
25
24
26
if (coderUrl !=null&& workspaceName !=null) {
@@ -27,16 +29,19 @@ class CoderGatewayConnectionProvider : GatewayConnectionProvider {
27
29
logger.warning("There is already a connection started on ${connection.url} using the workspace ${connection.workspaceId}")
28
30
returnnull
29
31
}
30
-
val url =URL(coderUrl)
31
32
val clientLifetime =LifetimeDefinition()
32
33
val credentials =RemoteCredentialsHolder()
33
34
credentials.apply {
34
35
setHost("coder.${workspaceName}")
35
36
userName = user
36
-
setPrivateKeyFile(privateSSHKey)
37
+
password = pass
37
38
}
38
-
var tcpJoinLink ="jetbrains-gateway://connect#projectPath=${projectPath}&host=${url.host}&port=22&user=${user}&type=ssh&deploy=true&buildNumber=221.5591.52&productCode=IU"
var tcpJoinLink ="jetbrains-gateway://connect#projectPath=${projectPath}&host=coder.${workspaceName}&port=22&user=${user}&token=$token&type=ssh&deploy=true&buildNumber=221.5591.52&productCode=IU"
"coder_url" to URL(wizardModel.loginModel.uriScheme.toString().toLowerCase(), wizardModel.loginModel.host, wizardModel.loginModel.port.toString()).toString(),
111
-
"workspace_name" to workspace.name,
112
-
"username" to coderClient.me.username,
113
-
"private_ssh_key" to privateSSHKey,
114
-
"project_path" to tfProject.text
107
+
GatewayUI.getInstance().connect(
108
+
mapOf(
109
+
"type" to "coder",
110
+
"coder_url" to URL(wizardModel.loginModel.uriScheme.toString().toLowerCase(), wizardModel.loginModel.host, wizardModel.loginModel.port, "").toString(),
111
+
"workspace_name" to workspace.name,
112
+
"username" to coderClient.me.username,
113
+
"password" to wizardModel.loginModel.password!!,
114
+
"session_token" to coderClient.sessionToken,
115
+
"project_path" to tfProject.text
116
+
)
115
117
)
116
-
)
118
+
}
117
119
}
118
120
119
121
}
120
122
121
123
overridefundispose() {
122
124
123
125
}
126
+
127
+
companionobject {
128
+
val logger =Logger.getLogger(CoderWorkspacesStepView::class.java.simpleName)
0 commit comments