aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/genericForm
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericForm')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts12
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts4
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts3
4 files changed, 16 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
index 08575bcad..bcbcefa8d 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
@@ -24,6 +24,7 @@ import * as _ from 'lodash';
export const SUPPLEMENTARY_FILE = 'supplementaryFile';
export const SDN_C_PRE_LOAD = 'sdncPreLoad';
+export const PAUSE_INSTANTIATION = 'pauseInstantiation';
@Injectable()
export class ControlGeneratorUtil {
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
index b10ed9a75..c238f90a4 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
@@ -9,7 +9,7 @@ import {
import {NgRedux} from "@angular-redux/store";
import {AppState} from "../../../../store/reducers";
import {AaiService} from "../../../../services/aaiService/aai.service";
-import {ControlGeneratorUtil, SDN_C_PRE_LOAD} from "../control.generator.util.service";
+import {ControlGeneratorUtil, PAUSE_INSTANTIATION, SDN_C_PRE_LOAD} from "../control.generator.util.service";
import * as _ from "lodash";
import {FormGroup} from "@angular/forms";
import {Constants} from "../../../../utils/constants";
@@ -18,6 +18,7 @@ import {InputFormControl} from "../../../../models/formControlModels/inputFormCo
import {NodeModel} from "../../../../models/nodeModel";
import {MultiselectFormControl} from "../../../../models/formControlModels/multiselectFormControl.model";
import {MultiSelectItem} from "../../../formControls/component/multiselect/multiselect.model";
+import {PauseStatus} from "../../../../models/serviceInstanceActions";
@Injectable()
export class SharedControllersService {
@@ -132,6 +133,15 @@ export class SharedControllersService {
})
};
+ getPauseInstantiation = (instance: any) : FormControlModel => {
+ return new CheckboxFormControl({
+ controlName: PAUSE_INSTANTIATION,
+ displayName: 'Pause upon Completion',
+ dataTestId: 'pauseInstantiation',
+ value: instance && instance.pauseInstantiation === PauseStatus.AFTER_COMPLETION
+ })
+ }
+
getProductFamilyControl = (instance : any, controls : FormControlModel[], isMandatory?: boolean) : DropdownFormControl => {
return new DropdownFormControl({
type : FormControlType.DROPDOWN,
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
index 154c60f9e..bbfde30d8 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
@@ -1080,8 +1080,8 @@ describe('VFModule Control Generator', () => {
});
each([
- [true, 4, formControlsWithoutLcpRegionTenantLegacy],
- [false, 7,formControlsWithLcpRegionTenantLegacy]
+ [true, 5, formControlsWithoutLcpRegionTenantLegacy],
+ [false, 8,formControlsWithLcpRegionTenantLegacy]
]).
test('getAlaCarteFormControls should return the correct order of controls', (flag: boolean, controlAmount: number, orderedControls: string[]) => {
when(mockFeatureFlagsService.getFlagState(Features.FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF)).thenReturn(flag);
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
index b7cf80be3..8c6af89da 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
@@ -24,6 +24,7 @@ import {MessageModal} from "../../../messageModal/message-modal.service";
import {ButtonType} from "../../../customModal/models/button.type";
import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
import {FeatureFlagsService, Features} from "../../../../services/featureFlag/feature-flags.service";
+import {PauseStatus} from "../../../../models/serviceInstanceActions";
export enum FormControlNames {
INSTANCE_NAME = 'instanceName',
@@ -122,7 +123,6 @@ export class VfModuleControlGenerator {
}
const vnf: VnfInstance = this.store.getState().service.serviceInstance[serviceId].vnfs[vnfStoreKey];
const vnfModel = this.newVNFModel(serviceId, vnf);
-
const vfModuleInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store, this.getVfModuleInstance(serviceId, vnfStoreKey, uuidData, isUpdateMode));
let result: FormControlModel[] = [];
this.pushInstanceAndVGToForm(result, vfModuleInstance, serviceId, vnfModel, true);
@@ -133,6 +133,7 @@ export class VfModuleControlGenerator {
}
result.push(this._sharedControllersService.getRollbackOnFailureControl(vfModuleInstance));
result.push(this._sharedControllersService.getSDNCControl(vfModuleInstance, false, this.getSdncExtraContents()));
+ result.push(this._sharedControllersService.getPauseInstantiation(vfModuleInstance));
if (this.store.getState().global.flags['FLAG_SUPPLEMENTARY_FILE']) {
result = this._basicControlGenerator.concatSupplementaryFile(result, vfModuleInstance);
}