Skip to content

Commit

Permalink
Merge pull request #161 from jaimergp/open-gpu-server
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored Jan 19, 2024
2 parents 762e91e + 1c1f1af commit 44b7fb6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions site/open-gpu-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function loadOpenStatusJSON (url, callback) {
var xobj = new XMLHttpRequest()
xobj.overrideMimeType('application/json')
xobj.open('GET', url, true)
xobj.onreadystatechange = function () {
if (xobj.readyState === 4 && xobj.status === 200) {
// Required use of an anonymous callback as .open will NOT return a value
// but simply returns undefined in asynchronous mode
callback(xobj.responseText)
}
}
xobj.send(null)
}

function displayOpenGPUServerStatus (reportText) {
var report = JSON.parse(reportText)
var div = document.getElementById('open-gpu-server-status')

if (report.status === 'operational') {
div.className = 'status operational'
div.innerHTML = 'All Systems Operational'
} else {
div.className = 'status degraded performance'
div.innerHTML = report.status
}
}

var url = 'https://api.openstatus.dev/public/status/open-gpu-server'
loadOpenStatusJSON(url, displayOpenGPUServerStatus)
4 changes: 4 additions & 0 deletions site/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ <h4 id="cloud_services"><a href="#cloud_services" style="color: inherit;">Cloud
<h5><a href="https://status.dev.azure.com/">Azure DevOps</a>: <span id="azure-status">No Status Available</span></h5>
</div>
<script type="text/javascript" src="azure.js"></script>
<div id="open-gpu-server-dummy-div">
<h5><a href="https://ci-status.quansight.dev/">Open GPU Server</a>: <span id="open-gpu-server-status">No Status Available</span></h5>
</div>
<script type="text/javascript" src="open-gpu-server.js"></script>

<h4 id="little_migrations"><a href="#other_migrations" style="color: inherit;">Short-Term Migrations</a></h4>
<div id="migratorDivLittle" style="text-align:center;"></div>
Expand Down

0 comments on commit 44b7fb6

Please sign in to comment.