feat(statuspage): add nested status page groups and optional component details
This commit is contained in:
1 parent
1c31003baf
commit
9b26b4150e
26 files changed
+4566
-760
No files matched your search
Vendored
+25
@@ -43,6 +43,21 @@ X-Empty:
|
||||
</div>
|
||||
<button type="submit">save</button>
|
||||
</form>
|
||||
<form data-api="/org/statuspages/p1/monitors" data-method="put" data-rows="monitors" id="sp">
|
||||
<div data-row>
|
||||
<input type="checkbox" data-field="include" checked>
|
||||
<input type="hidden" data-field="monitor_id" value="m1">
|
||||
<select data-field="group_id" data-nullable><option value="" selected>none</option><option value="g1">G1</option></select>
|
||||
<input data-field="label" value="Web">
|
||||
</div>
|
||||
<div data-row>
|
||||
<input type="checkbox" data-field="include" checked>
|
||||
<input type="hidden" data-field="monitor_id" value="m2">
|
||||
<select data-field="group_id" data-nullable><option value="">none</option><option value="g1" selected>G1</option></select>
|
||||
<input data-field="label" value="">
|
||||
</div>
|
||||
<button type="submit">save</button>
|
||||
</form>
|
||||
<pre id="out"></pre>
|
||||
<script>
|
||||
const sent = [];
|
||||
@@ -114,6 +129,16 @@ window.axios = { create: () => ({ interceptors: { request: { use() {} } }, reque
|
||||
]);
|
||||
qhForm.querySelector("[data-quiet-remove]").click();
|
||||
check("removing all quiet_hours rows sends empty array", (await submitQH()).quiet_hours, []);
|
||||
|
||||
const spForm = document.getElementById("sp");
|
||||
spForm.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true }));
|
||||
await new Promise((r) => setTimeout(r, 20));
|
||||
check("data-rows respects data-nullable on group_id", sent.at(-1), {
|
||||
monitors: [
|
||||
{ monitor_id: "m1", group_id: null, label: "Web" },
|
||||
{ monitor_id: "m2", group_id: "g1", label: "" },
|
||||
],
|
||||
});
|
||||
document.getElementById("out").textContent = out.join("\n");
|
||||
})();
|
||||
</script></body></html>
|
||||
Reference in new issue
Block a user