Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metrics UI] Ensure inventory view buckets never drop below 60 seconds #58503

Merged
merged 10 commits into from
Feb 27, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const createTimeRangeWithInterval = async (
): Promise<InfraTimerangeInput> => {
const aggregations = getMetricsAggregations(options);
const modules = await aggregationsToModules(framework, requestContext, aggregations, options);
const interval =
const interval = Math.max(
(await calculateMetricInterval(
framework,
requestContext,
Expand All @@ -32,7 +32,9 @@ export const createTimeRangeWithInterval = async (
},
modules,
options.nodeType
)) || 60000;
)) || 60,
60
);
return {
interval: `${interval}s`,
from: options.timerange.to - interval * 5000, // We need at least 5 buckets worth of data
Expand Down