Work on CSS management

This commit is contained in:
2014-11-27 21:40:23 +01:00
parent d2b0d0dae6
commit 3858127a6d
8 changed files with 69 additions and 22 deletions

View File

@@ -22,6 +22,8 @@ class IWLADisplayAllVisits(IPlugin):
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Last seen', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit', 'iwla_bandwith', ''])
for super_hit in last_access:
address = super_hit['remote_addr']
if display_visitor_ip and\

View File

@@ -40,7 +40,8 @@ class IWLADisplayReferers(IPlugin):
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Connexion from', ['Origin', 'Pages', 'Hits'])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit'])
table.appendRow(['<b>Search Engine</b>', '', ''])
for r,_ in top_search_engine_referers:
row = [r, search_engine_referers[r]['pages'], search_engine_referers[r]['hits']]
@@ -67,6 +68,8 @@ class IWLADisplayReferers(IPlugin):
title = '%s - %s' % ('Connexion from', link)
table = DisplayHTMLBlockTable(title, ['Origin', 'Pages', 'Hits'])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit'])
table.appendRow(['<b>Search Engine</b>', '', ''])
for r,_ in top_search_engine_referers[:10]:
row = [r, search_engine_referers[r]['pages'], search_engine_referers[r]['hits']]
@@ -92,6 +95,7 @@ class IWLADisplayReferers(IPlugin):
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('Top key phrases', ['Key phrase', 'Search'])
table.setColsCSSClass(['', 'iwla_search'])
for phrase in top_key_phrases:
table.appendRow([phrase[0], phrase[1]])
page.appendBlock(table)
@@ -103,6 +107,7 @@ class IWLADisplayReferers(IPlugin):
# Top key phrases in index
title = '%s - %s' % ('Top key phrases', link)
table = DisplayHTMLBlockTable(title, ['Key phrase', 'Search'])
table.setColsCSSClass(['', 'iwla_search'])
for phrase in top_key_phrases[:10]:
table.appendRow([phrase[0], phrase[1]])
index.appendBlock(table)

View File

@@ -20,7 +20,8 @@ class IWLADisplayTopDownloads(IPlugin):
title = time.strftime('All Downloads - %B %Y', self.iwla.getCurTime())
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('All Downloads', ['URI', 'Hit'])
table = DisplayHTMLBlockTable('All Downloads', ['URI', 'Hit'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_downloads:
table.appendRow([uri, entrance])
page.appendBlock(table)
@@ -33,7 +34,8 @@ class IWLADisplayTopDownloads(IPlugin):
# Top in index
index = self.iwla.getDisplayIndex()
table = DisplayHTMLBlockTable(title, ['URI', 'Hits'])
table = DisplayHTMLBlockTable(title, ['URI', 'Hits'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_downloads[:10]:
table.appendRow([uri, entrance])
index.appendBlock(table)

View File

@@ -21,6 +21,7 @@ class IWLADisplayTopHits(IPlugin):
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('All Hits', ['URI', 'Entrance'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_hits:
table.appendRow([uri, entrance])
page.appendBlock(table)
@@ -34,6 +35,7 @@ class IWLADisplayTopHits(IPlugin):
index = self.iwla.getDisplayIndex()
table = DisplayHTMLBlockTable(title, ['URI', 'Entrance'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_hits[:10]:
table.appendRow([uri, entrance])
index.appendBlock(table)

View File

@@ -20,7 +20,8 @@ class IWLADisplayTopPages(IPlugin):
path = self.iwla.getCurDisplayPath(filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('All Pages', ['URI', 'Entrance'])
table = DisplayHTMLBlockTable('All Pages', ['URI', 'Entrance'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_pages:
table.appendRow([uri, entrance])
page.appendBlock(table)
@@ -33,7 +34,8 @@ class IWLADisplayTopPages(IPlugin):
# Top in index
index = self.iwla.getDisplayIndex()
table = DisplayHTMLBlockTable(title, ['URI', 'Entrance'])
table = DisplayHTMLBlockTable(title, ['URI', 'Entrance'])
table.setColsCSSClass(['', 'iwla_hit'])
for (uri, entrance) in top_pages[:10]:
table.appendRow([uri, entrance])
index.appendBlock(table)

View File

@@ -21,6 +21,7 @@ class IWLADisplayTopVisitors(IPlugin):
index = self.iwla.getDisplayIndex()
table = DisplayHTMLBlockTable('Top visitors', ['Host', 'Pages', 'Hits', 'Bandwidth', 'Last seen'])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit', 'iwla_bandwith', ''])
for super_hit in top_visitors:
address = super_hit['remote_addr']
if display_visitor_ip and\