Apply suggestions from code review

This commit is contained in:
Frank Elsinga 2026-01-17 14:28:36 +01:00 committed by GitHub
parent 3127f9817c
commit 224e6b8705
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 10 deletions

View File

@ -1,6 +1,6 @@
exports.up = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.integer("screenshot_delay").notNullable().defaultTo(0);
table.integer("screenshot_delay").notNullable().unsigned().defaultTo(0);
});
};

View File

@ -1055,10 +1055,9 @@
"remoteBrowserToggle": "By default Chromium runs inside the Uptime Kuma container. You can use a remote browser by toggling this switch.",
"useRemoteBrowser": "Use a Remote Browser",
"deleteRemoteBrowserMessage": "Are you sure want to delete this Remote Browser for all monitors?",
"Screenshot Delay ({ms})": "Screenshot Delay ({ms})",
"ms": "ms",
"screenshotDelayDescription": "Wait this many milliseconds before taking the screenshot.",
"screenshotDelayMaxInfo": "Maximum: {max}ms (0.5 × interval).",
"Screenshot Delay": "Screenshot Delay ({miliseconds})",
"miliseconds": "{n} milisecond | {n} miliseconds",
"screenshotDelayDescription": "Optionally wait this many milliseconds before taking the screenshot. Maximum: {maxValueMs}ms (0.5 × interval).",
"screenshotDelayWarning": "Higher values keep the browser open longer, which may increase memory usage with many concurrent monitors.",
"GrafanaOncallUrl": "Grafana Oncall URL",
"systemService": "System Service",

View File

@ -266,7 +266,7 @@
<!-- Screenshot Delay -->
<div class="my-3">
<label for="screenshot-delay" class="form-label">
{{ $t("Screenshot Delay ({ms})", { ms: $t("ms") }) }}
{{ $t("Screenshot Delay", { miliseconds: $t("miliseconds", monitor.screenshot_delay) }) }}
</label>
<input
id="screenshot-delay"
@ -278,10 +278,8 @@
step="100"
/>
<div class="form-text">
{{ $t("screenshotDelayDescription") }}
{{
$t("screenshotDelayMaxInfo", {
max: Math.floor(monitor.interval * 1000 * 0.5),
{{ $t("screenshotDelayDescription", {
maxValueMs: Math.floor(monitor.interval * 1000 * 0.5),
})
}}
</div>