From 6b1e53d593a958254481f2043f6da8c6c96d4a0b Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Tue, 21 Jan 2020 12:20:37 +0200 Subject: originalName may be model's "entry name", customizationId or invariantId The classic originalName is the "entry name". So two more options were added through SharedTreeService::modelByIdentifier() function. Issue-ID: VID-724 Change-Id: I9f192d2b24c9c1659a95baabd21252bed392e9da Signed-off-by: Ittay Stern --- .../objectsToTree/models/vnf/vnf.model.info.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf') diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts index c3c33a1be..1215bb80e 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts @@ -9,7 +9,10 @@ import {SharedTreeService} from "../../shared.tree.service"; import {NgRedux} from "@angular-redux/store"; import {AppState} from "../../../../../shared/store/reducers"; import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service"; -import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; +import { + GenericFormPopupComponent, + PopupType +} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; import {DialogService} from 'ng2-bootstrap-modal'; import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service"; import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service"; @@ -17,13 +20,18 @@ import {ITreeNode} from "angular-tree-component/dist/defs/api"; import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service"; import {DuplicateService} from "../../../duplicate/duplicate.service"; import {DuplicateVnfComponent} from "../../../duplicate/duplicate-vnf.component"; -import {SdcUiServices} from "onap-ui-angular"; import {IframeService} from "../../../../../shared/utils/iframe.service"; import {changeInstanceCounter, removeInstance} from "../../../../../shared/storeUtil/utils/general/general.actions"; import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data"; import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service"; import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions"; -import {deleteActionVnfInstance, undoDeleteActionVnfInstance, undoUpgradeVnf, updateVnfPosition, upgradeVnf} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions"; +import { + deleteActionVnfInstance, + undoDeleteActionVnfInstance, + undoUpgradeVnf, + updateVnfPosition, + upgradeVnf +} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions"; import * as _ from 'lodash'; import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config"; import {ComponentInfoType} from "../../../component-info/component-info-model"; @@ -81,7 +89,9 @@ export class VnfModelInfo implements ILevelNodeInfo { ************************************************************/ getModel = (vnfModelId: string, instance: VnfInstance, serviceHierarchy): VNFModel => { const originalModelName = instance.originalName ? instance.originalName : vnfModelId; - return new VNFModel(serviceHierarchy[this.name][originalModelName], this._featureFlagsService.getAllFlags()); + return new VNFModel( + this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName), + this._featureFlagsService.getAllFlags()); }; -- cgit 1.2.3-korg