def info(context): revisionHash, revisionDate, revisionRelative = getRevisionInfo() print "Sprint tool, revision %s" % link(revisionHash, gitURL % {'hash': revisionHash}) if isDevMode(): print clr("Development mode", 'red') else: print clr("Production mode", 'green') loadTime = getLoadtime() print "Started %s" % clr(loadTime) print "Up for %s" % clr(timesince(loadTime))
def footer(handler): print "</div>" print "<br style=\"clear:both\">" print "</div>" print "</div>" print "</div>" revisionHash, revisionDate, revisionRelative = getRevisionInfo() print "<div class=\"footer_timestamp\">" print "Current system time: %s<br>" % getNow() print "Current revision:", if isDevMode(): print "<span style=\"color: #f00;\">Development build</span><br>" else: print "<a href=\"%s\">%s</a>" % (gitURL % {'hash': revisionHash}, revisionHash), print "(<span title=\"%s\">%s</span>)<br>" % (revisionDate, revisionRelative) print "</div>" print "<script src=\"/static/less.js\" type=\"text/javascript\"></script>" # In case any less <link>s were in the body print "</body>" print "</html>"