mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-28 08:48:50 +00:00
Merge branch 'master' into master-3.0
This commit is contained in:
commit
b0bbf514b1
@ -64,13 +64,13 @@ export class ConsoleDeviceActionBrowserComponent {
|
|||||||
try {
|
try {
|
||||||
var uri;
|
var uri;
|
||||||
if (this.node.console_type === 'telnet') {
|
if (this.node.console_type === 'telnet') {
|
||||||
uri = `gns3+telnet://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`;
|
uri = `gns3+telnet://[${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 === 'vnc') {
|
} else if (this.node.console_type === 'vnc') {
|
||||||
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}`;
|
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')) {
|
} 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}`
|
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')) {
|
} else if (this.node.console_type.startsWith('http')) {
|
||||||
uri = `${this.node.console_type}://${this.node.console_host}:${this.node.console}`
|
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
|
return window.open(uri); // open an http console directly in a new window/tab
|
||||||
} else {
|
} else {
|
||||||
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
|
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
|
||||||
|
@ -226,18 +226,18 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.showCommand(`Launching console for node ${splittedCommand[1]}...`);
|
this.showCommand(`Launching console for node ${splittedCommand[1]}...`);
|
||||||
if (node.console_type === 'telnet') {
|
if (node.console_type === 'telnet') {
|
||||||
location.assign(
|
location.assign(
|
||||||
`gns3+telnet://${node.console_host}:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
|
`gns3+telnet://[${node.console_host}]:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
|
||||||
);
|
);
|
||||||
} else if (node.console_type === 'vnc') {
|
} else if (node.console_type === 'vnc') {
|
||||||
location.assign(
|
location.assign(
|
||||||
`gns3+vnc://${node.console_host}:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
|
`gns3+vnc://[${node.console_host}]:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
|
||||||
);
|
);
|
||||||
} else if (node.console_type.startsWith('spice')) {
|
} else if (node.console_type.startsWith('spice')) {
|
||||||
location.assign(
|
location.assign(
|
||||||
`gns3+spice://${node.console_host}:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
|
`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')) {
|
} else if (node.console_type.startsWith('http')) {
|
||||||
window.open(`${node.console_type}://${node.console_host}:${node.console}`);
|
window.open(`${node.console_type}://[${node.console_host}]:${node.console}`);
|
||||||
} else {
|
} else {
|
||||||
this.showCommand('Supported console types are: telnet, vnc, spice and spice+agent');
|
this.showCommand('Supported console types are: telnet, vnc, spice and spice+agent');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user