collapse graph area if there are no fails
If there are no actual fails, we shouldn't show the graph area at all, this makes the page smaller length wise. As an additional hint that there is nothing to see here for the no hit bugs, set the div opacity to 0.5 to make them fade away a bit. Change-Id: I0e06d4df4de3e2d726c58e21aa9aa0d011d36510
This commit is contained in:
parent
325cc32e18
commit
032cce34fd
@ -31,7 +31,7 @@ function graphite_hit_count(job, color) {
|
||||
|
||||
function update_graph_for_bug(main, bug) {
|
||||
var div = main.find("#bug-" + bug['number'] + " .graph");
|
||||
if (bug['data'].length > 0) {
|
||||
if (bug['fails'] > 0) {
|
||||
$.plot(div, bug['data'],
|
||||
{xaxis: {
|
||||
mode: "time"
|
||||
@ -39,6 +39,8 @@ function update_graph_for_bug(main, bug) {
|
||||
);
|
||||
} else {
|
||||
div.html("No matches");
|
||||
div.css('height', 'auto');
|
||||
div.parent().css('opacity', '0.5');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user