iwla

iwla Commit Details

Date:2014-12-17 21:27:31 (6 years 7 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:a74a6b8469e399d33838a40fb105e619b2f7318e
Parents: f82e26e3bce8917516d3cbd4df179cb672b6f93f
Message:Display 'Others' when max displayed reached

Changes:
Mplugins/display/referers.py (3 diffs)
Mplugins/display/top_downloads.py (1 diff)
Mplugins/display/top_hits.py (1 diff)
Mplugins/display/top_pages.py (1 diff)

File differences

plugins/display/referers.py
8383
8484
8585
86
87
88
89
90
91
8692
8793
8894
......
9298
9399
94100
101
102
103
104
105
106
95107
96108
97109
......
101113
102114
103115
116
117
118
119
120
121
104122
105123
106124
total_search[1] += search_engine_referers[r]['pages']
total_search[2] += search_engine_referers[r]['hits']
table.appendRow(row)
if self.max_referers:
others = 0
for (uri, entrance) in top_referers[self.max_referers:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
total_external = [0]*3
table.appendRow(['<b>%s</b>' % (self.iwla._(u'External URL')), '', ''])
total_external[1] += referers[r]['pages']
total_external[2] += referers[r]['hits']
table.appendRow(row)
if self.max_referers:
others = 0
for (uri, entrance) in top_referers[self.max_referers:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
total_robot = [0]*3
table.appendRow(['<b>%s</b>' % (self.iwla._(u'External URL (robot)')), '', ''])
total_robot[1] += robots_referers[r]['pages']
total_robot[2] += robots_referers[r]['hits']
table.appendRow(row)
if self.max_referers:
others = 0
for (uri, entrance) in top_referers[self.max_referers:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
page.appendBlock(table)
plugins/display/top_downloads.py
5656
5757
5858
59
60
61
62
63
64
5965
6066
6167
for (uri, entrance) in new_list:
table.appendRow([generateHTMLLink(uri), entrance])
total_entrance[1] += entrance
if self.max_downloads:
others = 0
for (uri, entrance) in top_downloads[self.max_downloads:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
page.appendBlock(table)
display.addPage(page)
plugins/display/top_hits.py
5555
5656
5757
58
59
60
61
62
63
64
5865
5966
6067
for (uri, entrance) in new_list:
table.appendRow([generateHTMLLink(uri), entrance])
total_hits[1] += entrance
if self.max_hits:
others = 0
for (uri, entrance) in top_hits[self.max_hits:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
page.appendBlock(table)
display.addPage(page)
plugins/display/top_pages.py
5555
5656
5757
58
59
60
61
62
63
5864
5965
6066
for (uri, entrance) in new_list:
table.appendRow([generateHTMLLink(uri), entrance])
total_hits[1] += entrance
if self.max_pages:
others = 0
for (uri, entrance) in top_pages[self.max_pages:]:
others += entrance
table.appendRow([self.iwla._(u'Others'), others])
table.setCellCSSClass(table.getNbRows()-1, 0, 'iwla_others')
page.appendBlock(table)
display.addPage(page)

Archive Download the corresponding diff file

Branches

Tags