mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-28 23:10:11 +00:00
Fix for console widget
This commit is contained in:
parent
a75de3b179
commit
9e2bc25c01
@ -3,6 +3,7 @@ import { Node } from '../../../../../cartography/models/node';
|
|||||||
import { Server } from '../../../../../models/server';
|
import { Server } from '../../../../../models/server';
|
||||||
import { NodeConsoleService } from '../../../../../services/nodeConsole.service';
|
import { NodeConsoleService } from '../../../../../services/nodeConsole.service';
|
||||||
import { ToasterService } from '../../../../../services/toaster.service';
|
import { ToasterService } from '../../../../../services/toaster.service';
|
||||||
|
import { MapSettingsService } from '../../../../../services/mapsettings.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -15,7 +16,8 @@ export class HttpConsoleActionComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private consoleService: NodeConsoleService,
|
private consoleService: NodeConsoleService,
|
||||||
private toasterService: ToasterService
|
private toasterService: ToasterService,
|
||||||
|
private mapSettingsService: MapSettingsService
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
@ -23,6 +25,7 @@ export class HttpConsoleActionComponent implements OnInit {
|
|||||||
openConsole() {
|
openConsole() {
|
||||||
this.nodes.forEach(n => {
|
this.nodes.forEach(n => {
|
||||||
if (n.status === 'started') {
|
if (n.status === 'started') {
|
||||||
|
this.mapSettingsService.logConsoleSubject.next(true);
|
||||||
this.consoleService.openConsoleForNode(n);
|
this.consoleService.openConsoleForNode(n);
|
||||||
} else {
|
} else {
|
||||||
this.toasterService.error('To open console please start the node');
|
this.toasterService.error('To open console please start the node');
|
||||||
|
@ -163,6 +163,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
this.settings = this.settingsService.getAll();
|
this.settings = this.settingsService.getAll();
|
||||||
this.isTopologySummaryVisible = this.mapSettingsService.isTopologySummaryVisible;
|
this.isTopologySummaryVisible = this.mapSettingsService.isTopologySummaryVisible;
|
||||||
this.isConsoleVisible = this.mapSettingsService.isLogConsoleVisible;
|
this.isConsoleVisible = this.mapSettingsService.isLogConsoleVisible;
|
||||||
|
this.mapSettingsService.logConsoleSubject.subscribe(value => this.isConsoleVisible = value);
|
||||||
|
|
||||||
this.progressService.activate();
|
this.progressService.activate();
|
||||||
const routeSub = this.route.paramMap.subscribe((paramMap: ParamMap) => {
|
const routeSub = this.route.paramMap.subscribe((paramMap: ParamMap) => {
|
||||||
|
@ -8,6 +8,7 @@ export class MapSettingsService {
|
|||||||
public isLogConsoleVisible: boolean = false;
|
public isLogConsoleVisible: boolean = false;
|
||||||
public isLayerNumberVisible: boolean = false;
|
public isLayerNumberVisible: boolean = false;
|
||||||
public interfaceLabels: Map<string, boolean> = new Map<string, boolean>();
|
public interfaceLabels: Map<string, boolean> = new Map<string, boolean>();
|
||||||
|
public logConsoleSubject = new Subject<boolean>();
|
||||||
public mapRenderedEmitter = new EventEmitter<boolean>();
|
public mapRenderedEmitter = new EventEmitter<boolean>();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user