Trigger panel: fixed show triggers option.
This commit is contained in:
@@ -296,7 +296,7 @@ function (angular, _) {
|
||||
return this.request('service.getsla', params);
|
||||
};
|
||||
|
||||
p.getTriggers = function(groupids, hostids, applicationids) {
|
||||
p.getTriggers = function(groupids, hostids, applicationids, showEvents) {
|
||||
var params = {
|
||||
output: 'extend',
|
||||
groupids: groupids,
|
||||
@@ -308,7 +308,7 @@ function (angular, _) {
|
||||
skipDependent: true,
|
||||
//only_true: true,
|
||||
filter: {
|
||||
value: 1
|
||||
value: showEvents
|
||||
},
|
||||
selectGroups: ['name'],
|
||||
selectHosts: ['name'],
|
||||
|
||||
@@ -123,6 +123,7 @@ function (angular, app, _, $, config, PanelMeta) {
|
||||
var zabbix = datasource.zabbixAPI;
|
||||
var queryProcessor = datasource.queryProcessor;
|
||||
var triggerFilter = $scope.panel.triggers;
|
||||
var showEvents = $scope.panel.showEvents.value;
|
||||
var buildQuery = queryProcessor.buildTriggerQuery(triggerFilter.group.filter,
|
||||
triggerFilter.host.filter,
|
||||
triggerFilter.application.filter);
|
||||
@@ -130,7 +131,7 @@ function (angular, app, _, $, config, PanelMeta) {
|
||||
return zabbix.getTriggers(query.groupids,
|
||||
query.hostids,
|
||||
query.applicationids,
|
||||
$scope.panel.showEvents.value)
|
||||
showEvents)
|
||||
.then(function(triggers) {
|
||||
return _.map(triggers, function (trigger) {
|
||||
var lastchange = new Date(trigger.lastchange * 1000);
|
||||
|
||||
Reference in New Issue
Block a user