diff options
author | 2019-12-18 21:04:38 +0200 | |
---|---|---|
committer | 2019-12-22 14:01:45 +0200 | |
commit | 4c87ecaa8cce40f078f8540a15928e7e805e4ef7 (patch) | |
tree | f31c55200451d13f108c8583b8d275ae7a7c8bab /vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts | |
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/genericForm/formControlsServices/service.control.generator.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts index 12054a8a7..da13b0be4 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.ts @@ -5,7 +5,7 @@ import {AppState} from "../../../store/reducers"; import {FormControlModel, ValidatorModel, ValidatorOptions} from "../../../models/formControlModels/formControl.model"; import {DropdownFormControl} from "../../../models/formControlModels/dropdownFormControl.model"; import * as _ from 'lodash'; -import {BasicControlGenerator} from "./basic.control.generator"; +import {ControlGeneratorUtil} from "./control.generator.util.service"; import {AaiService} from "../../../services/aaiService/aai.service"; import {FormGroup} from "@angular/forms"; import {FormControlType} from "../../../models/formControlModels/formControlTypes.enum"; @@ -17,6 +17,7 @@ import {ServiceModel} from "../../../models/serviceModel"; import {CheckboxFormControl} from "../../../models/formControlModels/checkboxFormControl.model"; import {VidNotions} from "../../../models/vidNotions"; +import {SharedControllersService} from "./sharedControlles/shared.controllers.service"; export enum FormControlNames { INSTANCE_NAME = 'instanceName', @@ -36,7 +37,8 @@ export enum FormControlNames { export class ServiceControlGenerator { aaiService : AaiService; constructor(private genericFormService : GenericFormService, - private _basicControlGenerator : BasicControlGenerator, + private _basicControlGenerator : ControlGeneratorUtil, + private _sharedControllersService : SharedControllersService, private store: NgRedux<AppState>, private http: HttpClient, private _aaiService : AaiService, @@ -64,7 +66,7 @@ export class ServiceControlGenerator { const serviceModel = new ServiceModel(this.store.getState().service.serviceHierarchy[serviceId]); if(!_.isNil(serviceModel)){ - result.push(this._basicControlGenerator.getInstanceName(serviceInstance, serviceId, serviceModel.isEcompGeneratedNaming)); + result.push(this._sharedControllersService.getInstanceName(serviceInstance, serviceId, serviceModel.isEcompGeneratedNaming)); result.push(this.getGlobalSubscriberControl(serviceInstance, result)); result.push(this.getServiceTypeControl(serviceInstance, result, false)); result.push(this.getOwningEntityControl(serviceInstance, result)); @@ -87,7 +89,7 @@ export class ServiceControlGenerator { let result : FormControlModel[] = []; const serviceModel = new ServiceModel(this.store.getState().service.serviceHierarchy[serviceId]); if(!_.isNil(serviceModel)){ - result.push(this._basicControlGenerator.getInstanceName(serviceInstance, serviceId, serviceModel.isEcompGeneratedNaming)); + result.push(this._sharedControllersService.getInstanceName(serviceInstance, serviceId, serviceModel.isEcompGeneratedNaming)); result.push(this.getGlobalSubscriberControl(serviceInstance, result)); result.push(this.getServiceTypeControl(serviceInstance, result, true)); result.push(this.getOwningEntityControl(serviceInstance, result)); |