[LNT] r308795 - Upgrade to Flask 0.12.2 + switch to Flask Blueprints

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 15:38:20 PDT 2017


Author: cmatthews
Date: Fri Jul 21 15:38:19 2017
New Revision: 308795

URL: http://llvm.org/viewvc/llvm-project?rev=308795&view=rev
Log:
Upgrade to Flask 0.12.2 + switch to Flask Blueprints

The Flask Module system we were using in LNT was depricated and removed
from Flask long ago. This changes us from Module to Blueprints. Biggest
change is that all url_for calls need to specify the blueprint name,
or add a "." for the local blueprint.  I updated all uses of url_for
to correctly account for this.

Modified:
    lnt/trunk/lnt/server/ui/app.py
    lnt/trunk/lnt/server/ui/decorators.py
    lnt/trunk/lnt/server/ui/profile_views.py
    lnt/trunk/lnt/server/ui/regression_views.py
    lnt/trunk/lnt/server/ui/templates/all_machines.html
    lnt/trunk/lnt/server/ui/templates/index.html
    lnt/trunk/lnt/server/ui/templates/layout.html
    lnt/trunk/lnt/server/ui/templates/local.html
    lnt/trunk/lnt/server/ui/templates/utils.html
    lnt/trunk/lnt/server/ui/templates/v4_all_orders.html
    lnt/trunk/lnt/server/ui/templates/v4_daily_report.html
    lnt/trunk/lnt/server/ui/templates/v4_global_status.html
    lnt/trunk/lnt/server/ui/templates/v4_graph.html
    lnt/trunk/lnt/server/ui/templates/v4_machine.html
    lnt/trunk/lnt/server/ui/templates/v4_matrix.html
    lnt/trunk/lnt/server/ui/templates/v4_new_regressions.html
    lnt/trunk/lnt/server/ui/templates/v4_order.html
    lnt/trunk/lnt/server/ui/templates/v4_overview.html
    lnt/trunk/lnt/server/ui/templates/v4_profile.html
    lnt/trunk/lnt/server/ui/templates/v4_recent_activity.html
    lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html
    lnt/trunk/lnt/server/ui/templates/v4_regression_list.html
    lnt/trunk/lnt/server/ui/templates/v4_run.html
    lnt/trunk/lnt/server/ui/templates/v4_summary_report_ui.html
    lnt/trunk/lnt/server/ui/views.py
    lnt/trunk/requirements.client.txt

Modified: lnt/trunk/lnt/server/ui/app.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/app.py?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/app.py (original)
+++ lnt/trunk/lnt/server/ui/app.py Fri Jul 21 15:38:19 2017
@@ -162,7 +162,7 @@ class App(LNTExceptionLoggerFlask):
         app.load_config(instance)
 
         # Load the application routes.
-        app.register_module(lnt.server.ui.views.frontend)
+        app.register_blueprint(lnt.server.ui.views.frontend)
 
         # Load the flaskRESTful API.
         app.api = Api(app)

Modified: lnt/trunk/lnt/server/ui/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/decorators.py?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/decorators.py (original)
+++ lnt/trunk/lnt/server/ui/decorators.py Fri Jul 21 15:38:19 2017
@@ -3,7 +3,8 @@ from flask import abort
 from flask import current_app, g, render_template
 from flask import request
 
-frontend = flask.Module(__name__)
+frontend = flask.Blueprint(__name__, template_folder="ui/templates/",
+                           static_folder="ui/static")
 
 
 # Decorator for implementing per-database routes.

