chore: import gateway, exchange secrets, env example
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const rows = document.querySelectorAll("tr[data-path]");
|
||||
|
||||
async function poll() {
|
||||
for (const row of rows) {
|
||||
const dot = row.querySelector(".status");
|
||||
try {
|
||||
const r = await fetch(`${row.dataset.path}/health`, {
|
||||
method: "GET",
|
||||
cache: "no-store",
|
||||
});
|
||||
dot.classList.toggle("ok", r.ok);
|
||||
dot.classList.toggle("err", !r.ok);
|
||||
dot.setAttribute("aria-label", r.ok ? "ok" : "error");
|
||||
} catch {
|
||||
dot.classList.remove("ok");
|
||||
dot.classList.add("err");
|
||||
dot.setAttribute("aria-label", "unreachable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
poll();
|
||||
setInterval(poll, 5000);
|
||||
Reference in New Issue
Block a user