|
|
@ -68,7 +68,7 @@ import { |
|
|
formatValue, |
|
|
formatValue, |
|
|
getEntityDetailsPageURL, |
|
|
getEntityDetailsPageURL, |
|
|
hasDatasourceLabelsVariables, |
|
|
hasDatasourceLabelsVariables, |
|
|
isDefined |
|
|
isDefined, isDefinedAndNotNull |
|
|
} from '@core/utils'; |
|
|
} from '@core/utils'; |
|
|
import { Store } from '@ngrx/store'; |
|
|
import { Store } from '@ngrx/store'; |
|
|
import { AppState } from '@core/core.state'; |
|
|
import { AppState } from '@core/core.state'; |
|
|
@ -555,7 +555,9 @@ export class LabelVariablePattern { |
|
|
const entityInfo = this.ctx.defaultSubscription.getFirstEntityInfo(); |
|
|
const entityInfo = this.ctx.defaultSubscription.getFirstEntityInfo(); |
|
|
label = createLabelFromSubscriptionEntityInfo(entityInfo, label); |
|
|
label = createLabelFromSubscriptionEntityInfo(entityInfo, label); |
|
|
} else { |
|
|
} else { |
|
|
const datasource = this.ctx.defaultSubscription?.firstDatasource ?? (this.ctx as any).mapInstance?.getData()[0]; |
|
|
const datasource = isDefinedAndNotNull(this.ctx.defaultSubscription) |
|
|
|
|
|
? this.ctx.defaultSubscription.firstDatasource ?? undefined |
|
|
|
|
|
: (this.ctx as any).mapInstance?.getData()[0]; |
|
|
label = createLabelFromDatasource(datasource, label); |
|
|
label = createLabelFromDatasource(datasource, label); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|