[autofix.ci] apply automated fixes
This commit is contained in:
parent
2e0cebb3fb
commit
cf840e4936
@ -1772,13 +1772,13 @@ class Monitor extends BeanModel {
|
||||
if (isNaN(delay) || delay < 0) {
|
||||
throw new Error("Screenshot delay must be a non-negative number");
|
||||
}
|
||||
|
||||
|
||||
// Must not exceed 0.8 * timeout (page.goto timeout is interval * 1000 * 0.8)
|
||||
const maxDelayFromTimeout = this.interval * 1000 * 0.8;
|
||||
if (delay >= maxDelayFromTimeout) {
|
||||
throw new Error(`Screenshot delay must be less than ${maxDelayFromTimeout}ms (0.8 × interval)`);
|
||||
}
|
||||
|
||||
|
||||
// Must not exceed 0.5 * interval to prevent blocking next check
|
||||
const maxDelayFromInterval = this.interval * 1000 * 0.5;
|
||||
if (delay >= maxDelayFromInterval) {
|
||||
|
||||
@ -279,7 +279,11 @@
|
||||
/>
|
||||
<div class="form-text">
|
||||
{{ $t("screenshotDelayDescription") }}
|
||||
{{ $t("screenshotDelayMaxInfo", { max: Math.floor(monitor.interval * 1000 * 0.5) }) }}
|
||||
{{
|
||||
$t("screenshotDelayMaxInfo", {
|
||||
max: Math.floor(monitor.interval * 1000 * 0.5),
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
<div class="form-text text-warning">
|
||||
{{ $t("screenshotDelayWarning") }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user