From 0541f87cfa1b892d261ea00ddbb0864b2c0c0164 Mon Sep 17 00:00:00 2001 From: Maja Komel Date: Wed, 15 Feb 2023 11:21:47 +0100 Subject: [PATCH] Default to day granularity for charts on thematic pages --- components/country/Apps.js | 2 ++ components/country/Websites.js | 1 + cypress/e2e/mat.e2e.cy.js | 2 +- pages/network/[asn].js | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/country/Apps.js b/components/country/Apps.js index 04368d9c6..e5e5bfa79 100644 --- a/components/country/Apps.js +++ b/components/country/Apps.js @@ -21,6 +21,7 @@ const ChartsContainer = () => { probe_cc: countryCode, since, until, + time_grain: 'day', }), [countryCode, since, until]) const queryCircumventionTools = useMemo(() => ({ @@ -28,6 +29,7 @@ const ChartsContainer = () => { probe_cc: countryCode, since, until, + time_grain: 'day', }), [countryCode, since, until]) return ( diff --git a/components/country/Websites.js b/components/country/Websites.js index 363618007..a739809cb 100644 --- a/components/country/Websites.js +++ b/components/country/Websites.js @@ -19,6 +19,7 @@ const WebsitesSection = ({ countryCode }) => { since, until, test_name: 'web_connectivity', + time_grain: 'day', }), [countryCode, since, until]) return ( diff --git a/cypress/e2e/mat.e2e.cy.js b/cypress/e2e/mat.e2e.cy.js index 8c70b82bb..5656a6232 100644 --- a/cypress/e2e/mat.e2e.cy.js +++ b/cypress/e2e/mat.e2e.cy.js @@ -20,7 +20,7 @@ describe('MAT Tests', () => { describe('MAT Basics', () => { before(() => { - cy.visit('http://localhost:3100/chart/mat?test_name=web_connectivity&since=2022-03-01&until=2022-04-01&axis_x=measurement_start_day') + cy.visit('http://localhost:3100/chart/mat?test_name=web_connectivity&since=2022-03-01&until=2022-04-01&axis_x=measurement_start_day&time_grain=day') }) it('it loads', () => { diff --git a/pages/network/[asn].js b/pages/network/[asn].js index 81fb67c53..4d9697b1d 100644 --- a/pages/network/[asn].js +++ b/pages/network/[asn].js @@ -39,6 +39,7 @@ const ChartsContainer = () => { since, until, test_name: 'web_connectivity', + time_grain: 'day', }), [asn, since, until]) const queryMessagingApps = useMemo(() => ({ @@ -46,6 +47,7 @@ const ChartsContainer = () => { asn, since, until, + time_grain: 'day', }), [asn, since, until]) const queryCircumventionTools = useMemo(() => ({ @@ -53,6 +55,7 @@ const ChartsContainer = () => { asn, since, until, + time_grain: 'day', }), [asn, since, until]) return (