Skip to content

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

feat(studio): add query perf symlink to reports (#38783)

kemal.earth3a9c377ac3b5
diff --git a/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx b/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx
index bdcbc96054f..a770362494a 100644
--- a/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx
+++ b/apps/studio/components/layouts/ReportsLayout/ReportsMenu.tsx
@@ -1,5 +1,5 @@
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { Plus } from 'lucide-react'
+import { Plus, ArrowUpRight } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useMemo, useState } from 'react'
@@ -146,6 +146,12 @@ const ReportsMenu = () => {
},
]
: []),
+ {
+ name: 'Query Performance',
+ key: 'query-performance',
+ url: `/project/${ref}/advisors/query-performance`,
+ rightIcon: <ArrowUpRight strokeWidth={1} className="h-4 w-4" />,
+ },
...(postgrestReportEnabled
? [
{
@@ -250,8 +256,14 @@ const ReportsMenu = () => {
: 'hover:bg-surface-200'
)}
>
- <Link href={subItem.url} className="flex-grow h-7 flex items-center pl-3">
- {subItem.name}
+ <Link
+ href={subItem.url}
+ className="flex-grow h-7 flex justify-between items-center pl-3"
+ >
+ <span>{subItem.name}</span>
+ {subItem.rightIcon && (
+ <span className="shrink-0">{subItem.rightIcon}</span>
+ )}
</Link>
</li>
))}