Commit 6a93307d289aa1178e3d77d9f3daac1a8e2683b9

Authored by Vladyslav Prykhodko
1 parent 8294240a

add expression

@@ -151,7 +151,8 @@ export default class AliasController { @@ -151,7 +151,8 @@ export default class AliasController {
151 newDatasource.entityId = resolvedEntity.id; 151 newDatasource.entityId = resolvedEntity.id;
152 newDatasource.entityType = resolvedEntity.entityType; 152 newDatasource.entityType = resolvedEntity.entityType;
153 newDatasource.entityName = resolvedEntity.name; 153 newDatasource.entityName = resolvedEntity.name;
154 - newDatasource.entityDescription = resolvedEntity.entityDescription 154 + newDatasource.entityLabel = resolvedEntity.label;
  155 + newDatasource.entityDescription = resolvedEntity.entityDescription;
155 newDatasource.name = resolvedEntity.name; 156 newDatasource.name = resolvedEntity.name;
156 newDatasource.generated = i > 0 ? true : false; 157 newDatasource.generated = i > 0 ? true : false;
157 datasources.push(newDatasource); 158 datasources.push(newDatasource);
@@ -177,6 +178,7 @@ export default class AliasController { @@ -177,6 +178,7 @@ export default class AliasController {
177 datasource.entityId = entity.id; 178 datasource.entityId = entity.id;
178 datasource.entityType = entity.entityType; 179 datasource.entityType = entity.entityType;
179 datasource.entityName = entity.name; 180 datasource.entityName = entity.name;
  181 + datasource.entityLabel = entity.label;
180 datasource.name = entity.name; 182 datasource.name = entity.name;
181 datasource.entityDescription = entity.entityDescription; 183 datasource.entityDescription = entity.entityDescription;
182 deferred.resolve([datasource]); 184 deferred.resolve([datasource]);
@@ -344,7 +344,13 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device @@ -344,7 +344,13 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device
344 } 344 }
345 345
346 function entityToEntityInfo(entity) { 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 function entityRelationInfoToEntityInfo(entityRelationInfo, direction) { 356 function entityRelationInfoToEntityInfo(entityRelationInfo, direction) {
@@ -497,6 +497,8 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t @@ -497,6 +497,8 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t
497 label = label.split(variable).join(datasource.entityName); 497 label = label.split(variable).join(datasource.entityName);
498 } else if (variableName === 'deviceName') { 498 } else if (variableName === 'deviceName') {
499 label = label.split(variable).join(datasource.entityName); 499 label = label.split(variable).join(datasource.entityName);
  500 + } else if (variableName === 'entityLabel') {
  501 + label = label.split(variable).join(datasource.entityLabel);
500 } else if (variableName === 'aliasName') { 502 } else if (variableName === 'aliasName') {
501 label = label.split(variable).join(datasource.aliasName); 503 label = label.split(variable).join(datasource.aliasName);
502 } else if (variableName === 'entityDescription') { 504 } else if (variableName === 'entityDescription') {