From 6e288d272f28552af66582ef591c0d1f1343d6b8 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Mon, 3 Mar 2025 14:31:03 +0000 Subject: [PATCH 1/2] feat: update default audit log avatar --- site/src/components/Avatar/Avatar.tsx | 1 - .../AuditPage/AuditLogRow/AuditLogRow.tsx | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/site/src/components/Avatar/Avatar.tsx b/site/src/components/Avatar/Avatar.tsx index c09bfaddddf10..f5492158b4aad 100644 --- a/site/src/components/Avatar/Avatar.tsx +++ b/site/src/components/Avatar/Avatar.tsx @@ -57,7 +57,6 @@ const avatarVariants = cva( export type AvatarProps = AvatarPrimitive.AvatarProps & VariantProps & { src?: string; - fallback?: string; }; diff --git a/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx b/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx index e5145ea86c966..3a6774eff1499 100644 --- a/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx +++ b/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx @@ -20,6 +20,7 @@ import { determineGroupDiff, determineIdPSyncMappingDiff, } from "./AuditLogDiff/auditUtils"; +import { NetworkIcon } from "lucide-react"; const httpStatusColor = (httpStatus: number): ThemeRole => { // Treat server errors (500) as errors @@ -101,10 +102,20 @@ export const AuditLogRow: FC = ({ css={styles.auditLogHeaderInfo} > - + {/* + * Session logs don't have an associated user to the log, + * so when it happens we display a default icon to represent non user actions + */} + {auditLog.user ? ( + + ) : ( + + + + )} Date: Mon, 3 Mar 2025 14:34:51 +0000 Subject: [PATCH 2/2] Run fmt --- site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx b/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx index 3a6774eff1499..ebd79c0ba9abf 100644 --- a/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx +++ b/site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx @@ -10,6 +10,7 @@ import { DropdownArrow } from "components/DropdownArrow/DropdownArrow"; import { Pill } from "components/Pill/Pill"; import { Stack } from "components/Stack/Stack"; import { TimelineEntry } from "components/Timeline/TimelineEntry"; +import { NetworkIcon } from "lucide-react"; import { type FC, useState } from "react"; import { Link as RouterLink } from "react-router-dom"; import type { ThemeRole } from "theme/roles"; @@ -20,7 +21,6 @@ import { determineGroupDiff, determineIdPSyncMappingDiff, } from "./AuditLogDiff/auditUtils"; -import { NetworkIcon } from "lucide-react"; const httpStatusColor = (httpStatus: number): ThemeRole => { // Treat server errors (500) as errors