Last active
June 23, 2020 18:35
-
-
Save GentlemanHal/f10519c100f576c7169a to your computer and use it in GitHub Desktop.
Nevergreen MVP monitor page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<ul id="projects"> | |
</ul> | |
<script> | |
function update() { | |
var cctrayUrl = 'https://builds.apache.org/cc.xml' | |
$.ajax({ | |
type: 'POST', | |
url: 'https://nevergreen.io/api/projects', | |
data: JSON.stringify({feeds: [{url: cctrayUrl}]}), | |
timeout: 15000, | |
crossDomain: true, | |
headers: { | |
Accept: 'application/json; charset=utf-8', | |
'Content-Type': 'application/json; charset=utf-8' | |
} | |
}).done(function (response) { | |
$("#projects").empty() | |
response.forEach(function (project) { | |
$('#projects').append('<li>' + project.description + ' (' + project.prognosis + ')</li>') | |
}) | |
}) | |
} | |
update() // run immediately | |
setInterval(update, 10000) // then every 10 seconds | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment