[LNT] r299135 - Fix issue where matrix page is loaded even when graph button is clicked

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 16:53:05 PDT 2017


Author: cmatthews
Date: Thu Mar 30 18:53:05 2017
New Revision: 299135

URL: http://llvm.org/viewvc/llvm-project?rev=299135&view=rev
Log:
Fix issue where matrix page is loaded even when graph button is clicked

In the LNT run page, if you clicked the matrix button, then back, then the graph button, you would get the matrix page a second time. This is because we were changing the whole form's submit URL.  Change that to change the submit URL for both graph and matrix, so graph will work after matrix is clicked.

Modified:
    lnt/trunk/lnt/server/ui/templates/v4_run.html

Modified: lnt/trunk/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_run.html?rev=299135&r1=299134&r2=299135&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Thu Mar 30 18:53:05 2017
@@ -377,7 +377,7 @@ $('.profile-prev-only').tooltip();
       {{ utils.render_popup_end() }}
       </section>
     {% endfor %}
-    <p><input type="submit" value="Graph"> <input id="matrix_button" type="submit" value="Matrix">
+    <p><input id="graph_button" type="submit" value="Graph"> <input id="matrix_button" type="submit" value="Matrix">
   </form>
   </section>
 
@@ -422,6 +422,13 @@ $("#matrix_button").on("click", function
     $('#graph_selection_form').attr('action', "{{ matrix_base }}").submit();
 });
 
+$("#graph_button").on("click", function(e){
+    e.preventDefault();
+    {% set graph_base=v4_url_for('v4_graph') %}
+    $('#graph_selection_form').attr('action', "{{ graph_base }}").submit();
+});
+
+
 </script>
 
 




More information about the llvm-commits mailing list