Commit b5c6381eecc340b71e2a33aad1bbed7bd33aee66
1 parent
7d561fb0
Code review. entity.service Router minor refactoring
Showing
1 changed file
with
3 additions
and
4 deletions
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import { Injectable } from '@angular/core'; | |
17 | +import {Inject, Injectable} from '@angular/core'; | |
18 | 18 | import { EMPTY, forkJoin, Observable, of, throwError } from 'rxjs'; |
19 | 19 | import { HttpClient } from '@angular/common/http'; |
20 | 20 | import { PageLink } from '@shared/models/page/page-link'; |
... | ... | @@ -68,7 +68,6 @@ import { |
68 | 68 | StringOperation |
69 | 69 | } from '@shared/models/query/query.models'; |
70 | 70 | import { alarmFields } from '@shared/models/alarm.models'; |
71 | - | |
72 | 71 | import { EdgeService } from "@core/http/edge.service"; |
73 | 72 | import { ruleChainType } from "@shared/models/rule-chain.models"; |
74 | 73 | import { Router } from "@angular/router"; |
... | ... | @@ -93,7 +92,7 @@ export class EntityService { |
93 | 92 | private entityRelationService: EntityRelationService, |
94 | 93 | private attributeService: AttributeService, |
95 | 94 | private utils: UtilsService, |
96 | - private route: Router | |
95 | + private router: Router | |
97 | 96 | ) { } |
98 | 97 | |
99 | 98 | private getEntityObservable(entityType: EntityType, entityId: string, |
... | ... | @@ -323,7 +322,7 @@ export class EntityService { |
323 | 322 | break; |
324 | 323 | case EntityType.RULE_CHAIN: |
325 | 324 | pageLink.sortOrder.property = 'name'; |
326 | - if (this.route.url.includes('edge')) { | |
325 | + if (this.router.url.includes('edge')) { | |
327 | 326 | entitiesObservable = this.ruleChainService.getRuleChains(pageLink, ruleChainType.edge, config); |
328 | 327 | } else { |
329 | 328 | entitiesObservable = this.ruleChainService.getRuleChains(pageLink, ruleChainType.core, config); | ... | ... |