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:
Kira Pilot
2022-12-02 15:14:45 -05:00
committed by GitHub
parent fa641554e8
commit 65407462d1
12 changed files with 298 additions and 99 deletions
+8 -1
View File
@@ -986,6 +986,8 @@ export const MockAuditLog: TypesGen.AuditLog = {
additional_fields: {},
description: "{user} created workspace {target}",
user: MockUser,
resource_link: "/@admin/bruno-dev",
is_deleted: false,
}
export const MockAuditLog2: TypesGen.AuditLog = {
@@ -1024,12 +1026,17 @@ export const MockAuditLogWithWorkspaceBuild: TypesGen.AuditLog = {
request_id: "61555889-2875-475c-8494-f7693dd5d75b",
action: "stop",
resource_type: "workspace_build",
description: "{user} stopped workspace build for {target}",
description: "{user} stopped build for workspace {target}",
additional_fields: {
workspaceName: "test2",
},
}
export const MockAuditLogWithDeletedResource: TypesGen.AuditLog = {
...MockAuditLog,
is_deleted: true,
}
export const MockWorkspaceQuota: TypesGen.WorkspaceQuota = {
credits_consumed: 0,
budget: 100,