diff --git a/ui-ngx/src/app/core/api/widget-subscription.ts b/ui-ngx/src/app/core/api/widget-subscription.ts index 9d07c751a5..440e61148e 100644 --- a/ui-ngx/src/app/core/api/widget-subscription.ts +++ b/ui-ngx/src/app/core/api/widget-subscription.ts @@ -582,12 +582,9 @@ export class WidgetSubscription implements IWidgetSubscription { const data = this.alarms.data[0]; entityId = data.originator; entityName = data.originatorName; + entityLabel = data.originatorLabel; if (data.latest && data.latest[EntityKeyType.ENTITY_FIELD]) { const entityFields = data.latest[EntityKeyType.ENTITY_FIELD]; - const labelValue = entityFields.label; - if (labelValue) { - entityLabel = labelValue.value; - } const additionalInfoValue = entityFields.additionalInfo; if (additionalInfoValue) { const additionalInfo = additionalInfoValue.value; diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts index 5b233ba2d1..18290225b6 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts @@ -804,11 +804,13 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, if (descriptors.length) { let entityId; let entityName; + let entityLabel; if (alarm && alarm.originator) { entityId = alarm.originator; entityName = alarm.originatorName; + entityLabel = alarm.originatorLabel; } - this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, {alarm}); + this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, {alarm}, entityLabel); } } @@ -827,11 +829,13 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, } let entityId; let entityName; + let entityLabel; if (alarm && alarm.originator) { entityId = alarm.originator; entityName = alarm.originatorName; + entityLabel = alarm.originatorLabel; } - this.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, {alarm}); + this.ctx.actionsApi.handleWidgetAction($event, actionDescriptor, entityId, entityName, {alarm}, entityLabel); } }