mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
adding workspace_build resource (#4636)
* adding workspace_build resource * added migration * added migration for audit_actions * fix keyword * got rid oof diffs for workspace builds * adding workspace name to string * renamed migrations * fixed lint * pass throough AdditionalFields and fix tests * no need to pass through each handler * cleaned up migrations
This commit is contained in:
@@ -19,6 +19,7 @@ const (
|
||||
ResourceTypeTemplateVersion ResourceType = "template_version"
|
||||
ResourceTypeUser ResourceType = "user"
|
||||
ResourceTypeWorkspace ResourceType = "workspace"
|
||||
ResourceTypeWorkspaceBuild ResourceType = "workspace_build"
|
||||
ResourceTypeGitSSHKey ResourceType = "git_ssh_key"
|
||||
ResourceTypeAPIKey ResourceType = "api_key"
|
||||
ResourceTypeGroup ResourceType = "group"
|
||||
@@ -36,6 +37,8 @@ func (r ResourceType) FriendlyString() string {
|
||||
return "user"
|
||||
case ResourceTypeWorkspace:
|
||||
return "workspace"
|
||||
case ResourceTypeWorkspaceBuild:
|
||||
return "workspace build"
|
||||
case ResourceTypeGitSSHKey:
|
||||
return "git ssh key"
|
||||
case ResourceTypeAPIKey:
|
||||
@@ -53,6 +56,8 @@ const (
|
||||
AuditActionCreate AuditAction = "create"
|
||||
AuditActionWrite AuditAction = "write"
|
||||
AuditActionDelete AuditAction = "delete"
|
||||
AuditActionStart AuditAction = "start"
|
||||
AuditActionStop AuditAction = "stop"
|
||||
)
|
||||
|
||||
func (a AuditAction) FriendlyString() string {
|
||||
@@ -63,6 +68,10 @@ func (a AuditAction) FriendlyString() string {
|
||||
return "updated"
|
||||
case AuditActionDelete:
|
||||
return "deleted"
|
||||
case AuditActionStart:
|
||||
return "started"
|
||||
case AuditActionStop:
|
||||
return "stopped"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user