forked from 0ad/0ad
Ykkrosh
702450526b
Various scripts and stuff that run on the build server This was SVN commit r6571.
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<title>WFG Autobuilder Logs</title>
|
|
<style>
|
|
body { font-family: sans-serif; font-size: small; }
|
|
ul { margin: 0; padding: 0; }
|
|
li { list-style: none; margin: 0; padding: 0; }
|
|
</style>
|
|
|
|
<ul id="logs">
|
|
<li>Loading...
|
|
</ul>
|
|
|
|
<script>
|
|
window.onload = function () {
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', '/');
|
|
xhr.onreadystatechange = function () {
|
|
if (xhr.readyState == 4) {
|
|
if (xhr.status != 200) {
|
|
document.getElementById('logs').innerHTML = '<li>HTTP error '+xhr.status;
|
|
return;
|
|
}
|
|
|
|
var items = [];
|
|
var contents = xhr.responseXML.getElementsByTagName('Contents');
|
|
for (var i = 0; i < contents.length; ++i) {
|
|
var key = contents[i].getElementsByTagName('Key')[0].textContent;
|
|
if (key == 'logindex.html') continue;
|
|
var size = contents[i].getElementsByTagName('Size')[0].textContent;
|
|
items.push( [key, size] );
|
|
}
|
|
items.sort(function (a, b) { return a[0] < b[0] ? 1 : a[0] > b[0] ? -1 : 0 });
|
|
var output = '';
|
|
for (var i = 0; i < items.length; ++i)
|
|
output += '<li><a href="' + escape(items[i][0]) + '">' + items[i][0] + '</a> (' + items[i][1] + ' bytes)';
|
|
document.getElementById('logs').innerHTML = output;
|
|
}
|
|
}
|
|
xhr.send('');
|
|
}
|
|
</script>
|