mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
Fix searching in pg cron logs + unselect selected log when search input changes
This commit is contained in:
1 parent
5f9563225c
commit
a2a05fd6b1
4 files changed
+8
-5
No files matched your search
@@ -93,7 +93,6 @@ const LogTable = ({
|
||||
const { show: showContextMenu } = useContextMenu()
|
||||
|
||||
const [cellPosition, setCellPosition] = useState<any>()
|
||||
|
||||
const [selectionOpen, setSelectionOpen] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
@@ -249,7 +248,7 @@ const LogTable = ({
|
||||
const LogsExplorerTableHeader = () => (
|
||||
<div
|
||||
className={cn(
|
||||
'flex w-full items-center justify-between border-t bg-surface-100 px-5 py-2',
|
||||
'flex w-full items-center justify-between border-t bg-surface-100 px-5 py-2',
|
||||
className,
|
||||
{ hidden: !showHeader }
|
||||
)}
|
||||
@@ -369,7 +368,7 @@ const LogTable = ({
|
||||
<DataGrid
|
||||
role="table"
|
||||
style={{ height: '100%' }}
|
||||
className={cn('flex-1 flex-grow h-full border-none', {
|
||||
className={cn('flex-1 flex-grow h-full border-0', {
|
||||
'data-grid--simple-logs': queryType,
|
||||
'data-grid--logs-explorer': !queryType,
|
||||
})}
|
||||
|
||||
@@ -350,6 +350,9 @@ export const SQL_FILTER_TEMPLATES: any = {
|
||||
..._SQL_FILTER_COMMON,
|
||||
database: (value: string) => `m.project like '${value}%'`,
|
||||
},
|
||||
pg_cron_logs: {
|
||||
..._SQL_FILTER_COMMON,
|
||||
},
|
||||
}
|
||||
|
||||
export enum LogsTableName {
|
||||
|
||||
@@ -150,6 +150,7 @@ export const LogsPreviewer = ({
|
||||
}
|
||||
const handleSearch: LogSearchCallback = async (event, { query, to, from }) => {
|
||||
if (event === 'search-input-change') {
|
||||
setSelectedLogId(null)
|
||||
setFilters((prev) => ({ ...prev, search_query: query }))
|
||||
router.push({
|
||||
pathname: router.pathname,
|
||||
|
||||
@@ -2,12 +2,13 @@ import { Eye, EyeOff, RefreshCw, Search, Terminal, X } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Button, Input, TooltipContent_Shadcn_, TooltipTrigger_Shadcn_, Tooltip_Shadcn_ } from 'ui'
|
||||
|
||||
import { useParams } from 'common'
|
||||
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
|
||||
import CSVButton from 'components/ui/CSVButton'
|
||||
import DatabaseSelector from 'components/ui/DatabaseSelector'
|
||||
import { useLoadBalancersQuery } from 'data/read-replicas/load-balancers-query'
|
||||
import { Button, Input, TooltipContent_Shadcn_, TooltipTrigger_Shadcn_, Tooltip_Shadcn_ } from 'ui'
|
||||
import DatePickers from './Logs.DatePickers'
|
||||
import {
|
||||
FILTER_OPTIONS,
|
||||
@@ -17,7 +18,6 @@ import {
|
||||
} from './Logs.constants'
|
||||
import type { Filters, LogSearchCallback, LogTemplate } from './Logs.types'
|
||||
import LogsFilterPopover from './LogsFilterPopover'
|
||||
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
|
||||
|
||||
interface PreviewFilterPanelProps {
|
||||
defaultSearchValue?: string
|
||||
|
||||
Reference in new issue
Block a user