mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-15 09:42:56 -07:00
Put the issue purge limit on the issues page
This commit is contained in:
parent
66af499970
commit
d19efd91a5
2 changed files with 12 additions and 6 deletions
|
@ -26,12 +26,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" *ngIf="form.controls.deleteIssues.value">
|
<div class="form-group" *ngIf="form.controls.deleteIssues.value">
|
||||||
<div class="checkbox">
|
<label for="daysAfterResolvedToDelete" class="control-label">Leave the resolved issue for X amount of
|
||||||
<input type="checkbox" id="daysAfterResolvedToDelete" formControlName="daysAfterResolvedToDelete" ng-checked="form.daysAfterResolvedToDelete">
|
days before deletion</label>
|
||||||
<label for="daysAfterResolvedToDelete">Leave the resolved issue for X amount of days before deletion</label>
|
<input type="number" class="form-control form-control-custom form-small" min="1" max="365" id="daysAfterResolvedToDelete"
|
||||||
</div>
|
formControlName="daysAfterResolvedToDelete" ng-checked="form.daysAfterResolvedToDelete">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" [disabled]="form.invalid" class="btn btn-primary-outline ">Submit</button>
|
<button type="submit" [disabled]="form.invalid" class="btn btn-primary-outline ">Submit</button>
|
||||||
|
@ -52,8 +53,8 @@
|
||||||
<label for="categoryToAdd" class="control-label">Add Category</label>
|
<label for="categoryToAdd" class="control-label">Add Category</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<input type="text" [(ngModel)]="categoryToAdd.value" class="form-control form-control-custom " id="categoryToAdd" name="categoryToAdd"
|
<input type="text" [(ngModel)]="categoryToAdd.value" class="form-control form-control-custom " id="categoryToAdd"
|
||||||
value="{{categoryToAdd.value}}">
|
name="categoryToAdd" value="{{categoryToAdd.value}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<button class="btn btn-primary-outline" (click)="addCategory()">Add</button>
|
<button class="btn btn-primary-outline" (click)="addCategory()">Add</button>
|
||||||
|
|
|
@ -55,6 +55,11 @@ export class IssuesComponent implements OnInit {
|
||||||
|
|
||||||
const settings = form.value;
|
const settings = form.value;
|
||||||
|
|
||||||
|
if(settings.deleteIssues && settings.daysAfterResolvedToDelete <= 0) {
|
||||||
|
this.notificationService.error("You need to enter days greater than 0");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.settingsService.saveIssueSettings(settings).subscribe(x => {
|
this.settingsService.saveIssueSettings(settings).subscribe(x => {
|
||||||
if (x) {
|
if (x) {
|
||||||
this.notificationService.success("Successfully saved the Issue settings");
|
this.notificationService.success("Successfully saved the Issue settings");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue