📈 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 eslint regions complaint
Blue Mousedc7114442fc9
diff --git a/src/pages/Project/View/ViewProject.helpers.jsx b/src/pages/Project/View/ViewProject.helpers.jsxindex 3c042e485..d68a13e60 100644--- a/src/pages/Project/View/ViewProject.helpers.jsx+++ b/src/pages/Project/View/ViewProject.helpers.jsx@@ -375,80 +375,9 @@ const getSettings = (chart, timeBucket, activeChartMetrics, applyRegions) => {}}-const getSettingsPerf = (chart, timeBucket, activeChartMetrics, applyRegions) => {+const getSettingsPerf = (chart, timeBucket, activeChartMetrics) => {const xAxisSize = _size(chart.x)- let regions-- if (applyRegions) {- let regionStart-- if (xAxisSize > 1) {- regionStart = dayjs(chart.x[xAxisSize - 2]).toDate()- } else {- regionStart = dayjs(chart.x[xAxisSize - 1]).toDate()- }-- regions = {- dns: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- tls: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- conn: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- response: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- render: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- dom_load: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- ttfb: [- {- start: regionStart,- style: {- dasharray: '6 2',- },- },- ],- }- }-return {data: {x: 'x',@@ -481,7 +410,6 @@ const getSettingsPerf = (chart, timeBucket, activeChartMetrics, applyRegions) =>groups: [['dns', 'tls', 'conn', 'response', 'render', 'dom_load', 'ttfb', 'frontend', 'network', 'backend'],],- // regions,},axis: {x: {diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsxindex 3a2bd86d6..31b2e8fd6 100644--- a/src/pages/Project/View/ViewProject.jsx+++ b/src/pages/Project/View/ViewProject.jsx@@ -416,8 +416,7 @@ const ViewProject = ({setIsPanelsDataEmptyPerf(true)} else {const { chart: chartPerf } = dataPerf- const applyRegions = !_includes(noRegionPeriods, activePeriod.period)- const bbSettings = getSettingsPerf(chartPerf, timeBucket, activeChartMetricsPerf, applyRegions)+ const bbSettings = getSettingsPerf(chartPerf, timeBucket, activeChartMetricsPerf)setChartDataPerf(chartPerf)setPanelsDataPerf({@@ -679,8 +678,7 @@ const ViewProject = ({}}} else if (!isLoading && !_isEmpty(chartDataPerf) && !_isEmpty(mainChart)) {- const applyRegions = !_includes(noRegionPeriods, activePeriod.period)- const bbSettings = getSettingsPerf(chartDataPerf, timeBucket, activeChartMetricsPerf, applyRegions)+ const bbSettings = getSettingsPerf(chartDataPerf, timeBucket, activeChartMetricsPerf)if (!_isEmpty(mainChart)) {mainChart.destroy()