📈 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
fixed broken captcha dashboard
Blue Mouse017d1f590f55
diff --git a/public/locales/en.json b/public/locales/en.jsonindex ca1d13c74..4d2f23c85 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -536,6 +536,7 @@"prev": "Previous","next": "Next","unique": "Unique visitors",+ "results": "Results","total": "Total page views","today": "Today","yesterday": "Yesterday",diff --git a/src/pages/Captcha/View/ViewCaptcha.helpers.jsx b/src/pages/Captcha/View/ViewCaptcha.helpers.jsxindex c9bb36280..fd194fb6d 100644--- a/src/pages/Captcha/View/ViewCaptcha.helpers.jsx+++ b/src/pages/Captcha/View/ViewCaptcha.helpers.jsx@@ -83,21 +83,21 @@ const onCSVExportClick = (data, pid, tnMapping, language) => {}const CHART_METRICS_MAPPING = {- unique: 'unique',+ results: 'results',}// function to filter the data for the chartconst getColumns = (chart, activeChartMetrics) => {const {- unique,+ results,} = activeChartMetricsconst columns = [['x', ..._map(chart.x, el => dayjs(el).toDate())],]- if (unique) {- columns.push(['unique', ...chart.uniques])+ if (results) {+ columns.push(['results', ...chart.results])}return columns@@ -123,7 +123,7 @@ const getSettings = (chart, timeBucket, activeChartMetrics, applyRegions, timeFo}regions = {- unique: [+ results: [{start: regionStart,style: {@@ -139,10 +139,10 @@ const getSettings = (chart, timeBucket, activeChartMetrics, applyRegions, timeFox: 'x',columns: getColumns(modifiedChart, activeChartMetrics),types: {- unique: chartType === chartTypes.line ? area() : bar(),+ results: chartType === chartTypes.line ? area() : bar(),},colors: {- unique: '#2563EB',+ results: '#2563EB',},regions,},diff --git a/src/pages/Captcha/View/ViewCaptcha.jsx b/src/pages/Captcha/View/ViewCaptcha.jsxindex 43abdcbb0..eb500d1f1 100644--- a/src/pages/Captcha/View/ViewCaptcha.jsx+++ b/src/pages/Captcha/View/ViewCaptcha.jsx@@ -81,7 +81,7 @@ const ViewProject = ({const [mainChart, setMainChart] = useState(null)const [dataLoading, setDataLoading] = useState(false)const [activeChartMetrics, setActiveChartMetrics] = useState({- [CHART_METRICS_MAPPING.unique]: true,+ [CHART_METRICS_MAPPING.results]: true,})const [sessionDurationAVG, setSessionDurationAVG] = useState(null)const checkIfAllMetricsAreDisabled = useMemo(() => !_some(activeChartMetrics, (value) => value), [activeChartMetrics])@@ -107,16 +107,16 @@ const ViewProject = ({const chartMetrics = useMemo(() => {return [{- id: CHART_METRICS_MAPPING.unique,- label: t('dashboard.unique'),- active: activeChartMetrics[CHART_METRICS_MAPPING.unique],+ id: CHART_METRICS_MAPPING.results,+ label: t('dashboard.results'),+ active: activeChartMetrics[CHART_METRICS_MAPPING.results],},]}, [t, activeChartMetrics])const dataNames = useMemo(() => {return {- unique: t('project.unique'),+ results: t('project.results'),}}, [t])