use trends only if interval strictly greater than specified

This commit is contained in:
Alexander Zobnin
2018-10-31 21:19:42 +03:00
parent a41df652b2
commit ae32dfb9a7
2 changed files with 4 additions and 4 deletions

View File

@@ -618,8 +618,8 @@ export class ZabbixDatasource {
let useTrendsFrom = Math.ceil(dateMath.parse('now-' + this.trendsFrom) / 1000);
let useTrendsRange = Math.ceil(utils.parseInterval(this.trendsRange) / 1000);
let useTrends = this.trends && (
(timeFrom <= useTrendsFrom) ||
(timeTo - timeFrom >= useTrendsRange)
(timeFrom < useTrendsFrom) ||
(timeTo - timeFrom > useTrendsRange)
);
return useTrends;
}