mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
feat(studio): gate the SQL Editor Logs source behind otelLegacyLogs
Keeps the new source consistent with the rest of the logs migration and out of everyone's editor until the flag is rolled out. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0e5531d564
commit
d36acaf0ee
2 files changed
+8
-4
No files matched your search
@@ -125,7 +125,8 @@ export const SQLEditor = () => {
|
||||
const getImpersonatedRoleState = useGetImpersonatedRoleState()
|
||||
const databaseSelectorState = useDatabaseSelectorStateSnapshot()
|
||||
const logsTimeRange = useSqlEditorLogsStateSnapshot()
|
||||
const queryingLogs = isLogsSource(databaseSelectorState.selectedDatabaseId)
|
||||
const logsSourceEnabled = useFlag('otelLegacyLogs')
|
||||
const queryingLogs = logsSourceEnabled && isLogsSource(databaseSelectorState.selectedDatabaseId)
|
||||
const { aiOptInLevel } = useOrgAiOptInLevel()
|
||||
const showPrettyExplain = useFlag('ShowPrettyExplain')
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Hotkey } from '@tanstack/react-hotkeys'
|
||||
import { LOCAL_STORAGE_KEYS, useParams } from 'common'
|
||||
import { LOCAL_STORAGE_KEYS, useFlag, useParams } from 'common'
|
||||
import { AlignLeft, Check, Heart, Keyboard, MoreVertical } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import {
|
||||
@@ -56,7 +56,8 @@ export const UtilityActions = ({
|
||||
const snapV2 = useSqlEditorV2StateSnapshot()
|
||||
const databaseSelectorState = useDatabaseSelectorStateSnapshot()
|
||||
const logsTimeRange = useSqlEditorLogsStateSnapshot()
|
||||
const queryingLogs = isLogsSource(databaseSelectorState.selectedDatabaseId)
|
||||
const logsSourceEnabled = useFlag('otelLegacyLogs')
|
||||
const queryingLogs = logsSourceEnabled && isLogsSource(databaseSelectorState.selectedDatabaseId)
|
||||
|
||||
const [isAiOpen] = useLocalStorageQuery(LOCAL_STORAGE_KEYS.SQL_EDITOR_AI_OPEN, true)
|
||||
const [intellisenseEnabled, setIntellisenseEnabled] = useLocalStorageQuery(
|
||||
@@ -220,7 +221,9 @@ export const UtilityActions = ({
|
||||
<DatabaseSelector
|
||||
selectedDatabaseId={lastSelectedDb.length === 0 ? undefined : lastSelectedDb}
|
||||
variant="connected-on-right"
|
||||
additionalOptions={[{ id: SQL_EDITOR_LOGS_SOURCE_ID, name: 'Logs' }]}
|
||||
additionalOptions={
|
||||
logsSourceEnabled ? [{ id: SQL_EDITOR_LOGS_SOURCE_ID, name: 'Logs' }] : []
|
||||
}
|
||||
onSelectId={onSelectDatabase}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user