diff --git a/apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.queries.ts b/apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.queries.ts index 45decf308f89b..3d0d377fc77d7 100644 --- a/apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.queries.ts +++ b/apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.queries.ts @@ -257,6 +257,7 @@ const getEdgeLogsQuery = () => { -- ONLY include logs where the path does not include /rest/ WHERE edge_logs_request.path NOT LIKE '%/rest/%' + AND edge_logs_request.path NOT LIKE '%/storage/%' ` } @@ -445,6 +446,41 @@ const getSupavisorLogsQuery = () => { ` } +// WHERE pathname includes `/storage/` +const getSupabaseStorageLogsQuery = () => { + return ` + select + id, + el.timestamp as timestamp, + 'storage' as log_type, + CAST(edge_logs_response.status_code AS STRING) as status, + CASE + WHEN edge_logs_response.status_code BETWEEN 200 AND 299 THEN 'success' + WHEN edge_logs_response.status_code BETWEEN 400 AND 499 THEN 'warning' + WHEN edge_logs_response.status_code >= 500 THEN 'error' + ELSE 'success' + END as level, + edge_logs_request.path as path, + edge_logs_request.host as host, + null as event_message, + edge_logs_request.method as method, + authorization_payload.role as api_role, + COALESCE(sb.auth_user, null) as auth_user, + null as log_count, + null as logs + from edge_logs as el + cross join unnest(metadata) as edge_logs_metadata + cross join unnest(edge_logs_metadata.request) as edge_logs_request + cross join unnest(edge_logs_metadata.response) as edge_logs_response + left join unnest(edge_logs_request.sb) as sb + left join unnest(sb.jwt) as jwt + left join unnest(jwt.authorization) as auth + left join unnest(auth.payload) as authorization_payload + -- ONLY include logs where the path includes /storage/ + WHERE edge_logs_request.path LIKE '%/storage/%' + ` +} + /** * Combine all log sources to create the unified logs CTE */ @@ -462,6 +498,8 @@ WITH unified_logs AS ( ${getAuthLogsQuery()} union all ${getSupavisorLogsQuery()} + union all + ${getSupabaseStorageLogsQuery()} ) ` } diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx index bacfc877998b3..94d27bf058280 100644 --- a/apps/www/components/Hero/Hero.tsx +++ b/apps/www/components/Hero/Hero.tsx @@ -3,7 +3,6 @@ import Link from 'next/link' import { Button } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' import { useSendTelemetryEvent } from '~/lib/telemetry' -import AnnouncementBadge from '../Announcement/Badge' const Hero = () => { const sendTelemetryEvent = useSendTelemetryEvent() @@ -16,12 +15,6 @@ const Hero = () => {
-

Build in a weekend Scale to millions diff --git a/apps/www/components/Nav/index.tsx b/apps/www/components/Nav/index.tsx index ad9daf0ca5976..a1f59fb792816 100644 --- a/apps/www/components/Nav/index.tsx +++ b/apps/www/components/Nav/index.tsx @@ -24,7 +24,7 @@ import MobileMenu from './MobileMenu' import RightClickBrandLogo from './RightClickBrandLogo' import { useSendTelemetryEvent } from '~/lib/telemetry' import useDropdownMenu from './useDropdownMenu' -import { AnnouncementBanner, AuthenticatedDropdownMenu } from 'ui-patterns' +import { AuthenticatedDropdownMenu } from 'ui-patterns' interface Props { hideNavbar: boolean @@ -71,7 +71,6 @@ const Nav = ({ hideNavbar, stickyNavbar = true }: Props) => { return ( <> -