feat(ui): add Grace period input to monitor general settings (#755)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Raj Nandan Sharma
2026-06-13 19:02:20 +05:30
parent 9a545dbf48
commit 350e291db0
2 changed files with 20 additions and 0 deletions
@@ -75,6 +75,7 @@
category_name: "Home",
monitor_type: "" as MonitorType,
is_hidden: "NO",
confirmation_threshold: 1,
monitor_settings_json: "",
external_url: ""
});
@@ -116,6 +117,7 @@
category_name: m.category_name || "Home",
monitor_type: m.monitor_type || "",
is_hidden: m.is_hidden || "NO",
confirmation_threshold: m.confirmation_threshold ?? 1,
monitor_settings_json: m.monitor_settings_json || "",
external_url: m.external_url || ""
};
@@ -263,6 +263,24 @@
continue to work normally.
</p>
</div>
<div class="flex flex-col gap-2">
<Label for="monitor-confirmation-threshold">Grace period</Label>
<Input
id="monitor-confirmation-threshold"
type="number"
min="1"
max="60"
step="1"
value={monitor.confirmation_threshold ?? 1}
oninput={(e) => {
const v = parseInt((e.currentTarget as HTMLInputElement).value, 10);
monitor.confirmation_threshold = Number.isNaN(v) ? 1 : Math.min(60, Math.max(1, v));
}}
/>
<p class="text-muted-foreground text-xs">
Require this many consecutive checks before a status change is recorded. 1 = off (record every check immediately).
</p>
</div>
</div>
</Card.Content>
<Card.Footer class="flex justify-end">