mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #4348 from Infisical/fix/log-date-issue
feat: resolved audit log date issue in integration page
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user