Hide empty groups in the graphIndex view
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 11:06:15 +0000 (13:06 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 11:06:15 +0000 (13:06 +0200)
site/index.html
site/js/gipeda.js

index 81b4149..136399e 100644 (file)
@@ -209,9 +209,10 @@ html {
   <h1>Benchmarks</h1>
  </div>
  <div class="container">
+    {{> nothing }}
     <div class="panel-group" role="tablist">
      {{#each benchGroups}}
-      <div class="panel panel-default">
+      <div class="panel panel-default graph-list-panel">
        <div class="panel-heading" role="tab" id="heading-{{@index}}">
         <h4 class="panel-title">
          <a class="accordion-toggle" data-toggle="collapse" href="#table-{{@index}}">
index f77d1fa..40ac0a4 100644 (file)
@@ -509,7 +509,7 @@ function setupChart () {
 
                 if ($("#tooltip").data('rev') != rev) {
                     $("#tooltip")
-                       .html(shortRev(rev))
+                       .html(shortRev(rev))
                        .data('rev',rev)
                        .html(templates.revTooltip(tooltipContext))
                         .fadeIn(200)
@@ -589,9 +589,16 @@ function updateBenchFilter() {
         $('tr.summary-row.summary-improvement')
             .removeClass('summary-row-collapsed');
     }
-    $('tr.summary-row').first()
+    // Always show first entry in the history
+    $('.summary-table tr.summary-row').first()
             .removeClass('summary-row-collapsed');
 
+    $('.graph-list-panel').show().each(function() {
+        if ($(this).has('tr.summary-row:visible').length == 0) {
+            $(this).hide();
+        }
+    });
+
     updateNothingToSee();
 };