mirror of
https://github.com/supabase/supabase.git
synced 2026-09-06 09:59:03 +08:00
## Problem Workers log views were limited to the most recent 24 hours and could not be narrowed by event text or HTTP method. ## Fix Adds selectable time ranges, event-message search, and an HTTP-method filter for invocation logs. Filters are applied in the analytics query and included in the cache key. ## How to test - Open a worker and select the Invocations tab. - Change the time range, enter an event message, and select a method. - Expected result: only matching invocation logs are shown. - Open Logs or Activity. - Expected result: message and time filters are available; the method filter is hidden. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added worker log filtering by date range and event message. * Applied a default 24-hour time range to log searches. * Improved filter controls and updated empty-state messaging to reflect the selected range. * **Bug Fixes** * Improved filtering accuracy and safer handling of special characters in event messages. * **Tests** * Added coverage for date-range and message-filter query behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
16 lines
549 B
TypeScript
16 lines
549 B
TypeScript
export const workersKeys = {
|
|
list: (projectRef: string | undefined) => ['projects', projectRef, 'workers'] as const,
|
|
detail: (projectRef: string | undefined, name: string | undefined) =>
|
|
['projects', projectRef, 'worker', name, 'detail'] as const,
|
|
logs: (
|
|
projectRef: string | undefined,
|
|
name: string | undefined,
|
|
stream: string,
|
|
filters: {
|
|
iso_timestamp_start?: string
|
|
iso_timestamp_end?: string
|
|
message?: string
|
|
}
|
|
) => ['projects', projectRef, 'worker', name, 'logs', stream, filters] as const,
|
|
}
|