1 import {TreeNodeModel} from "./treeNodeModel";
2 import {Level1Model} from "./nodeModel";
3 import {Level1Instance} from "./level1Instance";
6 export class VpnTreeNode extends TreeNodeModel {
9 menuActions: { [p: string]: { method: Function; visible: Function; enable: Function } };
11 statusMessage?: string;
13 routeTargetId: string;
14 routeTargetRole: string;
15 customerVPNId: string;
17 constructor(instance: Level1Instance, vpnModel: Level1Model, storeKey: string) {
18 super(instance, vpnModel);
19 this.name = instance.instanceName ? instance.instanceName : !vpnModel.isEcompGeneratedNaming ? vpnModel.modelCustomizationName : '<Automatically Assigned>';
20 this.modelName = vpnModel.modelCustomizationName;
21 this.type = vpnModel.type;
22 this.isEcompGeneratedNaming = vpnModel.isEcompGeneratedNaming;
23 this.storeKey = storeKey;
24 this.region = instance.region;
25 this.routeTargetId = instance.routeTargets && instance.routeTargets.length ? instance.routeTargets[0].globalRouteTarget : null;
26 this.routeTargetRole = instance.routeTargets && instance.routeTargets.length ? instance.routeTargets[0].routeTargetRole : null;
27 this.customerVPNId = instance.customerId;