diff --git a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx index caa673097f5..bcfc5ce385e 100644 --- a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx +++ b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx @@ -136,7 +136,6 @@ export const LogsPreviewer: React.FC = ({ projectRef, queryType, override setShowChart(!showChart)} - isCustomQuery={false} isLoading={isLoading} newCount={newCount} templates={TEMPLATES.filter( diff --git a/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx b/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx index 02fa7c7161f..f15ddeccaa8 100644 --- a/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx +++ b/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx @@ -4,12 +4,8 @@ import { Input, Typography, IconRefreshCw, - IconX, IconSearch, - IconClock, - Popover, IconExternalLink, - Toggle, IconEye, IconEyeOff, } from '@supabase/ui' @@ -26,11 +22,10 @@ interface Props { defaultFromValue?: string templates?: any isLoading: boolean - isCustomQuery: boolean newCount: number onRefresh?: () => void onSearch?: LogSearchCallback - onCustomClick?: () => void + onExploreClick?: () => void onSelectTemplate: (template: LogTemplate) => void isShowingEventChart: boolean onToggleEventChart: () => void @@ -47,14 +42,13 @@ dayjs.extend(utc) */ const PreviewFilterPanel: FC = ({ isLoading, - isCustomQuery, newCount, onRefresh, onSearch = () => {}, defaultSearchValue = '', defaultToValue = '', defaultFromValue = '', - onCustomClick, + onExploreClick, dispatchWhereFilters, whereFilters: filters, table, @@ -83,38 +77,36 @@ const PreviewFilterPanel: FC = ({ } }, [defaultToValue]) - const RefreshButton = () => { - return !isCustomQuery ? ( - - ) : null - } +
+
+ + )} + + + } + loading={isLoading} + onClick={onRefresh} + > + Refresh + + ) const handleToChange = (e: React.ChangeEvent) => { const value = e.target.value @@ -135,14 +127,6 @@ const PreviewFilterPanel: FC = ({ } } - const handleReset = async () => { - setTo({ value: '', error: '' }) - setFrom({ value: '', error: '' }) - const value = dayjs().utc().toISOString() - setDefaultTimestamp(value) - onSearch({ query: search, to: '', from: '' }) - } - const handleSearch = () => onSearch({ query: search, to: to.value, from: from.value }) return ( @@ -221,7 +205,7 @@ const PreviewFilterPanel: FC = ({ -