Try to manage CSS path
This commit is contained in:
14
iwla.py
14
iwla.py
@@ -28,7 +28,7 @@ class IWLA(object):
|
||||
self.analyse_started = False
|
||||
self.current_analysis = {}
|
||||
self.cache_plugins = {}
|
||||
self.display = DisplayHTMLBuild()
|
||||
self.display = DisplayHTMLBuild(self)
|
||||
self.valid_visitors = None
|
||||
|
||||
self.log_format_extracted = re.sub(r'([^\$\w])', r'\\\g<1>', conf.log_format)
|
||||
@@ -89,6 +89,12 @@ class IWLA(object):
|
||||
cur_time = self.meta_infos['last_time']
|
||||
return os.path.join(str(cur_time.tm_year), str(cur_time.tm_mon), filename)
|
||||
|
||||
def getResourcesPath(self):
|
||||
return conf.resources_path
|
||||
|
||||
def getCSSPath(self):
|
||||
return conf.css_path
|
||||
|
||||
def _clearMeta(self):
|
||||
self.meta_infos = {
|
||||
'last_time' : None
|
||||
@@ -96,7 +102,7 @@ class IWLA(object):
|
||||
return self.meta_infos
|
||||
|
||||
def _clearDisplay(self):
|
||||
self.display = DisplayHTMLBuild()
|
||||
self.display = DisplayHTMLBuild(self)
|
||||
return self.display
|
||||
|
||||
def getDBFilename(self, time):
|
||||
@@ -108,7 +114,7 @@ class IWLA(object):
|
||||
os.makedirs(base)
|
||||
|
||||
# TODO : remove return
|
||||
#return
|
||||
return
|
||||
|
||||
with open(filename + '.tmp', 'wb+') as f:
|
||||
pickle.dump(obj, f)
|
||||
@@ -232,7 +238,7 @@ class IWLA(object):
|
||||
title = 'Stats %d/%d' % (cur_time.tm_mon, cur_time.tm_year)
|
||||
filename = self.getCurDisplayPath('index.html')
|
||||
print '==> Generate display (%s)' % (filename)
|
||||
page = DisplayHTMLPage(title, filename)
|
||||
page = DisplayHTMLPage(title, filename, conf.css_path)
|
||||
|
||||
days = DisplayHTMLBlockTable('By day', ['Day', 'Visits', 'Pages', 'Hits', 'Bandwidth', 'Not viewed Bandwidth'])
|
||||
days.setColsCSSClass(['', 'iwla_visit', 'iwla_page', 'iwla_hit', 'iwla_bandwidth', 'iwla_bandwidth'])
|
||||
|
||||
Reference in New Issue
Block a user