Browse Source
Merge pull request #103 from slokhorst/patch-1
Clarify import error when no server files are found
pull/109/head
Per-Arne Andersen
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
wg_dashboard_frontend/src/app/page/dashboard/add-server/add-server.component.ts
|
@ -148,7 +148,11 @@ export class AddServerComponent implements OnInit { |
|
|
forkJoin(observables).subscribe(data => { |
|
|
forkJoin(observables).subscribe(data => { |
|
|
let server: any = data.filter((x: any) => !x.isClient); |
|
|
let server: any = data.filter((x: any) => !x.isClient); |
|
|
|
|
|
|
|
|
if(server.length !== 1) { |
|
|
if(server.length == 0) { |
|
|
|
|
|
this.notify.notify("error", "No server files detected!") |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(server.length > 1) { |
|
|
// TODO output error - should only be one server
|
|
|
// TODO output error - should only be one server
|
|
|
this.notify.notify("error", "Detected multiple server files!") |
|
|
this.notify.notify("error", "Detected multiple server files!") |
|
|
return false; |
|
|
return false; |
|
|