mysql-connector: implement getHistory for DB connector

This commit is contained in:
Alexander Zobnin
2017-07-21 19:30:53 +03:00
parent 6d89f36bb2
commit 16256f2778
12 changed files with 233 additions and 24 deletions

View File

@@ -356,9 +356,15 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
});
} else {
// Use history
getHistoryPromise = _this2.zabbix.getHistory(items, timeFrom, timeTo).then(function (history) {
return responseHandler.handleHistory(history, items);
});
if (_this2.enableDirectDBConnection) {
getHistoryPromise = _this2.zabbix.getHistory(items, timeFrom, timeTo).then(function (history) {
return _this2.zabbix.dbConnector.handleHistory(history, items);
});
} else {
getHistoryPromise = _this2.zabbix.getHistory(items, timeFrom, timeTo).then(function (history) {
return responseHandler.handleHistory(history, items);
});
}
}
return getHistoryPromise;