mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
Fix always show loading indicator when call API failed;Z-Index issue in repository detail page when event popup widget open;Wrong robot token expiration in system settings when call API failed
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
b0e3b65ade
commit
97acf44fbc
@ -129,7 +129,7 @@ export class Configuration {
|
|||||||
this.email_password = new StringValueItem("", true);
|
this.email_password = new StringValueItem("", true);
|
||||||
this.email_insecure = new BoolValueItem(false, true);
|
this.email_insecure = new BoolValueItem(false, true);
|
||||||
this.token_expiration = new NumberValueItem(30, true);
|
this.token_expiration = new NumberValueItem(30, true);
|
||||||
this.robot_token_duration = new NumberValueItem(30, true);
|
this.robot_token_duration = new NumberValueItem(30 * (60 * 24), true);
|
||||||
this.cfg_expiration = new NumberValueItem(30, true);
|
this.cfg_expiration = new NumberValueItem(30, true);
|
||||||
this.verify_remote_cert = new BoolValueItem(false, true);
|
this.verify_remote_cert = new BoolValueItem(false, true);
|
||||||
this.scan_all_policy = new ComplexValueItem({
|
this.scan_all_policy = new ComplexValueItem({
|
||||||
|
@ -27,7 +27,7 @@ import { Endpoint } from "../service/interface";
|
|||||||
import { EndpointService } from "../service/endpoint.service";
|
import { EndpointService } from "../service/endpoint.service";
|
||||||
|
|
||||||
import { ErrorHandler } from "../error-handler/index";
|
import { ErrorHandler } from "../error-handler/index";
|
||||||
import { map, catchError } from "rxjs/operators";
|
import { map, catchError, finalize } from "rxjs/operators";
|
||||||
import { ConfirmationMessage } from "../confirmation-dialog/confirmation-message";
|
import { ConfirmationMessage } from "../confirmation-dialog/confirmation-message";
|
||||||
import { ConfirmationAcknowledgement } from "../confirmation-dialog/confirmation-state-message";
|
import { ConfirmationAcknowledgement } from "../confirmation-dialog/confirmation-state-message";
|
||||||
import { ConfirmationDialogComponent } from "../confirmation-dialog/confirmation-dialog.component";
|
import { ConfirmationDialogComponent } from "../confirmation-dialog/confirmation-dialog.component";
|
||||||
@ -115,14 +115,14 @@ export class EndpointComponent implements OnInit, OnDestroy {
|
|||||||
retrieve(): void {
|
retrieve(): void {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.selectedRow = [];
|
this.selectedRow = [];
|
||||||
this.endpointService.getEndpoints(this.targetName)
|
this.endpointService.getEndpoints(this.targetName).pipe(finalize(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.forceRefreshView(1000);
|
||||||
|
}))
|
||||||
.subscribe(targets => {
|
.subscribe(targets => {
|
||||||
this.targets = targets || [];
|
this.targets = targets || [];
|
||||||
this.loading = false;
|
|
||||||
this.forceRefreshView(1000);
|
|
||||||
}, error => {
|
}, error => {
|
||||||
this.errorHandler.error(error);
|
this.errorHandler.error(error);
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import { TranslateService } from "@ngx-translate/core";
|
|||||||
import { ConfirmationDialogComponent } from "../confirmation-dialog/confirmation-dialog.component";
|
import { ConfirmationDialogComponent } from "../confirmation-dialog/confirmation-dialog.component";
|
||||||
import { operateChanges, OperateInfo, OperationState } from "../operation/operate";
|
import { operateChanges, OperateInfo, OperationState } from "../operation/operate";
|
||||||
import { OperationService } from "../operation/operation.service";
|
import { OperationService } from "../operation/operation.service";
|
||||||
import { map, catchError } from "rxjs/operators";
|
import { map, catchError, finalize } from "rxjs/operators";
|
||||||
import { errorHandler as errorHandFn } from "../shared/shared.utils";
|
import { errorHandler as errorHandFn } from "../shared/shared.utils";
|
||||||
import { Observable, throwError as observableThrowError, forkJoin } from "rxjs";
|
import { Observable, throwError as observableThrowError, forkJoin } from "rxjs";
|
||||||
@Component({
|
@Component({
|
||||||
@ -76,14 +76,14 @@ export class LabelComponent implements OnInit {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.selectedRow = [];
|
this.selectedRow = [];
|
||||||
this.targetName = "";
|
this.targetName = "";
|
||||||
this.labelService.getLabels(scope, this.projectId, name)
|
this.labelService.getLabels(scope, this.projectId, name).pipe(finalize(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.forceRefreshView(2000);
|
||||||
|
}))
|
||||||
.subscribe(targets => {
|
.subscribe(targets => {
|
||||||
this.targets = targets || [];
|
this.targets = targets || [];
|
||||||
this.loading = false;
|
|
||||||
this.forceRefreshView(2000);
|
|
||||||
}, error => {
|
}, error => {
|
||||||
this.errorHandler.error(error);
|
this.errorHandler.error(error);
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
.rightPos {
|
.rightPos {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 600;
|
z-index: 1;
|
||||||
right: 35px;
|
right: 35px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -108,10 +108,6 @@
|
|||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.datagrid-action-bar {
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trigger-item hbr-label-piece {
|
.trigger-item hbr-label-piece {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
|
@ -59,10 +59,10 @@ export class ProjectRoutingResolver implements Resolve<Project> {
|
|||||||
this.router.navigate(['/harbor', 'projects']);
|
this.router.navigate(['/harbor', 'projects']);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, catchError (error => {
|
}), catchError (error => {
|
||||||
this.router.navigate(['/harbor', 'projects']);
|
this.router.navigate(['/harbor', 'projects']);
|
||||||
return null;
|
return null;
|
||||||
})));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,18 +291,17 @@ export class UserComponent implements OnInit, OnDestroy {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return this.userService.deleteUser(user.user_id).pipe(map(() => {
|
return this.userService.deleteUser(user.user_id).pipe(map(() => {
|
||||||
this.translate.get('BATCH.DELETED_SUCCESS').subscribe(res => {
|
this.translate.get('BATCH.DELETED_SUCCESS').subscribe(res => {
|
||||||
operateChanges(operMessage, OperationState.success);
|
operateChanges(operMessage, OperationState.success);
|
||||||
});
|
});
|
||||||
}, catchError(error => {
|
}), catchError(error => {
|
||||||
const message = errorHandFn(error);
|
const message = errorHandFn(error);
|
||||||
this.translate.get(message).subscribe(res =>
|
this.translate.get(message).subscribe(res =>
|
||||||
operateChanges(operMessage, OperationState.failure, res)
|
operateChanges(operMessage, OperationState.failure, res)
|
||||||
);
|
);
|
||||||
return observableThrowError(message);
|
return observableThrowError(message);
|
||||||
})));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh the user list
|
// Refresh the user list
|
||||||
|
Loading…
Reference in New Issue
Block a user