feat(audit-logs): query by secret path

This commit is contained in:
Daniel Hougaard
2025-01-27 15:53:07 +01:00
parent a93bfa69c9
commit 27efc908e2
9 changed files with 71 additions and 30 deletions
@@ -5,6 +5,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { OrgPermissionActions, OrgPermissionSubjects, useSubscription } from "@app/context";
import { withPermission } from "@app/hoc";
import { useDebounce } from "@app/hooks";
import { ActorType, EventType, UserAgentType } from "@app/hooks/api/auditLogs/enums";
import { usePopUp } from "@app/hooks/usePopUp";
@@ -67,10 +68,13 @@ export const LogsSection = withPermission(
const userAgentType = watch("userAgentType") as UserAgentType | undefined;
const actor = watch("actor");
const projectId = watch("project")?.id;
const secretPath = watch("secretPath");
const startDate = watch("startDate");
const endDate = watch("endDate");
const [debouncedSecretPath] = useDebounce<string>(secretPath!, 500);
return (
<div>
{showFilters && (
@@ -90,6 +94,7 @@ export const LogsSection = withPermission(
isOrgAuditLogs={isOrgAuditLogs}
showActorColumn={!!showActorColumn}
filter={{
secretPath: debouncedSecretPath || undefined,
eventMetadata: presets?.eventMetadata,
projectId,
actorType: presets?.actorType,