iwla

iwla Commit Details

Date:2015-04-08 14:04:59 (6 years 3 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:157868dc3eee5ec842fbc65b5794c1e50d31f349
Parents: 651a7b95669e6ba8244abf6d42e7fc021d980dd1
Message:Update istats_diff, the key used in hashtable can be changed (using uri() for example)

Changes:
Mconf.py (1 diff)
Mplugins/display/browsers.py (2 diffs)
Mplugins/display/istats_diff.py (2 diffs)

File differences

conf.py
1111
1212
1313
14
14
1515
1616
1717
1818
1919
20
20
2121
2222
2323
# Hooks used
pre_analysis_hooks = ['page_to_hit', 'robots']
post_analysis_hooks = ['referers', 'top_pages', 'top_downloads', 'operating_systems', 'browsers', 'feeds', 'hours_stats', 'reverse_dns']
display_hooks = ['track_users', 'top_visitors', 'all_visits', 'referers', 'top_pages', 'top_downloads', 'referers_diff', 'operating_systems', 'browsers', 'feeds', 'hours_stats']
display_hooks = ['track_users', 'top_visitors', 'all_visits', 'referers', 'top_pages', 'top_downloads', 'referers_diff', 'operating_systems', 'browsers', 'feeds', 'hours_stats', 'top_downloads_diff']
# Reverse DNS timeout
reverse_dns_timeout = 0.2
# Count this addresses as hit
page_to_hit_conf = [r'^.+/logo[/]?$']
page_to_hit_conf = [r'^.+/logo[/]?$', r'^.+/search[/]?.*$']
# Count this addresses as page
hit_to_page_conf = [r'^.+/category/.+$', r'^.+/tag/.+$', r'^.+/archive/.+$', r'^.+/ljdc[/]?$', r'^.+/source/tree/.*$', r'^.+/source/file/.*$', r'^.+/search/1$']
plugins/display/browsers.py
102102
103103
104104
105
105
106106
107107
108108
......
120120
121121
122122
123
123
124124
125125
126126
display.addPage(page)
title = 'Top Browsers'
title = self.iwla._(u'Top Browsers')
if self.create_browsers:
link = '<a href=\'%s\'>%s</a>' % (filename, self.iwla._(u'All Browsers'))
title = '%s - %s' % (title, link)
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
else:
icon = '<img src="/%s/browser/unknown.png"/>' % (self.icon_path)
browser = 'Unknown'
browser = self.iwla._(u'Unknown')
table.appendRow([icon, browser, entrance])
total_browsers[2] -= entrance
if total_browsers[2]:
plugins/display/istats_diff.py
7373
7474
7575
76
76
77
78
7779
7880
7981
......
9496
9597
9698
97
98
99
100
101
path = self.iwla.getCurDisplayPath(self.filename)
page = display.getPage(path)
if not page: return
if not page:
self.logger.error('No page for %s' % (path))
return
title = self.iwla._(self.block_name)
block = page.getBlock(title)
if not block:
stats_diff[k] = 'iwla_new'
for (idx, row) in enumerate(block.rows):
if row[0] in stats_diff.keys():
block.setCellCSSClass(idx, 0, stats_diff[row[0]])
for k in stats_diff.keys():
if k in row[0]:
block.setCellCSSClass(idx, 0, stats_diff[k])

Archive Download the corresponding diff file

Branches

Tags