feat: add inactivity cleanup and failure cleanup configuration fields to Template Schedule Form (#7402)

* added workspace actions entitlement

* added workspace actions experiment

* added new route for template enterprise meta

* removing new route; repurposing old

* add new fields to get endpoints

* removed workspace actions experiment

* added logic to enterprise template store

* added new form fields

* feature flagged new fields

* fix validation

* fixed submit btn

* fix tests

* changed ttl defaults

* added FE tests

* added BE tests

* fixed lint

* adjusted comment language

* fixing unstaged changes check

* fix test

* Update coderd/database/migrations/000122_add_template_cleanup_ttls.down.sql

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update coderd/database/migrations/000122_add_template_cleanup_ttls.up.sql

Co-authored-by: Dean Sheather <dean@deansheather.com>

---------

Co-authored-by: Dean Sheather <dean@deansheather.com>
This commit is contained in:
Kira Pilot
2023-05-05 08:19:26 -07:00
committed by GitHub
parent 3632ac8c01
commit 5ffa6dae50
33 changed files with 578 additions and 59 deletions

15
coderd/apidoc/docs.go generated
View File

@ -6719,10 +6719,18 @@ const docTemplate = `{
"description": "DisplayName is the displayed name of the template.",
"type": "string"
},
"failure_ttl_ms": {
"description": "FailureTTLMillis allows optionally specifying the max lifetime before Coder\nstops all resources for failed workspaces created from this template.",
"type": "integer"
},
"icon": {
"description": "Icon is a relative path or external URL that specifies\nan icon to be displayed in the dashboard.",
"type": "string"
},
"inactivity_ttl_ms": {
"description": "InactivityTTLMillis allows optionally specifying the max lifetime before Coder\ndeletes inactive workspaces created from this template.",
"type": "integer"
},
"max_ttl_ms": {
"description": "MaxTTLMillis allows optionally specifying the max lifetime for\nworkspaces created from this template.",
"type": "integer"
@ -8698,6 +8706,10 @@ const docTemplate = `{
"display_name": {
"type": "string"
},
"failure_ttl_ms": {
"description": "FailureTTLMillis and InactivityTTLMillis are enterprise-only. Their\nvalues are used if your license is entitled to use the advanced\ntemplate scheduling feature.",
"type": "integer"
},
"icon": {
"type": "string"
},
@ -8705,6 +8717,9 @@ const docTemplate = `{
"type": "string",
"format": "uuid"
},
"inactivity_ttl_ms": {
"type": "integer"
},
"max_ttl_ms": {
"description": "MaxTTLMillis is an enterprise feature. It's value is only used if your\nlicense is entitled to use the advanced template scheduling feature.",
"type": "integer"