diff --git a/src/app/components/project-map/context-menu/actions/http-console/http-console-action.component.ts b/src/app/components/project-map/context-menu/actions/http-console/http-console-action.component.ts index bf16ecfd..33c23941 100644 --- a/src/app/components/project-map/context-menu/actions/http-console/http-console-action.component.ts +++ b/src/app/components/project-map/context-menu/actions/http-console/http-console-action.component.ts @@ -3,6 +3,7 @@ import { Node } from '../../../../../cartography/models/node'; import { Server } from '../../../../../models/server'; import { NodeConsoleService } from '../../../../../services/nodeConsole.service'; import { ToasterService } from '../../../../../services/toaster.service'; +import { MapSettingsService } from '../../../../../services/mapsettings.service'; @Component({ @@ -15,7 +16,8 @@ export class HttpConsoleActionComponent implements OnInit { constructor( private consoleService: NodeConsoleService, - private toasterService: ToasterService + private toasterService: ToasterService, + private mapSettingsService: MapSettingsService ) { } ngOnInit() {} @@ -23,6 +25,7 @@ export class HttpConsoleActionComponent implements OnInit { openConsole() { this.nodes.forEach(n => { if (n.status === 'started') { + this.mapSettingsService.logConsoleSubject.next(true); this.consoleService.openConsoleForNode(n); } else { this.toasterService.error('To open console please start the node'); diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index 61a62f9f..afa251ec 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -163,6 +163,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy { this.settings = this.settingsService.getAll(); this.isTopologySummaryVisible = this.mapSettingsService.isTopologySummaryVisible; this.isConsoleVisible = this.mapSettingsService.isLogConsoleVisible; + this.mapSettingsService.logConsoleSubject.subscribe(value => this.isConsoleVisible = value); this.progressService.activate(); const routeSub = this.route.paramMap.subscribe((paramMap: ParamMap) => { diff --git a/src/app/services/mapsettings.service.ts b/src/app/services/mapsettings.service.ts index 9f171055..df6a71ba 100644 --- a/src/app/services/mapsettings.service.ts +++ b/src/app/services/mapsettings.service.ts @@ -8,6 +8,7 @@ export class MapSettingsService { public isLogConsoleVisible: boolean = false; public isLayerNumberVisible: boolean = false; public interfaceLabels: Map = new Map(); + public logConsoleSubject = new Subject(); public mapRenderedEmitter = new EventEmitter(); constructor() {