mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
Logs without a service-specific overview now show common fields and attributes in collapsible groups. Existing service overviews use the same section layout, with the first section open. Configured fields share one renderer across service overviews. Raw JSON uses shared presentation for single-log, multi-log, and downstream Auth views, with copy controls supplied by each view. Attribute lookups are scoped to the selected log's source, ID, and timestamp window and respect metadata visibility. It's based on the #50953 stack; request correlation, timeline UI, and Auth changes are separate layers. Sections use the `CollapsibleDetailSection` that master now shares with the audit log pages, and the new Supavisor overview follows the same layout: no separate time header, first section open. ### How to test 1. With Unified Logs and `otelUnifiedLogs` enabled, open an API Gateway log and a Postgres or Auth log. Check the overview sections, expand/collapse groups, and try copying a field. 2. Open Raw JSON on a log with enough metadata to scroll. Confirm the copy button stays visible and copies the complete JSON. 3. Select multiple logs and confirm their combined JSON still renders correctly. ### Validation - Synced with master; verified head `663ebfd13117ae3c5aa0de52e4488253a317d59f`. - Focused local unit/MSW suite: 246 tests passed across 19 files with retries disabled, both normally and with `--sequence.shuffle --sequence.seed=50835`. Independent focused run: 24 tests passed with seed 5083528. - Browser QA on the matching studio-staging preview passed: API Gateway and Postgres section expansion/collapse, field copying, scrolling and copying complete Raw JSON, and copying multiple selected logs. - All four unit-test shards, all four E2E shards, typecheck, formatting, lint ratchet, and Studio Docker build passed. The Next.js E2E report includes one storage-folder test that passed on retry. - Independent code review found no actionable issues. Working tree clean. ### Stack Based on the logs table building blocks stack, which merges first: #50953 → #50954 → #50955 → #50957 → #50958 → #52281. Then merge in order: 1. #50835 — grouped log overviews and raw JSON 2. #50840 — request correlation queries 3. #50836 — request timeline UI and folding 4. #50841 — shared Auth user details 5. #50837 — log user correlation and Auth activity --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Jordi Enric <jordi.err@gmail.com>
155 lines
3.2 KiB
TypeScript
155 lines
3.2 KiB
TypeScript
import {
|
|
CableIcon,
|
|
CodeIcon,
|
|
GlobeIcon,
|
|
HardDriveIcon,
|
|
HashIcon,
|
|
LockIcon,
|
|
MonitorDotIcon,
|
|
PackageOpenIcon,
|
|
ReceiptTextIcon,
|
|
ServerIcon,
|
|
ShieldCheckIcon,
|
|
ZapIcon,
|
|
} from 'lucide-react'
|
|
|
|
import { BlockConfig } from '../components/shared/Block'
|
|
import {
|
|
apiKeyAdditionalFields,
|
|
apiKeyPrimaryField,
|
|
authorizationFields,
|
|
authPrimaryFields,
|
|
edgeFunctionDetailsFields,
|
|
edgeFunctionPrimaryFields,
|
|
locationAdditionalFields,
|
|
locationPrimaryField,
|
|
networkPrimaryFields,
|
|
postgresSessionFields,
|
|
postgresStatementFields,
|
|
postgrestPrimaryFields,
|
|
postgresTransactionFields,
|
|
postgrestResponseFields,
|
|
storageDetailsFields,
|
|
storagePrimaryFields,
|
|
supavisorNodeFields,
|
|
supavisorPrimaryFields,
|
|
supavisorSourceFields,
|
|
techDetailsFields,
|
|
userAdditionalFields,
|
|
userPrimaryField,
|
|
} from './serviceFlowFields'
|
|
|
|
export const authBlockConfig: BlockConfig = {
|
|
title: 'Authentication',
|
|
icon: LockIcon,
|
|
primaryFields: authPrimaryFields,
|
|
}
|
|
|
|
export const postgrestBlockConfig: BlockConfig = {
|
|
title: 'Data API',
|
|
icon: ServerIcon,
|
|
primaryFields: postgrestPrimaryFields,
|
|
sections: [
|
|
{
|
|
title: 'Response Details',
|
|
icon: ReceiptTextIcon,
|
|
fields: postgrestResponseFields,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const networkBlockConfig: BlockConfig = {
|
|
title: 'Network',
|
|
icon: GlobeIcon,
|
|
primaryFields: networkPrimaryFields,
|
|
sections: [
|
|
{
|
|
type: 'fieldWithSeeMore',
|
|
primaryField: apiKeyPrimaryField,
|
|
additionalFields: apiKeyAdditionalFields,
|
|
showValueAsBadge: true,
|
|
},
|
|
{
|
|
type: 'fieldWithSeeMore',
|
|
primaryField: userPrimaryField,
|
|
additionalFields: userAdditionalFields,
|
|
},
|
|
{
|
|
type: 'fieldWithSeeMore',
|
|
primaryField: locationPrimaryField,
|
|
additionalFields: locationAdditionalFields,
|
|
},
|
|
{
|
|
title: 'Authorization',
|
|
icon: ShieldCheckIcon,
|
|
fields: authorizationFields,
|
|
},
|
|
{
|
|
title: 'Tech Details',
|
|
icon: MonitorDotIcon,
|
|
fields: techDetailsFields,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const edgeFunctionBlockConfig: BlockConfig = {
|
|
title: 'Edge Function',
|
|
icon: ZapIcon,
|
|
primaryFields: edgeFunctionPrimaryFields,
|
|
sections: [
|
|
{
|
|
title: 'Function Details',
|
|
icon: CodeIcon,
|
|
fields: edgeFunctionDetailsFields,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const storageBlockConfig: BlockConfig = {
|
|
title: 'Storage',
|
|
icon: HardDriveIcon,
|
|
primaryFields: storagePrimaryFields,
|
|
sections: [
|
|
{
|
|
title: 'Storage Details',
|
|
icon: PackageOpenIcon,
|
|
fields: storageDetailsFields,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const postgresBlockConfig: BlockConfig = {
|
|
title: 'Postgres',
|
|
primaryFields: postgresStatementFields,
|
|
sections: [
|
|
{
|
|
title: 'Session',
|
|
icon: CableIcon,
|
|
fields: postgresSessionFields,
|
|
},
|
|
{
|
|
title: 'Transaction',
|
|
icon: HashIcon,
|
|
fields: postgresTransactionFields,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const supavisorBlockConfig: BlockConfig = {
|
|
title: 'Supavisor',
|
|
icon: CableIcon,
|
|
primaryFields: supavisorPrimaryFields,
|
|
sections: [
|
|
{
|
|
title: 'Node Details',
|
|
icon: ServerIcon,
|
|
fields: supavisorNodeFields,
|
|
},
|
|
{
|
|
title: 'Source',
|
|
icon: CodeIcon,
|
|
fields: supavisorSourceFields,
|
|
},
|
|
],
|
|
}
|