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

Commit0672bf5

Browse files
authored
feat: support icon and description in preset (#18977)
## Description This PR adds support for `description` and `icon` fields to`template_version_presets`. These fields will allow displaying richerinformation for presets in the UI, improving the user experience whencreating a workspace.Both fields are optional, non-nullable, and default to empty strings.## Changes* Database migration with the addition of `description VARCHAR(128)` and`icon VARCHAR(256)` columns to the `template_version_presets` table.* Updated the `CreateWorkspacePageView` in the UINote: UI changes will be addressed in a separate PR
1 parent58123e1 commit0672bf5

File tree

24 files changed

+704
-576
lines changed

24 files changed

+704
-576
lines changed

‎cli/testdata/coder_provisioner_list_--output_json.golden‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"last_seen_at": "====[timestamp]=====",
88
"name": "test-daemon",
99
"version": "v0.0.0-devel",
10-
"api_version": "1.7",
10+
"api_version": "1.8",
1111
"provisioners": [
1212
"echo"
1313
],

‎coderd/apidoc/docs.go‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/dbfake/dbfake.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ func (t TemplateVersionBuilder) Do() TemplateVersionResponse {
417417
InvalidateAfterSecs:preset.InvalidateAfterSecs,
418418
SchedulingTimezone:preset.SchedulingTimezone,
419419
IsDefault:false,
420+
Description:preset.Description,
421+
Icon:preset.Icon,
420422
})
421423
}
422424

‎coderd/database/dbgen/dbgen.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,8 @@ func Preset(t testing.TB, db database.Store, seed database.InsertPresetParams) d
13921392
InvalidateAfterSecs:seed.InvalidateAfterSecs,
13931393
SchedulingTimezone:seed.SchedulingTimezone,
13941394
IsDefault:seed.IsDefault,
1395+
Description:seed.Description,
1396+
Icon:seed.Icon,
13951397
})
13961398
require.NoError(t,err,"insert preset")
13971399
returnpreset

‎coderd/database/dump.sql‎

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTERTABLE template_version_presets
2+
DROP COLUMN IF EXISTS description,
3+
DROP COLUMN IF EXISTS icon;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTERTABLE template_version_presets
2+
ADD COLUMN IF NOT EXISTS descriptionVARCHAR(128)NOT NULL DEFAULT'',
3+
ADD COLUMN IF NOT EXISTS iconVARCHAR(256)NOT NULL DEFAULT'';
4+
5+
COMMENT ON COLUMN template_version_presets.description IS'Short text describing the preset (max 128 characters).';
6+
COMMENT ON COLUMN template_version_presets.icon IS'URL or path to an icon representing the preset (max 256 characters).';

‎coderd/database/models.go‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries.sql.go‎

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp