Author: gnichols Date: 2011-07-25 21:11:19 +0000 (Mon, 25 Jul 2011) New Revision: 1037
Modified: trunk/server/cgi/saved.py Log: 725441 - FEAT: save command should store results on server for review
Modified: trunk/server/cgi/saved.py =================================================================== --- trunk/server/cgi/saved.py 2011-07-25 17:24:51 UTC (rev 1036) +++ trunk/server/cgi/saved.py 2011-07-25 21:11:19 UTC (rev 1037) @@ -15,7 +15,7 @@ # Author: Greg Nichols #
-import os,sys,cgi,lxml, re +import os,sys,cgi,lxml, re, cgitb, time from lxml import etree v7ClassLibraryPath = '/usr/share/v7/lib/' sys.path.append(v7ClassLibraryPath) @@ -23,11 +23,12 @@ v7ServerRoot = '/var/www/v7'
from v7.environment import Environment +from v7.tags import Constants from template import Template
environment = Environment()
-import cgitb + cgitb.enable()
@@ -44,7 +45,7 @@ def showSavedResults(parameters): localPath = os.path.join(environment.getServerDirectory(), "store") resultsFileFilter = re.compile(".(xml|xml.gz)$", re.IGNORECASE) - fileNamePattern = re.compile("^v7-results-(?P<hostname>[^-]+)-(?P<date>[0-9]+).xml(.gz)?$") + fileNamePattern = re.compile("^v7-results-(?P<hostname>.*+)-(?P<date>[0-9]+).xml(.gz)?$") for (root,dirs,files) in os.walk(localPath): files = filter(resultsFileFilter.search, files) if files: @@ -56,8 +57,9 @@ if match: dateStamp = match.group("date") date = "%s-%s-%s" % (dateStamp[4:6], dateStamp[6:8], dateStamp[:4]) + time = "%s:%s:%s" % (dateStamp[8:10], dateStamp[10:12], dateStamp[12:]) hostname = match.group("hostname") - print " <a href="v7xml.py?sheet=summary&content=html&rpath=%s/%s">%s %s</a><br>" % (root, file, hostname, date) + print " <a href="v7xml.py?sheet=summary&content=html&rpath=%s/%s">%s %s %s</a><br>" % (root, file, hostname, date, time) print "<br>"
parameters = getParameters()
v7-commits@lists.stg.fedorahosted.org