summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree
diff options
context:
space:
mode:
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-11-21 16:17:55 +0200
committerYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-11-25 12:42:52 +0200
commitbda996b9faf9d5d443d2256c0626620bd8104269 (patch)
tree41d86b08efdc5291404f0c672cc98328c6a2aaf3 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree
parentd8f8033a6e6f5a8d724d4b94c4056d2660cc34f1 (diff)
VfModule upgrade: popup with retain-assignments checkbox
Also: - undo upgrade -> remove field - cancel on popup works Issue-ID: VID-603 Change-Id: I47106ce4d042c777b56699d8c5c5e1e99f856a5e Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts16
1 files changed, 9 insertions, 7 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 2210d7c84..5e14586c5 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
@@ -20,10 +20,10 @@ import {MessageBoxService} from "../../../../../shared/components/messageBox/mes
import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
import {IframeService} from "../../../../../shared/utils/iframe.service";
import {
- deleteActionVfModuleInstance,
+ deleteActionVfModuleInstance, deleteVFModuleField,
removeVfModuleInstance,
undoDeleteVfModuleInstance,
- undoUgradeVFModule,
+ undoUgradeVFModule, updateVFModuleField,
updateVFModulePosition,
upgradeVFModule
} from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions";
@@ -354,7 +354,8 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
},
undoDelete: {
method: (node, serviceModelId) => {
- this._store.dispatch(undoDeleteVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId))
+ this._store.dispatch(undoDeleteVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId));
+ this._store.dispatch(deleteVFModuleField(node.data.modelName, node.parent.data.vnfStoreKey, node.data.servicedId ,node.data.dynamicModelName, 'retainAssignments'));
},
visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node),
enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId)
@@ -386,9 +387,6 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
}
private upgradeVFM(serviceModelId, node) {
- this._sharedTreeService.upgradeBottomUp(node, serviceModelId);
- this._store.dispatch(upgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.dynamicModelName));
-
if (FeatureFlagsService.getFlagState(Features.FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS, this._store)) {
this._iframeService.addClassOpenModal('content');
this._dialogService.addDialog(GenericFormPopupComponent, {
@@ -401,10 +399,14 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
modelId: node.data.modelId,
type: node.data.type,
popupService: this._vfModuleUpgradePopupService,
+ vfModule : _.cloneDeep(node)
},
- node: node,
+ node,
isUpdateMode: false
});
+ }else {
+ this._sharedTreeService.upgradeBottomUp(node, serviceModelId);
+ this._store.dispatch(upgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId ,node.data.dynamicModelName));
}
}