feat: added a min for integration audit log

This commit is contained in:
=
2025-08-14 22:32:51 +05:30
parent c83d4af7a3
commit 97366f6e95
2 changed files with 8 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ export const IntegrationAuditLogsSection = ({ integration }: Props) => {
<div className="mb-4 flex items-center justify-between border-b border-mineshaft-400 pb-4"> <div className="mb-4 flex items-center justify-between border-b border-mineshaft-400 pb-4">
<p className="text-lg font-semibold text-gray-200">Integration Logs</p> <p className="text-lg font-semibold text-gray-200">Integration Logs</p>
<p className="text-xs text-gray-400"> <p className="text-xs text-gray-400">
Displaying audit logs from the last {auditLogsRetentionDays} days Displaying audit logs from the last {Math.min(auditLogsRetentionDays, 60)} days
</p> </p>
</div> </div>
<LogsSection <LogsSection
@@ -32,7 +32,9 @@ export const IntegrationAuditLogsSection = ({ integration }: Props) => {
showFilters={false} showFilters={false}
presets={{ presets={{
eventMetadata: { integrationId: integration.id }, 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 eventType: INTEGRATION_EVENTS
}} }}
/> />

View File

@@ -28,7 +28,7 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {
<h3 className="font-semibold text-mineshaft-100">Sync Logs</h3> <h3 className="font-semibold text-mineshaft-100">Sync Logs</h3>
{subscription.auditLogs && ( {subscription.auditLogs && (
<p className="text-xs text-bunker-300"> <p className="text-xs text-bunker-300">
Displaying audit logs from the last {auditLogsRetentionDays} days Displaying audit logs from the last {Math.min(auditLogsRetentionDays, 60)} days
</p> </p>
)} )}
</div> </div>
@@ -38,7 +38,9 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {
showFilters={false} showFilters={false}
presets={{ presets={{
eventMetadata: { syncId: secretSync.id }, 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 eventType: INTEGRATION_EVENTS
}} }}
/> />