Skip to content

Commit 8faed95

Browse files
committed
fix: url glitch on new environment page
- url was not displayed in the env page until the rest client was connected - but we don't need to wait for the rest client to connect, the url is already available from settings
1 parent b031c65 commit 8faed95

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteEnvironment.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ class CoderRemoteEnvironment(
3030
private var agent: WorkspaceAgent,
3131
private var cs: CoroutineScope,
3232
) : AbstractRemoteProviderEnvironment() {
33+
private var status = WorkspaceAndAgentStatus.from(workspace, agent)
34+
3335
private val ui: ToolboxUi = serviceLocator.getService(ToolboxUi::class.java)
3436
override fun getId(): String = "${workspace.name}.${agent.name}"
3537
override fun getName(): String = "${workspace.name}.${agent.name}"
36-
private var status = WorkspaceAndAgentStatus.from(workspace, agent)
3738

3839
init {
3940
actionsList.add(

src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class CoderRemoteProvider(
211211
* Just displays the deployment URL at the moment, but we could use this as
212212
* a form for creating new environments.
213213
*/
214-
override fun getNewEnvironmentUiPage(): UiPage = NewEnvironmentPage(client?.url?.toString())
214+
override fun getNewEnvironmentUiPage(): UiPage = NewEnvironmentPage(getDeploymentURL()?.first)
215215

216216
/**
217217
* We always show a list of environments.

0 commit comments

Comments
 (0)