Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
744e476
added workspace actions entitlement
Kira-Pilot May 1, 2023
e6e1ec6
added workspace actions experiment
Kira-Pilot May 1, 2023
c049e9e
added new route for template enterprise meta
Kira-Pilot May 3, 2023
537ced7
removing new route; repurposing old
Kira-Pilot May 3, 2023
cd6a485
add new fields to get endpoints
Kira-Pilot May 3, 2023
6c984fa
Merge remote-tracking branch 'origin/main' into workspace-actions-tem…
Kira-Pilot May 3, 2023
57a9de7
removed workspace actions experiment
Kira-Pilot May 3, 2023
07cb07c
added logic to enterprise template store
Kira-Pilot May 3, 2023
7091fc1
added new form fields
Kira-Pilot May 3, 2023
e565225
feature flagged new fields
Kira-Pilot May 3, 2023
3d9f6f5
fix validation
Kira-Pilot May 4, 2023
abab4c8
fixed submit btn
Kira-Pilot May 4, 2023
ad37203
Merge remote-tracking branch 'origin/main' into workspace-actions-tem…
Kira-Pilot May 4, 2023
240f297
fix tests
Kira-Pilot May 4, 2023
be512ee
changed ttl defaults
Kira-Pilot May 4, 2023
8536b75
added FE tests
Kira-Pilot May 4, 2023
a05eb6c
added BE tests
Kira-Pilot May 4, 2023
0478e07
fixed lint
Kira-Pilot May 4, 2023
bba4722
adjusted comment language
Kira-Pilot May 4, 2023
c76a0f4
fixing unstaged changes check
Kira-Pilot May 4, 2023
9db6b13
fix test
Kira-Pilot May 4, 2023
a2a38f0
Merge branch 'main' into workspace-actions-template-route/kira-pilot
Kira-Pilot May 4, 2023
9fa9c5b
Update coderd/database/migrations/000122_add_template_cleanup_ttls.do…
Kira-Pilot May 5, 2023
43a2267
Update coderd/database/migrations/000122_add_template_cleanup_ttls.up…
Kira-Pilot May 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added new route for template enterprise meta
  • Loading branch information
Kira-Pilot committed May 3, 2023
commit c049e9e4eee9ed2785e401ea55433987ba326835
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"Dsts",
"embeddedpostgres",
"enablements",
"enterprisemeta",
"errgroup",
"eventsourcemock",
"Failf",
Expand Down
58 changes: 58 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE ONLY templates DROP COLUMN IF EXISTS failure_ttl;
ALTER TABLE ONLY templates DROP COLUMN IF EXISTS inactivity_ttl;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE ONLY templates ADD COLUMN IF NOT EXISTS failure_ttl BIGINT NOT NULL DEFAULT 0;
ALTER TABLE ONLY templates ADD COLUMN IF NOT EXISTS inactivity_ttl BIGINT NOT NULL DEFAULT 0;
4 changes: 3 additions & 1 deletion coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 31 additions & 9 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion coderd/database/queries/templates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ SET
name = $4,
icon = $5,
display_name = $6,
allow_user_cancel_workspace_jobs = $7
allow_user_cancel_workspace_jobs = $7,
failure_ttl = $8,
inactivity_ttl = $9
WHERE
id = $1
RETURNING
Expand Down
2 changes: 2 additions & 0 deletions coderd/database/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ overrides:
template_max_ttl: TemplateMaxTTL
motd_file: MOTDFile
uuid: UUID
failure_ttl: FailureTTL
inactivity_ttl: InactivityTTL

sql:
- schema: "./dump.sql"
Expand Down
5 changes: 5 additions & 0 deletions codersdk/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ type UpdateTemplateMeta struct {
AllowUserCancelWorkspaceJobs bool `json:"allow_user_cancel_workspace_jobs,omitempty"`
}

type UpdateTemplateEnterpriseMeta struct {
FailureTTL int64 `json:"failure_ttl,omitempty"`
InactivityTTL int64 `json:"inactivity_ttl,omitempty"`
}

type TemplateExample struct {
ID string `json:"id" format:"uuid"`
URL string `json:"url"`
Expand Down
Loading