mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-02 19:16:44 +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() {
|
ngOnInit() {
|
||||||
this.progressService.activate();
|
this.progressService.activate();
|
||||||
setTimeout(() => {
|
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.serverService.getLocalServer(this.document.location.hostname, port).then((server: Server) => {
|
||||||
this.progressService.deactivate();
|
this.progressService.deactivate();
|
||||||
|
Loading…
Reference in New Issue
Block a user