mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-19 04:57:51 +00:00
Async getting local server path
This commit is contained in:
parent
c841a3d879
commit
bb9cfc988b
@ -36,18 +36,18 @@ export class AddServerDialogComponent implements OnInit {
|
||||
return 'remote';
|
||||
}
|
||||
|
||||
getDefaultLocalServerPath() {
|
||||
async getDefaultLocalServerPath() {
|
||||
if(this.electronService.isElectronApp) {
|
||||
return this.electronService.remote.require('./local-server.js').getLocalServerPath();
|
||||
return await this.electronService.remote.require('./local-server.js').getLocalServerPath();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
async ngOnInit() {
|
||||
this.locations = this.getLocations();
|
||||
this.server.authorization = 'none';
|
||||
this.server.location = this.getDefaultLocation();
|
||||
this.server.path = this.getDefaultLocalServerPath();
|
||||
this.server.path = await this.getDefaultLocalServerPath();
|
||||
}
|
||||
|
||||
onAddClick(): void {
|
||||
|
Loading…
Reference in New Issue
Block a user