Commit 592d40cb authored by Jakob Moser's avatar Jakob Moser
Browse files

Adjust JavaScript to new API

parent 22c3ef2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ function getServiceUrl(serviceHost) {
/**
 * Create an HTML status badge for the given service object. The service object could look like this:
 * 
 * {"name": "Website", "host": "fachschaft.cl.uni-heidelberg.de", "status": "up"}
 * {"name": "Website", "host": "fachschaft.cl.uni-heidelberg.de", "status": 200}
 *
 * The badge code would then look like this:
 * 
@@ -62,7 +62,7 @@ function createStatusBadge(service) {
    nameEl.textContent = service.name

    const statusEl = document.createElement("span")
    statusEl.textContent = service.status
    statusEl.textContent = service.status == 200 ? "Up" : "Down"

    a.append(nameEl, statusEl)