Merge remote-tracking branch 'upstream/gh-pages' into jekyll-friendly-site

This commit is contained in:
Adam Schmideg 2019-02-21 15:19:52 +01:00
commit baf03a9fa7

View file

@ -259,13 +259,37 @@ js:
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
// Create the blob retriever that iterates over all the pages of the blobstore.
var blobs = [];
var retrieveBlobs = function(marker, finished) {
// Generate the blob listing URL and request it from Azure
var url = 'https://gethstore.blob.core.windows.net/builds?restype=container&comp=list&maxresults=5000&prefix=geth-';
if (marker != "") {
url += "&marker=" + marker;
}
$.ajax({ $.ajax({
url: 'https://gethstore.blob.core.windows.net/builds?restype=container&comp=list', url: url,
type: 'GET',
error: function() { error: function() {
alert("Failed to load releases!"); alert("Failed to load releases!");
}, },
dataType: 'xml', dataType: 'xml',
success: function(data) { success: function(data) {
// List of blobs retrieved, acumulate them first of all
Array.prototype.push.apply(blobs, $(data).find('Blob'));
// If there are more pages, load them all
marker = $($(data).find('NextMarker')[0]).text();
if (marker != "") {
retrieveBlobs(marker, finished);
} else {
finished(blobs);
}
}
});
}
// Start retrieving the release blobs and populate the page on success
retrieveBlobs("", function() {
// Define the release tables // Define the release tables
var releases = { var releases = {
stable: [], stable: [],
@ -275,7 +299,6 @@ js:
var signatures = {}; var signatures = {};
// Iterate over all the blobs and populate the tables // Iterate over all the blobs and populate the tables
var blobs = $(data).find('Blob')
for (var i = 0; i < blobs.length; i++) { for (var i = 0; i < blobs.length; i++) {
// Gather all available resources to later inspection // Gather all available resources to later inspection
var name = $($(blobs[i]).find('Name')[0]).text(); var name = $($(blobs[i]).find('Name')[0]).text();
@ -286,12 +309,6 @@ js:
signatures[name] = true; signatures[name] = true;
continue; continue;
} }
// Skip any blobs that do not start with "geth"
if (!name.startsWith("geth")) {
continue;
}
// Otherwise add an entry to one of the release tables // Otherwise add an entry to one of the release tables
var parts = name.split("-"); var parts = name.split("-");
var date = parts[parts.length-1].split(".")[0]; var date = parts[parts.length-1].split(".")[0];
@ -475,8 +492,6 @@ js:
} }
// Mark the request done to possibly hide the loading page // Mark the request done to possibly hide the loading page
requestDone(); requestDone();
},
type: 'GET'
}); });
</script> </script>