Merge pull request #4348 from Infisical/fix/log-date-issue

feat: resolved audit log date issue in integration page
This commit is contained in:
Maidul Islam
2025-08-11 07:10:28 -07:00
committed by GitHub

View File

@@ -40,12 +40,20 @@ export const LogsSection = withPermission(
});
const [timezone, setTimezone] = useState<Timezone>(Timezone.Local);
const [dateFilter, setDateFilter] = useState<TAuditLogDateFilterFormData>({
startDate: new Date(Number(new Date()) - ms("1h")),
endDate: new Date(),
type: AuditLogDateFilterType.Relative,
relativeModeValue: "1h"
});
const [dateFilter, setDateFilter] = useState<TAuditLogDateFilterFormData>(
presets?.endDate || presets?.startDate
? {
type: AuditLogDateFilterType.Absolute,
startDate: presets?.startDate || new Date(Number(new Date()) - ms("1h")),
endDate: presets?.endDate || new Date()
}
: {
startDate: new Date(Number(new Date()) - ms("1h")),
endDate: new Date(),
type: AuditLogDateFilterType.Relative,
relativeModeValue: "1h"
}
);
useEffect(() => {
if (subscription && !subscription.auditLogs) {