Code review. entity.service Router minor refactoring
This commit is contained in:
parent
7d561fb0a4
commit
b5c6381eec
@ -14,7 +14,7 @@
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import {Inject, Injectable} from '@angular/core';
|
||||
import { EMPTY, forkJoin, Observable, of, throwError } from 'rxjs';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { PageLink } from '@shared/models/page/page-link';
|
||||
@ -68,7 +68,6 @@ import {
|
||||
StringOperation
|
||||
} from '@shared/models/query/query.models';
|
||||
import { alarmFields } from '@shared/models/alarm.models';
|
||||
|
||||
import { EdgeService } from "@core/http/edge.service";
|
||||
import { ruleChainType } from "@shared/models/rule-chain.models";
|
||||
import { Router } from "@angular/router";
|
||||
@ -93,7 +92,7 @@ export class EntityService {
|
||||
private entityRelationService: EntityRelationService,
|
||||
private attributeService: AttributeService,
|
||||
private utils: UtilsService,
|
||||
private route: Router
|
||||
private router: Router
|
||||
) { }
|
||||
|
||||
private getEntityObservable(entityType: EntityType, entityId: string,
|
||||
@ -323,7 +322,7 @@ export class EntityService {
|
||||
break;
|
||||
case EntityType.RULE_CHAIN:
|
||||
pageLink.sortOrder.property = 'name';
|
||||
if (this.route.url.includes('edge')) {
|
||||
if (this.router.url.includes('edge')) {
|
||||
entitiesObservable = this.ruleChainService.getRuleChains(pageLink, ruleChainType.edge, config);
|
||||
} else {
|
||||
entitiesObservable = this.ruleChainService.getRuleChains(pageLink, ruleChainType.core, config);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user