fix(dashboard): filter on all properties (except on overview)
This commit is contained in:
@@ -7,7 +7,6 @@ import type { IChartType } from '@openpanel/validation';
|
|||||||
|
|
||||||
import { useTRPC } from '@/integrations/trpc/react';
|
import { useTRPC } from '@/integrations/trpc/react';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { SerieIcon } from '../report-chart/common/serie-icon';
|
|
||||||
import { Widget, WidgetBody } from '../widget';
|
import { Widget, WidgetBody } from '../widget';
|
||||||
import { OverviewChartToggle } from './overview-chart-toggle';
|
import { OverviewChartToggle } from './overview-chart-toggle';
|
||||||
import { WidgetButtons, WidgetFooter, WidgetHead } from './overview-widget';
|
import { WidgetButtons, WidgetFooter, WidgetHead } from './overview-widget';
|
||||||
@@ -148,6 +147,40 @@ export default function OverviewTopEvents({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
link_out: {
|
||||||
|
title: 'Link out',
|
||||||
|
btn: 'Link out',
|
||||||
|
chart: {
|
||||||
|
report: {
|
||||||
|
limit: 10,
|
||||||
|
projectId,
|
||||||
|
startDate,
|
||||||
|
endDate,
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'event',
|
||||||
|
segment: 'event',
|
||||||
|
id: 'A',
|
||||||
|
name: 'link_out',
|
||||||
|
filters: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
breakdowns: [
|
||||||
|
{
|
||||||
|
id: 'A',
|
||||||
|
name: 'properties.href',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
chartType,
|
||||||
|
lineType: 'monotone',
|
||||||
|
interval: interval,
|
||||||
|
name: 'Link out',
|
||||||
|
range: range,
|
||||||
|
previous: previous,
|
||||||
|
metric: 'sum',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export function PropertiesCombobox({
|
|||||||
{/* <SearchHeader onSearch={() => {}} value={search} /> */}
|
{/* <SearchHeader onSearch={() => {}} value={search} /> */}
|
||||||
{/* <DropdownMenuSeparator /> */}
|
{/* <DropdownMenuSeparator /> */}
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="group justify-between"
|
className="group justify-between gap-2"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
handleStateChange('event');
|
handleStateChange('event');
|
||||||
@@ -138,7 +138,7 @@ export function PropertiesCombobox({
|
|||||||
<DatabaseIcon className="size-4 group-hover:text-blue-500 group-hover:scale-125 transition-all group-hover:rotate-12" />
|
<DatabaseIcon className="size-4 group-hover:text-blue-500 group-hover:scale-125 transition-all group-hover:rotate-12" />
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="group justify-between"
|
className="group justify-between gap-2"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
handleStateChange('profile');
|
handleStateChange('profile');
|
||||||
|
|||||||
@@ -88,13 +88,17 @@ export default function OverviewFilters({
|
|||||||
</div>
|
</div>
|
||||||
<PropertiesCombobox
|
<PropertiesCombobox
|
||||||
mode={mode}
|
mode={mode}
|
||||||
exclude={[
|
exclude={
|
||||||
|
enableEventsFilter
|
||||||
|
? []
|
||||||
|
: [
|
||||||
'properties.*',
|
'properties.*',
|
||||||
'name',
|
'name',
|
||||||
'duration',
|
'duration',
|
||||||
'created_at',
|
'created_at',
|
||||||
'has_profile',
|
'has_profile',
|
||||||
]}
|
]
|
||||||
|
}
|
||||||
onSelect={(action) => {
|
onSelect={(action) => {
|
||||||
setFilter(action.value, [], 'is');
|
setFilter(action.value, [], 'is');
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user