|
|
|
@@ -13729,7 +13729,7 @@ func (q *sqlQuerier) GetTemplateAverageBuildTime(ctx context.Context, templateID
|
|
|
|
|
|
|
|
|
|
const getTemplateByID = `-- name: GetTemplateByID :one
|
|
|
|
|
SELECT
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, disable_module_cache, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon
|
|
|
|
|
FROM
|
|
|
|
|
template_with_names
|
|
|
|
|
WHERE
|
|
|
|
@@ -13772,6 +13772,7 @@ func (q *sqlQuerier) GetTemplateByID(ctx context.Context, id uuid.UUID) (Templat
|
|
|
|
|
&i.MaxPortSharingLevel,
|
|
|
|
|
&i.UseClassicParameterFlow,
|
|
|
|
|
&i.CorsBehavior,
|
|
|
|
|
&i.DisableModuleCache,
|
|
|
|
|
&i.CreatedByAvatarURL,
|
|
|
|
|
&i.CreatedByUsername,
|
|
|
|
|
&i.CreatedByName,
|
|
|
|
@@ -13784,7 +13785,7 @@ func (q *sqlQuerier) GetTemplateByID(ctx context.Context, id uuid.UUID) (Templat
|
|
|
|
|
|
|
|
|
|
const getTemplateByOrganizationAndName = `-- name: GetTemplateByOrganizationAndName :one
|
|
|
|
|
SELECT
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, disable_module_cache, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon
|
|
|
|
|
FROM
|
|
|
|
|
template_with_names AS templates
|
|
|
|
|
WHERE
|
|
|
|
@@ -13835,6 +13836,7 @@ func (q *sqlQuerier) GetTemplateByOrganizationAndName(ctx context.Context, arg G
|
|
|
|
|
&i.MaxPortSharingLevel,
|
|
|
|
|
&i.UseClassicParameterFlow,
|
|
|
|
|
&i.CorsBehavior,
|
|
|
|
|
&i.DisableModuleCache,
|
|
|
|
|
&i.CreatedByAvatarURL,
|
|
|
|
|
&i.CreatedByUsername,
|
|
|
|
|
&i.CreatedByName,
|
|
|
|
@@ -13846,7 +13848,7 @@ func (q *sqlQuerier) GetTemplateByOrganizationAndName(ctx context.Context, arg G
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getTemplates = `-- name: GetTemplates :many
|
|
|
|
|
SELECT id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon FROM template_with_names AS templates
|
|
|
|
|
SELECT id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, disable_module_cache, created_by_avatar_url, created_by_username, created_by_name, organization_name, organization_display_name, organization_icon FROM template_with_names AS templates
|
|
|
|
|
ORDER BY (name, id) ASC
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
@@ -13890,6 +13892,7 @@ func (q *sqlQuerier) GetTemplates(ctx context.Context) ([]Template, error) {
|
|
|
|
|
&i.MaxPortSharingLevel,
|
|
|
|
|
&i.UseClassicParameterFlow,
|
|
|
|
|
&i.CorsBehavior,
|
|
|
|
|
&i.DisableModuleCache,
|
|
|
|
|
&i.CreatedByAvatarURL,
|
|
|
|
|
&i.CreatedByUsername,
|
|
|
|
|
&i.CreatedByName,
|
|
|
|
@@ -13912,7 +13915,7 @@ func (q *sqlQuerier) GetTemplates(ctx context.Context) ([]Template, error) {
|
|
|
|
|
|
|
|
|
|
const getTemplatesWithFilter = `-- name: GetTemplatesWithFilter :many
|
|
|
|
|
SELECT
|
|
|
|
|
t.id, t.created_at, t.updated_at, t.organization_id, t.deleted, t.name, t.provisioner, t.active_version_id, t.description, t.default_ttl, t.created_by, t.icon, t.user_acl, t.group_acl, t.display_name, t.allow_user_cancel_workspace_jobs, t.allow_user_autostart, t.allow_user_autostop, t.failure_ttl, t.time_til_dormant, t.time_til_dormant_autodelete, t.autostop_requirement_days_of_week, t.autostop_requirement_weeks, t.autostart_block_days_of_week, t.require_active_version, t.deprecated, t.activity_bump, t.max_port_sharing_level, t.use_classic_parameter_flow, t.cors_behavior, t.created_by_avatar_url, t.created_by_username, t.created_by_name, t.organization_name, t.organization_display_name, t.organization_icon
|
|
|
|
|
t.id, t.created_at, t.updated_at, t.organization_id, t.deleted, t.name, t.provisioner, t.active_version_id, t.description, t.default_ttl, t.created_by, t.icon, t.user_acl, t.group_acl, t.display_name, t.allow_user_cancel_workspace_jobs, t.allow_user_autostart, t.allow_user_autostop, t.failure_ttl, t.time_til_dormant, t.time_til_dormant_autodelete, t.autostop_requirement_days_of_week, t.autostop_requirement_weeks, t.autostart_block_days_of_week, t.require_active_version, t.deprecated, t.activity_bump, t.max_port_sharing_level, t.use_classic_parameter_flow, t.cors_behavior, t.disable_module_cache, t.created_by_avatar_url, t.created_by_username, t.created_by_name, t.organization_name, t.organization_display_name, t.organization_icon
|
|
|
|
|
FROM
|
|
|
|
|
template_with_names AS t
|
|
|
|
|
LEFT JOIN
|
|
|
|
@@ -14071,6 +14074,7 @@ func (q *sqlQuerier) GetTemplatesWithFilter(ctx context.Context, arg GetTemplate
|
|
|
|
|
&i.MaxPortSharingLevel,
|
|
|
|
|
&i.UseClassicParameterFlow,
|
|
|
|
|
&i.CorsBehavior,
|
|
|
|
|
&i.DisableModuleCache,
|
|
|
|
|
&i.CreatedByAvatarURL,
|
|
|
|
|
&i.CreatedByUsername,
|
|
|
|
|
&i.CreatedByName,
|
|
|
|
@@ -14256,7 +14260,8 @@ SET
|
|
|
|
|
group_acl = $8,
|
|
|
|
|
max_port_sharing_level = $9,
|
|
|
|
|
use_classic_parameter_flow = $10,
|
|
|
|
|
cors_behavior = $11
|
|
|
|
|
cors_behavior = $11,
|
|
|
|
|
disable_module_cache = $12
|
|
|
|
|
WHERE
|
|
|
|
|
id = $1
|
|
|
|
|
`
|
|
|
|
@@ -14273,6 +14278,7 @@ type UpdateTemplateMetaByIDParams struct {
|
|
|
|
|
MaxPortSharingLevel AppSharingLevel `db:"max_port_sharing_level" json:"max_port_sharing_level"`
|
|
|
|
|
UseClassicParameterFlow bool `db:"use_classic_parameter_flow" json:"use_classic_parameter_flow"`
|
|
|
|
|
CorsBehavior CorsBehavior `db:"cors_behavior" json:"cors_behavior"`
|
|
|
|
|
DisableModuleCache bool `db:"disable_module_cache" json:"disable_module_cache"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (q *sqlQuerier) UpdateTemplateMetaByID(ctx context.Context, arg UpdateTemplateMetaByIDParams) error {
|
|
|
|
@@ -14288,6 +14294,7 @@ func (q *sqlQuerier) UpdateTemplateMetaByID(ctx context.Context, arg UpdateTempl
|
|
|
|
|
arg.MaxPortSharingLevel,
|
|
|
|
|
arg.UseClassicParameterFlow,
|
|
|
|
|
arg.CorsBehavior,
|
|
|
|
|
arg.DisableModuleCache,
|
|
|
|
|
)
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
@@ -22843,7 +22850,7 @@ LEFT JOIN LATERAL (
|
|
|
|
|
) latest_build ON TRUE
|
|
|
|
|
LEFT JOIN LATERAL (
|
|
|
|
|
SELECT
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior
|
|
|
|
|
id, created_at, updated_at, organization_id, deleted, name, provisioner, active_version_id, description, default_ttl, created_by, icon, user_acl, group_acl, display_name, allow_user_cancel_workspace_jobs, allow_user_autostart, allow_user_autostop, failure_ttl, time_til_dormant, time_til_dormant_autodelete, autostop_requirement_days_of_week, autostop_requirement_weeks, autostart_block_days_of_week, require_active_version, deprecated, activity_bump, max_port_sharing_level, use_classic_parameter_flow, cors_behavior, disable_module_cache
|
|
|
|
|
FROM
|
|
|
|
|
templates
|
|
|
|
|
WHERE
|
|
|
|
|