Merge "collapse graph area if there are no fails"

This commit is contained in:
Jenkins 2014-09-29 17:50:31 +00:00 committed by Gerrit Code Review
commit 8393f0a7f6
1 changed files with 3 additions and 1 deletions

View File

@ -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');
}
}