Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11b59c7

Browse files
committed
Update SSH command format to "workspace.coder"
Refactor the workspace SSH command syntax across the project to use the"workspace.coder" format instead of "coder.workspace". This standardizesthe SSH host entries for better consistency and clarity.- Adjust command strings in configuration, documentation, and UI components- Ensure alignment between code examples and actual command usage
1 parentca8660c commit11b59c7

File tree

14 files changed

+33
-26
lines changed

14 files changed

+33
-26
lines changed

‎cli/configssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (r *RootCmd) configSSH() *serpent.Command {
235235
cmd:=&serpent.Command{
236236
Annotations:workspaceCommand,
237237
Use:"config-ssh",
238-
Short:"Add an SSH Host entry for your workspaces\"sshcoder.workspace\"",
238+
Short:"Add an SSH Host entry for your workspaces\"ssh workspace.coder\"",
239239
Long:FormatExamples(
240240
Example{
241241
Description:"You can use -o (or --ssh-option) so set SSH options to be used for all your workspaces",

‎cli/testdata/coder_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SUBCOMMANDS:
1818
completion Install or update shell completion scripts for the
1919
detected or chosen shell.
2020
config-ssh Add an SSH Host entry for your workspaces "ssh
21-
coder.workspace"
21+
workspace.coder"
2222
create Create a workspace
2323
delete Delete a workspace
2424
dotfiles Personalize your workspace by applying a canonical

‎cli/testdata/coder_config-ssh_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ coder v0.0.0-devel
33
USAGE:
44
coder config-ssh [flags]
55

6-
Add an SSH Host entry for your workspaces "sshcoder.workspace"
6+
Add an SSH Host entry for your workspaces "ssh workspace.coder"
77

88
- You can use -o (or --ssh-option) so set SSH options to be used for all
99
your

‎docs/admin/networking/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In order for clients to be able to establish direct connections:
4444
`coder port-forward`). Note that the
4545
[VSCode extension](https://marketplace.visualstudio.com/items?itemName=coder.coder-remote)
4646
and[JetBrains Plugin](https://plugins.jetbrains.com/plugin/19620-coder/), and
47-
[`sshcoder.<workspace>`](../../reference/cli/config-ssh.md) all utilize the
47+
[`ssh <workspace>.coder`](../../reference/cli/config-ssh.md) all utilize the
4848
CLI to establish a workspace connection.
4949
- Either the client or workspace agent are able to discover a reachable
5050
`ip:port` of their counterpart. If the agent and client are able to

‎docs/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@
10621062
},
10631063
{
10641064
"title":"config-ssh",
1065-
"description":"Add an SSH Host entry for your workspaces\"sshcoder.workspace\"",
1065+
"description":"Add an SSH Host entry for your workspaces\"ssh workspace.coder\"",
10661066
"path":"reference/cli/config-ssh.md"
10671067
},
10681068
{

‎docs/reference/cli/config-ssh.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/cli/index.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/tutorials/testing-templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
coder create -t $TEMPLATE_NAME --template-version ${{ steps.name.outputs.version_name }} test-${{ steps.name.outputs.version_name }} --yes
106106
coder config-ssh --yes
107107
# run some example commands
108-
sshcoder.test-${{ steps.name.outputs.version_name }} -- make build
108+
ssh test-${{ steps.name.outputs.version_name }}.coder -- make build
109109
110110
-name:Delete the test workspace
111111
if:always()

‎docs/user-guides/workspace-access/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ successful, you'll see the following message:
6969
You should now be able to ssh into your workspace.
7070
For example, try running:
7171
72-
$ sshcoder.<workspaceName>
72+
$ ssh <workspaceName>.coder
7373
```
7474

75-
Your workspace is now accessible via`sshcoder.<workspace_name>`
76-
(for example,`sshcoder.myEnv` if your workspace is named`myEnv`).
75+
Your workspace is now accessible via`ssh <workspace_name>.coder`
76+
(for example,`ssh myEnv.coder` if your workspace is named`myEnv`).
7777

7878
##Visual Studio Code
7979

‎site/src/modules/resources/AgentRow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface AgentRowProps {
4848
workspace:Workspace;
4949
showApps:boolean;
5050
showBuiltinApps?:boolean;
51-
sshPrefix?:string;
51+
sshSuffix?:string;
5252
hideSSHButton?:boolean;
5353
hideVSCodeDesktopButton?:boolean;
5454
serverVersion:string;
@@ -70,7 +70,7 @@ export const AgentRow: FC<AgentRowProps> = ({
7070
serverAPIVersion,
7171
onUpdateAgent,
7272
storybookAgentMetadata,
73-
sshPrefix,
73+
sshSuffix,
7474
})=>{
7575
// Apps visibility
7676
constvisibleApps=agent.apps.filter((app)=>!app.hidden);
@@ -207,7 +207,7 @@ export const AgentRow: FC<AgentRowProps> = ({
207207
<AgentSSHButton
208208
workspaceName={workspace.name}
209209
agentName={agent.name}
210-
sshPrefix={sshPrefix}
210+
sshSuffix={sshSuffix}
211211
/>
212212
)}
213213
{proxy.preferredWildcardHostname!==""&&

‎site/src/modules/resources/SSHButton/SSHButton.stories.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ export const Closed: Story = {
1616
args:{
1717
workspaceName:MockWorkspace.name,
1818
agentName:MockWorkspaceAgent.name,
19-
sshPrefix:"coder.",
19+
sshSuffix:"coder",
2020
},
2121
};
2222

2323
exportconstOpened:Story={
2424
args:{
2525
workspaceName:MockWorkspace.name,
2626
agentName:MockWorkspaceAgent.name,
27-
sshPrefix:"coder.",
27+
sshSuffix:"coder",
2828
},
2929
play:async({ canvasElement})=>{
3030
constcanvas=within(canvasElement);
@@ -33,3 +33,11 @@ export const Opened: Story = {
3333
},
3434
decorators:[withDesktopViewport],
3535
};
36+
37+
exportconstWithSuffix:Story={
38+
args:{
39+
workspaceName:MockWorkspace.name,
40+
agentName:MockWorkspaceAgent.name,
41+
sshSuffix:"coder",
42+
},
43+
};

‎site/src/modules/resources/SSHButton/SSHButton.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ import { docs } from "utils/docs";
2020
interfaceAgentSSHButtonProps{
2121
workspaceName:string;
2222
agentName:string;
23-
sshPrefix?:string;
23+
sshSuffix?:string;
2424
}
2525

2626
exportconstAgentSSHButton:FC<AgentSSHButtonProps>=({
2727
workspaceName,
28-
agentName,
29-
sshPrefix,
28+
sshSuffix,
3029
})=>{
3130
constpaper=useClassName(classNames.paper,[]);
3231

@@ -56,7 +55,7 @@ export const AgentSSHButton: FC<AgentSSHButtonProps> = ({
5655
/>
5756
<SSHStep
5857
helpText="Connect to the agent:"
59-
codeExample={`ssh${sshPrefix}${workspaceName}.${agentName}`}
58+
codeExample={`ssh${workspaceName}.${sshSuffix}`}
6059
/>
6160
</Stack>
6261
</ol>

‎site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface WorkspaceProps {
3434
hideSSHButton?:boolean;
3535
hideVSCodeDesktopButton?:boolean;
3636
buildInfo?:TypesGen.BuildInfoResponse;
37-
sshPrefix?:string;
37+
sshSuffix?:string;
3838
buildLogs?:TypesGen.ProvisionerJobLog[];
3939
latestVersion?:TypesGen.TemplateVersion;
4040
timings?:TypesGen.WorkspaceBuildTimings;
@@ -59,7 +59,7 @@ export const Workspace: FC<WorkspaceProps> = ({
5959
hideSSHButton,
6060
hideVSCodeDesktopButton,
6161
buildInfo,
62-
sshPrefix,
62+
sshSuffix,
6363
template,
6464
buildLogs,
6565
latestVersion,
@@ -252,7 +252,7 @@ export const Workspace: FC<WorkspaceProps> = ({
252252
agent={agent}
253253
workspace={workspace}
254254
template={template}
255-
sshPrefix={sshPrefix}
255+
sshSuffix={sshSuffix}
256256
showApps={permissions.updateWorkspace}
257257
showBuiltinApps={permissions.updateWorkspace}
258258
hideSSHButton={hideSSHButton}

‎site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export const WorkspaceReadyPage: FC<WorkspaceReadyPageProps> = ({
6565
mutationFn:API.restartWorkspace,
6666
});
6767

68-
// SSH Prefix
69-
constsshPrefixQuery=useQuery(deploymentSSHConfig());
68+
// SSH Prefix and Suffix
69+
constsshConfigQuery=useQuery(deploymentSSHConfig());
7070

7171
// Favicon
7272
constfavicon=getFaviconByStatus(workspace.latest_build);
@@ -206,7 +206,7 @@ export const WorkspaceReadyPage: FC<WorkspaceReadyPageProps> = ({
206206
hideSSHButton={featureVisibility.browser_only}
207207
hideVSCodeDesktopButton={featureVisibility.browser_only}
208208
buildInfo={buildInfoQuery.data}
209-
sshPrefix={sshPrefixQuery.data?.hostname_prefix}
209+
sshSuffix={sshConfigQuery.data?.hostname_suffix}
210210
template={template}
211211
buildLogs={buildLogs}
212212
timings={timingsQuery.data}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp