mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
feat(site): add presets to workspace creation page
* Add frontend components to pick a preset * Add api endpoints to list presets and fetch their parameters * update database queries based on new insights about how the frontend uses presets
This commit is contained in:
@ -25,21 +25,18 @@ WHERE
|
||||
|
||||
-- name: GetPresetByWorkspaceBuildID :one
|
||||
SELECT
|
||||
template_version_presets.id,
|
||||
template_version_presets.name,
|
||||
template_version_presets.created_at
|
||||
template_version_presets.*
|
||||
FROM
|
||||
workspace_builds
|
||||
INNER JOIN template_version_presets ON workspace_builds.template_version_preset_id = template_version_presets.id
|
||||
template_version_presets
|
||||
INNER JOIN workspace_builds ON workspace_builds.template_version_preset_id = template_version_presets.id
|
||||
WHERE
|
||||
workspace_builds.id = @workspace_build_id;
|
||||
|
||||
-- name: GetPresetParametersByPresetID :many
|
||||
-- name: GetPresetParametersByTemplateVersionID :many
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
value
|
||||
template_version_preset_parameters.*
|
||||
FROM
|
||||
template_version_preset_parameters
|
||||
INNER JOIN template_version_presets ON template_version_preset_parameters.template_version_preset_id = template_version_presets.id
|
||||
WHERE
|
||||
template_version_preset_id = @template_version_preset_id;
|
||||
template_version_presets.template_version_id = @template_version_id;
|
||||
|
Reference in New Issue
Block a user