import { faFingerprint } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Link } from "@tanstack/react-router"; import { useProject, useSubscription } from "@app/context"; import { EventType } from "@app/hooks/api/auditLogs/enums"; import { TSecretSync } from "@app/hooks/api/secretSyncs"; import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection"; const INTEGRATION_EVENTS = [ EventType.SECRET_SYNC_SYNC_SECRETS, EventType.SECRET_SYNC_REMOVE_SECRETS, EventType.SECRET_SYNC_IMPORT_SECRETS ]; type Props = { secretSync: TSecretSync; }; export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => { const { subscription } = useSubscription(); const { currentProject } = useProject(); const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30; return (

Sync Logs

{subscription.auditLogs && (

Displaying audit logs from the last {Math.min(auditLogsRetentionDays, 60)} days

)}
{subscription.auditLogs ? ( ) : (

Please{" "} {subscription && subscription.slug !== null ? ( upgrade your subscription ) : ( upgrade your subscription )}{" "} to view sync logs.

)}
); };