[llvm-commits] [zorg] r99155 - in /zorg/trunk/lnt: lnt/viewer/Config.py lnt/viewer/NTStyleBrowser.ptl lnt/viewer/machines.ptl lnt/viewer/nightlytest.ptl lnt/viewer/root.ptl lnt/viewer/runs.ptl lnt/viewer/tests.ptl lnt/viewer/zview/zviewui.ptl tests/Web/NightlytestMachinesRoot.py tests/Web/NightlytestRoot.py tests/Web/NightlytestRunRoot.py tests/Web/RootPage.py
Daniel Dunbar
daniel at zuster.org
Sun Mar 21 17:55:27 PDT 2010
Author: ddunbar
Date: Sun Mar 21 19:55:27 2010
New Revision: 99155
URL: http://llvm.org/viewvc/llvm-project?rev=99155&view=rev
Log:
LNT: Make navigation and headers more consistent.
Modified:
zorg/trunk/lnt/lnt/viewer/Config.py
zorg/trunk/lnt/lnt/viewer/NTStyleBrowser.ptl
zorg/trunk/lnt/lnt/viewer/machines.ptl
zorg/trunk/lnt/lnt/viewer/nightlytest.ptl
zorg/trunk/lnt/lnt/viewer/root.ptl
zorg/trunk/lnt/lnt/viewer/runs.ptl
zorg/trunk/lnt/lnt/viewer/tests.ptl
zorg/trunk/lnt/lnt/viewer/zview/zviewui.ptl
zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py
zorg/trunk/lnt/tests/Web/NightlytestRoot.py
zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py
zorg/trunk/lnt/tests/Web/RootPage.py
Modified: zorg/trunk/lnt/lnt/viewer/Config.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/Config.py?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/Config.py (original)
+++ zorg/trunk/lnt/lnt/viewer/Config.py Sun Mar 21 19:55:27 2010
@@ -44,14 +44,16 @@
ntEmailEnabled = False
ntEmailHost = ntEmailFrom = ntEmailTo = ""
- return Config(os.path.join(baseDir, data['zorg']),
+ return Config(data.get('name', 'LNT'),
+ os.path.join(baseDir, data['zorg']),
data['zorgURL'],
dict([(k,DBInfo.fromData(baseDir, v))
for k,v in data['databases'].items()]),
ntEmailEnabled, ntEmailHost, ntEmailFrom, ntEmailTo)
- def __init__(self, zorgDir, zorgURL, databases,
+ def __init__(self, name, zorgDir, zorgURL, databases,
ntEmailEnabled, ntEmailHost, ntEmailFrom, ntEmailTo):
+ self.name = name
self.zorgDir = zorgDir
self.zorgURL = zorgURL
self.tempDir = os.path.join(zorgDir, 'viewer', 'resources', 'graphs')
Modified: zorg/trunk/lnt/lnt/viewer/NTStyleBrowser.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/NTStyleBrowser.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/NTStyleBrowser.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/NTStyleBrowser.ptl Sun Mar 21 19:55:27 2010
@@ -89,12 +89,8 @@
return summary
def _q_index [html] (self):
- self.root.getHeader(self.getTitle(), "../..",
- addPopupJS=True, addFormCSS=True)
-
- request = quixote.get_request()
- full = request.form.get('full', '')
- allResults = not not full
+ # Get a DB connection.
+ db = self.root.getDB()
# Get the filtering form.
form = quixote.form.Form(method=str("get"))
@@ -106,15 +102,22 @@
form.add_submit("submit", "Update")
Util.addOtherFormValues(form)
- # Get a DB connection.
- db = self.root.getDB()
run,runs,compareTo = self.getInfo(db)
machine = run.machine
summary = self.getRunSummary(db, run, compareTo, form)
+ self.root.getHeader('Run Results', "../..",
+ components=(('nightlytest','nightlytest'),
+ ('machine',
+ 'nightlytest/machines/%d'%machine.id)),
+ addPopupJS=True, addFormCSS=True)
+
+ request = quixote.get_request()
+ full = request.form.get('full', '')
+ allResults = not not full
+
"""
<center>
- <h1>%s</h1>
<table>
<tr>
<td align=right>Machine:</td>
@@ -124,8 +127,7 @@
<td align=right>Run:</td>
<td>%s</td>
</tr>
- """ % (self.getHeaderTitle(), machine.name, machine.number,
- run.start_time)
+ """ % (machine.name, machine.number, run.start_time)
if compareTo:
"""
<tr>
@@ -266,12 +268,6 @@
def getTags(self):
abstract
- def getTitle(self):
- abstract
-
- def getHeaderTitle(self):
- abstract
-
def getParameters(self):
abstract
@@ -319,29 +315,19 @@
Directory.__init__(self)
self.root = root
- def getTitle(self):
- abstract
-
- def getHeaderTitle(self):
- abstract
-
def getTags(self):
abstract
def _q_index [plain] (self):
- self.root.getHeader(self.getTitle(), "..")
-
# Get a DB connection
db = self.root.getDB()
- # Find recent runs.
- """
- <center>
- <h2>%s</h2>
- </center>
- """ % (self.getHeaderTitle(),)
+ self.root.getHeader('Overview', "..",
+ components=(('nightlytest','nightlytest'),))
+ # Find recent runs.
"""
+ <center><h3>Submission Overview</h3></center>
<table width="100%%">
<tr>
<td valign="top" width="50%">
Modified: zorg/trunk/lnt/lnt/viewer/machines.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/machines.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/machines.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/machines.ptl Sun Mar 21 19:55:27 2010
@@ -26,11 +26,8 @@
m = db.getMachine(self.id)
- self.root.getHeader("zorg:machine:%d" % self.id, '../..')
-
- """
- <h2>Machine: %s:%d</h2>
- """ % (m.name, m.number)
+ self.root.getHeader("Machine: %s:%d" % (m.name,m.number), '../..',
+ components=(('browse','browse'),))
# Show the machine info dictionary.
"""
Modified: zorg/trunk/lnt/lnt/viewer/nightlytest.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/nightlytest.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/nightlytest.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/nightlytest.ptl Sun Mar 21 19:55:27 2010
@@ -29,12 +29,6 @@
def getTags(self):
return (None, 'nightlytest')
- def getTitle(self):
- return 'LLVM Nightly Test Results'
-
- def getHeaderTitle(self):
- return 'LLVM Nightly Test Results'
-
def getParameters(self):
return ()
@@ -436,17 +430,15 @@
}
""" % (plots,)
- self.root.getHeader("Nightly Test Results", "../..",
+ self.root.getHeader("Results Graph", "../..",
+ components=(('nightlytest','nightlytest'),
+ ('machine',
+ 'nightlytest/machines/%d'%machine.id),
+ ('run', 'nightlytest/%d' % run.id)),
addPopupJS=True, addGraphJS=True,
addJSScript=graph_init,
onload='init()')
- """
- <center>
- <h2>LLVM Nightly Test Results</h2>
- </center>
- """
-
# Graph2D based graph.
"""
<h3>Graph</h3>
@@ -522,30 +514,19 @@
raise TraversalError(str(exc))
def _q_index [html] (self):
- self.root.getHeader("Nightly Test Results", "../../..",
- addPopupJS=True)
-
# Get a DB connection.
db = self.root.getDB()
machine = db.getMachine(self.id)
+ self.root.getHeader("Machine: %s:%d" % (machine.name,machine.number),
+ "../../..",
+ components=(('nightlytest','nightlytest'),),
+ addPopupJS=True)
+
# Find all runs on this machine.
runs = db.runs(machine).order_by(Run.start_time.desc()).all()
- """
- <center>
- <h1>LLVM Nightly Test Results</h1>
- <table>
- <tr>
- <td align=right>Machine:</td>
- <td>%s:%d</td>
- </tr>
- </table>
- </center>
- <p>
- """ % (machine.name, machine.number)
-
# FIXME: List previous machines with the same nickname?
"""
<table width="100%%" border=1>
@@ -652,9 +633,6 @@
raise TraversalError(str(exc))
def _q_index [html] (self):
- self.root.getHeader("Nightly Test Results", "../../..",
- addPopupJS=True)
-
# Get a DB connection.
db = self.root.getDB()
@@ -662,6 +640,10 @@
t = db.getTest(id = self.testID)
programName = t.name.split(str('.'), 3)[1]
+ self.root.getHeader("Program: %s" % programName, "../../..",
+ components=(('nightlytest','nightlytest'),),
+ addPopupJS=True)
+
# Collect runs within the last 48 hours of the most recent report.
import datetime
runs = []
@@ -672,19 +654,6 @@
filter(Run.start_time >= cutoff).\
order_by(Run.start_time.desc()).all()
- """
- <center>
- <h1>LLVM Nightly Test Results</h1>
- <table>
- <tr>
- <td align=right>Program:</td>
- <td>%s</td>
- </tr>
- </table>
- </center>
- <p>
- """ % (programName,)
-
self.getAllResults(db, programName, runs)
self.root.getFooter()
@@ -796,12 +765,6 @@
def getTags(self):
return (None, 'nightlytest')
- def getTitle(self):
- return 'Nightly Test'
-
- def getHeaderTitle(self):
- return 'LLVM Nightly Test'
-
def getTestRunUI(self, component):
return NightlyTestRunUI(self.root, component)
Modified: zorg/trunk/lnt/lnt/viewer/root.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/root.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/root.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/root.ptl Sun Mar 21 19:55:27 2010
@@ -51,7 +51,7 @@
return db
- def getHeader [html] (self, title, pathToRoot,
+ def getHeader [html] (self, title, pathToRoot, components=None,
addSorttableJS=True,
addFormCSS=False,
addPopupJS=False,
@@ -85,6 +85,11 @@
</script>
""" % (addJSScript,)
+ if components:
+ component_title = ' : %s' %(
+ ' : '.join(short_name for short_name,_ in components))
+ else:
+ component_title = ''
"""
<link rel="stylesheet" href="%s/resources/style.css" type="text/css" />
""" % (pathToRoot,)
@@ -94,9 +99,9 @@
""" % (pathToRoot,)
"""
<link rel="icon" type="image/png" href="%s/favicon.ico">
- <title>%s</title>
+ <title>%s%s - %s</title>
</head>
- """ % (pathToRoot, title)
+ """ % (pathToRoot, self.config.name, component_title, title)
"""\
<body"""
@@ -135,6 +140,12 @@
</div>
"""
+ if components is not None:
+ """<h2><a href="%s">%s</a>""" % (pathToRoot, self.config.name)
+ for short_name,path in components:
+ """ : <a href="%s/%s">%s</a>""" % (pathToRoot,path,short_name)
+ """ - %s</h2>""" % title
+
def getFooter [html] (self):
db_log = getattr(quixote.get_request(), str('db_log'), None)
if db_log:
@@ -155,13 +166,10 @@
current - quixote.get_request().start_time)
def _q_index [html] (self):
- self.getHeader("zorg", ".")
-
- """
- <h2>LLVM Testing DB</h2>
- """
+ self.getHeader("Overview", ".",
+ components=(),)
- # Available UIs
+ # Available UIs.
if self.dbInfo.showNightlytest:
"""
@@ -181,14 +189,11 @@
self.getFooter()
def browse [html] (self):
- self.getHeader("zorg", ".", addSorttableJS=False)
-
# Get a DB connection.
db = self.getDB()
- """
- <h2>LLVM Testing DB</h2>
- """
+ self.getHeader("Database Browser", ".", components=(),
+ addSorttableJS=False)
# List machines.
"""
@@ -273,10 +278,7 @@
form.add_submit("submit", "Submit")
def render [html] ():
- self.getHeader("Submit Run", ".", addFormCSS=1)
- """
- <h1>Submit Runs</h1>
- """
+ self.getHeader("Submit Run", ".", components=(), addFormCSS=1)
form.render()
self.getFooter()
@@ -342,26 +344,13 @@
def result [plain] ():
res,stdout,stderr = process()
- if True:
- """\
+ """\
STATUS: %s
OUTPUT:
%s
ERRORS:
%s""" % (res, stdout, stderr)
- else:
- self.getHeader("Data Received", "../..")
- """
- <h3>Result</h3>
- %s
- <h3>Output</h3>
- <pre>\n%s</pre>
- <h3>Errors</h3>
- <pre>\n%s</pre>
- </body>
- """ % (res, stdout, stderr)
- self.getFooter()
if not form.is_submitted() or form.has_errors():
return render()
Modified: zorg/trunk/lnt/lnt/viewer/runs.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/runs.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/runs.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/runs.ptl Sun Mar 21 19:55:27 2010
@@ -26,12 +26,8 @@
r = db.getRun(self.id)
m = db.getMachine(r.machine_id)
- self.root.getHeader("zorg:run:%d" % self.id, '../..')
-
- """
- <body>
- <h2>Run: %d</h2>
- """ % (r.id)
+ self.root.getHeader("Run: %s" % r.id, '../..',
+ components=(('browse','browse'),))
"""
<table border=1 cellborder=1>
Modified: zorg/trunk/lnt/lnt/viewer/tests.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/tests.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/tests.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/tests.ptl Sun Mar 21 19:55:27 2010
@@ -25,12 +25,8 @@
t = db.getTest(self.id)
- self.root.getHeader("zorg:test:%d" % self.id, '../..')
-
- """
- <body>
- <h2>Test: %s</h2>
- """ % (t.name,)
+ self.root.getHeader("Test: %s" % t.name, '../..',
+ components=(('browse','browse'),))
# Show the test info dictionary.
"""
Modified: zorg/trunk/lnt/lnt/viewer/zview/zviewui.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/zview/zviewui.ptl?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/zview/zviewui.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/zview/zviewui.ptl Sun Mar 21 19:55:27 2010
@@ -172,14 +172,11 @@
}
""" % locals()
- self.root.getHeader("zorg", "..", addGraphJS=True, addJSScript=script,
+ self.root.getHeader("ZView", "..", components=(),
+ addGraphJS=True, addJSScript=script,
onload='init()')
"""
- <h2>ZView</h2>
- """
-
- """
<h3>Test Selection</h3>
<form id="test_select_form">
<p>Machine: <select id="test_select_form_machine"
Modified: zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py Sun Mar 21 19:55:27 2010
@@ -1,4 +1,4 @@
# RUN: curl -s %base_url/nightlytest/machines/1/ | FileCheck %s
-# CHECK: <h1>LLVM Nightly Test Results</h1>
+# CHECK: <h2>{{.*}}LNT{{.*}} : {{.*}}nightlytest{{.*}}</h2>
# CHECK: Render Time:
Modified: zorg/trunk/lnt/tests/Web/NightlytestRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestRoot.py?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestRoot.py Sun Mar 21 19:55:27 2010
@@ -1,3 +1,3 @@
# RUN: curl -s %base_url/nightlytest/ | FileCheck %s
-# CHECK: <h2>LLVM Nightly Test</h2>
+# CHECK: <h2>{{.*}}LNT{{.*}} : {{.*}}nightlytest{{.*}}</h2>
# CHECK: Render Time:
Modified: zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py Sun Mar 21 19:55:27 2010
@@ -1,10 +1,10 @@
# RUN: curl -s %base_url/nightlytest/1/ | FileCheck --check-prefix=BRIEF %s
-# BRIEF: <h1>LLVM Nightly Test Results</h1>
+# BRIEF: <h2>{{.*}}LNT{{.*}} : {{.*}}nightlytest{{.*}} : {{.*}}machine{{.*}}</h2>
# BRIEF: See Full Test Results
# BRIEF: Render Time:
# RUN: curl -s %base_url/nightlytest/1/?full=1 | FileCheck --check-prefix=FULL %s
-# FULL: <h1>LLVM Nightly Test Results</h1>
+# FULL: <h2>{{.*}}LNT{{.*}} : {{.*}}nightlytest{{.*}} : {{.*}}machine{{.*}}</h2>
# FULL: See Brief Test Results
# FULL: Render Time:
Modified: zorg/trunk/lnt/tests/Web/RootPage.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/RootPage.py?rev=99155&r1=99154&r2=99155&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/RootPage.py (original)
+++ zorg/trunk/lnt/tests/Web/RootPage.py Sun Mar 21 19:55:27 2010
@@ -1,2 +1,2 @@
# RUN: curl -s %base_url/ | FileCheck %s
-# CHECK: <h2>LLVM Testing DB</h2>
+# CHECK: <h2>{{.*}}LNT{{.*}} - Overview</h2>
More information about the llvm-commits
mailing list