Commit 4e8af4a15dfdcdb1319e862179b8a8f0557b45dc
1 parent
aa14b0cb
Code review: added 'edge' in AssetScope, refactored assets-table-config.resolver…
….ts for edge's assets title
Showing
2 changed files
with
4 additions
and
3 deletions
... | ... | @@ -35,7 +35,7 @@ export class AssetComponent extends EntityComponent<AssetInfo> { |
35 | 35 | |
36 | 36 | entityType = EntityType; |
37 | 37 | |
38 | - assetScope: 'tenant' | 'customer' | 'customer_user'; | |
38 | + assetScope: 'tenant' | 'customer' | 'customer_user' | 'edge'; | |
39 | 39 | |
40 | 40 | constructor(protected store: Store<AppState>, |
41 | 41 | protected translate: TranslateService, | ... | ... |
... | ... | @@ -137,8 +137,9 @@ export class AssetsTableConfigResolver implements Resolve<EntityTableConfig<Asse |
137 | 137 | this.config.tableTitle = parentCustomer.title + ': ' + this.translate.instant('asset.assets'); |
138 | 138 | } |
139 | 139 | } else if (this.config.componentsData.assetScope === 'edge') { |
140 | - this.edgeService.getEdge(this.edgeId).pipe(map(edge => | |
141 | - this.config.tableTitle = edge.name + ': ' + this.translate.instant('asset.assets'))).subscribe(); | |
140 | + this.edgeService.getEdge(this.edgeId).subscribe( | |
141 | + edge => this.config.tableTitle = edge.name + ': ' + this.translate.instant('asset.assets') | |
142 | + ); | |
142 | 143 | } else { |
143 | 144 | this.config.tableTitle = this.translate.instant('asset.assets'); |
144 | 145 | } | ... | ... |