forked from CWAD/circlewithadot.net
add connected instances list to aprelay
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link href="../style.css?v=20250831" rel="stylesheet" />
|
||||
<style>
|
||||
/* Relay-only CSS */
|
||||
.relay-wrap {
|
||||
max-width: 860px;
|
||||
margin: 0 auto 60px;
|
||||
@@ -30,7 +29,6 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* logo next to header */
|
||||
.relay-logo {
|
||||
display: block;
|
||||
width: 80px;
|
||||
@@ -88,7 +86,6 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Homepage-style icon box for updates */
|
||||
.updates-title {
|
||||
margin: 0 0 10px;
|
||||
font-size: 16px;
|
||||
@@ -107,7 +104,6 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Policy box (make it match the rest of the page sizing) */
|
||||
.policy-card {
|
||||
font-size: 14px;
|
||||
}
|
||||
@@ -203,7 +199,6 @@
|
||||
</noscript>
|
||||
</section>
|
||||
|
||||
<!-- Updates box -->
|
||||
<section class="relay-card updates-card" style="margin-top:16px;">
|
||||
<p class="updates-title"><strong>For relay updates, check here</strong></p>
|
||||
<div class="icon-row">
|
||||
@@ -216,7 +211,6 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Covenant / policy box -->
|
||||
<section class="relay-card policy-card" style="margin-top:16px;">
|
||||
<p class="policy-title"><strong>Relay policy</strong></p>
|
||||
|
||||
@@ -242,6 +236,28 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="relay-card instances-card" style="margin-top:16px;">
|
||||
<p class="instances-title"><strong>Connected instances</strong></p>
|
||||
|
||||
<div class="instances-table" role="table" aria-label="Connected relay instances">
|
||||
<div class="instances-header" role="row">
|
||||
<span role="columnheader">Instance</span>
|
||||
<span role="columnheader">Status</span>
|
||||
</div>
|
||||
|
||||
<div id="instances-body" class="instances-body" role="rowgroup">
|
||||
<div class="instances-row" role="row">
|
||||
<span class="mono" role="cell">Loading…</span>
|
||||
<span role="cell">–</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="instances-meta">
|
||||
Last check: <span id="instances-updated">–</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="site-footer" role="contentinfo" style="margin-top:16px;">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-left">
|
||||
@@ -275,6 +291,7 @@
|
||||
</main>
|
||||
|
||||
<a rel="me" href="https://mastodon.circlewithadot.net/@incentive" hidden>Mastodon</a>
|
||||
<a rel="me" href="https://mastodon.circlewithadot.net/@cwad" hidden>Mastodon</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -64,3 +64,37 @@ async function loadStats() {
|
||||
loadStats();
|
||||
setInterval(loadStats, 300000);
|
||||
|
||||
async function loadInstanceStatuses() {
|
||||
const bodyEl = document.getElementById("instances-body");
|
||||
const updatedEl = document.getElementById("instances-updated");
|
||||
if (!bodyEl || !updatedEl) return;
|
||||
|
||||
try {
|
||||
const res = await fetch("aprelay_instances.json", { cache: "no-store" });
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
||||
|
||||
const data = await res.json();
|
||||
const instances = Array.isArray(data.instances) ? data.instances : [];
|
||||
updatedEl.textContent = data.generated_at || "–";
|
||||
|
||||
if (!instances.length) {
|
||||
bodyEl.innerHTML = `<div class="instances-row"><span class="mono">No data</span><span>–</span></div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
bodyEl.innerHTML = instances.map(x => `
|
||||
<div class="instances-row" role="row">
|
||||
<span class="mono" role="cell">${x.domain}</span>
|
||||
<span role="cell">${x.status}</span>
|
||||
</div>
|
||||
`).join("");
|
||||
} catch (e) {
|
||||
bodyEl.innerHTML = `<div class="instances-row"><span class="mono">Error loading list</span><span>–</span></div>`;
|
||||
updatedEl.textContent = "–";
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
loadInstanceStatuses();
|
||||
});
|
||||
|
||||
|
||||
121
services/aprelay_instances.json
Normal file
121
services/aprelay_instances.json
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"generated_at": "2026-02-07 02:03:58 UTC",
|
||||
"instances": [
|
||||
{
|
||||
"domain": "activitypub.space",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "ailbhean.co-shaoghal.net",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "bitforged.social",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "clar.ke",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "cyangant.dedyn.io",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "declin.eu",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "fed.fsub.de",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "fedifreu.de",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "fleacf.space",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "irlqt.net",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "kosen-agola-misskey.kouta2133.work",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "mammut.gogreenit.net",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "mastodon.circlewithadot.net",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "misskey.jayhsustudio.com",
|
||||
"status": "530",
|
||||
"code": 530
|
||||
},
|
||||
{
|
||||
"domain": "misskey.xstudiotw.net",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "mitchelltribe.rodeo",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "mstdn.canarylabs.eu",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "mstdn.catbyte.tech",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "mstdn.fan",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "okpeace.org",
|
||||
"status": "dead",
|
||||
"code": null
|
||||
},
|
||||
{
|
||||
"domain": "pl.aelaraji.com",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "relay.fedi.buzz",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
},
|
||||
{
|
||||
"domain": "social.domaincrawler.com",
|
||||
"status": "working",
|
||||
"code": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user