Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(dashboard): filter on all properties (except on overview)

Carl-Gerhard Lindesvärd8312556b38f6
diff --git a/apps/start/src/components/overview/overview-top-events.tsx b/apps/start/src/components/overview/overview-top-events.tsx
index a0e17bdd5..fc43fc157 100644
--- a/apps/start/src/components/overview/overview-top-events.tsx
+++ b/apps/start/src/components/overview/overview-top-events.tsx
@@ -7,7 +7,6 @@ import type { IChartType } from '@openpanel/validation';
import { useTRPC } from '@/integrations/trpc/react';
import { useQuery } from '@tanstack/react-query';
-import { SerieIcon } from '../report-chart/common/serie-icon';
import { Widget, WidgetBody } from '../widget';
import { OverviewChartToggle } from './overview-chart-toggle';
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 (
diff --git a/apps/start/src/components/report/sidebar/PropertiesCombobox.tsx b/apps/start/src/components/report/sidebar/PropertiesCombobox.tsx
index 99637fcfe..843fc3fa3 100644
--- a/apps/start/src/components/report/sidebar/PropertiesCombobox.tsx
+++ b/apps/start/src/components/report/sidebar/PropertiesCombobox.tsx
@@ -128,7 +128,7 @@ export function PropertiesCombobox({
{/* <SearchHeader onSearch={() => {}} value={search} /> */}
{/* <DropdownMenuSeparator /> */}
<DropdownMenuItem
- className="group justify-between"
+ className="group justify-between gap-2"
onClick={(e) => {
e.preventDefault();
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" />
</DropdownMenuItem>
<DropdownMenuItem
- className="group justify-between"
+ className="group justify-between gap-2"
onClick={(e) => {
e.preventDefault();
handleStateChange('profile');
diff --git a/apps/start/src/modals/overview-filters.tsx b/apps/start/src/modals/overview-filters.tsx
index 78bebe888..1c516d67e 100644
--- a/apps/start/src/modals/overview-filters.tsx
+++ b/apps/start/src/modals/overview-filters.tsx
@@ -88,13 +88,17 @@ export default function OverviewFilters({
</div>
<PropertiesCombobox
mode={mode}
- exclude={[
- 'properties.*',
- 'name',
- 'duration',
- 'created_at',
- 'has_profile',
- ]}
+ exclude={
+ enableEventsFilter
+ ? []
+ : [
+ 'properties.*',
+ 'name',
+ 'duration',
+ 'created_at',
+ 'has_profile',
+ ]
+ }
onSelect={(action) => {
setFilter(action.value, [], 'is');
}}