diff options
author | 2019-12-17 09:33:35 +0000 | |
---|---|---|
committer | 2019-12-17 09:33:35 +0000 | |
commit | 5e3debb8feabc8bf0631344bacfff837629240e4 (patch) | |
tree | 61362b7c5719e3c9d51b0cde5604b4b629b94f71 /vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts | |
parent | 5f8ce4adff724009dad903887cd320a0095c1437 (diff) | |
parent | 8d17bc384337849ffdf4a8369834c4480c9c5d93 (diff) |
Merge "Do not show retain VGs checkbox in VFM Upgrade modal + tests modifications"
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts index bbfe8705e..667e79678 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts @@ -1,7 +1,7 @@ import {Injectable} from "@angular/core"; import {ITreeNode} from "angular-tree-component/dist/defs/api"; import {FormGroup} from "@angular/forms"; -import {VfModulePopupServiceBase} from "../vfModule/vfModule.popuop.service"; +import {VfModulePopupServiceBase} from "../vfModule/vfModule.popup.service"; import {upgradeVFModule} from "../../../../storeUtil/utils/vfModule/vfModule.actions"; import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service"; import {NgRedux} from "@angular-redux/store"; @@ -16,11 +16,12 @@ import {FormControlModel} from "../../../../models/formControlModels/formControl import {CheckboxFormControl} from "../../../../models/formControlModels/checkboxFormControl.model"; import {FormControlType} from "../../../../models/formControlModels/formControlTypes.enum"; import {mergeObjectByPathAction} from "../../../../storeUtil/utils/general/general.actions"; +import * as _ from "lodash"; +import {VfModuleInstance} from "../../../../models/vfModuleInstance"; export enum UpgradeFormControlNames { RETAIN_VOLUME_GROUPS = 'retainVolumeGroups', RETAIN_ASSIGNMENTS = 'retainAssignments', - SDN_C_PRE_LOAD = 'sdncPreLoad', } @Injectable() @@ -43,11 +44,12 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[] { let result: FormControlModel[] =[ this.getRetainAssignmentsControl(), - this.getRetainVolumeGroupsControl(), this._basicControlGenerator.getSDNCControl(null) ]; - - const vfModuleInstance = this._vfModuleControlGenerator.getVfModuleInstance(serviceId, vnfStoreKey, this.uuidData, isUpdateMode); + const vfModuleInstance :VfModuleInstance = this._vfModuleControlGenerator.getVfModuleInstance(serviceId, vnfStoreKey, this.uuidData, isUpdateMode); + if(this._store.getState().service.serviceHierarchy[serviceId].vfModules[this.uuidData['modelName']].volumeGroupAllowed){ + result.push(this.getRetainVolumeGroupsControl()); + } result = this._basicControlGenerator.concatSupplementaryFile(result, vfModuleInstance); return result; }; |