Remove iwla parameter in hook functions
This commit is contained in:
@@ -9,8 +9,8 @@ class IWLADisplayAllVisits(IPlugin):
|
||||
super(IWLADisplayAllVisits, self).__init__(iwla)
|
||||
self.API_VERSION = 1
|
||||
|
||||
def hook(self, iwla):
|
||||
hits = iwla.getValidVisitors()
|
||||
def hook(self):
|
||||
hits = self.iwla.getValidVisitors()
|
||||
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
|
||||
|
||||
cur_time = self.iwla.getCurTime()
|
||||
@@ -40,7 +40,7 @@ class IWLADisplayAllVisits(IPlugin):
|
||||
display = self.iwla.getDisplay()
|
||||
display.addPage(page)
|
||||
|
||||
index = iwla.getDisplayIndex()
|
||||
index = self.iwla.getDisplayIndex()
|
||||
block = DisplayHTMLRawBlock()
|
||||
block.setRawHTML('<a href=\'%s\'>All visits</a>' % (filename))
|
||||
index.appendBlock(block)
|
||||
|
||||
@@ -70,8 +70,8 @@ class IWLADisplayReferers(IPlugin):
|
||||
key_phrases[key_phrase] += 1
|
||||
break
|
||||
|
||||
def hook(self, iwla):
|
||||
stats = iwla.getCurrentVisists()
|
||||
def hook(self):
|
||||
stats = self.iwla.getCurrentVisists()
|
||||
referers = {}
|
||||
robots_referers = {}
|
||||
search_engine_referers = {}
|
||||
|
||||
@@ -10,10 +10,10 @@ class IWLADisplayTopVisitors(IPlugin):
|
||||
self.API_VERSION = 1
|
||||
self.requires = ['IWLAPostAnalysisTopVisitors']
|
||||
|
||||
def hook(self, iwla):
|
||||
stats = iwla.getMonthStats()
|
||||
def hook(self):
|
||||
stats = self.iwla.getMonthStats()
|
||||
|
||||
index = iwla.getDisplayIndex()
|
||||
index = self.iwla.getDisplayIndex()
|
||||
table = DisplayHTMLBlockTable('Top visitors', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])
|
||||
for super_hit in stats['top_visitors']:
|
||||
address = super_hit['remote_addr']
|
||||
|
||||
Reference in New Issue
Block a user