Commit 48392feb authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Vincent Pelletier

apachedex: Display row header when hovering its cells (report tables).

When the table is large and requires scrolling, it becomes difficult
to read so add 'title' attribute to <tr> on 'Stats per module' and
'Hits per status code' tables. For example when hovering a particular
cell on a module row, it display the module name.

/reviewed-on nexedi/apachedex!3
parent 7905d8cd
...@@ -454,7 +454,7 @@ class GenericSiteStats(object): ...@@ -454,7 +454,7 @@ class GenericSiteStats(object):
for status, data_dict in sorted(filtered_status.iteritems(), for status, data_dict in sorted(filtered_status.iteritems(),
key=ITEMGETTER0): key=ITEMGETTER0):
has_errors |= statusIsError(status) has_errors |= statusIsError(status)
append('<tr><th>%s</th>' % statusAsHtml(status)) append('<tr title="%s"><th>%s</th>' % (status, statusAsHtml(status)))
append(hitTd(sum(data_dict.itervalues()), status)) append(hitTd(sum(data_dict.itervalues()), status))
for column in column_list: for column in column_list:
append(hitTd(data_dict[column], status)) append(hitTd(data_dict[column], status))
...@@ -673,19 +673,19 @@ class ERP5SiteStats(GenericSiteStats): ...@@ -673,19 +673,19 @@ class ERP5SiteStats(GenericSiteStats):
append('</td>') append('</td>')
for module_id, data_dict in sorted(filtered_module.iteritems(), for module_id, data_dict in sorted(filtered_module.iteritems(),
key=ITEMGETTER0): key=ITEMGETTER0):
append('<tr class="group_top"><th rowspan="2">%s</th>' append('<tr class="group_top" title="%s (module)"><th rowspan="2">%s</th>'
'<th>module</th>' % module_id) '<th>module</th>' % (module_id, module_id))
hiddenGraph(self.module[module_id][False], module_id + ' (module)') hiddenGraph(self.module[module_id][False], module_id + ' (module)')
apdexAsColumns(data_dict[False]) apdexAsColumns(data_dict[False])
append('</tr><tr class="group_bottom"><th>document</th>') append('</tr><tr class="group_bottom" title="%s (document)"><th>document</th>' % module_id)
hiddenGraph(self.module[module_id][True], module_id + ' (document)') hiddenGraph(self.module[module_id][True], module_id + ' (document)')
apdexAsColumns(data_dict[True]) apdexAsColumns(data_dict[True])
append('</tr>') append('</tr>')
append('<tr class="group_top group_bottom"><th colspan="2">site search' append('<tr class="group_top group_bottom" title="site search"><th colspan="2">site search'
'</th>') '</th>')
hiddenGraph(self.site_search, 'site search') hiddenGraph(self.site_search, 'site search')
site_search_overall = apdexAsColumns(filtered_site_search) site_search_overall = apdexAsColumns(filtered_site_search)
append('<tr class="group_top group_bottom"><th colspan="2">other</th>') append('<tr class="group_top group_bottom" title="other"><th colspan="2">other</th>')
hiddenGraph(self.no_module, 'other') hiddenGraph(self.no_module, 'other')
no_module_overall = apdexAsColumns(filtered_no_module) no_module_overall = apdexAsColumns(filtered_no_module)
append('</tr></table><h2>Per-level overall</h2><table class="stats"><tr>' append('</tr></table><h2>Per-level overall</h2><table class="stats"><tr>'
......
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