don't fetch alerts for empty item list

This commit is contained in:
Alexander Zobnin
2017-10-24 13:07:38 +03:00
parent d084e1723a
commit 7bf473238f
4 changed files with 10 additions and 1 deletions

View File

@@ -771,6 +771,9 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
var items = _.flatten(results);
var itemids = _.map(items, 'itemid');
if (itemids.length === 0) {
return [];
}
return _this11.zabbix.getAlerts(itemids);
}).then(function (triggers) {
triggers = _.filter(triggers, function (trigger) {