@ -30,6 +30,7 @@ import { DashboardService } from '@core/http/dashboard.service';
import { DialogComponent } from '@shared/components/dialog.component' ;
import { Router } from '@angular/router' ;
import { RuleChainService } from "@core/http/rule-chain.service" ;
import { ruleChainType } from "@shared/models/rule-chain.models" ;
export interface AddEntitiesToEdgeDialogData {
edgeId : string ;
@ -50,6 +51,7 @@ export class AddEntitiesToEdgeDialogComponent extends
submitted = false ;
entityType : EntityType ;
subType : string ;
assignToEdgeTitle : string ;
assignToEdgeText : string ;
@ -74,6 +76,7 @@ export class AddEntitiesToEdgeDialogComponent extends
this . addEntitiesToEdgeFormGroup = this . fb . group ( {
entityIds : [ null , [ Validators . required ] ]
} ) ;
this . subType = '' ;
switch ( this . data . entityType ) {
case EntityType . DEVICE :
this . assignToEdgeTitle = 'device.assign-device-to-edge-title' ;
@ -82,6 +85,7 @@ export class AddEntitiesToEdgeDialogComponent extends
case EntityType . RULE_CHAIN :
this . assignToEdgeTitle = 'rulechain.assign-rulechain-to-edge-title' ;
this . assignToEdgeText = 'rulechain.assign-rulechain-to-edge-text' ;
this . subType = ruleChainType . edge ;
break ;
case EntityType . ASSET :
this . assignToEdgeTitle = 'asset.assign-asset-to-edge-title' ;