This commit is contained in:
grossmj 2023-05-22 19:48:23 +08:00
parent 5d48ea046d
commit 37e6921ffb
3 changed files with 6 additions and 1 deletions

View File

@ -69,6 +69,9 @@ export class ConsoleDeviceActionBrowserComponent {
uri = `gns3+vnc://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`;
} else if (this.node.console_type.startsWith('spice')) {
uri = `gns3+spice://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`
} else if (this.node.console_type.startsWith('http')) {
uri = `${this.node.console_type}://${this.node.console_host}:${this.node.console}`
return window.open(uri); // open an http console directly in a new window/tab
} else {
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
}

View File

@ -236,6 +236,8 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
location.assign(
`gns3+spice://${node.console_host}:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
);
} else if (node.console_type.startsWith('http')) {
window.open(`${node.console_type}://${node.console_host}:${node.console}`);
} else {
this.showCommand('Supported console types are: telnet, vnc, spice and spice+agent');
}

View File

@ -61,7 +61,7 @@
{{ node.name }}
</div>
<div *ngIf="node.console != null && node.console != undefined && node.console_type != 'none'">
{{ node.console_type }} {{ node.console_host }}:{{ node.console }}
{{ node.console_type }}://{{ node.console_host }}:{{ node.console }}
</div>
<div *ngIf="node.console === null || node.console === undefined || node.console_type === 'none'">
none