mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 08:20:52 +00:00
feat: audit log disable storage flag (#4295)
* feat: audit log disable storage flag * fix: pr changes * fix: revert license fns * Update frontend/src/layouts/OrganizationLayout/components/AuditLogBanner/AuditLogBanner.tsx
This commit is contained in:
@@ -12,6 +12,7 @@ export const AuditLogsPage = () => {
|
||||
<link rel="icon" href="/infisical.ico" />
|
||||
<meta property="og:image" content="/images/message.png" />
|
||||
</Helmet>
|
||||
|
||||
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
||||
<div className="w-full max-w-7xl">
|
||||
<PageHeader
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Fragment } from "react";
|
||||
import { faFile } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faCancel, faFile } from "@fortawesome/free-solid-svg-icons";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
import {
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
Tr
|
||||
} from "@app/components/v2";
|
||||
import { Timezone } from "@app/helpers/datetime";
|
||||
import { useGetAuditLogs } from "@app/hooks/api";
|
||||
import { useFetchServerStatus, useGetAuditLogs } from "@app/hooks/api";
|
||||
import { TGetAuditLogsFilter } from "@app/hooks/api/auditLogs/types";
|
||||
|
||||
import { LogsTableRow } from "./LogsTableRow";
|
||||
@@ -30,6 +30,8 @@ type Props = {
|
||||
const AUDIT_LOG_LIMIT = 30;
|
||||
|
||||
export const LogsTable = ({ filter, refetchInterval, timezone }: Props) => {
|
||||
const { data: status } = useFetchServerStatus();
|
||||
|
||||
// Determine the project ID for filtering
|
||||
const filterProjectId =
|
||||
// Use the projectId from the filter if it exists
|
||||
@@ -79,7 +81,11 @@ export const LogsTable = ({ filter, refetchInterval, timezone }: Props) => {
|
||||
{isEmpty && (
|
||||
<Tr>
|
||||
<Td colSpan={3}>
|
||||
<EmptyState title="No audit logs on file" icon={faFile} />
|
||||
{status?.auditLogStorageDisabled ? (
|
||||
<EmptyState title="Audit log storage is disabled" icon={faCancel} />
|
||||
) : (
|
||||
<EmptyState title="No audit logs on file" icon={faFile} />
|
||||
)}
|
||||
</Td>
|
||||
</Tr>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user