diff options
author | 2019-07-07 19:23:03 +0300 | |
---|---|---|
committer | 2019-07-08 16:13:43 +0300 | |
commit | f792671ae247a931f34d902e9276202b5016ef9a (patch) | |
tree | 6104971e8074c9a3d720836276ff18619719ec02 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts | |
parent | fc62274e8d15964d63c62bf0e2f4abc040252ee9 (diff) |
Merge from ecomp 718fd196 - Modern UI
Issue-ID: VID-378
Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts index 7db3d906e..bfe1d0082 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts @@ -42,6 +42,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo { name: string = 'vfModules'; type: string = 'Module'; typeName: string = 'M'; + componentInfoType = ComponentInfoType.VFMODULE; /*********************************************************** * return if user should provide instance name or not. @@ -367,22 +368,16 @@ export class VFModuleModelInfo implements ILevelNodeInfo { return (!_.isNil(instance) && !_.isNil(instance[deepDynamicName])) ? instance[deepDynamicName].position : null; } - onSelectedNode(node: ITreeNode): void { + getInfo(model, instance): ModelInformationItem[] { + const modelInformation = !_.isEmpty(model) && !_.isEmpty(model.properties) ? [ + ModelInformationItem.createInstance("Base module", model.properties.baseModule), + ModelInformationItem.createInstance("Min instances", !_.isNull(model.properties.minCountInstances)? String(model.properties.minCountInstances): null), + ModelInformationItem.createInstance("Max instances", !_.isNull(model.properties.maxCountInstances)? String(model.properties.maxCountInstances): null), + ModelInformationItem.createInstance("Initial instances count", !_.isNull(model.properties.initialCount)? String(model.properties.initialCount): null) + ] : []; + + const instanceInfo = []; + const result = [modelInformation, instanceInfo]; + return _.uniq(_.flatten(result)); } - - getInfoForVFModule(model, instance): ComponentInfoModel { - let modelInfoItems: ModelInformationItem[] = []; - if (model && !_.isNil(model.properties)) - { - modelInfoItems = [ - ModelInformationItem.createInstance("Base Module", model.properties.baseModule), - ModelInformationItem.createInstance("Min Instances", model.properties.minCountInstances), - ModelInformationItem.createInstance("Max Instances", model.properties.maxCountInstances), - ModelInformationItem.createInstance("Initial Instances Count", model.properties.initialCount) - ]; - } - return this._componentInfoService.addGeneralInfoItems(modelInfoItems, ComponentInfoType.VFMODULE, model, instance); - } - - } |