mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: add controls to template for determining startup days (#10226)
* feat: template controls which days can autostart * Add unit test to test blocking autostart with DaysOfWeek
This commit is contained in:
34
coderd/apidoc/docs.go
generated
34
coderd/apidoc/docs.go
generated
@ -7732,6 +7732,14 @@ const docTemplate = `{
|
||||
"description": "Allow users to cancel in-progress workspace jobs.\n*bool as the default value is \"true\".",
|
||||
"type": "boolean"
|
||||
},
|
||||
"autostart_requirement": {
|
||||
"description": "AutostartRequirement allows optionally specifying the autostart allowed days\nfor workspaces created from this template. This is an enterprise feature.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.TemplateAutostartRequirement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autostop_requirement": {
|
||||
"description": "AutostopRequirement allows optionally specifying the autostop requirement\nfor workspaces created from this template. This is an enterprise feature.",
|
||||
"allOf": [
|
||||
@ -9896,8 +9904,11 @@ const docTemplate = `{
|
||||
"allow_user_cancel_workspace_jobs": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"autostart_requirement": {
|
||||
"$ref": "#/definitions/codersdk.TemplateAutostartRequirement"
|
||||
},
|
||||
"autostop_requirement": {
|
||||
"description": "AutostopRequirement is an enterprise feature. Its value is only used if\nyour license is entitled to use the advanced template scheduling feature.",
|
||||
"description": "AutostopRequirement and AutostartRequirement are enterprise features. Its\nvalue is only used if your license is entitled to use the advanced template\nscheduling feature.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.TemplateAutostopRequirement"
|
||||
@ -10013,6 +10024,27 @@ const docTemplate = `{
|
||||
"TemplateAppsTypeApp"
|
||||
]
|
||||
},
|
||||
"codersdk.TemplateAutostartRequirement": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"days_of_week": {
|
||||
"description": "DaysOfWeek is a list of days of the week in which autostart is allowed\nto happen. If no days are specified, autostart is not allowed.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"monday",
|
||||
"tuesday",
|
||||
"wednesday",
|
||||
"thursday",
|
||||
"friday",
|
||||
"saturday",
|
||||
"sunday"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.TemplateAutostopRequirement": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
Reference in New Issue
Block a user