blob: 903fd2f3274c6f74a0633e5a07ba6b71604af400 [file] [log] [blame]
Ittay Sternf7926712019-07-07 19:23:03 +03001import {TreeNodeModel} from "./treeNodeModel";
2import {Level1Model} from "./nodeModel";
3import {Level1Instance} from "./level1Instance";
4
5
6export class NcfTreeNode extends TreeNodeModel {
7 storeKey : string;
8 typeName: string;
9 menuActions: { [p: string]: { method: Function; visible: Function; enable: Function } };
10 isFailed: boolean;
11 statusMessage?: string;
12 instanceGroupRole: string;
13 instanceGroupFunction: string;
14 numberOfNetworks: number;
15 modelVersion: string;
16
17 constructor(instance: Level1Instance, ncfModel: Level1Model, storeKey: string, modelVersion: string) {
18 super(instance, ncfModel);
19 this.name = instance.instanceName? instance.instanceName: !ncfModel.isEcompGeneratedNaming ? ncfModel.modelCustomizationName : '<Automatically Assigned>';
20 this.modelName = ncfModel.modelCustomizationName;
21 this.type = ncfModel.type;
22 this.isEcompGeneratedNaming = ncfModel.isEcompGeneratedNaming;
23 this.storeKey = storeKey;
24 this.instanceGroupRole = instance['instanceGroupRole'];
25 this.instanceGroupFunction = instance['instanceGroupFunction'];
26 this.numberOfNetworks = instance['numberOfNetworks'];
27 this.modelVersion = modelVersion;
28 }
29}