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"
>
{
- if (e === "all") onChange(undefined);
- else onChange(e);
- }}
+ onValueChange={(e) => onChange(e)}
className={twMerge(
"w-full border border-mineshaft-500 bg-mineshaft-700 text-mineshaft-100",
value === undefined && "text-mineshaft-400"
)}
>
-
- All projects
-
{workspaces.map((project) => (
{project.name}
diff --git a/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsx
index a184b0f5c..65f481712 100644
--- a/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsx
+++ b/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsx
@@ -44,7 +44,7 @@ export const LogsSection = ({
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"] as const);
- const { control, reset, watch } = useForm({
+ const { control, reset, watch, setValue } = useForm({
resolver: yupResolver(auditLogFilterFormSchema),
defaultValues: {
projectId: undefined,
@@ -79,6 +79,7 @@ export const LogsSection = ({
className={filterClassName}
presets={presets}
control={control}
+ setValue={setValue}
watch={watch}
reset={reset}
/>