[llvm-commits] [LNT] r164194 - in /lnt/trunk/lnt/server/ui: templates/v4_graph.html views.py

Michael Gottesman mgottesman at apple.com
Tue Sep 18 19:08:51 PDT 2012


Author: mgottesman
Date: Tue Sep 18 21:08:51 2012
New Revision: 164194

URL: http://llvm.org/viewvc/llvm-project?rev=164194&view=rev
Log:
[LNT] Added in changes to v4_graph/views.py to use the new flot
highlight plugin.

Modified:
    lnt/trunk/lnt/server/ui/templates/v4_graph.html
    lnt/trunk/lnt/server/ui/views.py

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=164194&r1=164193&r2=164194&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_graph.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_graph.html Tue Sep 18 21:08:51 2012
@@ -24,6 +24,9 @@
   <script language="javascript" type="text/javascript"
           src="{{ url_for('.static',
                           filename='flot/jquery.flot.selection.min.js') }}"> </script>
+  <script language="javascript" type="text/javascript"
+          src="{{ url_for('.static',
+                          filename='flot/jquery.flot.highlight.min.js') }}"></script>
 {% endblock %}
 
 {% block title %}Graph{% endblock %}
@@ -43,6 +46,9 @@
           lineWidth : 1 },
         shadowSize : 0
         },
+      highlight : {
+        range: {{revision_range|tojson|safe}} 
+      },
       zoom : { interactive : true },
       pan : { interactive : true },
       grid : {
@@ -63,6 +69,11 @@
         lineWidth : 1 },
       shadowSize : 0 },
     selection: { mode: "x" },
+    highlight : {
+       range: {{revision_range|tojson|safe}},
+       alpha: "1",
+       stroke: true,
+    },
     yaxis: { ticks: [] } });
 
   // Connect selection on the overview graph to the main plot.

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=164194&r1=164193&r2=164194&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Tue Sep 18 21:08:51 2012
@@ -444,6 +444,7 @@
     legend = []
     graph_plots = []
     overview_plots = []
+    revision_range = None
     num_points = 0
     num_plots = len(graph_tests)
     use_day_axis = None
@@ -510,7 +511,6 @@
             data = map(convert, data)
 
         # Compute the graph points.
-        revision_range_region = []
         errorbar_data = []
         points_data = []
         pts = []
@@ -522,10 +522,10 @@
         if compare_to and show_highlight:
             start_rev = compare_to.order.llvm_project_revision
             end_rev = run.order.llvm_project_revision
-            revision_range_region = (
-                convert_revision(start_rev),
-                convert_revision(end_rev)
-            )
+            revision_range = {
+                "start": convert_revision(start_rev),
+                "end": convert_revision(end_rev)
+            }
 
         if normalize_by_median:
             normalize_by = 1.0/stats.median([min(values)
@@ -628,13 +628,6 @@
                             "lineWidth" : 2 },
                         "shadowSize" : 4 })
 
-        # If we are comparing two revisions,
-        if compare_to and show_highlight:
-            reg_col = [0.0, 0.0, 1.0]
-            graph_plots.insert(0, {
-                    "data" : revision_range_region,
-                    "color" : util.toColorString(reg_col) })
-
         # Add the points plot, if used.
         if points_data:
             pts_col = (0,0,0)
@@ -681,6 +674,7 @@
                            compare_to=compare_to, options=options,
                            num_plots=num_plots, num_points=num_points,
                            neighboring_runs=neighboring_runs,
+                           revision_range=revision_range,
                            graph_plots=graph_plots,
                            overview_plots=overview_plots, legend=legend,
                            use_day_axis=use_day_axis)





More information about the llvm-commits mailing list