diff options
author | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-18 21:04:38 +0200 |
---|---|---|
committer | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-22 14:01:45 +0200 |
commit | 4c87ecaa8cce40f078f8540a15928e7e805e4ef7 (patch) | |
tree | f31c55200451d13f108c8583b8d275ae7a7c8bab /vid-webpack-master/src/app/shared/components/genericFormPopup | |
parent | 54af5cdca044c7b486f02f4163d16c39e990f701 (diff) |
Refactor Generic Generators
Issue-ID: VID-731
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: Ib851ff4056d64e12eaf415c5d689c832196ec8b0
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup')
15 files changed, 54 insertions, 35 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts index 514b9bfef..ac417ed6e 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts @@ -5,7 +5,7 @@ import {GenericFormPopupService} from "./generic-form-popup.service"; import {IframeService} from "../../utils/iframe.service"; import {NgRedux} from "@angular-redux/store"; import {ServicePopupService} from "./genericFormServices/service/service.popup.service"; -import {BasicControlGenerator} from "../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../services/aaiService/aai.service"; import {ServiceControlGenerator} from "../genericForm/formControlsServices/service.control.generator"; import {GenericFormService} from "../genericForm/generic-form.service"; @@ -21,6 +21,7 @@ import {VfModulePopupService} from "./genericFormServices/vfModule/vfModule.popu import {VfModuleControlGenerator} from "../genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator"; import {FeatureFlagsService} from "../../services/featureFlag/feature-flags.service"; import {VfModuleUpgradePopupService} from "./genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service"; +import {SharedControllersService} from "../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockAppStore<T>{ getState() { @@ -958,7 +959,8 @@ describe('Generic Form popup Service', () => { FormBuilder, IframeService, ServicePopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, ServiceControlGenerator, GenericFormService, LogService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts index ebabc89b7..9bcc02d73 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts @@ -1,7 +1,7 @@ import {NetworkPopupService} from "./network/network.popup.service"; import {LogService} from "../../../utils/log/log.service"; import {NgRedux} from "@angular-redux/store"; -import {BasicControlGenerator} from "../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../../services/aaiService/aai.service"; import {HttpClient} from "@angular/common/http"; import {NetworkControlGenerator} from "../../genericForm/formControlsServices/networkGenerator/network.control.generator"; @@ -1984,7 +1984,7 @@ describe('Basic popup service', () => { TestBed.configureTestingModule({ providers : [ NetworkPopupService, - BasicControlGenerator, + ControlGeneratorUtil, NetworkControlGenerator, DefaultDataGeneratorService, GenericFormService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts index f8b40dd99..9340a155a 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts @@ -5,7 +5,7 @@ import {AppState} from "../../../store/reducers"; import {NgRedux} from "@angular-redux/store"; import {FormControlModel} from "../../../models/formControlModels/formControl.model"; import {DefaultDataGeneratorService} from "../../../services/defaultDataServiceGenerator/default.data.generator.service"; -import {BasicControlGenerator} from "../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../genericForm/formControlsServices/control.generator.util.service"; import * as _ from 'lodash'; import {VfModule} from "../../../models/vfModule"; import {VNFModel} from "../../../models/vnfModel"; @@ -18,7 +18,7 @@ import {Constants} from "../../../utils/constants"; export class BasicPopupService { constructor(private _store: NgRedux<AppState>, private _defaultDataGeneratorService : DefaultDataGeneratorService, - private _basicControlGenerator : BasicControlGenerator){} + private _basicControlGenerator : ControlGeneratorUtil){} extractSubscriberNameBySubscriberId(subsriberId: string) { let result: string = null; diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts index 67c371212..34d6850eb 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts @@ -2,7 +2,7 @@ import {NetworkPopupService} from "./network.popup.service"; import {LogService} from "../../../../utils/log/log.service"; import {SdcUiServices} from "onap-ui-angular"; import {NgRedux} from "@angular-redux/store"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {HttpClient} from "@angular/common/http"; import {NetworkControlGenerator} from "../../../genericForm/formControlsServices/networkGenerator/network.control.generator"; @@ -13,6 +13,7 @@ import {DefaultDataGeneratorService} from "../../../../services/defaultDataServi import {BasicPopupService} from "../basic.popup.service"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {getTestBed, TestBed} from "@angular/core/testing"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockAppStore<T> {} @@ -1987,7 +1988,8 @@ describe('Network popup service', () => { TestBed.configureTestingModule({ providers : [ NetworkPopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, NetworkControlGenerator, DefaultDataGeneratorService, GenericFormService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.ts index a352e770f..ff444f087 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.ts @@ -1,6 +1,6 @@ import {Injectable} from "@angular/core"; import {FormPopupDetails, PopupType} from "../../../../models/formControlModels/formPopupDetails.model"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {NetworkInstance} from "../../../../models/networkInstance"; import {AppState} from "../../../../store/reducers"; import {NgRedux} from "@angular-redux/store"; @@ -33,7 +33,7 @@ export class NetworkPopupService implements GenericPopupInterface { isUpdateMode: boolean; - constructor(private _basicControlGenerator: BasicControlGenerator, + constructor(private _basicControlGenerator: ControlGeneratorUtil, private _networkControlGenerator: NetworkControlGenerator, private _iframeService: IframeService, private _defaultDataGeneratorService: DefaultDataGeneratorService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts index ebea695f7..0ce051cf4 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts @@ -1,6 +1,6 @@ import {LogService} from "../../../../utils/log/log.service"; import {NgRedux} from "@angular-redux/store"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {HttpClient} from "@angular/common/http"; import {GenericFormService} from "../../../genericForm/generic-form.service"; @@ -14,6 +14,7 @@ import {FormControlModel} from "../../../../models/formControlModels/formControl import {SdcUiServices} from "onap-ui-angular"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {getTestBed, TestBed} from "@angular/core/testing"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockModalService<T> {} @@ -2053,8 +2054,9 @@ describe('Service popup service', () => { TestBed.configureTestingModule({ providers : [ ServicePopupService, - BasicControlGenerator, + ControlGeneratorUtil, ServiceControlGenerator, + SharedControllersService, DefaultDataGeneratorService, GenericFormService, FormBuilder, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.ts index 3e7e8c1e5..d25ab2c7f 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.ts @@ -5,7 +5,7 @@ import {ModelInformationItem} from "../../../model-information/model-information import {Subject} from "rxjs"; import {ITreeNode} from "angular-tree-component/dist/defs/api"; import {FormPopupDetails, PopupType} from "../../../../models/formControlModels/formPopupDetails.model"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {IframeService} from "../../../../utils/iframe.service"; import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; @@ -35,7 +35,7 @@ export class ServicePopupService implements GenericPopupInterface { - constructor(private _basicControlGenerator: BasicControlGenerator, + constructor(private _basicControlGenerator: ControlGeneratorUtil, private _serviceControlGenerator: ServiceControlGenerator, private _iframeService: IframeService, private _defaultDataGeneratorService: DefaultDataGeneratorService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts index 935454752..b16c5bdc0 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts @@ -1,6 +1,6 @@ import {LogService} from "../../../../utils/log/log.service"; import {NgRedux} from "@angular-redux/store"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {HttpClient} from "@angular/common/http"; import {GenericFormService} from "../../../genericForm/generic-form.service"; @@ -13,6 +13,7 @@ import {VfModuleControlGenerator} from "../../../genericForm/formControlsService import {SdcUiServices} from "onap-ui-angular"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {getTestBed, TestBed} from "@angular/core/testing"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockModalService<T> {} @@ -1982,7 +1983,8 @@ describe('VFModule popup service', () => { TestBed.configureTestingModule({ providers : [ VfModulePopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, VfModuleControlGenerator, DefaultDataGeneratorService, GenericFormService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.ts index 6a31bb7ee..18dc65590 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.ts @@ -1,6 +1,6 @@ import {Injectable} from "@angular/core"; import {FormPopupDetails, PopupType} from "../../../../models/formControlModels/formPopupDetails.model"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {AppState} from "../../../../store/reducers"; import {NgRedux} from "@angular-redux/store"; import {ITreeNode} from "angular-tree-component/dist/defs/api"; @@ -20,6 +20,7 @@ import {VfModuleControlGenerator} from "../../../genericForm/formControlsService import {FormControlModel} from "../../../../models/formControlModels/formControl.model"; import * as _ from 'lodash'; import {createVFModuleInstance, updateVFModuleInstance} from "../../../../storeUtil/utils/vfModule/vfModule.actions"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; export abstract class VfModulePopupServiceBase { dynamicInputs: any; @@ -43,7 +44,8 @@ export abstract class VfModulePopupServiceBase { }; protected constructor( - protected _basicControlGenerator: BasicControlGenerator, + protected _basicControlGenerator: ControlGeneratorUtil, + protected _sharedControllersService : SharedControllersService, protected _vfModuleControlGenerator: VfModuleControlGenerator, protected _iframeService: IframeService, protected _defaultDataGeneratorService: DefaultDataGeneratorService, @@ -156,14 +158,15 @@ export abstract class VfModulePopupServiceBase { export class VfModulePopupService extends VfModulePopupServiceBase implements GenericPopupInterface { - constructor(_basicControlGenerator: BasicControlGenerator, + constructor(_basicControlGenerator: ControlGeneratorUtil, + _sharedControllersService : SharedControllersService, _vfModuleControlGenerator: VfModuleControlGenerator, _iframeService: IframeService, _defaultDataGeneratorService: DefaultDataGeneratorService, _aaiService: AaiService, _basicPopupService : BasicPopupService, _store: NgRedux<AppState>) { - super(_basicControlGenerator, _vfModuleControlGenerator, _iframeService, _defaultDataGeneratorService, _aaiService, _basicPopupService, _store); + super(_basicControlGenerator, _sharedControllersService, _vfModuleControlGenerator, _iframeService, _defaultDataGeneratorService, _aaiService, _basicPopupService, _store); } 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 667e79678..5181318dc 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 @@ -6,7 +6,7 @@ import {upgradeVFModule} from "../../../../storeUtil/utils/vfModule/vfModule.act import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service"; import {NgRedux} from "@angular-redux/store"; import {AppState} from "../../../../store/reducers"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {VfModuleControlGenerator} from "../../../genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator"; import {IframeService} from "../../../../utils/iframe.service"; import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service"; @@ -18,6 +18,7 @@ import {FormControlType} from "../../../../models/formControlModels/formControlT import {mergeObjectByPathAction} from "../../../../storeUtil/utils/general/general.actions"; import * as _ from "lodash"; import {VfModuleInstance} from "../../../../models/vfModuleInstance"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; export enum UpgradeFormControlNames { RETAIN_VOLUME_GROUPS = 'retainVolumeGroups', @@ -26,7 +27,8 @@ export enum UpgradeFormControlNames { @Injectable() export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { - constructor(protected _basicControlGenerator: BasicControlGenerator, + constructor(protected _basicControlGenerator: ControlGeneratorUtil, + protected _sharedControllersService : SharedControllersService, protected _vfModuleControlGenerator: VfModuleControlGenerator, protected _iframeService: IframeService, protected _defaultDataGeneratorService: DefaultDataGeneratorService, @@ -34,7 +36,7 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { protected _basicPopupService: BasicPopupService, protected _store: NgRedux<AppState>, private _sharedTreeService: SharedTreeService) { - super(_basicControlGenerator, _vfModuleControlGenerator, _iframeService, _defaultDataGeneratorService, _aaiService, _basicPopupService, _store); + super(_basicControlGenerator, _sharedControllersService, _vfModuleControlGenerator, _iframeService, _defaultDataGeneratorService, _aaiService, _basicPopupService, _store); } node: ITreeNode; @@ -44,7 +46,7 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[] { let result: FormControlModel[] =[ this.getRetainAssignmentsControl(), - this._basicControlGenerator.getSDNCControl(null) + this._sharedControllersService.getSDNCControl(null) ]; const vfModuleInstance :VfModuleInstance = this._vfModuleControlGenerator.getVfModuleInstance(serviceId, vnfStoreKey, this.uuidData, isUpdateMode); if(this._store.getState().service.serviceHierarchy[serviceId].vfModules[this.uuidData['modelName']].volumeGroupAllowed){ diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts index 4003b4dcc..2ca992f08 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts @@ -1,10 +1,10 @@ import {LogService} from "../../../../utils/log/log.service"; import {NgRedux} from "@angular-redux/store"; import { - BasicControlGenerator, + ControlGeneratorUtil, SDN_C_PRE_LOAD, SUPPLEMENTARY_FILE -} from "../../../genericForm/formControlsServices/basic.control.generator"; +} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {HttpClient} from "@angular/common/http"; import {GenericFormService} from "../../../genericForm/generic-form.service"; @@ -25,6 +25,7 @@ import {VfModuleActions} from "../../../../storeUtil/utils/vfModule/vfModule.act import {ServiceActions} from "../../../../storeUtil/utils/service/service.actions"; import {FormControlModel} from "../../../../models/formControlModels/formControl.model"; import * as _ from "lodash"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockModalService<T> {} @@ -72,7 +73,8 @@ describe('VFModule popup service', () => { TestBed.configureTestingModule({ providers: [ VfModuleUpgradePopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, VfModuleControlGenerator, DefaultDataGeneratorService, GenericFormService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts index 60f0f361e..6d5cf7cfe 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts @@ -9,12 +9,13 @@ import {AaiService} from "../../../../services/aaiService/aai.service"; import {LogService} from "../../../../utils/log/log.service"; import {HttpClient} from "@angular/common/http"; import {VnfPopupService} from "./vnf.popup.service"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {VnfControlGenerator} from "../../../genericForm/formControlsServices/vnfGenerator/vnf.control.generator"; import {UUIDData} from "../../generic-form-popup.component"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {getTestBed, TestBed} from "@angular/core/testing"; import {VfModuleUpgradePopupService} from "../vfModuleUpgrade/vfModule.upgrade.popuop.service"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockAppStore<T> {} @@ -2260,7 +2261,8 @@ describe('vnf new popup service', () => { BasicPopupService, VfModulePopupService, VfModuleUpgradePopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, VnfControlGenerator, {provide: NgRedux, useClass: MockReduxStore}, {provide: HttpClient, useClass: MockAppStore}, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts index 3e117ca74..2748b04c9 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts @@ -6,7 +6,7 @@ import {FormGroup} from "@angular/forms"; import {ModelInformationItem} from "../../../model-information/model-information.component"; import {ServiceModel} from "../../../../models/serviceModel"; import {Subject} from "rxjs/Subject"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {VnfControlGenerator} from "../../../genericForm/formControlsServices/vnfGenerator/vnf.control.generator"; import {IframeService} from "../../../../utils/iframe.service"; import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service"; @@ -34,7 +34,7 @@ export class VnfPopupService implements GenericPopupInterface{ isUpdateMode: boolean; constructor( - private _basicControlGenerator: BasicControlGenerator, + private _basicControlGenerator: ControlGeneratorUtil, private _vnfControlGenerator: VnfControlGenerator, private _iframeService: IframeService, private _defaultDataGeneratorService: DefaultDataGeneratorService, diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts index 8ee48e675..4c6db2cb5 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts @@ -8,13 +8,14 @@ import {BasicPopupService} from "../basic.popup.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; import {LogService} from "../../../../utils/log/log.service"; import {HttpClient} from "@angular/common/http"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {UUIDData} from "../../generic-form-popup.component"; import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service"; import {VnfGroupPopupService} from "./vnfGroup.popup.service"; import {VnfGroupControlGenerator} from "../../../genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator"; import {getTestBed, TestBed} from "@angular/core/testing"; import {VfModuleUpgradePopupService} from "../vfModuleUpgrade/vfModule.upgrade.popuop.service"; +import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service"; class MockAppStore<T> {} @@ -2257,7 +2258,8 @@ describe('vnf group new popup service', () => { BasicPopupService, VfModulePopupService, VfModuleUpgradePopupService, - BasicControlGenerator, + ControlGeneratorUtil, + SharedControllersService, VnfGroupControlGenerator, {provide: NgRedux, useClass: MockReduxStore}, {provide: HttpClient, useClass: MockAppStore}] diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.ts index 851d5d514..14512d3d8 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.ts @@ -6,7 +6,7 @@ import {FormGroup} from "@angular/forms"; import {ModelInformationItem} from "../../../model-information/model-information.component"; import {ServiceModel} from "../../../../models/serviceModel"; import {Subject} from "rxjs/Subject"; -import {BasicControlGenerator} from "../../../genericForm/formControlsServices/basic.control.generator"; +import {ControlGeneratorUtil} from "../../../genericForm/formControlsServices/control.generator.util.service"; import {IframeService} from "../../../../utils/iframe.service"; import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service"; import {AaiService} from "../../../../services/aaiService/aai.service"; @@ -34,7 +34,7 @@ export class VnfGroupPopupService implements GenericPopupInterface{ isUpdateMode: boolean; constructor( - private _basicControlGenerator: BasicControlGenerator, + private _basicControlGenerator: ControlGeneratorUtil, private _vnfGroupControlGenerator: VnfGroupControlGenerator, private _iframeService: IframeService, private _defaultDataGeneratorService: DefaultDataGeneratorService, |