import {ServiceNodeTypes} from '../../../shared/models/ServiceNodeTypes';
import {IframeService} from "../../../shared/utils/iframe.service";
import {DefaultDataGeneratorService} from "../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
import {createVFModuleInstance} from "../../../shared/storeUtil/utils/vfModule/vfModule.actions";
import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
private _drawingBoardTreeService: DrawingBoardTreeService,
private _defaultDataGeneratorService: DefaultDataGeneratorService,
private _vnfGroupControlGenerator: VnfGroupControlGenerator,
- private _vfModulePopuopService: VfModulePopuopService,
+ private _vfModulePopuopService: VfModulePopupService,
private _vnfGroupPopupService: VnfGroupPopupService,
private _vnfPopupService: VnfPopupService,
private _networkPopupService: NetworkPopupService,
@Output()
highlightInstances: EventEmitter<number> = new EventEmitter<number>();
- @ViewChild('tree') tree: TreeComponent;
+ @ViewChild('tree', {static: false}) tree: TreeComponent;
nodes = [];
service = {name: ''};
this.highlightInstances.emit(node.data.modelUniqueId);
if (FeatureFlagsService.getFlagState(Features.FLAG_1906_COMPONENT_INFO, this.store)) {
const serviceHierarchy = this._store.getState().service.serviceHierarchy[this.serviceModelId];
- const model = node.data.getModel(node.data.name, node.data, serviceHierarchy);
+
+ const instanceModel = this._sharedTreeService.modelByIdentifiers(
+ serviceHierarchy, node.data.modelTypeName,
+ this._sharedTreeService.modelUniqueNameOrId(node.data), node.data.name
+ );
+
+ const model = node.data.getModel(instanceModel);
const modelInfoItems = node.data.getInfo(model, null);
const componentInfoModel :ComponentInfoModel = this._sharedTreeService.addGeneralInfoItems(modelInfoItems, node.data.componentInfoType, model, null);
ComponentInfoService.triggerComponentInfoChange.next(componentInfoModel);
if (this._sharedTreeService.selectedVNF) {
this.store.dispatch(createVFModuleInstance(vfModule, node.data.name, this.serviceModelId, null, this._sharedTreeService.selectedVNF));
DrawingBoardTreeComponent.triggerreCalculateIsDirty.next(this.serviceModelId);
- } else if (this._availableModelsTreeService.getOptionalVNFs(this.serviceModelId, node.parent.data.name).length === 1) {
+ } else if (this._availableModelsTreeService.getOptionalVNFs(this.serviceModelId, node.parent.data.modelUniqueId).length === 1) {
let existVnf = this._store.getState().service.serviceInstance[this.serviceModelId].vnfs;
if(!_.isNil(existVnf)){
for(let vnfKey in existVnf){
- const modelUniqueId = existVnf[vnfKey]['modelInfo'].modelCustomizationId || existVnf[vnfKey]['modelInfo'].modelInvariantId;
+ const modelUniqueId = this._sharedTreeService.modelUniqueId(existVnf[vnfKey]);
if(modelUniqueId === node.parent.data.id){
this.store.dispatch(createVFModuleInstance(vfModule, node.data.name, this.serviceModelId, null, vnfKey));
DrawingBoardTreeComponent.triggerreCalculateIsDirty.next(this.serviceModelId);