mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-11 10:27:58 +01:00
Fix issue click members and logs tab in project detail page portal will redirect to projects list page when call API failed
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
8cd155088d
commit
db4793d318
@ -31,6 +31,9 @@ export const errorHandler = function (error: any): string {
|
||||
if (error.error && error.error.message) {
|
||||
return error.error.message;
|
||||
}
|
||||
if (error.message) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
if (!(error.statusCode || error.status)) {
|
||||
// treat as string message
|
||||
|
@ -104,7 +104,6 @@ export class AuditLogComponent implements OnInit {
|
||||
this.auditLogs = response.body;
|
||||
},
|
||||
error => {
|
||||
this.router.navigate(['/harbor', 'projects']);
|
||||
this.messageHandlerService.handleError(error);
|
||||
}
|
||||
);
|
||||
|
@ -129,15 +129,16 @@ export class MemberComponent implements OnInit, OnDestroy {
|
||||
this.selectedRow = [];
|
||||
this.memberService
|
||||
.listMembers(projectId, username).pipe(
|
||||
finalize(() => this.loading = false))
|
||||
finalize(() => {
|
||||
this.loading = false;
|
||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||
setTimeout(() => clearInterval(hnd), 1000);
|
||||
}))
|
||||
.subscribe(
|
||||
response => {
|
||||
this.members = response;
|
||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||
setTimeout(() => clearInterval(hnd), 1000);
|
||||
},
|
||||
error => {
|
||||
this.router.navigate(["/harbor", "projects"]);
|
||||
this.messageHandlerService.handleError(error);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user