From 032cce34fd84bbdff7bf8d2b724cc2c59895ad98 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Sat, 27 Sep 2014 08:19:19 -0400 Subject: [PATCH] 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 --- web/share/elastic-recheck.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/share/elastic-recheck.js b/web/share/elastic-recheck.js index 53b7759a..b4b152c9 100644 --- a/web/share/elastic-recheck.js +++ b/web/share/elastic-recheck.js @@ -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'); } }