Skip to content

Commit e17abf1

Browse files
committed
got rid oof diffs for workspace builds
1 parent 17aaa38 commit e17abf1

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

enterprise/audit/table.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,20 @@ var AuditableResources = auditMap(map[any]map[string]Action{
101101
"ttl": ActionTrack,
102102
"last_used_at": ActionIgnore,
103103
},
104+
// We don't show any diff for the WorkspaceBuild resource
104105
&database.WorkspaceBuild{}: {
105-
"id": ActionIgnore, // Unimportant to the user
106-
"created_at": ActionIgnore, // Never changes.
107-
"updated_at": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
108-
"workspace_id": ActionTrack,
109-
"template_version_id": ActionTrack,
110-
"build_number": ActionIgnore, // Unimportant to the user
111-
"transition": ActionTrack,
112-
"initiator_id": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
113-
"provisioner_state": ActionIgnore, // Unimportant to the user
114-
"job_id": ActionIgnore, // Unimportant to the user
115-
"deadline": ActionIgnore, // Unimportant to the user
116-
"reason": ActionIgnore, // Unimportant to the user
106+
"id": ActionIgnore,
107+
"created_at": ActionIgnore,
108+
"updated_at": ActionIgnore,
109+
"workspace_id": ActionIgnore,
110+
"template_version_id": ActionIgnore,
111+
"build_number": ActionIgnore,
112+
"transition": ActionIgnore,
113+
"initiator_id": ActionIgnore,
114+
"provisioner_state": ActionIgnore,
115+
"job_id": ActionIgnore,
116+
"deadline": ActionIgnore,
117+
"reason": ActionIgnore,
117118
},
118119
})
119120

site/src/components/AuditLogRow/AuditLogRow.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ export const AuditLogRow: React.FC<AuditLogRowProps> = ({
130130
</Stack>
131131
</Stack>
132132

133-
<div
134-
className={
135-
shouldDisplayDiff ? undefined : styles.disabledDropdownIcon
136-
}
137-
>
138-
{isDiffOpen ? <CloseDropdown /> : <OpenDropdown />}
139-
</div>
133+
{shouldDisplayDiff ? (
134+
<div> {isDiffOpen ? <CloseDropdown /> : <OpenDropdown />}</div>
135+
) : (
136+
<div className={styles.columnWithoutDiff}></div>
137+
)}
140138
</Stack>
141139

142140
{shouldDisplayDiff && (
@@ -190,8 +188,8 @@ const useStyles = makeStyles((theme) => ({
190188
color: theme.palette.text.secondary,
191189
whiteSpace: "nowrap",
192190
},
193-
194-
disabledDropdownIcon: {
195-
opacity: 0.5,
191+
// offset the absence of the arrow icon on diff-less logs
192+
columnWithoutDiff: {
193+
marginLeft: "24px",
196194
},
197195
}))

0 commit comments

Comments
 (0)