Showing
3 changed files
with
12 additions
and
2 deletions
... | ... | @@ -151,7 +151,8 @@ export default class AliasController { |
151 | 151 | newDatasource.entityId = resolvedEntity.id; |
152 | 152 | newDatasource.entityType = resolvedEntity.entityType; |
153 | 153 | newDatasource.entityName = resolvedEntity.name; |
154 | - newDatasource.entityDescription = resolvedEntity.entityDescription | |
154 | + newDatasource.entityLabel = resolvedEntity.label; | |
155 | + newDatasource.entityDescription = resolvedEntity.entityDescription; | |
155 | 156 | newDatasource.name = resolvedEntity.name; |
156 | 157 | newDatasource.generated = i > 0 ? true : false; |
157 | 158 | datasources.push(newDatasource); |
... | ... | @@ -177,6 +178,7 @@ export default class AliasController { |
177 | 178 | datasource.entityId = entity.id; |
178 | 179 | datasource.entityType = entity.entityType; |
179 | 180 | datasource.entityName = entity.name; |
181 | + datasource.entityLabel = entity.label; | |
180 | 182 | datasource.name = entity.name; |
181 | 183 | datasource.entityDescription = entity.entityDescription; |
182 | 184 | deferred.resolve([datasource]); | ... | ... |
... | ... | @@ -344,7 +344,13 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
344 | 344 | } |
345 | 345 | |
346 | 346 | function entityToEntityInfo(entity) { |
347 | - return { origEntity: entity, name: entity.name, entityType: entity.id.entityType, id: entity.id.id, entityDescription: entity.additionalInfo?entity.additionalInfo.description:"" }; | |
347 | + return { | |
348 | + origEntity: entity, | |
349 | + name: entity.name, | |
350 | + entityType: entity.id.entityType, | |
351 | + id: entity.id.id, | |
352 | + entityDescription: entity.additionalInfo?entity.additionalInfo.description:"" | |
353 | + }; | |
348 | 354 | } |
349 | 355 | |
350 | 356 | function entityRelationInfoToEntityInfo(entityRelationInfo, direction) { | ... | ... |
... | ... | @@ -497,6 +497,8 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t |
497 | 497 | label = label.split(variable).join(datasource.entityName); |
498 | 498 | } else if (variableName === 'deviceName') { |
499 | 499 | label = label.split(variable).join(datasource.entityName); |
500 | + } else if (variableName === 'entityLabel') { | |
501 | + label = label.split(variable).join(datasource.entityLabel); | |
500 | 502 | } else if (variableName === 'aliasName') { |
501 | 503 | label = label.split(variable).join(datasource.aliasName); |
502 | 504 | } else if (variableName === 'entityDescription') { | ... | ... |