mirror of
https://github.com/rajnandan1/kener.git
synced 2026-06-23 04:10:22 +00:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user