const SERVICE_BLACKLIST = [ 'ixvd.net', 'proxy', '2d.neo.ixvd.net', 'pad.sandbox.neo.ixvd.net', ]; const serviceHolderDiv = document.querySelector('#service-holder'); async function update() { serviceHolderDiv.innerHTML = 'Loading...'; let fetchResult = await (await fetch('/relay/gatus')).json() serviceHolderDiv.innerHTML = ''; fetchResult.forEach(s => { if (!s.results || s.results.length === 0) return; let service = s.results[0]; if (service.hostname && !SERVICE_BLACKLIST.includes(service.hostname) && service.status === 200) { let serviceDiv = document.createElement('div'); serviceDiv.classList.add('service'); serviceDiv.innerHTML = ` ${service.hostname} ${service.success ? 'Online' : 'Offline'} `; serviceHolderDiv.appendChild(serviceDiv); } }) } update();