Add $__range_series variable for calculating function over the whole series, #531

This commit is contained in:
Alexander Zobnin
2019-10-09 15:15:51 +03:00
parent ca50d0db98
commit 1827aa942a
5 changed files with 40 additions and 3 deletions

View File

@@ -111,6 +111,9 @@ export class ZabbixDatasource {
let timeFrom = Math.ceil(dateMath.parse(options.range.from) / 1000);
let timeTo = Math.ceil(dateMath.parse(options.range.to) / 1000);
// Add range variables
options.scopedVars = Object.assign({}, options.scopedVars, utils.getRangeScopedVars(options.range));
// Prevent changes of original object
let target = _.cloneDeep(t);