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

Commit1b5f341

Browse files
authored
chore: align active version terminology and link to docs (#14639)
1 parent4f2202f commit1b5f341

File tree

10 files changed

+67
-25
lines changed

10 files changed

+67
-25
lines changed

‎cli/templatecreate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (r *RootCmd) templateCreate() *serpent.Command {
237237
},
238238
{
239239
Flag:"require-active-version",
240-
Description:"Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature.",
240+
Description:"Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature. See https://coder.com/docs/templates/general-settings#require-automatic-updates-enterprise for more details.",
241241
Value:serpent.BoolOf(&requireActiveVersion),
242242
Default:"false",
243243
},

‎cli/templateedit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (r *RootCmd) templateEdit() *serpent.Command {
290290
},
291291
{
292292
Flag:"require-active-version",
293-
Description:"Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature.",
293+
Description:"Requires workspace builds to use the active template version. This setting does not apply to template admins. This is an enterprise-only feature. See https://coder.com/docs/templates/general-settings#require-automatic-updates-enterprise for more details.",
294294
Value:serpent.BoolOf(&requireActiveVersion),
295295
Default:"false",
296296
},

‎cli/testdata/coder_templates_create_--help.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ OPTIONS:
5454
--require-active-version bool (default: false)
5555
Requires workspace builds to use the active template version. This
5656
setting does not apply to template admins. This is an enterprise-only
57-
feature.
57+
feature. See
58+
https://coder.com/docs/templates/general-settings#require-automatic-updates-enterprise
59+
for more details.
5860

5961
--var string-array
6062
Alias of --variable.

‎cli/testdata/coder_templates_edit_--help.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ OPTIONS:
8686
--require-active-version bool (default: false)
8787
Requires workspace builds to use the active template version. This
8888
setting does not apply to template admins. This is an enterprise-only
89-
feature.
89+
feature. See
90+
https://coder.com/docs/templates/general-settings#require-automatic-updates-enterprise
91+
for more details.
9092

9193
-y, --yes bool
9294
Bypass prompts.

‎docs/images/templates/publish.png

-52.6 KB
Loading

‎docs/reference/cli/templates_create.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/templates_edit.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/templates/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ workspaces.
111111
![Building a template](../images/templates/build-template.png)
112112

113113
Select**Publish version**. In the**Publish new version** dialog, make sure
114-
**Promote todefault version** is checked then select**Publish**.
114+
**Promote toactive version** is checked then select**Publish**.
115115

116116
![Publish a template](../images/templates/publish.png)
117117

‎docs/workspaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ manually updated the workspace.
150150

151151
##Updating workspaces
152152

153-
After updating thedefault version of the template that a workspace was created
153+
After updating theactive version of the template that a workspace was created
154154
from, you can update the workspace. Coder will start the workspace with said
155155
version.
156156

‎site/src/pages/TemplateVersionEditorPage/PublishTemplateVersionDialog.tsx

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,25 @@ import type { PublishVersionData } from "pages/TemplateVersionEditorPage/types";
1010
importtype{FC}from"react";
1111
import{getFormHelpers}from"utils/formUtils";
1212
import*asYupfrom"yup";
13+
import{
14+
HelpTooltip,
15+
HelpTooltipContent,
16+
HelpTooltipLink,
17+
HelpTooltipLinksGroup,
18+
HelpTooltipText,
19+
HelpTooltipTitle,
20+
HelpTooltipTrigger,
21+
}from"../../components/HelpTooltip/HelpTooltip";
22+
import{docs}from"../../utils/docs";
1323

1424
exportconstLanguage={
1525
versionNameLabel:"Version name",
1626
messagePlaceholder:"Write a short message about the changes you made...",
17-
defaultCheckboxLabel:"Promote to default version",
27+
defaultCheckboxLabel:"Promote to active version",
28+
activeVersionHelpTitle:"Active versions",
29+
activeVersionHelpText:
30+
"Templates can enforce that the active version be used for all workspaces (enterprise-only)",
31+
activeVersionHelpBody:"Review the documentation",
1832
};
1933

2034
exporttypePublishTemplateVersionDialogProps=DialogProps&{
@@ -88,22 +102,46 @@ export const PublishTemplateVersionDialog: FC<
88102
rows={5}
89103
/>
90104

91-
<FormControlLabel
92-
label={Language.defaultCheckboxLabel}
93-
control={
94-
<Checkbox
95-
size="small"
96-
checked={form.values.isActiveVersion}
97-
onChange={async(e)=>{
98-
awaitform.setFieldValue(
99-
"isActiveVersion",
100-
e.target.checked,
101-
);
102-
}}
103-
name="isActiveVersion"
104-
/>
105-
}
106-
/>
105+
<Stackdirection={"row"}>
106+
<FormControlLabel
107+
label={Language.defaultCheckboxLabel}
108+
control={
109+
<Checkbox
110+
size="small"
111+
checked={form.values.isActiveVersion}
112+
onChange={async(e)=>{
113+
awaitform.setFieldValue(
114+
"isActiveVersion",
115+
e.target.checked,
116+
);
117+
}}
118+
name="isActiveVersion"
119+
/>
120+
}
121+
/>
122+
123+
<HelpTooltip>
124+
<HelpTooltipTrigger/>
125+
126+
<HelpTooltipContent>
127+
<HelpTooltipTitle>
128+
{Language.activeVersionHelpTitle}
129+
</HelpTooltipTitle>
130+
<HelpTooltipText>
131+
{Language.activeVersionHelpText}
132+
</HelpTooltipText>
133+
<HelpTooltipLinksGroup>
134+
<HelpTooltipLink
135+
href={docs(
136+
"/templates/general-settings#require-automatic-updates-enterprise",
137+
)}
138+
>
139+
{Language.activeVersionHelpBody}
140+
</HelpTooltipLink>
141+
</HelpTooltipLinksGroup>
142+
</HelpTooltipContent>
143+
</HelpTooltip>
144+
</Stack>
107145
</FormFields>
108146
</Stack>
109147
</form>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp