diff --git a/src/types/grafanaTypes.ts b/src/types/grafanaTypes.ts index 9c3cdbe..1ad0dfb 100644 --- a/src/types/grafanaTypes.ts +++ b/src/types/grafanaTypes.ts @@ -52,7 +52,6 @@ export const DEFAULT_QUERY: Partial = { filter: [], resultFormat: 'time_series', interval: 'AUTO', - percentileValue: 95, }; /** diff --git a/src/utils/intervalUtils.test.ts b/src/utils/intervalUtils.test.ts index 3633d11..889e997 100644 --- a/src/utils/intervalUtils.test.ts +++ b/src/utils/intervalUtils.test.ts @@ -55,7 +55,7 @@ describe('calculateQueryInterval', () => { it('should return HOUR interval if interval is AUTO and time interval bigger 3 hours and than below 6 hours', () => { //arrange const startTimestamp = 1713345420000; //Wednesday, 17 April 2024 09:17:00 - const endTimestamp = 1713356340000; //Wednesday, 17 April 2024 12:19:00 + const endTimestamp = 1713356280000; //Wednesday, 17 April 2024 12:18:00 // act const result = calculateQueryInterval('AUTO', startTimestamp, endTimestamp); diff --git a/src/utils/intervalUtils.ts b/src/utils/intervalUtils.ts index b755607..dae3ba0 100644 --- a/src/utils/intervalUtils.ts +++ b/src/utils/intervalUtils.ts @@ -51,7 +51,7 @@ export const calculateQueryInterval = ( } const intervalInMilliseconds = endTimestamp - startTimestamp; - const minuteIntervalLimitInMilliseconds = 3 * 60 * 60 * 1000 + 60000; // MINUTE granularity for timeframes below 3h 1m + const minuteIntervalLimitInMilliseconds = 3 * 60 * 60 * 1000; // MINUTE granularity for timeframes below 3h const hourIntervalLimitInMilliseconds = 6 * 24 * 60 * 60 * 1000; // HOUR granularity for timeframes below 6d const dayIntervalLimitInMilliseconds = 30 * 24 * 60 * 60 * 1000; // DAY granularity for timeframes below 30d