Add gzip support to results/sunburst

This commit is contained in:
Tim Buckley 2015-07-30 11:45:50 -06:00
parent a4d8274c53
commit 7ea9bcabec
2 changed files with 12 additions and 3 deletions

View File

@ -48,7 +48,7 @@ function displayFailingTests(d) {
$( "#failure-table-div" ).hide();
}
function createSunburst(run_id) {
function createSunburst(url) {
var width = 700,
height = 500,
@ -77,7 +77,7 @@ function createSunburst(run_id) {
.innerRadius(function(d) { return Math.max(0, y(d.y)); })
.outerRadius(function(d) { return Math.max(0, y(d.y + d.dy)); });
d3.json("tempest_api_tree_" + run_id + ".json", function(error, root) {
d3.json(url, function(error, root) {
if (error) throw error;
displayFailingTests(root);

View File

@ -68,7 +68,16 @@
</div>
</div>
<script>window.addEventListener('load', createSunburst( {{run_id}} ));</script>
<script>
window.addEventListener('load', function() {
var url = "tempest_api_tree_{{run_id}}.json";
if ("{{use_gzip}}" === "True") {
url += ".gz";
}
createSunburst( url );
});
</script>
<script>
$(document).ready(function(){
$("#show-hide-failures").click(function() {