mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-21 10:01:44 +00:00
Update direct-link.component.ts
This commit is contained in:
parent
50c5701192
commit
7b94cb779a
@ -30,8 +30,16 @@ export class DirectLinkComponent implements OnInit {
|
||||
|
||||
if (server) {
|
||||
this.router.navigate(['/server', server.id, 'project', projectId]);
|
||||
} else {
|
||||
this.toasterService.error('Server not found');
|
||||
} else {
|
||||
let serverToAdd: Server = new Server();
|
||||
serverToAdd.host = serverIp;
|
||||
serverToAdd.port = serverPort;
|
||||
serverToAdd.location = 'bundled';
|
||||
serverToAdd.name = serverIp;
|
||||
|
||||
this.serverService.create(serverToAdd).then((addedServer: Server) => {
|
||||
this.router.navigate(['/server', addedServer.id, 'project', projectId]);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user