feat(alerting): add monitor alert groups with default routing
This commit is contained in:
1 parent
52819e64bb
commit
8544e5a585
26 files changed
+2938
-1473
No files matched your search
Vendored
+13
@@ -13,6 +13,10 @@ X-Empty:
|
||||
</fieldset>
|
||||
<fieldset data-type="http" disabled hidden><select name="config.method"><option value="HEAD" selected>HEAD</option></select></fieldset>
|
||||
<fieldset data-hide-for="heartbeat"><input type="checkbox" name="regions" value="r1" data-multi checked></fieldset>
|
||||
<input type="hidden" name="alert_group_ids" data-multi>
|
||||
<input type="checkbox" name="alert_group_ids" value="default" data-multi checked>
|
||||
<input type="checkbox" name="alert_group_ids" value="ops" data-multi>
|
||||
<input type="hidden" name="channel_ids" data-multi>
|
||||
<button type="submit">save</button>
|
||||
</form>
|
||||
<form data-api="/org/agents/a1" data-method="patch" data-autosave id="auto">
|
||||
@@ -42,6 +46,15 @@ window.axios = { create: () => ({ interceptors: { request: { use() {} } }, reque
|
||||
check("numbered names build arrays", body.config.assertions, [{ path: "status", op: "==" }, { path: "queue.depth", op: "<" }]);
|
||||
check("header lines become an object", body.config.headers, { Authorization: "Bearer a:b", "X-Empty": "" });
|
||||
check("regions sent", body.regions, ["r1"]);
|
||||
check("default alert group selected", body.alert_group_ids, ["default"]);
|
||||
check("empty channel list stays an array", body.channel_ids, []);
|
||||
form.querySelector('[name="alert_group_ids"][value="default"]').checked = false;
|
||||
body = await submit();
|
||||
check("cleared alert groups sent explicitly", body.alert_group_ids, []);
|
||||
form.querySelector('[name="alert_group_ids"][value="ops"]').checked = true;
|
||||
body = await submit();
|
||||
check("custom alert group selected", body.alert_group_ids, ["ops"]);
|
||||
|
||||
|
||||
const sel = form.querySelector("[data-type-select]");
|
||||
sel.value = "heartbeat";
|
||||
|
||||
Reference in new issue
Block a user