mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 13:57:48 +00:00
Update bundled-server-finder.component.ts
This commit is contained in:
parent
3f7fe0a7f3
commit
6faba7c4ec
@ -21,7 +21,15 @@ export class BundledServerFinderComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.progressService.activate();
|
||||
setTimeout(() => {
|
||||
let port = parseInt(this.document.location.port, 10) ? parseInt(this.document.location.port, 10) : 80;
|
||||
let port;
|
||||
|
||||
if (parseInt(this.document.location.port, 10)) {
|
||||
port = parseInt(this.document.location.port, 10);
|
||||
} else if (location.protocol == "https:") {
|
||||
port = 443;
|
||||
} else {
|
||||
port = 80;
|
||||
}
|
||||
|
||||
this.serverService.getLocalServer(this.document.location.hostname, port).then((server: Server) => {
|
||||
this.progressService.deactivate();
|
||||
|
Loading…
Reference in New Issue
Block a user