Add build number to workspace_build audit logs (#5267)

* 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

* added build number

* checking for existence of additional fields

* adjust documentation

* PR feedback
This commit is contained in:
Kira Pilot
2022-12-06 13:33:21 -05:00
committed by GitHub
parent 6651c1632d
commit df389d429c
4 changed files with 47 additions and 31 deletions
@@ -14,10 +14,7 @@ export const AuditLogDescription: FC<{ auditLog: AuditLog }> = ({
let target = auditLog.resource_target.trim()
// audit logs with a resource_type of workspace build use workspace name as a target
if (
auditLog.resource_type === "workspace_build" &&
auditLog.additional_fields.workspaceName
) {
if (auditLog.resource_type === "workspace_build") {
target = auditLog.additional_fields.workspaceName.trim()
}