📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fixes
Blue Mouse9e787e4ca35e
diff --git a/web/app/pages/Project/Performance/View/PerformanceView.tsx b/web/app/pages/Project/Performance/View/PerformanceView.tsxindex cc4d7d15f..66c6d3806 100644--- a/web/app/pages/Project/Performance/View/PerformanceView.tsx+++ b/web/app/pages/Project/Performance/View/PerformanceView.tsx@@ -4,7 +4,6 @@ import _find from 'lodash/find'import _isEmpty from 'lodash/isEmpty'import _keys from 'lodash/keys'import _map from 'lodash/map'-import _some from 'lodash/some'import { EyeIcon, PercentIcon } from 'lucide-react'import { useState, useEffect, useMemo, useRef, lazy, Suspense } from 'react'import { useTranslation } from 'react-i18next'@@ -298,11 +297,6 @@ const PerformanceView = ({ tnMapping }: PerformanceViewProps) => {[t],)- const checkIfAllMetricsAreDisabled = useMemo(- () => !_some({ activeChartMetrics }, (value) => value),- [activeChartMetrics],- )-const loadAnalytics = async () => {if (!project) return@@ -414,7 +408,9 @@ const PerformanceView = ({ tnMapping }: PerformanceViewProps) => {let newTimebucket = timeBucketif (period === 'all' && !_isEmpty(dataPerf.timeBucket)) {- newTimebucket = dataPerf.timeBucket?.includes(timeBucket) ? timeBucket : (dataPerf.timeBucket?.[0] as string)+ newTimebucket = dataPerf.timeBucket?.includes(timeBucket as TimeBucket)+ ? timeBucket+ : (dataPerf.timeBucket?.[0] as TimeBucket)const newSearchParams = new URLSearchParams(searchParams.toString())newSearchParams.set('timeBucket', newTimebucket)setSearchParams(newSearchParams)@@ -490,7 +486,12 @@ const PerformanceView = ({ tnMapping }: PerformanceViewProps) => {// Show no events if data is emptyif (isPanelsDataEmpty) {- return <NoEvents filters={filters} />+ return (+ <>+ <DashboardHeader />+ <NoEvents filters={filters} />+ </>+ )}const ChartTypeSwitcher = ({ type, onSwitch }: { type: string; onSwitch: (type: 'line' | 'bar') => void }) => {@@ -589,7 +590,7 @@ const PerformanceView = ({ tnMapping }: PerformanceViewProps) => {activePeriodCompare={activePeriodCompare}/>) : null}- {!checkIfAllMetricsAreDisabled && !_isEmpty(chartData) ? (+ {activeChartMetrics && !_isEmpty(chartData) ? (<div onContextMenu={(e) => handleChartContextMenu(e, chartData?.x)} className='relative'><PerformanceChartchart={chartData}diff --git a/web/app/pages/Project/Traffic/View/TrafficView.tsx b/web/app/pages/Project/Traffic/View/TrafficView.tsxindex d5b85f1bc..ffa97d3a5 100644--- a/web/app/pages/Project/Traffic/View/TrafficView.tsx+++ b/web/app/pages/Project/Traffic/View/TrafficView.tsx@@ -736,11 +736,6 @@ const TrafficView = ({return <Loader />}- // Show no events if data is empty- if (isPanelsDataEmpty) {- return <NoEvents filters={filters} />- }-const headerRightContent = (<TrafficHeaderActionsprojectViews={projectViews}@@ -759,6 +754,16 @@ const TrafficView = ({/>)+ // Show no events if data is empty+ if (isPanelsDataEmpty) {+ return (+ <>+ <DashboardHeader rightContent={headerRightContent} />+ <NoEvents filters={filters} />+ </>+ )+ }+const ChartTypeSwitcher = ({ type, onSwitch }: { type: string; onSwitch: (type: 'line' | 'bar') => void }) => {if (type === chartTypes.bar) {return (diff --git a/web/app/pages/Project/View/components/NoEvents.tsx b/web/app/pages/Project/View/components/NoEvents.tsxindex df7653fa2..3bb8324b6 100644--- a/web/app/pages/Project/View/components/NoEvents.tsx+++ b/web/app/pages/Project/View/components/NoEvents.tsx@@ -19,7 +19,7 @@ const NoEvents = ({ filters }: NoEventsProps) => {if (_isEmpty(filters)) {return (- <div className='mt-5 flex flex-col py-6 sm:px-6 lg:px-8'>+ <div className='mt-5 flex min-h-[78vh] flex-col py-6 sm:px-6 lg:px-8'><div className='mx-auto w-full max-w-7xl'><Text as='h2' size='4xl' weight='semibold' className='my-3 text-center leading-tight'>{t('project.noEvTitle')}@@ -37,7 +37,7 @@ const NoEvents = ({ filters }: NoEventsProps) => {<div className='mt-4'><Filters tnMapping={tnMapping} /></div>- <div className='mt-5 flex flex-col py-6 sm:px-6 lg:px-8'>+ <div className='mt-5 flex min-h-[78vh] flex-col py-6 sm:px-6 lg:px-8'><div className='mx-auto w-full max-w-7xl'><Text as='h2' size='4xl' weight='semibold' className='my-3 text-center leading-tight'>{t('project.noEvTitle')}