mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
Add audit links/kira pilot (#5156)
* got links working * added translations * fixed translation * added translation for unavailable ip * added support for group, template, user links * cleaned up string * added deleted label * querying for workspace id * remove prints * fix/write tests * PR feedback pt 1 * PR feedback part 2
This commit is contained in:
@ -38,7 +38,9 @@ func (r ResourceType) FriendlyString() string {
|
||||
case ResourceTypeWorkspace:
|
||||
return "workspace"
|
||||
case ResourceTypeWorkspaceBuild:
|
||||
return "workspace build"
|
||||
// workspace builds have a unique friendly string
|
||||
// see coderd/audit.go:298 for explanation
|
||||
return "workspace"
|
||||
case ResourceTypeGitSSHKey:
|
||||
return "git ssh key"
|
||||
case ResourceTypeAPIKey:
|
||||
@ -102,6 +104,8 @@ type AuditLog struct {
|
||||
StatusCode int32 `json:"status_code"`
|
||||
AdditionalFields json.RawMessage `json:"additional_fields"`
|
||||
Description string `json:"description"`
|
||||
ResourceLink string `json:"resource_link"`
|
||||
IsDeleted bool `json:"is_deleted"`
|
||||
|
||||
User *User `json:"user"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user