import {DuplicateService} from '../duplicate/duplicate.service';
import {DrawingBoardTreeService, TreeNodeContextMenuModel} from "./drawing-board-tree.service";
import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
-import {SdcUiServices} from "onap-ui-angular";
import {HighlightPipe} from "../../../shared/pipes/highlight/highlight-filter.pipe";
import {VnfGroupPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service";
import {ObjectToInstanceTreeService} from "../objectsToTree/objectToInstanceTree/objectToInstanceTree.service";
import {ObjectToModelTreeService} from "../objectsToTree/objectToModelTree/objectToModelTree.service";
import {DrawingBoardModes} from "../drawing-board.modes";
import {ServiceInstanceActions} from "../../../shared/models/serviceInstanceActions";
+import {ModalService} from "../../../shared/components/customModal/services/modal.service";
@Component({
selector: 'drawing-board-tree',
@Input() pageMode : DrawingBoardModes;
static triggerDeleteActionService: Subject<string> = new Subject<string>();
static triggerUndoDeleteActionService: Subject<string> = new Subject<string>();
- static triggerreCalculateIsDirty: Subject<string> = new Subject<string>();
- @ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent;
+ @ViewChild(ContextMenuComponent, {static: false}) public contextMenu: ContextMenuComponent;
constructor(private _contextMenuService: ContextMenuService,
private _iframeService: IframeService,
private store: NgRedux<AppState>,
private route: ActivatedRoute,
private _duplicateService: DuplicateService,
- private modalService: SdcUiServices.ModalService,
+ private modalService: ModalService,
private _drawingBoardTreeService: DrawingBoardTreeService,
private _networkPopupService: NetworkPopupService,
- private _vfModulePopuopService: VfModulePopuopService,
+ private _vfModulePopuopService: VfModulePopupService,
private _vnfPopupService: VnfPopupService,
private _vnfGroupPopupService: VnfGroupPopupService,
private _errorMsgService: ErrorMsgService,
});
});
- DrawingBoardTreeComponent.triggerUndoDeleteActionService.subscribe((serviceModelId) => {
- this.drawingBoardTreeService.undoDeleteActionService(this.nodes, serviceModelId);
+ DrawingBoardTreeService.triggerCheckIsDirty.subscribe((serviceModelId)=>{
this.store.dispatch(changeServiceIsDirty(this.nodes, serviceModelId));
- });
+ })
- DrawingBoardTreeComponent.triggerreCalculateIsDirty.subscribe((serviceModelId) => {
+ DrawingBoardTreeComponent.triggerUndoDeleteActionService.subscribe((serviceModelId) => {
+ this.drawingBoardTreeService.undoDeleteActionService(this.nodes, serviceModelId);
this.store.dispatch(changeServiceIsDirty(this.nodes, serviceModelId));
});
@Output()
highlightNode: EventEmitter<number> = new EventEmitter<number>();
- @ViewChild('tree') tree: TreeComponent;
+ @ViewChild('tree', {static: false}) tree: TreeComponent;
missingDataTooltip: string = Constants.Error.MISSING_VNF_DETAILS;
currentNode: ITreeNode = null;
flags: any;
this.highlightNode.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.modelName, node.data, serviceHierarchy);
+
+ const instanceModel = this._sharedTreeService.modelByIdentifiers(
+ serviceHierarchy, node.data.modelTypeName,
+ this._sharedTreeService.modelUniqueNameOrId(node.data), node.data.modelName
+ );
+
+ const model = node.data.getModel(instanceModel);
const modelInfoItems = node.data.getInfo(model, node.data);
const componentInfoModel: ComponentInfoModel = this._sharedTreeService.addGeneralInfoItems(modelInfoItems, node.data.componentInfoType, model, node.data);
ComponentInfoService.triggerComponentInfoChange.next(componentInfoModel);