Build dist
This commit is contained in:
56
dist/datasource-zabbix/datasource.js
vendored
56
dist/datasource-zabbix/datasource.js
vendored
@@ -328,21 +328,19 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
|
||||
var getHistoryPromise = void 0;
|
||||
|
||||
if (useTrends) {
|
||||
(function () {
|
||||
var valueType = _this2.getTrendValueType(target);
|
||||
getHistoryPromise = _this2.zabbix.getTrend(items, timeFrom, timeTo).then(function (history) {
|
||||
return responseHandler.handleTrends(history, items, valueType);
|
||||
}).then(function (timeseries) {
|
||||
// Sort trend data, issue #202
|
||||
_.forEach(timeseries, function (series) {
|
||||
series.datapoints = _.sortBy(series.datapoints, function (point) {
|
||||
return point[c.DATAPOINT_TS];
|
||||
});
|
||||
var valueType = _this2.getTrendValueType(target);
|
||||
getHistoryPromise = _this2.zabbix.getTrend(items, timeFrom, timeTo).then(function (history) {
|
||||
return responseHandler.handleTrends(history, items, valueType);
|
||||
}).then(function (timeseries) {
|
||||
// Sort trend data, issue #202
|
||||
_.forEach(timeseries, function (series) {
|
||||
series.datapoints = _.sortBy(series.datapoints, function (point) {
|
||||
return point[c.DATAPOINT_TS];
|
||||
});
|
||||
|
||||
return timeseries;
|
||||
});
|
||||
})();
|
||||
|
||||
return timeseries;
|
||||
});
|
||||
} else {
|
||||
// Use history
|
||||
getHistoryPromise = _this2.zabbix.getHistory(items, timeFrom, timeTo).then(function (history) {
|
||||
@@ -389,20 +387,18 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
|
||||
|
||||
// Apply aggregations
|
||||
if (aggregationFunctions.length) {
|
||||
(function () {
|
||||
var dp = _.map(timeseries_data, 'datapoints');
|
||||
dp = sequence(aggregationFunctions)(dp);
|
||||
var dp = _.map(timeseries_data, 'datapoints');
|
||||
dp = sequence(aggregationFunctions)(dp);
|
||||
|
||||
var aggFuncNames = _.map(metricFunctions.getCategories()['Aggregate'], 'name');
|
||||
var lastAgg = _.findLast(target.functions, function (func) {
|
||||
return _.includes(aggFuncNames, func.def.name);
|
||||
});
|
||||
var aggFuncNames = _.map(metricFunctions.getCategories()['Aggregate'], 'name');
|
||||
var lastAgg = _.findLast(target.functions, function (func) {
|
||||
return _.includes(aggFuncNames, func.def.name);
|
||||
});
|
||||
|
||||
timeseries_data = [{
|
||||
target: lastAgg.text,
|
||||
datapoints: dp
|
||||
}];
|
||||
})();
|
||||
timeseries_data = [{
|
||||
target: lastAgg.text,
|
||||
datapoints: dp
|
||||
}];
|
||||
}
|
||||
|
||||
// Apply alias functions
|
||||
@@ -422,12 +418,10 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
|
||||
return func.def.name === 'timeShift';
|
||||
});
|
||||
if (timeShiftFunc) {
|
||||
(function () {
|
||||
var shift = timeShiftFunc.params[0];
|
||||
_.forEach(timeseries_data, function (series) {
|
||||
series.datapoints = dataProcessor.unShiftTimeSeries(shift, series.datapoints);
|
||||
});
|
||||
})();
|
||||
var shift = timeShiftFunc.params[0];
|
||||
_.forEach(timeseries_data, function (series) {
|
||||
series.datapoints = dataProcessor.unShiftTimeSeries(shift, series.datapoints);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
||||
2
dist/datasource-zabbix/datasource.js.map
vendored
2
dist/datasource-zabbix/datasource.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user