@@ -20,81 +20,19 @@ federation, along with the status of each. For more information about
2020the BinderHub federation, who is in it, how to join it, etc, see
2121`the mybinder federation page <https://mybinder.readthedocs.io/en/latest/about/federation.html >`_.
2222
23+ .. update fedUrls in _status/status.js
24+
2325========================== ======== =============== ============== =============== =====
2426 URL Response Docker registry JupyterHub API User/Build Pods Quota
2527========================== ======== =============== ============== =============== =====
2628gke.mybinder.org
2729ovh.mybinder.org
28- notebooks.gesis.org
30+ notebooks.gesis.org/binder
2931========================== ======== =============== ============== =============== =====
3032
3133.. raw :: html
3234
33- <script >
34- var fedUrls = [
35- " https://gke.mybinder.org" ,
36- " https://ovh.mybinder.org" ,
37- " https://notebooks.gesis.org/binder" ,
38- ]
39-
40- // Use a dictionary to store the rows that should be updated
41- var urlRows = {};
42- fedUrls .forEach ((url ) => {
43- document .querySelectorAll (' tr' ).forEach ((tr ) => {
44- if (tr .textContent .includes (url .replace (' https://' , ' ' ))) {
45- urlRows[url] = tr;
46- };
47- });
48- });
49-
50- fedUrls .forEach ((url ) => {
51- var urlHealth = url + ' /health'
52- var urlPrefix = url .split (' //' )[1 ].split (' .' )[0 ]
53-
54- // Query the endpoint and update health icon
55- var row = urlRows[url];
56- let [fieldUrl, fieldResponse, fieldRegistry, fieldHub, fieldPods, fieldQuota] = row .querySelectorAll (' td' )
57- $ .getJSON (urlHealth, {})
58- .done ((resp ) => {
59- if (resp[' ok' ] == false ) {
60- setStatus (fieldResponse, ' fail' )
61- } else {
62- setStatus (fieldResponse, ' success' )
63- }
64-
65- let [respReg, respHub, respQuota] = resp[' checks' ]
66-
67- if (respReg == false ) {
68- setStatus (fieldRegistry, ' fail' )
69- } else {
70- setStatus (fieldRegistry, ' success' )
71- }
72-
73- if (respHub == false ) {
74- setStatus (fieldHub, ' fail' )
75- } else {
76- setStatus (fieldHub, ' success' )
77- }
78-
79- fieldPods .textContent = ` ${ respQuota[' user_pods' ]} /${ respQuota[' build_pods' ]} `
80- fieldQuota .textContent = ` ${ respQuota[' quota' ]} `
81- })
82- .fail ((resp ) => {
83- setStatus (fieldResponse, ' fail' )
84- });
85- })
86-
87- var setStatus = (td , kind ) => {
88- if (kind == " success" ) {
89- td .textContent = " Success" ;
90- td .style .color = " green" ;
91- } else {
92- td .textContent = " Fail" ;
93- td .style .color = " red" ;
94- }
95- }
96-
97- </script >
35+ <script src =" ../_static/status.js" type =" text/javascript" />
9836
9937
10038Running Binder sessions
0 commit comments