Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 1 | import {TreeNodeModel} from "./treeNodeModel"; |
| 2 | import {Level1Model} from "./nodeModel"; |
| 3 | import {Level1Instance} from "./level1Instance"; |
| 4 | |
| 5 | |
| 6 | export 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 | } |