[llvm-commits] [LNT] r164758 - in /lnt/trunk/lnt/server/ui: static/flot/jquery.flot.highlight.js templates/v4_graph.html

Michael Gottesman mgottesman at apple.com
Wed Sep 26 21:31:40 PDT 2012


Author: mgottesman
Date: Wed Sep 26 23:31:40 2012
New Revision: 164758

URL: http://llvm.org/viewvc/llvm-project?rev=164758&view=rev
Log:
[LNT] v4_graph.html. Fixed a bug where if one does not have a comparison revision and thus revision range
is None, v4_graph.html blows up. This was fixed by adding an option to jquery.flot.highlight.js that disables
the plugin. If revision_range is None then we just disable the highlighting in the template.

Modified:
    lnt/trunk/lnt/server/ui/static/flot/jquery.flot.highlight.js
    lnt/trunk/lnt/server/ui/templates/v4_graph.html

Modified: lnt/trunk/lnt/server/ui/static/flot/jquery.flot.highlight.js
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/flot/jquery.flot.highlight.js?rev=164758&r1=164757&r2=164758&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/static/flot/jquery.flot.highlight.js (original)
+++ lnt/trunk/lnt/server/ui/static/flot/jquery.flot.highlight.js Wed Sep 26 23:31:40 2012
@@ -32,6 +32,9 @@
 
     function init(plot) {
         plot.hooks.draw.push(function(plot, ctx) {
+            if (!plot.getOptions().highlight.enabled)
+                return;
+            
             var plot_offset = plot.getPlotOffset();
             var plot_height = plot.height();
 
@@ -73,6 +76,7 @@
         init: init,
         options: {
             highlight: {
+                enabled: true,
                 range: {start: 0, end: 0},
                 color: ["0", "0", "255"],
                 alpha: "0.2",

Modified: lnt/trunk/lnt/server/ui/templates/v4_graph.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_graph.html?rev=164758&r1=164757&r2=164758&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_graph.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_graph.html Wed Sep 26 23:31:40 2012
@@ -50,7 +50,11 @@
         shadowSize : 0
         },
       highlight : {
+{% if revision_range is not none %}
         range: {{revision_range|tojson|safe}} 
+{% else %}
+        enabled: false
+{% endif %}
       },
       zoom : { interactive : true },
       pan : { interactive : true,
@@ -77,9 +81,13 @@
       enabled: false
     },
     highlight : {
+{% if revision_range is not none %}
        range: {{revision_range|tojson|safe}},
        alpha: "1",
        stroke: true,
+{% else %}
+        enabled: false
+{% endif %}
     },
     yaxis: { ticks: [] } });
 





More information about the llvm-commits mailing list