From 41a1c6679fb147f6f2442cb7a4563e37ea8c7073 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Fri, 27 Dec 2019 18:06:31 +0200 Subject: [PATCH] Added support entity Label to state name and breadcrumb for dashboard --- ui/src/app/api/subscription.js | 8 ++++--- .../components/widget/widget.controller.js | 15 ++++++++---- .../states/entity-state-controller.js | 23 +++++++++++-------- .../app/widget/lib/entities-table-widget.js | 12 +++++----- ui/src/app/widget/lib/flot-widget.js | 3 ++- ui/src/app/widget/lib/map-widget2.js | 9 +++++--- .../app/widget/lib/timeseries-table-widget.js | 10 ++++---- 7 files changed, 49 insertions(+), 31 deletions(-) diff --git a/ui/src/app/api/subscription.js b/ui/src/app/api/subscription.js index 86ab823294..f3d8e5cf47 100644 --- a/ui/src/app/api/subscription.js +++ b/ui/src/app/api/subscription.js @@ -179,8 +179,7 @@ export default class Subscription { } getFirstEntityInfo() { - var entityId; - var entityName; + var entityId, entityName, entityLabel = null; if (this.type === this.ctx.types.widgetType.rpc.value) { if (this.targetDeviceId) { entityId = { @@ -196,6 +195,7 @@ export default class Subscription { id: this.alarmSource.entityId }; entityName = this.alarmSource.entityName; + entityLabel = this.alarmSource.entityLabel; } } else { for (var i=0;i