UI: Add in VC support new property rollback on error

This commit is contained in:
Vladyslav_Prykhodko 2024-03-15 16:51:00 +02:00
parent eb50685108
commit 2ca3a86c96
4 changed files with 8 additions and 7 deletions

View File

@ -23,11 +23,16 @@
<mat-progress-bar color="warn" style="z-index: 10; width: 100%; margin-bottom: -4px;" mode="indeterminate" <mat-progress-bar color="warn" style="z-index: 10; width: 100%; margin-bottom: -4px;" mode="indeterminate"
*ngIf="isLoading$ | async"> *ngIf="isLoading$ | async">
</mat-progress-bar> </mat-progress-bar>
<form [formGroup]="loadVersionFormGroup" fxLayout="column" style="flex: 1; padding-top: 16px; overflow: auto;"> <form [formGroup]="loadVersionFormGroup" fxLayout="column" style="flex: 1; padding: 16px 0; overflow-y: auto; overflow-x: hidden">
<tb-entity-types-version-load <tb-entity-types-version-load
formControlName="entityTypes"> formControlName="entityTypes">
</tb-entity-types-version-load> </tb-entity-types-version-load>
</form> </form>
<div tb-hint-tooltip-icon="{{ 'version-control.rollback-on-error-hint' | translate }}" [formGroup]="loadVersionFormGroup">
<mat-slide-toggle formControlName="rollbackOnError">
{{ 'version-control.rollback-on-error' | translate }}
</mat-slide-toggle>
</div>
<div fxLayoutAlign="end center" fxLayoutGap="8px" style="padding-top: 16px;"> <div fxLayoutAlign="end center" fxLayoutGap="8px" style="padding-top: 16px;">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"

View File

@ -79,6 +79,7 @@ export class ComplexVersionLoadComponent extends PageComponent implements OnInit
ngOnInit(): void { ngOnInit(): void {
this.loadVersionFormGroup = this.fb.group({ this.loadVersionFormGroup = this.fb.group({
entityTypes: [createDefaultEntityTypesVersionLoad(), []], entityTypes: [createDefaultEntityTypesVersionLoad(), []],
rollbackOnError: [false]
}); });
} }

View File

@ -99,8 +99,3 @@
</button> </button>
</div> </div>
</fieldset> </fieldset>
<div [formGroup]="entityTypesVersionLoadFormGroup" fxLayout="row">
<mat-checkbox formControlName="rollbackOnError">
{{ 'version-control.rollback-on-error' | translate }}
</mat-checkbox>
</div>

View File

@ -4917,7 +4917,7 @@
"runtime-failed": "<b>Failed:</b> {{message}}", "runtime-failed": "<b>Failed:</b> {{message}}",
"auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings.", "auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings.",
"rollback-on-error": "Rollback on error", "rollback-on-error": "Rollback on error",
"rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.<br><b>Note</b>, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is" "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is"
}, },
"widget": { "widget": {
"widget-library": "Widgets library", "widget-library": "Widgets library",