Store files in month directory

This commit is contained in:
Grégory Soutadé
2014-11-27 14:11:47 +01:00
parent f7bf2e11ba
commit ce4bca056d
7 changed files with 35 additions and 26 deletions

View File

@@ -15,11 +15,10 @@ class IWLADisplayAllVisits(IPlugin):
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
cur_time = self.iwla.getCurTime()
title = time.strftime('All visits - %B %Y', cur_time)
title = time.strftime('All visits - %B %Y', self.iwla.getCurTime())
filename = 'all_visits_%d.html' % (cur_time.tm_mon)
path = '%d/%s' % (cur_time.tm_year, filename)
filename = 'all_visits.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Last seen', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])