aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/models/ncfTreeNode.ts
blob: 903fd2f3274c6f74a0633e5a07ba6b71604af400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {TreeNodeModel} from "./treeNodeModel";
import {Level1Model} from "./nodeModel";
import {Level1Instance} from "./level1Instance";


export class NcfTreeNode extends TreeNodeModel {
  storeKey : string;
  typeName: string;
  menuActions: { [p: string]: { method: Function; visible: Function; enable: Function } };
  isFailed: boolean;
  statusMessage?: string;
  instanceGroupRole: string;
  instanceGroupFunction: string;
  numberOfNetworks: number;
  modelVersion: string;

  constructor(instance: Level1Instance, ncfModel: Level1Model, storeKey: string, modelVersion: string) {
    super(instance, ncfModel);
    this.name = instance.instanceName? instance.instanceName: !ncfModel.isEcompGeneratedNaming ? ncfModel.modelCustomizationName : '<Automatically Assigned>';
    this.modelName = ncfModel.modelCustomizationName;
    this.type = ncfModel.type;
    this.isEcompGeneratedNaming = ncfModel.isEcompGeneratedNaming;
    this.storeKey = storeKey;
    this.instanceGroupRole = instance['instanceGroupRole'];
    this.instanceGroupFunction = instance['instanceGroupFunction'];
    this.numberOfNetworks = instance['numberOfNetworks'];
    this.modelVersion = modelVersion;
  }
}