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

This commit is contained in:
Chantsova Ekaterina 2021-06-08 14:34:55 +03:00
parent 08e517a6ee
commit f6957f836c

View File

@ -819,12 +819,14 @@ export function updateDatasourceFromEntityInfo(datasource: Datasource, entity: E
datasource.entityId = entity.id;
datasource.entityType = entity.entityType;
if (datasource.type === DatasourceType.entity || datasource.type === DatasourceType.entityCount) {
datasource.entityName = entity.name;
datasource.entityLabel = entity.label;
datasource.name = entity.name;
datasource.entityDescription = entity.entityDescription;
datasource.entity.label = entity.label;
datasource.entity.name = entity.name;
if (datasource.type === DatasourceType.entity) {
datasource.entityName = entity.name;
datasource.entityLabel = entity.label;
datasource.name = entity.name;
datasource.entityDescription = entity.entityDescription;
datasource.entity.label = entity.label;
datasource.entity.name = entity.name;
}
if (createFilter) {
datasource.entityFilter = {
type: AliasFilterType.singleEntity,