feat: audit logs event metadata & remapping support

This commit is contained in:
Daniel Hougaard
2024-09-15 20:01:43 +04:00
parent 24c460c695
commit 8f3b7e1698
2 changed files with 8 additions and 2 deletions

View File

@@ -40,9 +40,14 @@ export const UserAuditLogsSection = withPermission(
</Tooltip> </Tooltip>
</div> </div>
<LogsSection <LogsSection
remappedHeaders={{
Metadata: "Status"
}}
showFilters={showFilter} showFilters={showFilter}
filterClassName="bg-mineshaft-900 static" filterClassName="bg-mineshaft-900 static"
presetActor={orgMembership.user.id} presets={{
actorId: orgMembership.user.id
}}
isOrgAuditLogs isOrgAuditLogs
/> />
</div> </div>

View File

@@ -4,7 +4,8 @@ import { EventType, UserAgentType } from "@app/hooks/api/auditLogs/enums";
export const auditLogFilterFormSchema = yup export const auditLogFilterFormSchema = yup
.object({ .object({
eventType: yup.string().oneOf(Object.values(EventType), "Invalid event type"), eventMetadata: yup.object({}).optional(),
eventType: yup.array(yup.string().oneOf(Object.values(EventType), "Invalid event type")),
actor: yup.string(), actor: yup.string(),
userAgentType: yup.string().oneOf(Object.values(UserAgentType), "Invalid user agent type"), userAgentType: yup.string().oneOf(Object.values(UserAgentType), "Invalid user agent type"),
startDate: yup.date(), startDate: yup.date(),