delegate getDescription to ProfilesService

This commit is contained in:
Eugene Pankov
2021-07-13 10:28:27 +02:00
parent d7741f07a1
commit c043d5bc83
2 changed files with 6 additions and 1 deletions

View File

@@ -73,6 +73,11 @@ export class ProfilesService {
return this.profileProviders.find(x => x.id === profile.type) ?? null
}
getDescription (profile: Profile): string|null {
profile = this.getConfigProxyForProfile(profile)
return this.providerForProfile(profile)?.getDescription(profile) ?? null
}
selectorOptionForProfile <T> (profile: Profile): SelectorOption<T> {
profile = this.getConfigProxyForProfile(profile)
return {

View File

@@ -190,7 +190,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
}
getDescription (profile: Profile): string|null {
return this.profilesService.providerForProfile(profile)?.getDescription(profile) ?? null
return this.profilesService.getDescription(profile)
}
getTypeLabel (profile: Profile): string {