added button to show/hide test failures

This commit is contained in:
Austin Clark 2015-07-20 09:52:44 -06:00
parent 33aae1e6c8
commit 46d07af03d
2 changed files with 13 additions and 6 deletions

View File

@ -46,6 +46,7 @@
}
document.getElementById("failure-table-div").appendChild(tbl);
$( "#failure-table-div" ).hide();
}
function createSunburst(run_id) {
@ -100,11 +101,10 @@
tbl.setAttribute("class","table table-bordered table-hover table-striped");
if (typeof d.children == "undefined") {
for (var key in d) {
var row = tbl.insertRow();
var td1 = row.insertCell();
var td2 = row.insertCell();
td1.innerHTML = key;
td2.innerHTML = d[key];
var row = tbl.insertRow();
var td1 = row.insertCell();
var td2 = row.insertCell();
td1.innerHTML = key;
}
document.getElementById("result-table-div").appendChild(tbl);
document.getElementById("table-heading").innerHTML=d.name

View File

@ -37,7 +37,7 @@
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">Failing Tests</div>
<div class="panel-heading"><button type="button" id="show-hide-failures">Show/Hide Failures</button></div>
<div class="panel-body">
<div class="table-responsive" id="failure-table-div">
</div>
@ -47,6 +47,13 @@
</div>
<script>window.addEventListener('load', createSunburst( {{run_id}} ));</script>
<script>
$(document).ready(function(){
$("#show-hide-failures").click(function() {
$("#failure-table-div").toggle();
});
});
</script>
{% endblock %}