Show last access information for feeds parsers

This commit is contained in:
Gregory Soutade 2022-11-20 10:12:16 +01:00
parent ff57e5a90a
commit 82993afbce

View File

@ -73,8 +73,8 @@ class IWLADisplayFeeds(IPlugin):
display_visitor_ip = self.iwla.getConfValue('display_visitor_ip', False)
page = display.createPage(title, path, self.iwla.getConfValue('css_path', []))
table = display.createBlock(DisplayHTMLBlockTable, self.iwla._(u'All feeds parsers'), [self.iwla._(u'Host'), self.iwla._(u'Pages'), self.iwla._(u'Hits')])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit'])
table = display.createBlock(DisplayHTMLBlockTable, self.iwla._(u'All feeds parsers'), [self.iwla._(u'Host'), self.iwla._(u'Pages'), self.iwla._(u'Hits'), self.iwla._(u'Last Access')])
table.setColsCSSClass(['', 'iwla_page', 'iwla_hit', ''])
for super_hit in hits.values():
if not super_hit.get('feed_parser', False): continue
if super_hit['feed_parser'] == IWLAPostAnalysisFeeds.BAD_FEED_PARSER:
@ -88,7 +88,7 @@ class IWLADisplayFeeds(IPlugin):
address += '*'
pages = super_hit['not_viewed_pages'][0] + super_hit['viewed_pages'][0]
hits = super_hit['not_viewed_hits'][0] + super_hit['viewed_hits'][0]
table.appendRow([address, pages, hits])
table.appendRow([address, pages, hits, time.asctime(super_hit['last_access'])])
page.appendBlock(table)
note = DisplayHTMLRaw(self.iwla, ('<small>*%s</small>' % (self.iwla._(u'Merged feeds parsers'))))
page.appendBlock(note)