Skip to content

Commit a6de12a

Browse files
committed
impl: expose ssh wildcard config in the Settings page
Updated the UI component to allow configuration by the user
1 parent 870b8d3 commit a6de12a

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

src/main/kotlin/com/coder/gateway/CoderSettingsConfigurable.kt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,24 @@ class CoderSettingsConfigurable : BoundConfigurable("Coder") {
120120
CoderGatewayBundle.message("gateway.connector.settings.tls-alt-name.comment"),
121121
)
122122
}.layout(RowLayout.PARENT_GRID)
123-
row(CoderGatewayBundle.message("gateway.connector.settings.disable-autostart.heading")) {
124-
checkBox(CoderGatewayBundle.message("gateway.connector.settings.disable-autostart.title"))
125-
.bindSelected(state::disableAutostart)
126-
.comment(
127-
CoderGatewayBundle.message("gateway.connector.settings.disable-autostart.comment"),
128-
)
129-
}.layout(RowLayout.PARENT_GRID)
123+
group {
124+
row {
125+
cell() // For alignment.
126+
checkBox(CoderGatewayBundle.message("gateway.connector.settings.disable-autostart.title"))
127+
.bindSelected(state::disableAutostart)
128+
.comment(
129+
CoderGatewayBundle.message("gateway.connector.settings.disable-autostart.comment"),
130+
)
131+
}.layout(RowLayout.PARENT_GRID)
132+
row {
133+
cell() // For alignment.
134+
checkBox(CoderGatewayBundle.message("gateway.connector.settings.wildcard-config.title"))
135+
.bindSelected(state::isSshWildcardConfigEnabled)
136+
.comment(
137+
CoderGatewayBundle.message("gateway.connector.settings.wildcard-config.comment"),
138+
)
139+
}.layout(RowLayout.PARENT_GRID)
140+
}
130141
row(CoderGatewayBundle.message("gateway.connector.settings.ssh-config-options.title")) {
131142
textArea().resizableColumn().align(AlignX.FILL)
132143
.bindText(state::sshConfigOptions)

src/main/resources/messages/CoderGatewayBundle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ gateway.connector.settings.tls-alt-name.comment=Optionally set this to \
104104
an alternate hostname used for verifying TLS connections. This is useful \
105105
when the hostname used to connect to the Coder service does not match the \
106106
hostname in the TLS certificate.
107-
gateway.connector.settings.disable-autostart.heading=Autostart
108107
gateway.connector.settings.disable-autostart.title=Disable autostart
109108
gateway.connector.settings.disable-autostart.comment=Checking this box will \
110109
cause the plugin to configure the CLI with --disable-autostart. You must go \
111110
through the IDE selection again for the plugin to reconfigure the CLI with \
112111
this setting.
112+
gateway.connector.settings.wildcard-config.title=Enable SSH wildcard config
113+
gateway.connector.settings.wildcard-config.comment=Enables or disables wildcard \
114+
entries in the SSH configuration, which allows generic rules for matching multiple workspaces
113115
gateway.connector.settings.ssh-config-options.title=SSH config options
114116
gateway.connector.settings.ssh-config-options.comment=Extra SSH config options \
115117
to use when connecting to a workspace. This text will be appended as-is to \

0 commit comments

Comments
 (0)