diff --git a/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx index 2b6ec6744..aa55e8fbb 100644 --- a/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx +++ b/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx @@ -1,3 +1,4 @@ +import { NoticeBanner } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; @@ -10,6 +11,14 @@ export const AuditLogsPage = withPermission(

Audit Logs

+ {(window.location.origin.includes("https://app.infisical.com") || + window.location.origin.includes("https://gamma.infisical.com")) && ( + + We are currently working on improving the performance of querying audit logs. + However, please note that audit logs are still being published as usual, so there’s + no disruption to log generation. + + )}
diff --git a/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsx index 9ea92f9a9..bc99057ab 100644 --- a/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsx +++ b/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-nested-ternary */ -import { useState } from "react"; -import { Control, Controller, UseFormReset, UseFormWatch } from "react-hook-form"; +import { useEffect, useState } from "react"; +import { Control, Controller, UseFormReset, UseFormSetValue, UseFormWatch } from "react-hook-form"; import { faCheckCircle, faChevronDown, @@ -41,6 +41,7 @@ type Props = { }; className?: string; isOrgAuditLogs?: boolean; + setValue: UseFormSetValue; control: Control; reset: UseFormReset; watch: UseFormWatch; @@ -51,6 +52,7 @@ export const LogsFilter = ({ isOrgAuditLogs, className, control, + setValue, reset, watch }: Props) => { @@ -60,6 +62,12 @@ export const LogsFilter = ({ const { currentWorkspace, workspaces } = useWorkspace(); const { data, isLoading } = useGetAuditLogActorFilterOpts(currentWorkspace?.id ?? ""); + useEffect(() => { + if (workspaces.length) { + setValue("projectId", workspaces[0].id); + } + }, [workspaces]); + const renderActorSelectItem = (actor: Actor) => { switch (actor.type) { case ActorType.USER: @@ -243,20 +251,14 @@ export const LogsFilter = ({ className="w-40" >