From 97366f6e955ece75a501f1bf5c0b2d79db3c3daa Mon Sep 17 00:00:00 2001 From: = Date: Thu, 14 Aug 2025 22:32:51 +0530 Subject: [PATCH] feat: added a min for integration audit log --- .../components/IntegrationAuditLogsSection.tsx | 6 ++++-- .../components/SecretSyncAuditLogsSection.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/components/IntegrationAuditLogsSection.tsx b/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/components/IntegrationAuditLogsSection.tsx index 8c0687d61..b4ecd1e0e 100644 --- a/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/components/IntegrationAuditLogsSection.tsx +++ b/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/components/IntegrationAuditLogsSection.tsx @@ -24,7 +24,7 @@ export const IntegrationAuditLogsSection = ({ integration }: Props) => {

Integration Logs

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

{ showFilters={false} presets={{ eventMetadata: { integrationId: integration.id }, - startDate: new Date(new Date().setDate(new Date().getDate() - auditLogsRetentionDays)), + startDate: new Date( + new Date().setDate(new Date().getDate() - Math.min(auditLogsRetentionDays, 60)) + ), eventType: INTEGRATION_EVENTS }} /> diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx index 47b359d5e..ddb618708 100644 --- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx +++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx @@ -28,7 +28,7 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {

Sync Logs

{subscription.auditLogs && (

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

)} @@ -38,7 +38,9 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => { showFilters={false} presets={{ eventMetadata: { syncId: secretSync.id }, - startDate: new Date(new Date().setDate(new Date().getDate() - auditLogsRetentionDays)), + startDate: new Date( + new Date().setDate(new Date().getDate() - Math.min(auditLogsRetentionDays, 60)) + ), eventType: INTEGRATION_EVENTS }} />