diff --git a/ui/src/app/api/alias-controller.js b/ui/src/app/api/alias-controller.js index 10b110743f..66781a8dbb 100644 --- a/ui/src/app/api/alias-controller.js +++ b/ui/src/app/api/alias-controller.js @@ -146,6 +146,7 @@ export default class AliasController { newDatasource.entityId = resolvedEntity.id; newDatasource.entityType = resolvedEntity.entityType; newDatasource.entityName = resolvedEntity.name; + newDatasource.entityDescription = resolvedEntity.entityDescription newDatasource.name = resolvedEntity.name; newDatasource.generated = i > 0 ? true : false; datasources.push(newDatasource); @@ -167,6 +168,7 @@ export default class AliasController { datasource.entityType = entity.entityType; datasource.entityName = entity.name; datasource.name = entity.name; + datasource.entityDescription = entity.entityDescription; deferred.resolve([datasource]); } else { if (aliasInfo.stateEntity) { diff --git a/ui/src/app/api/entity.service.js b/ui/src/app/api/entity.service.js index 762bf1aba3..2e29238dfe 100644 --- a/ui/src/app/api/entity.service.js +++ b/ui/src/app/api/entity.service.js @@ -329,7 +329,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device } function entityToEntityInfo(entity) { - return { name: entity.name, entityType: entity.id.entityType, id: entity.id.id }; + return { name: entity.name, entityType: entity.id.entityType, id: entity.id.id, entityDescription: entity.additionalInfo?entity.additionalInfo.description:"" }; } function entityRelationInfoToEntityInfo(entityRelationInfo, direction) { diff --git a/ui/src/app/device/device-card.tpl.html b/ui/src/app/device/device-card.tpl.html index 522f1ab376..de8b7eebc4 100644 --- a/ui/src/app/device/device-card.tpl.html +++ b/ui/src/app/device/device-card.tpl.html @@ -16,7 +16,8 @@ -->
-
{{vm.item.type}}
+
{{vm.item.additionalInfo.description}}
+
{{vm.item.type}}
{{'device.assignedToCustomer' | translate}} '{{vm.item.assignedCustomer.title}}'
{{'device.public' | translate}}