Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -124,7 +124,7 @@ function AlarmsTableWidgetController($element, $scope, $filter, $mdMedia, $mdDia |
124 | 124 | $scope.$on('alarms-table-data-updated', function(event, tableId) { |
125 | 125 | if (vm.tableId == tableId) { |
126 | 126 | if (vm.subscription) { |
127 | - vm.allAlarms = vm.subscription.alarms; | |
127 | + vm.allAlarms = vm.subscription.alarms || []; | |
128 | 128 | updateAlarms(true); |
129 | 129 | $scope.$digest(); |
130 | 130 | } |
... | ... | @@ -298,7 +298,7 @@ function AlarmsTableWidgetController($element, $scope, $filter, $mdMedia, $mdDia |
298 | 298 | entityId = vm.currentAlarm.originator; |
299 | 299 | entityName = vm.currentAlarm.originatorName; |
300 | 300 | } |
301 | - vm.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, { alarm: vm.currentAlarm }); | |
301 | + vm.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, { alarm: alarm }); | |
302 | 302 | } |
303 | 303 | } |
304 | 304 | |
... | ... | @@ -312,7 +312,7 @@ function AlarmsTableWidgetController($element, $scope, $filter, $mdMedia, $mdDia |
312 | 312 | entityId = alarm.originator; |
313 | 313 | entityName = alarm.originatorName; |
314 | 314 | } |
315 | - vm.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, { alarm: vm.currentAlarm }); | |
315 | + vm.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, { alarm: alarm }); | |
316 | 316 | } |
317 | 317 | |
318 | 318 | function isCurrent(alarm) { | ... | ... |