File tree Expand file tree Collapse file tree 5 files changed +8
-15
lines changed
src/main/kotlin/com/coder/toolbox Expand file tree Collapse file tree 5 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -362,9 +362,8 @@ storage paths. The options can be configured from the plugin's main Workspaces p
362362
363363- ` lastDeploymentURL ` the last Coder deployment URL that Coder Toolbox successfully authenticated to.
364364
365- - ` workspaceCreatePath ` specifies the dashboard page’s relative path (to ` lastDeploymentURL ` ) or full URL where users
366- can create new workspaces. Helpful for customers that have their own in-house dashboards. Defaults to ` /templates ` if
367- missing.
365+ - ` workspaceCreateUrl ` specifies the dashboard page full URL where users can create new workspaces.
366+ Helpful for customers that have their own in-house dashboards. Defaults to the Coder deployment templates page.
368367
369368### TLS settings
370369
Original file line number Diff line number Diff line change @@ -224,13 +224,7 @@ class CoderRemoteProvider(
224224 override val additionalPluginActions: StateFlow <List <ActionDescription >> = MutableStateFlow (
225225 listOf (
226226 Action (context, " Create workspace" ) {
227- val wsCreatePath = context.settingsStore.workspaceCreatePath
228- val url = if (wsCreatePath.startsWith(" http://" ) || wsCreatePath.startsWith(" https://" )) {
229- wsCreatePath
230- } else {
231- client?.url?.withPath(wsCreatePath).toString()
232- }
233-
227+ val url = context.settingsStore.workspaceCreateUrl ? : client?.url?.withPath(" /templates" ).toString()
234228 context.desktop.browse(url) {
235229 context.ui.showErrorInfoPopup(it)
236230 }
Original file line number Diff line number Diff line change @@ -138,9 +138,9 @@ interface ReadOnlyCoderSettings {
138138 val sshConfigOptions: String?
139139
140140 /* *
141- * A relative path or full URL to the dashboard page used for creating workspaces.
141+ * A custom full URL to the dashboard page used for creating workspaces.
142142 */
143- val workspaceCreatePath : String
143+ val workspaceCreateUrl : String?
144144
145145 /* *
146146 * The path where network information for SSH hosts are stored
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ class CoderSettingsStore(
8080 .normalize()
8181 .toString()
8282
83- override val workspaceCreatePath : String
84- get() = store[WORKSPACE_CREATE_PATH ] ? : " /templates "
83+ override val workspaceCreateUrl : String?
84+ get() = store[WORKSPACE_CREATE_URL ]
8585
8686 /* *
8787 * Where the specified deployment should put its data.
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ internal const val SSH_CONFIG_OPTIONS = "sshConfigOptions"
4646
4747internal const val NETWORK_INFO_DIR = " networkInfoDir"
4848
49- internal const val WORKSPACE_CREATE_PATH = " workspaceCreatePath "
49+ internal const val WORKSPACE_CREATE_URL = " workspaceCreateUrl "
5050
5151internal const val SSH_AUTO_CONNECT_PREFIX = " ssh_auto_connect_"
5252
You can’t perform that action at this time.
0 commit comments