diff options
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree')
2 files changed, 8 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.component.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.component.ts index 1a42db403..18c3f72de 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.component.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.component.ts @@ -51,7 +51,6 @@ export class DrawingBoardTreeComponent implements OnInit, AfterViewInit { @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, {static: false}) public contextMenu: ContextMenuComponent; constructor(private _contextMenuService: ContextMenuService, @@ -87,12 +86,12 @@ export class DrawingBoardTreeComponent implements OnInit, AfterViewInit { }); }); - 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)); }); diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts index 28b6e51b1..dfd89ca79 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.service.ts @@ -5,9 +5,13 @@ import {NgRedux} from "@angular-redux/store"; import {AppState} from "../../../shared/store/reducers"; import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service"; import {ServiceInstanceActions} from "../../../shared/models/serviceInstanceActions"; +import {Subject} from "rxjs"; @Injectable() export class DrawingBoardTreeService { + + static triggerCheckIsDirty : Subject<string> = new Subject<string>(); + constructor(private store: NgRedux<AppState>){} isVFModuleMissingData(node: ITreeNode, serviceModelId : string): boolean { if(node.data.type === 'VFmodule' &&!_.isNil(this.store.getState().service.serviceInstance[serviceModelId].vnfs) && !_.isNil(this.store.getState().service.serviceInstance[serviceModelId].vnfs[node.parent.data.vnfStoreKey])){ |