Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: switches the default previewer datetime range to 1hr instead of 1 day.

TzeYiingce0d254a5ec0
diff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.ts
index 643a0ed5839..084085911d4 100644
--- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts
+++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts
@@ -435,6 +435,7 @@ export const PREVIEWER_DATEPICKER_HELPERS: DatetimeHelper[] = [
text: 'Last hour',
calcFrom: () => dayjs().subtract(1, 'hour').startOf('hour').toISOString(),
calcTo: () => '',
+ default: true,
},
{
text: 'Last 3 hours',
@@ -445,7 +446,6 @@ export const PREVIEWER_DATEPICKER_HELPERS: DatetimeHelper[] = [
text: 'Last day',
calcFrom: () => dayjs().subtract(1, 'day').startOf('day').toISOString(),
calcTo: () => '',
- default: true,
},
]
export const EXPLORER_DATEPICKER_HELPERS: DatetimeHelper[] = [
diff --git a/studio/tests/pages/projects/PreviewFilterPanel.test.js b/studio/tests/pages/projects/PreviewFilterPanel.test.js
index 1808d4119eb..85ef27cdf1b 100644
--- a/studio/tests/pages/projects/PreviewFilterPanel.test.js
+++ b/studio/tests/pages/projects/PreviewFilterPanel.test.js
@@ -50,10 +50,10 @@ test('Manual refresh', async () => {
})
test('Datepicker dropdown', async () => {
render(<PreviewFilterPanel />)
- clickDropdown(await screen.findByText(/Last day/))
+ clickDropdown(await screen.findByText(/Last hour/))
userEvent.click(await screen.findByText(/Last 3 hours/))
await screen.findByText(/Last 3 hours/)
- await expect(screen.findByText(/Last day/)).rejects.toThrow()
+ await expect(screen.findByText(/Last hour/)).rejects.toThrow()
})
test.todo('timestamp to/from filter default value')