Modified: lnt/trunk/lnt/server/ui/profile_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/profile_views.py?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/profile_views.py (original)
+++ lnt/trunk/lnt/server/ui/profile_views.py Fri Jul 21 15:38:19 2017
@@ -185,20 +185,20 @@ def v4_profile(testid, run1_id, run2_id=
     else:
         json_run2 = {}
     urls = {
-        'search': v4_url_for('v4_search'),
+        'search': v4_url_for('.v4_search'),
         'singlerun_template':
-            v4_url_for('v4_profile_fwd', testid=1111, run1_id=2222)
+            v4_url_for('.v4_profile_fwd', testid=1111, run1_id=2222)
             .replace('1111', '<testid>').replace('2222', '<run1id>'),
         'comparison_template':
-            v4_url_for('v4_profile_fwd2', testid=1111, run1_id=2222,
+            v4_url_for('.v4_profile_fwd2', testid=1111, run1_id=2222,
                        run2_id=3333)
             .replace('1111', '<testid>').replace('2222', '<run1id>')
             .replace('3333', '<run2id>'),
         'getTopLevelCounters':
-            v4_url_for('v4_profile_ajax_getTopLevelCounters'),
-        'getFunctions': v4_url_for('v4_profile_ajax_getFunctions'),
+            v4_url_for('.v4_profile_ajax_getTopLevelCounters'),
+        'getFunctions': v4_url_for('.v4_profile_ajax_getFunctions'),
         'getCodeForFunction':
-            v4_url_for('v4_profile_ajax_getCodeForFunction'),
+            v4_url_for('.v4_profile_ajax_getCodeForFunction'),
     }
     return render_template("v4_profile.html",
                            ts=ts, test=test,

Modified: lnt/trunk/lnt/server/ui/regression_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/regression_views.py?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/regression_views.py (original)
+++ lnt/trunk/lnt/server/ui/regression_views.py Fri Jul 21 15:38:19 2017
@@ -81,7 +81,7 @@ def v4_new_regressions():
             request.form['btn'] == "Create New Regression":
         regression = new_regression(ts, form.field_changes.data)
         flash("Created " + regression.title, FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_list",
+        return redirect(v4_url_for(".v4_regression_list",
                         highlight=regression.id))
     if request.method == 'POST' and request.form['btn'] == "Ignore Changes":
         msg = "Ignoring changes: "
@@ -182,14 +182,14 @@ def v4_regression_list():
         new_regress.title = regressions[target].title
         new_regress.bug = ' '.join(links)
         for r in regressions:
-            r.bug = v4_url_for("v4_regression_detail", id=new_regress.id)
+            r.bug = v4_url_for(".v4_regression_detail", id=new_regress.id)
             r.title = "Merged into Regression " + str(new_regress.id)
             r.state = RegressionState.IGNORED
         [ts.delete(x) for x in reg_inds]
 
         ts.commit()
         flash("Created: " + new_regress.title, FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_detail", id=new_regress.id))
+        return redirect(v4_url_for(".v4_regression_detail", id=new_regress.id))
     # Delete requested regressions.
     if request.method == 'POST' and \
             request.form['merge_btn'] == "Delete Regressions":
@@ -201,7 +201,7 @@ def v4_regression_list():
             ts.delete(reg)
         ts.commit()
         flash(' Deleted: '.join(titles), FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_list", state=state_filter))
+        return redirect(v4_url_for(".v4_regression_list", state=state_filter))
 
     q = ts.query(ts.Regression)
     title = "All Regressions"
@@ -312,7 +312,7 @@ def v4_regression_detail(id):
         regression_info.state = form.state.data
         ts.commit()
         flash("Updated " + regression_info.title, FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_list",
+        return redirect(v4_url_for(".v4_regression_list",
                         highlight=regression_info.id,
                         state=int(form.edit_state.data)))
     if request.method == 'POST' and \
@@ -332,7 +332,7 @@ def v4_regression_detail(id):
         lnt.server.db.fieldchange.rebuild_title(ts, regression_info)
         ts.commit()
         flash("Split " + second_regression.title, FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_list",
+        return redirect(v4_url_for(".v4_regression_list",
                         highlight=second_regression.id,
                         state=int(form.edit_state.data)))
     if request.method == 'POST' and request.form['save_btn'] == "Delete":
@@ -348,7 +348,7 @@ def v4_regression_detail(id):
         ts.delete(regression_info)
         ts.commit()
         flash("Deleted " + title, FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_regression_list",
+        return redirect(v4_url_for(".v4_regression_list",
                         state=int(form.edit_state.data)))
     form.field_changes.choices = list()
     form.state.default = regression_info.state
@@ -488,4 +488,4 @@ def v4_make_regression(machine_id, test_
     logger.info("Manually created new regressions: {}".format(regression.id))
     flash("Created " + regression.title, FLASH_SUCCESS)
 
-    return redirect(v4_url_for("v4_regression_detail", id=regression.id))
+    return redirect(v4_url_for(".v4_regression_detail", id=regression.id))

Modified: lnt/trunk/lnt/server/ui/templates/all_machines.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/all_machines.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/all_machines.html (original)
+++ lnt/trunk/lnt/server/ui/templates/all_machines.html Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Machines{%endblock%}
 
 {% block body %}

Modified: lnt/trunk/lnt/server/ui/templates/index.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/index.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/index.html (original)
+++ lnt/trunk/lnt/server/ui/templates/index.html Fri Jul 21 15:38:19 2017
@@ -6,7 +6,7 @@
 {# Display available test result suites. #}
 <h3>Test Suites</h3>
 {% for name in request.get_db().testsuite %}
-  <a href="{{db_url_for('v4_recent_activity', testsuite_name=name)}}">{{name}}</a><br/>
+  <a href="{{db_url_for('.v4_recent_activity', testsuite_name=name)}}">{{name}}</a><br/>
 {% endfor %}
 
 {% endblock %}

Modified: lnt/trunk/lnt/server/ui/templates/layout.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/layout.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/layout.html (original)
+++ lnt/trunk/lnt/server/ui/templates/layout.html Fri Jul 21 15:38:19 2017
@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8"/>
 
-    <script>var lnt_url_base="{{ url_for('index', _external=True) }}".replace(/\/$/, "");</script>
+    <script>var lnt_url_base="{{ url_for('.index', _external=True) }}".replace(/\/$/, "");</script>
     <link href="{{ url_for('.static', filename='bootstrap/css/bootstrap.min.css')
                 }}" rel="stylesheet" media="screen"/>
     <link href="{{ url_for('.static', filename='bootstrap/css/bootstrap-responsive.min.css')
@@ -129,7 +129,7 @@
             <div class="navbar-inner">
             {# LNT Instance Title #}
                 <div id="lnt-instance">
-                    <a class="brand" href="{{url_for('index')}}">{{old_config.name}}</a>
+                    <a class="brand" href="{{url_for('.index')}}">{{old_config.name}}</a>
                 </div>
                 {# Database Selector #}
                 <ul class="nav">
@@ -138,7 +138,7 @@
                         <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="dbselect" >Database <b class="caret"></b></a>
                         <ul class="dropdown-menu">
                             {% for name in old_config.databases.keys()|sort %}
-                                <li><a href="{{ url_for('select_db', db=name, path=request.path) }}">
+                                <li><a href="{{ url_for('.select_db', db=name, path=request.path) }}">
                                 {% if name == g.db_name %}
                                     <b>{{ name }}</b>
                                 {% else %}
@@ -156,7 +156,7 @@
                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">Suite<b class="caret"></b></a>
                         <ul class="dropdown-menu">
                             {% for name in request.get_db().testsuite %}
-                                <li><a href="{{db_url_for('v4_recent_activity', testsuite_name=name)}}">{{name}}</a></li>
+                                <li><a href="{{db_url_for('.v4_recent_activity', testsuite_name=name)}}">{{name}}</a></li>
                             {% endfor %}
                         </ul>
                     </li>
@@ -168,23 +168,23 @@
                         <li class="dropdown">
                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{g.testsuite_name}}<b class="caret"></b></a>
                             <ul class="dropdown-menu">
-                              <li><a href="{{ v4_url_for('v4_recent_activity') }}">Recent Activity</a></li>
-                              <li><a href="{{ v4_url_for('v4_global_status') }}">Global Status</a></li>
-                              <li><a href="{{ v4_url_for('v4_daily_report_overview') }}">Daily Report</a></li>
-                              <li><a href="{{ v4_url_for('v4_machines') }}">All Machines</a></li>
+                              <li><a href="{{ v4_url_for('.v4_recent_activity') }}">Recent Activity</a></li>
+                              <li><a href="{{ v4_url_for('.v4_global_status') }}">Global Status</a></li>
+                              <li><a href="{{ v4_url_for('.v4_daily_report_overview') }}">Daily Report</a></li>
+                              <li><a href="{{ v4_url_for('.v4_machines') }}">All Machines</a></li>
                                <li class="divider"></li>
                               <li class="disabled"><a href="#">Changes</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=0) }}">Detected</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=1) }}">Staged</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=10) }}">Active</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=20) }}">NTBF</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=21) }}">Ignored</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=23) }}">Verify</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=22) }}">Fixed</a></li>
-                              <li><a href="{{ v4_url_for('v4_regression_list', state=-1) }}">All</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=0) }}">Detected</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=1) }}">Staged</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=10) }}">Active</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=20) }}">NTBF</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=21) }}">Ignored</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=23) }}">Verify</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=22) }}">Fixed</a></li>
+                              <li><a href="{{ v4_url_for('.v4_regression_list', state=-1) }}">All</a></li>
                               <li class="divider"></li>
                               <li class="disabled"><a href="#">Summary Report</a></li>
-                              {#"{{ v4_url_for('v4_summary_report') }}"#}
+                              {#"{{ v4_url_for('.v4_summary_report') }}"#}
                             </ul>
                         </li>
                     </ul>
@@ -197,7 +197,7 @@
                                 <li class="nav-header">Select baseline:</li>
                                 {% for b in ts.query(ts.Baseline).all() %}
                                 {% set is_bold = b.id == session.get(baseline_key()) %}
-                              <li><a href="{{ v4_url_for('v4_set_baseline', id=b.id) }}">
+                              <li><a href="{{ v4_url_for('.v4_set_baseline', id=b.id) }}">
                                   {% if is_bold %}
                                       <b>{{ b.name }}</b>
                                   {% else %}
@@ -214,9 +214,9 @@
                     <li class="dropdown">
                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">System<b class="caret"></b></a>
                         <ul class="dropdown-menu">
-                          <li><a href="{{ url_for('log') }}">Logs</a></li>
-                          <li><a href="{{ url_for('rules') }}">Rules</a></li>
-                          <li><a href="{{ url_for('profile_admin') }}">Profiles</a></li>
+                          <li><a href="{{ url_for('.log') }}">Logs</a></li>
+                          <li><a href="{{ url_for('.rules') }}">Rules</a></li>
+                          <li><a href="{{ url_for('.profile_admin') }}">Profiles</a></li>
                           <li><a href="{{ url_for('.static', filename='docs/index.html') }}">Documentation</a></li>
                         </ul>
                     </li>

Modified: lnt/trunk/lnt/server/ui/templates/local.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/local.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/local.html (original)
+++ lnt/trunk/lnt/server/ui/templates/local.html Fri Jul 21 15:38:19 2017
@@ -4,7 +4,7 @@
 {% set prefix = "" %}
 
 {% macro render_order_link(order) -%}
-    <a href="{{v4_url_for('v4_order', id=order.id)}}">{{ prefix }}{{order.llvm_project_revision}}</a> 
+    <a href="{{v4_url_for('.v4_order', id=order.id)}}">{{ prefix }}{{order.llvm_project_revision}}</a>
 {%- endmacro %}
 
 {# Some example settings from llvm.org. #}
@@ -17,7 +17,7 @@
     <!-- And link the the llvm.org viewvc. -->
 
     {% macro render_order_link(order) -%}
-        <a href="{{v4_url_for('v4_order', id=order.id)}}">{{prefix}}{{order.llvm_project_revision}}</a> 
+        <a href="{{v4_url_for('.v4_order', id=order.id)}}">{{prefix}}{{order.llvm_project_revision}}</a>
         <a href="http://llvm.org/viewvc/llvm-project?view=revision&revision={{order.llvm_project_revision}}">
             <i class="icon-share-alt"></i></a>
     {%- endmacro %}

Modified: lnt/trunk/lnt/server/ui/templates/utils.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/utils.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/utils.html (original)
+++ lnt/trunk/lnt/server/ui/templates/utils.html Fri Jul 21 15:38:19 2017
@@ -15,15 +15,15 @@
 {%- endmacro %}
 
 {% macro render_result(r) -%}
-<a href="{{v4_url_for('v4_run', id=r.id)}}">View Results</a>
+<a href="{{v4_url_for('.v4_run', id=r.id)}}">View Results</a>
 {%- endmacro %}
 
 {% macro render_machine(m) -%}
-<a href="{{v4_url_for('v4_machine', id=m.id)}}">{{m.name}}:{{m.id}}</a>
+<a href="{{v4_url_for('.v4_machine', id=m.id)}}">{{m.name}}:{{m.id}}</a>
 {%- endmacro %}
 
 {% macro render_regression(regress) -%}
-<a href="{{v4_url_for('v4_regression_detail', id=regress.id)}}">{{regress.title}}:{{regress.id}}</a>
+<a href="{{v4_url_for('.v4_regression_detail', id=regress.id)}}">{{regress.title}}:{{regress.id}}</a>
 {%- endmacro %}
 
 {% macro render_bug(bug) -%}
@@ -34,18 +34,18 @@
   {% if v4_url_available() %}
     {% if compare_profile and profile %}
 
-      <a href="{{ v4_url_for('v4_profile_fwd2', run1_id=run_id, run2_id=compare_run_id, testid=test_id) }}"
+      <a href="{{ v4_url_for('.v4_profile_fwd2', run1_id=run_id, run2_id=compare_run_id, testid=test_id) }}"
          class="profile-btn btn btn-mini pull-right">Profile<i class="icon-eye-open"></i></a>
  
     {% elif profile %}
       
-      <a href="{{ v4_url_for('v4_profile_fwd', run1_id=run_id, testid=test_id) }}"
+      <a href="{{ v4_url_for('.v4_profile_fwd', run1_id=run_id, testid=test_id) }}"
          class="profile-btn btn btn-mni pull-right profile-but-no-prev" data-toggle="tooltip"
          title="This run has a profile, but the run being compared to does not">Profile<i class="icon-exclamation-sign"></i></a>
       
     {% elif compare_profile %}
       
-      <a href="{{ v4_url_for('v4_profile_fwd', run1_id=compare_run_id, testid=test_id) }}"
+      <a href="{{ v4_url_for('.v4_profile_fwd', run1_id=compare_run_id, testid=test_id) }}"
          class="profile-btn bt btn-mini pull-right profile-prev-only" data-toggle="tooltip"
          title="This run does not have a profile, but the run being compared to does">Profile<i class="icon-exclamation-sign"></i></a>
       

Modified: lnt/trunk/lnt/server/ui/templates/v4_all_orders.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_all_orders.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_all_orders.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_all_orders.html Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}{
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 {% block head %}
         <script src="{{ url_for('.static', filename='popup.js') }}"></script>
 {% endblock %}
@@ -22,7 +22,7 @@
   </thead>
 {% for order in orders %}
   <tr>
-    <td><a href="{{v4_url_for('v4_order', id=order.id)}}">{{
+    <td><a href="{{v4_url_for('.v4_order', id=order.id)}}">{{
         order.id}}</a></td>
     <td>{{order.previous_order_id}}</td>
     <td>{{order.next_order_id}}</td>

Modified: lnt/trunk/lnt/server/ui/templates/v4_daily_report.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_daily_report.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_daily_report.html Fri Jul 21 15:38:19 2017
@@ -1,10 +1,10 @@
 {% set db = request.get_db() %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Daily Report{% endblock %}
 {% block body %}
 
-{{ report.render(v4_url_for('v4_overview'))|safe }}
+{{ report.render(v4_url_for('.v4_overview'))|safe }}
 
 {% endblock %}

Modified: lnt/trunk/lnt/server/ui/templates/v4_global_status.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_global_status.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_global_status.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_global_status.html Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_global_status"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_global_status"))] %}
 {% block head %}
         <link type="text/css" rel="stylesheet"
               href="{{ url_for('.static', filename='v4_global_status.css') }}"></link>
@@ -47,7 +47,7 @@
 
 {% block page_header %}
         {# LNT Instance Title #}
-        <a href="{{url_for('index')}}" class="header-title">
+        <a href="{{url_for('.index')}}" class="header-title">
           <h2>{{old_config.name}}</h2>
         </a>
 
@@ -64,7 +64,7 @@
 
         {# Database Selector #}
         <span id="nav-dbselector">
-          <form method="get" action="{{ url_for('select_db') }}" class="nav">
+          <form method="get" action="{{ url_for('.select_db') }}" class="nav">
             <input type="hidden" name="path" value="{{ request.path }}"/>
             <label>Database:</label>
             <select name="db" onchange="submit()">

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=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_graph.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_graph.html Fri Jul 21 15:38:19 2017
@@ -2,7 +2,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 {% block head %}
   <script src="{{ url_for('.static', filename='popup.js') }}"></script>
   <script src="{{ url_for('.static', filename='sorttable.js') }}"></script>

Modified: lnt/trunk/lnt/server/ui/templates/v4_machine.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_machine.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_machine.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_machine.html Fri Jul 21 15:38:19 2017
@@ -4,12 +4,12 @@
 {% set machine = ts.getMachine(id) %}
 
 {% extends "layout.html" %}{
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}{{machine.name}}:{{machine.id}}{% endblock %}
 
 {% block sidebar %}
   <ul class="nav nav-list bs-docs-sidenav">
-    <li><a href="{{ v4_url_for("v4_machine_latest", machine_id=machine.id) }}"><i class="icon-time"></i> Latest Run</a></li>
+    <li><a href="{{ v4_url_for(".v4_machine_latest", machine_id=machine.id) }}"><i class="icon-time"></i> Latest Run</a></li>
     <li><a href="#fields"><i class="icon-chevron-right"></i> Fields</a></li>
     <li><a href="#parameters"><i class="icon-chevron-right"></i> Parameters</a></li>
     <li><a href="#submissions"><i class="icon-chevron-right"></i> Submissions</a></li>
@@ -65,7 +65,7 @@
         <h3>Compare</h3>
             <p>Compare the latest run on this machine with the latest run on another.</p>
 
-            <form action="{{ v4_url_for("v4_machine_compare", machine_id=machine.id)}}" method="get">
+            <form action="{{ v4_url_for(".v4_machine_compare", machine_id=machine.id)}}" method="get">
                 <p>
                 Compare {{ machine.name }} to
                 <select name="compare_to_id">

Modified: lnt/trunk/lnt/server/ui/templates/v4_matrix.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_matrix.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_matrix.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_matrix.html Fri Jul 21 15:38:19 2017
@@ -4,7 +4,7 @@
 {% set ts = request.get_testsuite() %}
 
 {% extends "layout.html" %}{
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %}
 {% block head %}
 {% endblock %}
 
@@ -41,7 +41,7 @@
 <h3>Baseline: {{baseline_rev}}</h3>
 <div id="matrix_div">
     {% if machine_name_common %}
-        <p>Machine: <a href="{{ v4_url_for('v4_machine', id=machine_id_common) }}">{{ machine_name_common }}</a></p>
+        <p>Machine: <a href="{{ v4_url_for('.v4_machine', id=machine_id_common) }}">{{ machine_name_common }}</a></p>
     {% endif %}
     <table class="table table-hover floating_header" style="width:auto">
     <thead>
@@ -51,7 +51,7 @@
         {% for r in associated_runs %}
             <th>
                 {% if not machine_name_common %}
-                <a href="{{ v4_url_for('v4_machine', id=r.machine.id) }}">{{ r.machine.name }}</a>
+                <a href="{{ v4_url_for('.v4_machine', id=r.machine.id) }}">{{ r.machine.name }}</a>
                 {% endif %}
                 {{ r.test.name | shortname }}</th>
         {% endfor %}
@@ -66,7 +66,7 @@
 
             <tr class="{{baseline_class}}">
                 <td>
-                    <a href="{{v4_url_for('v4_order', id=order_to_id[order])}}">
+                    <a href="{{v4_url_for('.v4_order', id=order_to_id[order])}}">
                         {{name}}
                     </a>
                     <br/>

Modified: lnt/trunk/lnt/server/ui/templates/v4_new_regressions.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_new_regressions.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_new_regressions.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_new_regressions.html Fri Jul 21 15:38:19 2017
@@ -4,7 +4,7 @@
 
 
 {% extends "layout.html" %}
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Regression Triage{% endblock %}
 
 {% block head %}
@@ -202,7 +202,7 @@ function update_tooltip(event, pos, item
 </div>
 
 
-<form method="POST" action="{{ v4_url_for("v4_new_regressions") }}">
+<form method="POST" action="{{ v4_url_for(".v4_new_regressions") }}">
     {{ form.hidden_tag() }}
 
 <table id="changes_table" class="display">
@@ -223,7 +223,7 @@ function update_tooltip(event, pos, item
   </tr>
   </thead>
   <tbody>
-    {% set graph_base=v4_url_for('v4_graph') %}
+    {% set graph_base=v4_url_for('.v4_graph') %}
     {# Show the active submissions. #}
     {% for form_change in form.field_changes%}
         {% set fc = changes[loop.index -1] %}
@@ -237,7 +237,7 @@ function update_tooltip(event, pos, item
             </table>
         <td>{{utils.render_machine(fc.ri.machine)}}</td>
         <td> {{ fc.ri.field.name }} </td>
-         {% set graph_base=v4_url_for('v4_graph', highlight_run=fc.run.id) %}
+         {% set graph_base=v4_url_for('.v4_graph', highlight_run=fc.run.id) %}
         <td><a href="{{graph_base}}&plot.{{fc.ri.test.id}}={{ fc.ri.machine.id}}.{{fc.ri.test.id}}.{{fc.ri.field.index}}">{{ fc.ri.test.name }}</a></td>
         <td>m{{ fc.ri.start_order.llvm_project_revision }}, {{utils.render_order_link(fc.ri.end_order)}}</td>
         <td>{{ fc.cr.previous }}</td><td>{{ fc.cr.current }}</td>

Modified: lnt/trunk/lnt/server/ui/templates/v4_order.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_order.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_order.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_order.html Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}{
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Order: {{order.id}}{% endblock %}
 
 {% block sidebar %}
@@ -15,14 +15,14 @@
   {# Provide links to the previous and next orders. #}
   <ul class="pager">
     {% if order.previous_order_id is not none %}
-      <li class="previous"><a href="{{v4_url_for('v4_order', id=order.previous_order_id)}}">
+      <li class="previous"><a href="{{v4_url_for('.v4_order', id=order.previous_order_id)}}">
     {% else %}
       <li class="previous disabled"><a href="#">
     {% endif %}
     ← Previous</a></li>
 
     {% if order.next_order_id is not none %}
-      <li class="next" ><a href="{{v4_url_for('v4_order', id=order.next_order_id)}}">
+      <li class="next" ><a href="{{v4_url_for('.v4_order', id=order.next_order_id)}}">
     {% else %}
       <li class="next disabled"><a href="#">
     {% endif %}
@@ -53,7 +53,7 @@
       <tr>
         <td>Previous Order</td>
           <td>
-              <a href="{{ v4_url_for("v4_order", id=order.previous_order_id) }}">
+              <a href="{{ v4_url_for(".v4_order", id=order.previous_order_id) }}">
                   {{order.previous_order_id}}
               </a>
           </td>
@@ -69,7 +69,7 @@
       {% if order.next_order_id %}
       <tr>
         <td>Next Order</td>
-          <td><a href="{{ v4_url_for("v4_order", id=order.next_order_id) }}">{{order.next_order_id}}</a></td>
+          <td><a href="{{ v4_url_for(".v4_order", id=order.next_order_id) }}">{{order.next_order_id}}</a></td>
           {% set next_order = ts.query(ts.Order).filter(ts.Order.id == order.next_order_id).one() %}
           {% for field in next_order.fields %}
                 <td>{{next_order.get_field(field)}}</td>

Modified: lnt/trunk/lnt/server/ui/templates/v4_overview.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_overview.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_overview.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_overview.html Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 {% set db = request.get_db() %}
 
 {% extends "layout.html" %}
-{% set components = [(testsuite_name, v4_url_for("v4_overview"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_overview"))] %}
 {% block title %}Overview{% endblock %}
 
 {% block head %}
@@ -42,33 +42,33 @@ div .dashboard_box {
 
 <div id="dashboard_content" class="dashboard">
 
-<a href="{{ v4_url_for('v4_recent_activity') }}">
+<a href="{{ v4_url_for('.v4_recent_activity') }}">
   <div class="dashboard_box dashboard">
     <h2>Recent Activity</h2>
     <p>display recent runs and active machines</p>
   </div>
 </a>
-<a href="{{ v4_url_for('v4_global_status') }}">
+<a href="{{ v4_url_for('.v4_global_status') }}">
   <div class="dashboard_box dashboard">
     <h2>Global Status</h2>
     <p>show baseline comparison for all tests and machines</p>
   </div>
 </a>
 
-<a href="{{ v4_url_for('v4_daily_report_overview') }}">
+<a href="{{ v4_url_for('.v4_daily_report_overview') }}">
   <div class="dashboard_box dashboard">
     <h2>Daily Report</h2>
     <p>daily performance change report (WIP)</p>
   </div>
 </a>
 
-<a href="{{ v4_url_for('v4_summary_report') }}">
+<a href="{{ v4_url_for('.v4_summary_report') }}">
   <div class="dashboard_box dashboard">
     <h2>Summary Report</h2>
     <p>high-level performance summary charts (WIP)</p>
   </div>
 </a>
-<a href="{{ v4_url_for('v4_machines') }}">
+<a href="{{ v4_url_for('.v4_machines') }}">
   <div class="dashboard_box dashboard">
     <h2>All Machines</h2>
     <p>All the machines with runs on this server.</p>

Modified: lnt/trunk/lnt/server/ui/templates/v4_profile.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_profile.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_profile.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_profile.html Fri Jul 21 15:38:19 2017
@@ -2,7 +2,7 @@
 {% import "utils.html" as utils %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity"))] %}
 
 {% block head %}
   <script language="javascript" type="text/javascript"

Modified: lnt/trunk/lnt/server/ui/templates/v4_recent_activity.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_recent_activity.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_recent_activity.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_recent_activity.html Fri Jul 21 15:38:19 2017
@@ -2,7 +2,7 @@
 {% set db = request.get_db() %}
 
 {% extends "layout.html" %}
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Recent Activity{% endblock %}
 
 
@@ -55,7 +55,7 @@
       {# Show the active submissions. #}
       {% for r,run_order in active_submissions %}
       <tr>
-        <td><a href="{{v4_url_for('v4_order', id=r.order.id)}}">{{run_order}}</a></td>
+        <td><a href="{{v4_url_for('.v4_order', id=r.order.id)}}">{{run_order}}</a></td>
         <td><span class="reltime" data-toggle="tooltip" title="{{r.start_time}}">{{ r.start_time.isoformat() }}</span></td>
         <td>{{ r.end_time - r.start_time }}</td>
         <td>{{ utils.render_machine(r.machine) }}</td>

Modified: lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_regression_detail.html Fri Jul 21 15:38:19 2017
@@ -3,8 +3,8 @@
 {% import "local.html" as local %}
 {% set db = request.get_db() %}
 
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity")),
-                      ("Tracking", v4_url_for("v4_regression_list"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity")),
+                      ("Tracking", v4_url_for(".v4_regression_list"))] %}
 {% block title %}Regression Details{% endblock %}
 
 {% block head %}
@@ -94,7 +94,7 @@ var changes = [
   </tr>
   </thead>
   <tbody>
-    {% set graph_base=v4_url_for('v4_graph') %}
+    {% set graph_base=v4_url_for('.v4_graph') %}
     {# Show the active submissions. #}
     {% for form_change in form.field_changes%}
         {% set fc = changes[loop.index -1] %}
@@ -110,7 +110,7 @@ var changes = [
         <td class="change_id">{{fc.ri.id}}</td>
         <td class="machine">{{utils.render_machine(fc.ri.machine)}}</td>
         <td class="metric"> {{ fc.ri.field.name }} </td>
-         {% set graph_base=v4_url_for('v4_graph', highlight_run=fc.run.id) %}
+         {% set graph_base=v4_url_for('.v4_graph', highlight_run=fc.run.id) %}
         <td><a href="{{graph_base}}&plot.{{fc.ri.test.id}}={{ fc.ri.machine.id}}.{{fc.ri.test.id}}.{{fc.ri.field.index}}">{{ fc.ri.test.name }}</a></td>
         <td>{{local.prefix}}{{ fc.ri.start_order.llvm_project_revision }}, {{local.render_order_link(fc.ri.end_order)}}</td>
         <td>{{ fc.cr.previous }}</td><td>{{ fc.cr.current }}</td>

Modified: lnt/trunk/lnt/server/ui/templates/v4_regression_list.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_regression_list.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_regression_list.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_regression_list.html Fri Jul 21 15:38:19 2017
@@ -2,7 +2,7 @@
 {% set db = request.get_db() %}
 
 {% extends "layout.html" %}
-{% set components = [(testsuite_name, v4_url_for("v4_recent_activity"))] %}
+{% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %}
 {% block title %}Regression List: {{title}}{% endblock %}
 
 {% block body %}
@@ -10,7 +10,7 @@
 <h3>Regressions List: {{title}}</h3>
 
 
-<form method="POST" action="{{ v4_url_for("v4_regression_list", state=state_filter) }}">
+<form method="POST" action="{{ v4_url_for(".v4_regression_list", state=state_filter) }}">
     
     
 <table id="regression_list" class="table table-striped table-hover table-condensed">

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=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Fri Jul 21 15:38:19 2017
@@ -6,9 +6,9 @@
 {% set comparison_neighboring_runs = request_info.comparison_neighboring_runs %}
 
 {% extends "layout.html" %}
-{% set components = [(ts.name, v4_url_for("v4_recent_activity")),
+{% set components = [(ts.name, v4_url_for(".v4_recent_activity")),
                      ('%s:%s' % (machine.name, machine.id),
-                     v4_url_for("v4_machine", id=machine.id))] %}
+                     v4_url_for(".v4_machine", id=machine.id))] %}
 
 {% block head %}
   <script>
@@ -114,7 +114,7 @@ $('.profile-prev-only').tooltip();
   {% for r in neighboring_runs %}
     <li>
       {{ "<b>"|safe if r.id == run.id else "" }}
-      <a href="{{v4_url_for('v4_run', id=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
+      <a href="{{v4_url_for('.v4_run', id=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
       {{ "</b>"|safe if r.id == run.id else "" }}
     </li>
   {% endfor %}
@@ -126,7 +126,7 @@ $('.profile-prev-only').tooltip();
     {% for r in comparison_neighboring_runs %}
       <li>
         {{ "<b>"|safe if compare_to and r.id == compare_to.id else "" }}
-        <a href="{{v4_url_for('v4_run', id=run.id, compare_to=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
+        <a href="{{v4_url_for('.v4_run', id=run.id, compare_to=r.id)}}"><span class="utctime">{{ r.start_time.isoformat() }}</span></a>
         {{ "</b>"|safe if compare_to and r.id == compare_to.id else "" }}
       </li>
     {% endfor %}
@@ -313,7 +313,7 @@ $('.profile-prev-only').tooltip();
 
   {{ utils.render_popup_end() }}
 
-  {% set graph_base=v4_url_for('v4_graph', highlight_run=run.id) %}
+  {% set graph_base=v4_url_for('.v4_graph', highlight_run=run.id) %}
   <form id="graph_selection_form" method="GET" action="{{ graph_base }}">
 
     {# Report one table for each primary field. #}
@@ -421,13 +421,13 @@ $('.profile-prev-only').tooltip();
 
 $("#matrix_button").on("click", function(e){
     e.preventDefault();
-    {% set matrix_base=v4_url_for('v4_matrix') %}
+    {% set matrix_base=v4_url_for('.v4_matrix') %}
     $('#graph_selection_form').attr('action', "{{ matrix_base }}").submit();
 });
 
 $("#graph_button").on("click", function(e){
     e.preventDefault();
-    {% set graph_base=v4_url_for('v4_graph') %}
+    {% set graph_base=v4_url_for('.v4_graph') %}
     $('#graph_selection_form').attr('action', "{{ graph_base }}").submit();
 });
 

Modified: lnt/trunk/lnt/server/ui/templates/v4_summary_report_ui.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_summary_report_ui.html?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_summary_report_ui.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_summary_report_ui.html Fri Jul 21 15:38:19 2017
@@ -1,5 +1,5 @@
 {% extends "layout.html" %}{
-{% set components = [("report", db_url_for("v4_summary_report"))] %}
+{% set components = [("report", db_url_for(".v4_summary_report"))] %}
 {% block head %}
   <script src="{{ url_for('.static', filename='popup.js') }}"></script>
   <script src="{{ url_for('.static',filename='json2.js')}}"></script>
@@ -13,7 +13,7 @@
   g.config = {{ config|tojson(indent=2)|safe }};
   g.all_orders = {{ all_orders|tojson(indent=2)|safe }};
   g.all_machines = {{ all_machines|tojson(indent=2)|safe }};
-  g.save_url = {{ db_url_for("v4_summary_report_ui")|tojson|safe }};
+  g.save_url = {{ db_url_for(".v4_summary_report_ui")|tojson|safe }};
 </script>
 
 <style>

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Fri Jul 21 15:38:19 2017
@@ -232,7 +232,7 @@ def v4_machine_latest(machine_id):
         .filter(ts.Run.machine_id == machine_id) \
         .order_by(ts.Run.start_time.desc()) \
         .first()
-    return redirect(v4_url_for('v4_run', id=run.id, **request.args))
+    return redirect(v4_url_for('.v4_run', id=run.id, **request.args))
 
 
 @v4_route("/machine/<int:machine_id>/compare")
@@ -250,7 +250,7 @@ def v4_machine_compare(machine_id):
         .order_by(ts.Run.start_time.desc()) \
         .first()
 
-    return redirect(v4_url_for('v4_run', id=machine_1_run.id,
+    return redirect(v4_url_for('.v4_run', id=machine_1_run.id,
                                compare_to=machine_2_run.id))
 
 
@@ -382,7 +382,7 @@ class V4RequestInfo(object):
         }
 
         self.data = lnt.server.reporting.runs.generate_run_data(
-            self.run, baseurl=db_url_for('index', _external=True),
+            self.run, baseurl=db_url_for('.index', _external=True),
             result=None, compare_to=compare_to, baseline=baseline,
             num_comparison_runs=self.num_comparison_runs,
             aggregation_fn=self.aggregation_fn, confidence_lv=confidence_lv,
@@ -430,7 +430,7 @@ Invalid URL for version %r database."""
 
     # If we found one, redirect to it's report.
     if matched_run is not None:
-        return redirect(db_url_for("v4_run", testsuite_name=tag,
+        return redirect(db_url_for(".v4_run", testsuite_name=tag,
                                    id=matched_run.id))
 
     # Otherwise, report an error.
@@ -511,7 +511,7 @@ def v4_run(id):
         return flask.jsonify(**json_obj)
 
     urls = {
-        'search': v4_url_for('v4_search')
+        'search': v4_url_for('.v4_search')
     }
     data = info.data
     data.update({
@@ -562,7 +562,7 @@ def v4_order(id):
             ts.session.commit()
 
             flash("Baseline {} updated.".format(baseline.name), FLASH_SUCCESS)
-        return redirect(v4_url_for("v4_order", id=id))
+        return redirect(v4_url_for(".v4_order", id=id))
     else:
         print form.errors
 
@@ -641,7 +641,7 @@ def v4_run_graph(id):
             run.machine.id, test_id, value)
         plot_number += 1
 
-    return redirect(v4_url_for("v4_graph", **args))
+    return redirect(v4_url_for(".v4_graph", **args))
 
 BaselineLegendItem = namedtuple('BaselineLegendItem', 'name id')
 LegendItem = namedtuple('LegendItem', 'machine test_name field_name color url')
@@ -1288,7 +1288,7 @@ def v4_daily_report_overview():
     extra_args.pop("month", None)
     extra_args.pop("day", None)
 
-    return redirect(v4_url_for("v4_daily_report",
+    return redirect(v4_url_for(".v4_daily_report",
                                year=date.year, month=date.month, day=date.day,
                                **extra_args))
 
@@ -1347,7 +1347,7 @@ def v4_summary_report_ui():
             flask.json.dump(config, f, indent=2)
 
         # Redirect to the summary report.
-        return redirect(db_url_for("v4_summary_report"))
+        return redirect(db_url_for(".v4_summary_report"))
 
     config_path = get_summary_config_path()
     if os.path.exists(config_path):

Modified: lnt/trunk/requirements.client.txt
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/requirements.client.txt?rev=308795&r1=308794&r2=308795&view=diff
==============================================================================
--- lnt/trunk/requirements.client.txt (original)
+++ lnt/trunk/requirements.client.txt Fri Jul 21 15:38:19 2017
@@ -1,7 +1,7 @@
 # Flask 0.11 does not work yet.
 six==1.10.0
 aniso8601==1.2.0
-Flask==0.10.1
+Flask==0.12.2
 Flask-RESTful==0.3.4
 Jinja2==2.7.2
 MarkupSafe==0.23




More information about the llvm-commits mailing list