Fix queue rules upper bound to never allow 0 (#543)

This commit is contained in:
Flaminel
2026-04-03 16:11:12 +03:00
committed by GitHub
parent 81f6de03e7
commit ef280ec398
5 changed files with 32 additions and 10 deletions

View File

@@ -236,6 +236,7 @@ export class QueueCleanerComponent implements OnInit, HasPendingChanges {
readonly stallCompletionError = computed(() => {
const min = this.stallMinCompletion() ?? 0;
const max = this.stallMaxCompletion() ?? 100;
if (max <= 0) return 'Max percentage must be greater than 0';
if (max < min) return 'Max percentage must be greater than or equal to Min percentage';
return undefined;
});
@@ -256,6 +257,7 @@ export class QueueCleanerComponent implements OnInit, HasPendingChanges {
readonly slowCompletionError = computed(() => {
const min = this.slowMinCompletion() ?? 0;
const max = this.slowMaxCompletion() ?? 100;
if (max <= 0) return 'Max percentage must be greater than 0';
if (max < min) return 'Max percentage must be greater than or equal to Min percentage';
return undefined;
});