Opening more than 1 console with one click in console widget

This commit is contained in:
piotrpekala7 2021-05-11 02:09:40 +02:00
parent abdd739f06
commit 9fd34e8253
2 changed files with 4 additions and 3 deletions

View File

@ -25,9 +25,10 @@ export class HttpConsoleActionComponent implements OnInit {
this.nodes.forEach((n) => {
if (n.status === 'started') {
this.mapSettingsService.logConsoleSubject.next(true);
this.consoleService.openConsoleForNode(n);
// this timeout is required due to xterm.js implementation
setTimeout(() => { this.consoleService.openConsoleForNode(n); }, 500);
} else {
this.toasterService.error('To open console please start the node');
this.toasterService.error('To open console please start the node ' + n.name);
}
});
}

View File

@ -8,7 +8,7 @@
<app-stop-node-action *ngIf="nodes.length" [server]="server" [nodes]="nodes"></app-stop-node-action>
<app-reload-node-action *ngIf="nodes.length" [server]="server" [nodes]="nodes"></app-reload-node-action>
<app-http-console-action
*ngIf="!projectService.isReadOnly(project) && nodes.length === 1"
*ngIf="!projectService.isReadOnly(project) && nodes.length > 0"
[server]="server"
[nodes]="nodes"
></app-http-console-action>