Commit f6957f836c0bba4b5ec8da299f7ccd3e693a49c9

Authored by Chantsova Ekaterina
1 parent 08e517a6

Fix entities count datasource label overwriting, configured label was never displayed

@@ -819,12 +819,14 @@ export function updateDatasourceFromEntityInfo(datasource: Datasource, entity: E @@ -819,12 +819,14 @@ export function updateDatasourceFromEntityInfo(datasource: Datasource, entity: E
819 datasource.entityId = entity.id; 819 datasource.entityId = entity.id;
820 datasource.entityType = entity.entityType; 820 datasource.entityType = entity.entityType;
821 if (datasource.type === DatasourceType.entity || datasource.type === DatasourceType.entityCount) { 821 if (datasource.type === DatasourceType.entity || datasource.type === DatasourceType.entityCount) {
822 - datasource.entityName = entity.name;  
823 - datasource.entityLabel = entity.label;  
824 - datasource.name = entity.name;  
825 - datasource.entityDescription = entity.entityDescription;  
826 - datasource.entity.label = entity.label;  
827 - datasource.entity.name = entity.name; 822 + if (datasource.type === DatasourceType.entity) {
  823 + datasource.entityName = entity.name;
  824 + datasource.entityLabel = entity.label;
  825 + datasource.name = entity.name;
  826 + datasource.entityDescription = entity.entityDescription;
  827 + datasource.entity.label = entity.label;
  828 + datasource.entity.name = entity.name;
  829 + }
828 if (createFilter) { 830 if (createFilter) {
829 datasource.entityFilter = { 831 datasource.entityFilter = {
830 type: AliasFilterType.singleEntity, 832 type: AliasFilterType.singleEntity,