feat: add frontend support for mandating active template version (#10338)

This commit is contained in:
Jon Ayers
2023-10-19 18:21:52 -05:00
committed by GitHub
parent f5f150d568
commit d33526108f
15 changed files with 157 additions and 31 deletions
+3
View File
@@ -11125,6 +11125,9 @@ const docTemplate = `{
"template_name": {
"type": "string"
},
"template_require_active_version": {
"type": "boolean"
},
"ttl_ms": {
"type": "integer"
},
+3
View File
@@ -10091,6 +10091,9 @@
"template_name": {
"type": "string"
},
"template_require_active_version": {
"type": "boolean"
},
"ttl_ms": {
"type": "integer"
},
+1
View File
@@ -1338,6 +1338,7 @@ func convertWorkspace(
TemplateDisplayName: template.DisplayName,
TemplateAllowUserCancelWorkspaceJobs: template.AllowUserCancelWorkspaceJobs,
TemplateActiveVersionID: template.ActiveVersionID,
TemplateRequireActiveVersion: template.RequireActiveVersion,
Outdated: workspaceBuild.TemplateVersionID.String() != template.ActiveVersionID.String(),
Name: workspace.Name,
AutostartSchedule: autostartSchedule,