Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix(ui): move log stream alerts beside Add Log Stream
Calvin1d4ec35349fb
diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogSettingsTab/AuditLogSettingsTab.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogSettingsTab/AuditLogSettingsTab.tsxindex bf3cb50dbf..01f5465f7e 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogSettingsTab/AuditLogSettingsTab.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogSettingsTab/AuditLogSettingsTab.tsx@@ -9,8 +9,6 @@ import { withPermission } from "@app/hoc";import { useScopeVariant } from "@app/hooks";import { useGetOrgAuditLogSettings, useUpdateOrgAuditLogSettings } from "@app/hooks/api";-import { AuditLogStreamAlertsCard } from "./AuditLogStreamAlertsCard";-export const AuditLogSettingsTab = withPermission(() => {const { currentOrg } = useOrganization();@@ -27,22 +25,19 @@ export const AuditLogSettingsTab = withPermission();return (- <div className="flex flex-col gap-y-5">- <AuditLogEventClassesForm- title="Event Classes"- description="Choose which classes of organization-level events are recorded. Each project has its own setting for its events."- settings={settings}- isPending={isPending}- isError={isError}- isSaving={isSaving}- canEdit={canEdit}- readOnlyMessage="You need the Edit permission on Audit Logs to change these settings."- variant={scopeVariant}- paywallKey="organization.audit-log-settings"- onSave={(eventClasses) => updateSettings({ eventClasses })}- />- <AuditLogStreamAlertsCard />- </div>+ <AuditLogEventClassesForm+ title="Event Classes"+ description="Choose which classes of organization-level events are recorded. Each project has its own setting for its events."+ settings={settings}+ isPending={isPending}+ isError={isError}+ isSaving={isSaving}+ canEdit={canEdit}+ readOnlyMessage="You need the Edit permission on Audit Logs to change these settings."+ variant={scopeVariant}+ paywallKey="organization.audit-log-settings"+ onSave={(eventClasses) => updateSettings({ eventClasses })}+ />);},{diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamTab.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamTab.tsxindex c76d3c55c0..d3670e0d8e 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamTab.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamTab.tsx@@ -17,7 +17,7 @@ import { withPermission } from "@app/hoc";import { usePopUp, useScopeVariant } from "@app/hooks";import { AuditLogStreamTable } from "./components/AuditLogStreamTable";-import { AddAuditLogStreamModal } from "./components";+import { AddAuditLogStreamModal, AuditLogStreamAlertAction } from "./components";export const AuditLogStreamsTab = withPermission(() => {@@ -40,7 +40,8 @@ export const AuditLogStreamsTab = withPermission(<CardDescription>Send audit logs from Infisical to external logging providers via HTTP</CardDescription>- <CardAction>+ <CardAction className="flex items-center gap-2">+ <AuditLogStreamAlertAction /><OrgPermissionCan I={OrgPermissionActions.Create} a={OrgPermissionSubjects.Settings}>{(isAllowed) => (<Buttondiff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamAlertAction.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamAlertAction.tsxindex 1a85f2adff..a378b85efd 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamAlertAction.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamAlertAction.tsx@@ -1,27 +1,15 @@import { OrgPermissionCan } from "@app/components/permissions";-import { Card, CardAction, CardDescription, CardHeader, CardTitle } from "@app/components/v3";import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context";import { AlertResourceType } from "@app/hooks/api/alerts";import { AlertAction } from "@app/views/Alerts";-export const AuditLogStreamAlertsCard = () => (- <Card>- <CardHeader>- <CardTitle>Log Stream Alerts</CardTitle>- <CardDescription>- Get notified when an external log stream cannot be reached and audit log events are being- dropped.- </CardDescription>- <CardAction>- <AlertAction- resourceType={AlertResourceType.AuditLogStream}- renderPermissionGate={(render) => (- <OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>- {render}- </OrgPermissionCan>- )}- />- </CardAction>- </CardHeader>- </Card>+export const AuditLogStreamAlertAction = () => (+ <AlertAction+ resourceType={AlertResourceType.AuditLogStream}+ renderPermissionGate={(render) => (+ <OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>+ {render}+ </OrgPermissionCan>+ )}+ />);diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/index.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/index.tsxindex 69febb4a90..20d89a1ebe 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/index.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/index.tsx@@ -1 +1,2 @@export * from "./AddAuditLogStreamModal";+export * from "./AuditLogStreamAlertAction";