This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 61bd3184 authored by Daniel Crazzolara's avatar Daniel Crazzolara
Browse files

Improved error handling for gitlab path selector

parent ccdeea84
2 merge requests!71Merge for September Release,!70Improvement/adapt import to new artemis export
...@@ -53,6 +53,11 @@ ...@@ -53,6 +53,11 @@
<div class="spinner"></div> <div class="spinner"></div>
</div> </div>
</div> </div>
<div *ngIf="errorOccurred">
<div class="h-100 w-100 d-flex justify-content-center align-items-center m-5">
<strong jhiTranslate="gitlab.pathSelector.errorOccurred"></strong>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -14,6 +14,7 @@ export class GitlabPathSelectorComponent implements OnInit { ...@@ -14,6 +14,7 @@ export class GitlabPathSelectorComponent implements OnInit {
subgroups: GitlabGroup[] | undefined; subgroups: GitlabGroup[] | undefined;
isLoading = false; isLoading = false;
errorOccurred = false;
constructor(private activeModal: NgbActiveModal, private jhiAlertService: JhiAlertService, private gitlabService: GitlabService) {} constructor(private activeModal: NgbActiveModal, private jhiAlertService: JhiAlertService, private gitlabService: GitlabService) {}
...@@ -25,8 +26,11 @@ export class GitlabPathSelectorComponent implements OnInit { ...@@ -25,8 +26,11 @@ export class GitlabPathSelectorComponent implements OnInit {
this.isLoading = false; this.isLoading = false;
}, },
error => { error => {
this.jhiAlertService.error(error.error); // eslint-disable-next-line no-console
console.log('############');
this.jhiAlertService.error('', { error: error.error });
this.isLoading = false; this.isLoading = false;
this.errorOccurred = true;
} }
); );
} }
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"description": "Beschreibung", "description": "Beschreibung",
"url": "URL", "url": "URL",
"visibility": "Freischaltung", "visibility": "Freischaltung",
"select": "Auswählen" "select": "Auswählen",
"errorOccurred": "Ein Fehler ist beim laden der Gitlab Gruppen aufgetreten."
} }
} }
} }
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"description": "Description", "description": "Description",
"url": "URL", "url": "URL",
"visibility": "Visibility", "visibility": "Visibility",
"select": "Select" "select": "Select",
"errorOccurred": "An error occurred while retrieving the Gitlab groups"
} }
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment