[llvm-commits] [LNT] r161339 - in /lnt/trunk/lnt/server: db/v4db.py ui/app.py ui/templates/index.html
Daniel Dunbar
daniel at zuster.org
Mon Aug 6 13:03:01 PDT 2012
Author: ddunbar
Date: Mon Aug 6 15:03:01 2012
New Revision: 161339
URL: http://llvm.org/viewvc/llvm-project?rev=161339&view=rev
Log:
Eliminate DB summary objects.
Modified:
lnt/trunk/lnt/server/db/v4db.py
lnt/trunk/lnt/server/ui/app.py
lnt/trunk/lnt/server/ui/templates/index.html
Modified: lnt/trunk/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/v4db.py?rev=161339&r1=161338&r2=161339&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/v4db.py (original)
+++ lnt/trunk/lnt/server/db/v4db.py Mon Aug 6 15:03:01 2012
@@ -152,28 +152,3 @@
db_name)
return db.importDataFromDict(data, config)
-
- def get_db_summary(self):
- return V4DBSummary(self)
-
-class V4DBSummary(object):
- class SuiteSummary(object):
- def __init__(self, name, path):
- self.name = name
- self.path = path
-
- def __init__(self, db):
- self.db = db
- # Load all the test suite names now so that we don't attempt to reuse a
- # cursor later.
- #
- # FIXME: Really, we just need to eliminate this object.
- self.testsuites = list(self.db.testsuite)
-
- @property
- def suites(self):
- for name in self.testsuites:
- yield V4DBSummary.SuiteSummary(name, ("v4", name))
-
- def is_up_to_date(self, db):
- return True
Modified: lnt/trunk/lnt/server/ui/app.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/app.py?rev=161339&r1=161338&r2=161339&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/app.py (original)
+++ lnt/trunk/lnt/server/ui/app.py Mon Aug 6 15:03:01 2012
@@ -32,7 +32,6 @@
self.request_time = time.time()
self.db = None
- self.db_summary = None
self.testsuite = None
def elapsed_time(self):
@@ -80,9 +79,6 @@
return self.testsuite
- def get_db_summary(self):
- return current_app.get_db_summary(g.db_name, self.get_db())
-
class App(flask.Flask):
@staticmethod
def create_standalone(config_path):
@@ -106,7 +102,6 @@
def __init__(self, name):
super(App, self).__init__(name)
self.start_time = time.time()
- self.db_summaries = {}
# Override the request class.
self.request_class = Request
@@ -130,11 +125,3 @@
# Set the application secret key.
self.secret_key = self.old_config.secretKey
-
- def get_db_summary(self, db_name, db):
- # FIXME/v3removal: Eliminate this, V4DB style has no need for summary
- # abstraction.
- db_summary = self.db_summaries.get(db_name)
- if db_summary is None or not db_summary.is_up_to_date(db):
- self.db_summaries[db_name] = db_summary = db.get_db_summary()
- return db_summary
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=161339&r1=161338&r2=161339&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/index.html (original)
+++ lnt/trunk/lnt/server/ui/templates/index.html Mon Aug 6 15:03:01 2012
@@ -4,10 +4,9 @@
{% block body %}
{# Display available test result suites. #}
-{% set summary = request.get_db_summary() %}
<h3>Test Suites</h3>
-{% for suite in summary.suites %}
- <a href="{{ '/'.join(suite.path) }}">{{suite.name}}</a><br>
+{% for name in request.get_db().testsuite %}
+ <a href="{{db_url_for('v4_overview', testsuite_name=name)}}">{{name}}</a><br>
{% endfor %}
{% if g.db_info.db_version == '0.3' and g.db_info.showGeneral %}
More information about the llvm-commits
mailing list