iwla

iwla Commit Details

Date:2014-11-27 14:29:25 (6 years 7 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:02233f2f37f7e03e621006e0b3768dd30fb12653
Parents: ce4bca056d2143a5ee034561d2b9944c0ae71bdd
Message:Replace getCurDisplayRoot() by getCurDisplayPath()

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

File differences

iwla.py
8484
8585
8686
87
87
8888
89
89
9090
9191
9292
......
9999
100100
101101
102
102
103103
104104
105105
......
220220
221221
222222
223
223
224224
225225
226226
227227
228228
229229
230
230
231231
232232
233233
def hasBeenViewed(self, request):
return int(request['status']) in conf.viewed_http_codes
def getCurDisplayRoot(self):
def getCurDisplayPath(self, filename):
cur_time = self.meta_infos['last_time']
return '%d/%d/' % (cur_time.tm_year, cur_time.tm_mon)
return os.path.join(str(cur_time.tm_year), str(cur_time.tm_mon), filename)
def _clearMeta(self):
self.meta_infos = {
return self.display
def getDBFilename(self, time):
return (conf.DB_ROOT + '%d/%d/%s') % (time.tm_year, time.tm_mon, conf.DB_FILENAME)
return os.path.join(conf.DB_ROOT, str(time.tm_year), str(time.tm_mon), conf.DB_FILENAME)
def _serialize(self, obj, filename):
base = os.path.dirname(filename)
def getDisplayIndex(self):
cur_time = self.meta_infos['last_time']
filename = '%s/index.html' % (self.getCurDisplayRoot())
filename = self.getCurDisplayPath('index.html')
return self.display.getPage(filename)
def _generateDisplayDaysStat(self):
cur_time = self.meta_infos['last_time']
title = 'Stats %d/%d' % (cur_time.tm_mon, cur_time.tm_year)
filename = '%s/index.html' % (self.getCurDisplayRoot())
filename = self.getCurDisplayPath('index.html')
print '==> Generate display (%s)' % (filename)
page = DisplayHTMLPage(title, filename)
plugins/display/all_visits.py
1818
1919
2020
21
21
2222
2323
2424
title = time.strftime('All visits - %B %Y', self.iwla.getCurTime())
filename = 'all_visits.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Last seen', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])
plugins/display/referers.py
5555
5656
5757
58
58
5959
6060
6161
......
9494
9595
9696
97
97
9898
9999
100100
title = time.strftime('Connexion from - %B %Y', cur_time)
filename = 'referers.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Connexion from', ['Origin', 'Pages', 'Hits'])
title = time.strftime('Key Phrases - %B %Y', cur_time)
filename = 'key_phrases.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Top key phrases', ['Key phrase', 'Search'])
plugins/display/top_downloads.py
2525
2626
2727
28
28
2929
3030
3131
title = time.strftime('Top Downloads - %B %Y', self.iwla.getCurTime())
filename = 'top_downloads.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('All Downloads', ['URI', 'Hit'])
plugins/display/top_hits.py
2525
2626
2727
28
28
2929
3030
3131
title = time.strftime('All Hits - %B %Y', self.iwla.getCurTime())
filename = 'top_hits.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Top Hits', ['URI', 'Entrance'])
plugins/display/top_pages.py
2525
2626
2727
28
28
2929
3030
3131
title = time.strftime('All Pages - %B %Y', self.iwla.getCurTime())
filename = 'top_pages.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Top Pages', ['URI', 'Entrance'])

Archive Download the corresponding diff file

Branches

Tags