Support table mode for text data

This commit is contained in:
Alexander Zobnin
2017-12-27 14:44:06 +03:00
parent a8b2e3c88c
commit 9eeb4fe468
14 changed files with 92 additions and 22 deletions

View File

@@ -290,7 +290,11 @@ class ZabbixAPIDatasource {
if (items.length) {
return this.zabbix.getHistory(items, timeFrom, timeTo)
.then(history => {
return responseHandler.handleText(history, items, target);
if (target.resultFormat === 'table') {
return responseHandler.handleHistoryAsTable(history, items);
} else {
return responseHandler.handleText(history, items, target);
}
});
} else {
return Promise.resolve([]);