Commit a004f2cb authored by Vincent Pelletier's avatar Vincent Pelletier

Color apdex column.

parent a2bb7274
......@@ -294,9 +294,12 @@ class ERP5SiteStats(GenericSiteStats):
'<th>max (s)</th>')
append('</tr>')
def apdexStatsAsHtml(data):
return '<td>%i%%</td><td>%s</td><td class="%s">%.2f</td>' \
'<td class="%s">%.2f</td>' % (
data.getApdex() * 100,
apdex = data.getApdex()
return '<td style="color: #%s; background-color: #%s">%i%%</td>' \
'<td>%s</td><td class="%s">%.2f</td><td class="%s">%.2f</td>' % (
(apdex < .5 and 'f' or '0') * 3,
('%x' % (apdex * 0xf)) * 3,
apdex * 100,
data.hit,
getClassForDuration(data.getAverage(), self.threshold),
data.getAverage() / US_PER_S,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment