From 9d7984604463cac2173fad7b11ed4edd68c44ede Mon Sep 17 00:00:00 2001 From: phil Date: Fri, 19 Dec 2025 18:03:34 -0500 Subject: [PATCH] add server status --- index.html | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9cd1471..4963170 100644 --- a/index.html +++ b/index.html @@ -98,6 +98,31 @@ }, })); + Alpine.data('pdsCheck', pds => ({ + loading: false, + error: null, + status: null, + + async init() { + this.loading = true; + this.error = null; + this.status = null; + let query = window.SimpleQuery(pds); + try { + await query('com.atproto.server.describeServer'); + this.status = 'online'; + } catch (e) { + if (window.isXrpcErr(e)) { + this.error = e.error; + } else { + this.error = 'Failed to reach (see console)'; + console.error(e); + } + } + this.loading = false; + } + })) + Alpine.data('relayCheckHost', (pds, relay) => ({ loading: false, error: null, @@ -113,7 +138,7 @@ this.loading = true; this.error = null; this.status = null; - let query = window.SimpleQuery(`https://${relay.hostname}`); + const query = window.SimpleQuery(`https://${relay.hostname}`); const hostname = pds.split('://')[1]; let data; try { @@ -207,7 +232,15 @@

PDS -

+ + +

Server

+
+
+

Relay host status

-- 2.51.2