diff options
author | Einat Vinouze <einat.vinouze@intl.att.com> | 2019-08-27 16:01:01 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-09-09 07:01:36 +0000 |
commit | e1f7974f0badbd4440d5b7ea5f1b1cb2d4973818 (patch) | |
tree | 46be9cdc44cbb475527bc3c43df23d16f7579d29 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule | |
parent | e25b88b5a7a0f3bf63ca7160a441b53145484bcc (diff) |
Adding feature: Replace vfmodule
Issue-ID: VID-603
Change-Id: I59068a0979d6fb733e4243c8f78921f396dc9d17
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts | 34 |
1 files changed, 29 insertions, 5 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 bfe1d0082..47a6dcb50 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 @@ -23,10 +23,12 @@ import { deleteActionVfModuleInstance, removeVfModuleInstance, undoDeleteVfModuleInstance, - updateVFModulePosition + undoUgradeVFModule, + updateVFModulePosition, + upgradeVFModule } from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions"; import {ComponentInfoService} from "../../../component-info/component-info.service"; -import {ComponentInfoModel, ComponentInfoType} from "../../../component-info/component-info-model"; +import {ComponentInfoType} from "../../../component-info/component-info-model"; import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; export class VFModuleModelInfo implements ILevelNodeInfo { @@ -353,10 +355,32 @@ export class VFModuleModelInfo implements ILevelNodeInfo { }, visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node), enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId) - } + }, + upgrade : { + method : (node, serviceModelId) => { + this._sharedTreeService.upgradeBottomUp(node, serviceModelId); + this._store.dispatch(upgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.dynamicModelName)); + }, + visible: (node,serviceModelId) => { + return this._sharedTreeService.shouldShowUpgrade(node, serviceModelId); + }, + enable: (node, serviceModelId) => { + return this._sharedTreeService.shouldShowUpgrade(node, serviceModelId); + } + }, + undoUpgrade: { + method: (node, serviceModelId) => { + this._sharedTreeService.undoUpgradeBottomUp(node, serviceModelId); + this._store.dispatch(undoUgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.dynamicModelName)); + }, + visible: (node) => { + return this._sharedTreeService.shouldShowUndoUpgrade(node); + }, + enable: (node) => { + return this._sharedTreeService.shouldShowUndoUpgrade(node); + } + }, }; - - } updatePosition(that , node, instanceId, parentStoreKey): void { |