Skip to content

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

feat: add placeholder query

TzeYiingfae9ff5ccbfd
diff --git a/studio/pages/project/[ref]/logs/explorer/index.tsx b/studio/pages/project/[ref]/logs/explorer/index.tsx
index 6dbf40db641..a781fb52c3b 100644
--- a/studio/pages/project/[ref]/logs/explorer/index.tsx
+++ b/studio/pages/project/[ref]/logs/explorer/index.tsx
@@ -29,13 +29,15 @@ import { useUpgradePrompt } from 'hooks/misc/useUpgradePrompt'
import UpgradePrompt from 'components/interfaces/Settings/Logs/UpgradePrompt'
import LogsExplorerHeader from 'components/ui/Logs/LogsExplorerHeader'
+const PLACEHOLDER_QUERY =
+ 'select\n cast(timestamp as datetime) as timestamp,\n event_message, metadata \nfrom edge_logs \nlimit 5'
export const LogsExplorerPage: NextPageWithLayout = () => {
useEditorHints()
const { ui, content } = useStore()
const router = useRouter()
const { ref: projectRef, q, ite, its } = useParams()
const [editorId, setEditorId] = useState<string>(uuidv4())
- const [editorValue, setEditorValue] = useState<string>('')
+ const [editorValue, setEditorValue] = useState<string>(PLACEHOLDER_QUERY)
const [saveModalOpen, setSaveModalOpen] = useState<boolean>(false)
const [warnings, setWarnings] = useState<LogsWarning[]>([])
const { data: subscription } = useProjectSubscriptionQuery({ projectRef })
@@ -147,7 +149,6 @@ export const LogsExplorerPage: NextPageWithLayout = () => {
}
}
-
return (
<div className="w-full h-full px-5 py-6 mx-auto">
<LogsExplorerHeader />