Skip to content

Commit 773dd2b

Browse files
committed
Show reason
1 parent c30b299 commit 773dd2b

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

site/src/pages/AuditPage/AuditLogRow/AuditLogRow.stories.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,25 @@ export const WithConnectionType: Story = {
164164
args: {
165165
showOrgDetails: true,
166166
auditLog: {
167-
id: "a26a8a29-9453-455c-8fdc-ce69d4e2c07b",
168-
request_id: "0d649adb-016d-4d8f-8448-875bbdf30c74",
169-
time: "2025-02-21T14:18:39.198013Z",
170-
ip: "fd7a:115c:a1e0:4955:8019:f5d3:e126:b422",
167+
id: "725ea2f2-faae-4bdd-a821-c2384a67d89c",
168+
request_id: "a486c1cb-6acb-41c9-9bce-1f4f24a2e8ff",
169+
time: "2025-02-24T10:20:08.054072Z",
170+
ip: "fd7a:115c:a1e0:4fa5:9ccd:27e4:5d72:c66a",
171171
user_agent: "",
172172
resource_type: "workspace_agent",
173-
resource_id: "a146c7e1-514b-4534-8f98-3f097fb83b11",
173+
resource_id: "813311fb-bad3-4a92-98cd-09ee57e73d6e",
174174
resource_target: "main",
175175
resource_icon: "",
176176
action: "disconnect",
177177
diff: {},
178-
status_code: 0,
178+
status_code: 255,
179179
additional_fields: {
180-
build_number: "5",
180+
reason: "process exited with error status: -1",
181+
build_number: "1",
181182
build_reason: "initiator",
182-
workspace_id: "d28295ae-a2dc-4aa0-af3c-79a2d4c44c55",
183-
workspace_name: "test",
184-
connection_type: "VS Code",
183+
workspace_id: "6a7cfb32-d208-47bb-91d0-ec54b69912b6",
184+
workspace_name: "test2",
185+
connection_type: "SSH",
185186
workspace_owner: "admin",
186187
},
187188
description: "{user} disconnected workspace agent {target}",

site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ export const AuditLogRow: FC<AuditLogRowProps> = ({
171171
</Link>
172172
</div>
173173
)}
174+
{auditLog.additional_fields?.reason && (
175+
<div>
176+
<h4 css={styles.auditLogInfoHeader}>Reason:</h4>
177+
<div>{auditLog.additional_fields?.reason}</div>
178+
</div>
179+
)}
174180
</div>
175181
}
176182
>

0 commit comments

Comments
 (0)