summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
diff options
context:
space:
mode:
authorMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-10-07 12:06:13 +0200
committerMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-10-08 13:45:58 +0200
commit1b93f300bda8e435954d93bc4088429ec28c34c0 (patch)
treeea1172a667d32ea9a890212bf0650230b0c0e559 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
parent226ef715d7afe3758fbc88c05cf4d752c6bed51b (diff)
VID - Feature flag for PNF in modern UI
This task is about introducing new feature flag: FLAG_EXTENDED_MACRO_PNF_CONFIG, which will allow to choose different PNF implementations. Main changes when flag is ON: - Modern UI will be used for instantiation of macro service with pnfs - There will be possibility to add instance of PNF in drawing board but this concerns only macro services For now "plus" icon on PNF generates new popup window but it is still impossible to add it as a new resource to service. This functionality will be implemented soon. Issue-ID: VID-694 Change-Id: I375db2104687f1f634adac31d4d1af3675f5911c Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts61
1 files changed, 37 insertions, 24 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
index a70b7efeb..67a962e8a 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
@@ -24,42 +24,55 @@ import {VrfModelInfo} from "./models/vrf/vrf.model.info";
import {NetworkStepService} from "./models/vrf/vrfModal/networkStep/network.step.service";
import {VpnStepService} from "./models/vrf/vrfModal/vpnStep/vpn.step.service";
import {VfModuleUpgradePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
-import {FeatureFlagsService} from "../../../shared/services/featureFlag/feature-flags.service";
+import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service";
import {ModalService} from "../../../shared/components/customModal/services/modal.service";
+import {PnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/pnf/pnf.popup.service";
+import {PnfModelInfoExtended} from "./models/pnf/pnf.model.info.extended";
@Injectable()
export class ObjectToTreeService {
constructor(private _defaultDataGeneratorService: DefaultDataGeneratorService,
private _dynamicInputsService: DynamicInputsService,
- private _sharedTreeService : SharedTreeService,
- private _dialogService : DialogService,
- private _vnfPopupService : VnfPopupService,
- private _networkPopupService : NetworkPopupService,
- private _vfModulePopupService : VfModulePopupService,
- private _vfModuleUpgradePopupService : VfModuleUpgradePopupService,
- private _vnfGroupPopupService : VnfGroupPopupService,
- private _duplicateService : DuplicateService,
+ private _sharedTreeService: SharedTreeService,
+ private _dialogService: DialogService,
+ private _vnfPopupService: VnfPopupService,
+ private _pnfPopupService: PnfPopupService,
+ private _networkPopupService: NetworkPopupService,
+ private _vfModulePopupService: VfModulePopupService,
+ private _vfModuleUpgradePopupService: VfModuleUpgradePopupService,
+ private _vnfGroupPopupService: VnfGroupPopupService,
+ private _duplicateService: DuplicateService,
private _modalService: ModalService,
- private _iframeService : IframeService,
- private _componentInfoService : ComponentInfoService,
- private _networkStepService : NetworkStepService,
- private _vpnStepService : VpnStepService,
- private _aaiService : AaiService,
+ private _iframeService: IframeService,
+ private _componentInfoService: ComponentInfoService,
+ private _networkStepService: NetworkStepService,
+ private _vpnStepService: VpnStepService,
+ private _aaiService: AaiService,
private _featureFlagsService: FeatureFlagsService,
- private _store : NgRedux<AppState>) {
+ private _store: NgRedux<AppState>) {
}
/***********************************************************
* return all first optional first level of the model tree
************************************************************/
- getFirstLevelOptions(): ILevelNodeInfo[] {
- return [new VnfModelInfo(this._dynamicInputsService, this._sharedTreeService, this._defaultDataGeneratorService, this._dialogService, this._vnfPopupService, this._vfModulePopupService, this._vfModuleUpgradePopupService,this._duplicateService, this._modalService, this._iframeService, this._componentInfoService, this._featureFlagsService, this._store)
- , new NetworkModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._networkPopupService, this._duplicateService, this._modalService, this._iframeService, this._featureFlagsService, this._store),
- new PnfModelInfo(this._sharedTreeService),
- new VrfModelInfo(this._store, this._sharedTreeService, this._dialogService, this._iframeService, this._featureFlagsService, this._networkStepService, this._vpnStepService),
- new CollectionResourceModelInfo(this._store, this._sharedTreeService),
- new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService),
- new VnfGroupingModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._vnfGroupPopupService, this._iframeService, this._aaiService, this._store)];
- };
+ getFirstLevelOptions(isALaCarte: boolean): ILevelNodeInfo[] {
+ if (FeatureFlagsService.getFlagState(Features.FLAG_EXTENDED_MACRO_PNF_CONFIG, this._store) === true && isALaCarte === false) {
+ return [new VnfModelInfo(this._dynamicInputsService, this._sharedTreeService, this._defaultDataGeneratorService, this._dialogService, this._vnfPopupService, this._vfModulePopupService, this._vfModuleUpgradePopupService, this._duplicateService, this._modalService, this._iframeService, this._componentInfoService, this._featureFlagsService, this._store)
+ , new NetworkModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._networkPopupService, this._duplicateService, this._modalService, this._iframeService, this._featureFlagsService, this._store),
+ new PnfModelInfoExtended(this._store, this._sharedTreeService, this._dialogService, this._pnfPopupService),
+ new VrfModelInfo(this._store, this._sharedTreeService, this._dialogService, this._iframeService, this._featureFlagsService, this._networkStepService, this._vpnStepService),
+ new CollectionResourceModelInfo(this._store, this._sharedTreeService),
+ new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService),
+ new VnfGroupingModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._vnfGroupPopupService, this._iframeService, this._aaiService, this._store)];
+ } else {
+ return [new VnfModelInfo(this._dynamicInputsService, this._sharedTreeService, this._defaultDataGeneratorService, this._dialogService, this._vnfPopupService, this._vfModulePopupService, this._vfModuleUpgradePopupService, this._duplicateService, this._modalService, this._iframeService, this._componentInfoService, this._featureFlagsService, this._store)
+ , new NetworkModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._networkPopupService, this._duplicateService, this._modalService, this._iframeService, this._featureFlagsService, this._store),
+ new PnfModelInfo(this._sharedTreeService),
+ new VrfModelInfo(this._store, this._sharedTreeService, this._dialogService, this._iframeService, this._featureFlagsService, this._networkStepService, this._vpnStepService),
+ new CollectionResourceModelInfo(this._store, this._sharedTreeService),
+ new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService),
+ new VnfGroupingModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._vnfGroupPopupService, this._iframeService, this._aaiService, this._store)];
+ }
+ }
}