+100
-26
index.html
+100
-26
index.html
···
41
41
window.slingshot = window.SimpleQuery('https://slingshot.microcosm.blue');
42
42
window.relays = [
43
43
{
44
-
name: 'Bluesky sync1.1 East',
45
-
hostname: 'relay1.us-east.bsky.network',
46
-
},
47
-
{
48
-
name: 'Bluesky sync1.1 West',
49
-
hostname: 'relay1.us-west.bsky.network',
44
+
name: 'Bluesky',
45
+
icon: 'https://web-cdn.bsky.app/static/apple-touch-icon.png',
46
+
hostname: 'bsky.network',
47
+
note: 'current',
48
+
missingApis: {
49
+
['com.atproto.sync.getHostStatus']: 'missing API (old relay code)',
50
+
['com.atproto.sync.getRepoStatus']: 'missing API (old relay code)',
51
+
},
50
52
},
51
53
{
52
54
name: 'Microcosm Montreal',
···
57
59
hostname: 'relay3.fr.hose.cam',
58
60
},
59
61
{
60
-
name: 'Bluesky prod (old)',
61
-
hostname: 'bsky.network',
62
+
name: 'Upcloud',
63
+
icon: 'https://upcloud.com/media/android-chrome-512x512-2-150x150.png',
64
+
hostname: 'relay.upcloud.world',
62
65
},
63
66
{
64
-
name: 'Blacksky (partial xrpc)',
67
+
name: 'Blacksky',
68
+
icon: 'https://blacksky.community/static/favicon-32x32.png',
65
69
hostname: 'atproto.africa',
70
+
missingApis: {
71
+
['com.atproto.sync.getHostStatus']: 'API not yet deployed',
72
+
['com.atproto.sync.getRepoStatus']: 'API not implemented',
73
+
},
74
+
},
75
+
{
76
+
name: 'Bluesky East',
77
+
icon: 'https://web-cdn.bsky.app/static/favicon-32x32.png',
78
+
note: 'future',
79
+
hostname: 'relay1.us-east.bsky.network',
66
80
},
67
81
{
68
-
name: 'Upcloud (no CORS)',
69
-
hostname: 'relay.upcloud.world',
82
+
name: 'Bluesky West',
83
+
icon: 'https://web-cdn.bsky.app/static/favicon-32x32.png',
84
+
note: 'future',
85
+
hostname: 'relay1.us-west.bsky.network',
70
86
},
71
87
];
72
88
</script>
···
219
235
loading: false,
220
236
error: null,
221
237
status: null,
238
+
expectedErrorInfo: null,
222
239
reqCrawlStatus: null,
223
240
reqCrawlError: null,
224
241
···
230
247
this.loading = true;
231
248
this.error = null;
232
249
this.status = null;
250
+
this.expectedError = false;
233
251
const query = window.SimpleQuery(`https://${relay.hostname}`);
234
252
const hostname = pds.split('://')[1];
235
253
let data;
···
239
257
});
240
258
this.status = data.status;
241
259
} catch(e) {
242
-
if (window.isXrpcErr(e)) {
260
+
if (relay.missingApis['com.atproto.sync.getHostStatus']) {
261
+
this.error = 'Can\'t check';
262
+
this.expectedErrorInfo = relay.missingApis['com.atproto.sync.getHostStatus'];
263
+
} else if (window.isXrpcErr(e)) {
243
264
this.error = e.error;
244
265
} else {
245
266
this.error = 'Failed to check (see console)';
···
399
420
loading: false,
400
421
error: null,
401
422
status: null,
423
+
expectedErrorInfo: null,
402
424
403
425
async init() {
404
426
await this.check(did, relay);
···
408
430
this.loading = true;
409
431
this.error = null;
410
432
this.status = null;
433
+
this.expectedErrorInfo = null;
411
434
412
435
const query = window.SimpleQuery(`https://${relay.hostname}`);
413
436
try {
···
415
438
params: { did },
416
439
});
417
440
} catch(e) {
418
-
if (window.isXrpcErr(e)) {
441
+
if (relay.missingApis['com.atproto.sync.getRepoStatus']) {
442
+
this.error = 'Can\'t check';
443
+
this.expectedErrorInfo = relay.missingApis['com.atproto.sync.getRepoStatus'];
444
+
} else if (window.isXrpcErr(e)) {
419
445
this.error = e.error;
420
446
} else {
421
447
this.error = 'Failed to check (see console)';
···
664
690
</div>
665
691
666
692
<h3 class="text-lg mt-3">Relay host status</h3>
667
-
<div class="overflow-x-auto overflow-y-auto max-h-33">
693
+
<div class="overflow-x-auto">
668
694
<table class="table table-xs">
669
695
<tbody>
670
696
<template x-for="relay in window.relays">
···
672
698
x-data="relayCheckHost(pds, relay)"
673
699
x-init="$watch('pds', pds => check(pds, relay))"
674
700
>
675
-
<td x-text="relay.name" class="text-sm"></td>
701
+
<td class="text-sm">
702
+
<div class="tooltip tooltip-right" :data-tip="relay.hostname">
703
+
<img
704
+
class="inline-block h-4 w-4"
705
+
:src="relay.icon"
706
+
alt=""
707
+
/>
708
+
<span x-text="relay.name"></span>
709
+
<span
710
+
x-show="!!relay.note"
711
+
x-text="relay.note"
712
+
class="badge badge-soft badge-neutral badge-xs"
713
+
></span>
714
+
</div>
715
+
</td>
676
716
<td>
677
717
<template x-if="loading">
678
718
<em>loading…</em>
679
719
</template>
680
720
<template x-if="error">
681
-
<span
682
-
x-text="error"
683
-
class="text-xs text-warning"
684
-
></span>
721
+
<div
722
+
class="text-xs"
723
+
:class="expectedErrorInfo
724
+
? 'text-info tooltip tooltip-left cursor-help'
725
+
: 'text-warning'"
726
+
:data-tip="expectedErrorInfo"
727
+
>
728
+
<span x-text="error"></span>
729
+
<span
730
+
x-show="!!expectedErrorInfo"
731
+
class="badge badge-soft badge-info badge-xs"
732
+
>i</span>
733
+
</div>
685
734
</template>
686
735
<template x-if="status">
687
736
<span
···
692
741
</template>
693
742
</td>
694
743
<td>
695
-
<div x-show="status !== 'active'">
744
+
<div x-show="status !== 'active' && !expectedErrorInfo">
696
745
<button
697
746
x-show="reqCrawlStatus !== 'done'"
698
747
class="btn btn-xs btn-ghost whitespace-nowrap"
···
791
840
<h3 class="text-lg mt-3">
792
841
Relay repo status
793
842
</h3>
794
-
<div class="overflow-x-auto overflow-y-auto max-h-33">
843
+
<div class="overflow-x-auto">
795
844
<table class="table table-xs">
796
845
<tbody>
797
846
<template x-for="relay in window.relays">
···
799
848
x-data="relayCheckRepo(did, relay)"
800
849
x-init="$watch('pds', pds => check(did, relay))"
801
850
>
802
-
<td x-text="relay.name" class="text-sm"></td>
851
+
<td class="text-sm">
852
+
<div class="tooltip tooltip-right" :data-tip="relay.hostname">
853
+
<img
854
+
class="inline-block h-4 w-4"
855
+
:src="relay.icon"
856
+
alt=""
857
+
/>
858
+
<span x-text="relay.name"></span>
859
+
<span
860
+
x-show="!!relay.note"
861
+
x-text="relay.note"
862
+
class="badge badge-neutral badge-soft badge-xs"
863
+
></span>
864
+
</div>
865
+
</td>
803
866
<template x-if="loading">
804
867
<td>
805
868
<em>loading…</em>
806
869
</td>
807
870
</template>
808
871
<template x-if="error">
809
-
<td
810
-
x-text="error"
811
-
class="text-xs text-warning"
812
-
></td>
872
+
<td>
873
+
<div
874
+
class="text-xs"
875
+
:class="expectedErrorInfo
876
+
? 'text-info tooltip tooltip-left cursor-help'
877
+
: 'text-warning'"
878
+
:data-tip="expectedErrorInfo"
879
+
>
880
+
<span x-text="error"></span>
881
+
<span
882
+
x-show="!!expectedErrorInfo"
883
+
class="badge badge-soft badge-info badge-xs"
884
+
>i</span>
885
+
</div>
886
+
</td>
813
887
</template>
814
888
<template x-if="status">
815
889
<td>