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:
Sas Swart
2025-01-24 07:37:46 +00:00
parent 45afcc668a
commit bf9e0a4749
23 changed files with 724 additions and 110 deletions

View File

@ -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;