diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-29 15:11:47 +0200 |
---|---|---|
committer | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-30 23:23:36 +0200 |
commit | aefc6a0e43b8ce36134dbbed71cf2b4cb9745a9f (patch) | |
tree | 82e6a44cdb477657796d3280aa0a9ef91aea1fe3 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember | |
parent | 714c28d14b53b91eac1a5ffa3ebdf63650028918 (diff) |
don't show delete in menu action while edit a macro service
Issue-ID: VID-760
Change-Id: Ieed2b7430cc1584681b1143d8b7244801dd8a1c4
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts index 86455ce60..20d1f5949 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts @@ -65,12 +65,13 @@ export class RelatedVnfMemberInfoModel implements ILevelNodeInfo { * @param model - vnf model * @param parentModel * @param storeKey - store key if exist + * @param serviceModelId ************************************************************/ - createInstanceTreeNode = (instance: VnfInstance, model: VNFModel, parentModel, storeKey: string): VnfTreeNode => { + createInstanceTreeNode = (instance: any, model: any, parentModel: any, storeKey: string, serviceModelId: string): any => { let node = new VnfTreeNode(instance, model, storeKey); node.missingData = this.hasMissingData(instance, node, model.isEcompGeneratedNaming); node.typeName = this.typeName; - node.menuActions = this.getMenuAction(<any>node, model.uuid); + node.menuActions = this.getMenuAction(<any>node, serviceModelId); node.isFailed = _.isNil(instance.isFailed) ? false : instance.isFailed; node.statusMessage = !_.isNil(instance.statusMessage) ? instance.statusMessage: ""; node = this._sharedTreeService.addingStatusProperty(node); @@ -128,8 +129,8 @@ export class RelatedVnfMemberInfoModel implements ILevelNodeInfo { method : (node, serviceModelId) => { this._store.dispatch(deleteActionRelatedVnfMemberInstance(node.parent.data.vnfGroupStoreKey, node.data.vnfStoreKey, serviceModelId)); }, - visible: (node) => this._sharedTreeService.shouldShowDelete(node), - enable: (node) => this._sharedTreeService.shouldShowDelete(node) + visible: (node) => this._sharedTreeService.shouldShowDelete(node, serviceModelId), + enable: (node) => this._sharedTreeService.shouldShowDelete(node, serviceModelId) }, undoDelete : { method : (node, serviceModelId) => { @@ -137,7 +138,7 @@ export class RelatedVnfMemberInfoModel implements ILevelNodeInfo { }, visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node), - enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId) + enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent, serviceModelId) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId) } } } |