From ac45c2dd61f41cf61b96fb2b1c6b86d6c8ba7685 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 1 Aug 2023 14:30:36 +0200 Subject: [PATCH] chg: [crawler ui] last crawled domains, show last check timestamp --- var/www/blueprints/crawler_splash.py | 1 + var/www/templates/crawler/crawler_splash/last_crawled.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/var/www/blueprints/crawler_splash.py b/var/www/blueprints/crawler_splash.py index 39d84971..1b7f4454 100644 --- a/var/www/blueprints/crawler_splash.py +++ b/var/www/blueprints/crawler_splash.py @@ -272,6 +272,7 @@ def crawlers_last_domains(): domain, epoch = domain_row.split(':', 1) dom = Domains.Domain(domain) meta = dom.get_meta() + meta['last'] = datetime.fromtimestamp(int(epoch)).strftime("%Y/%m/%d %H:%M.%S") meta['epoch'] = epoch meta['status_epoch'] = dom.is_up_by_epoch(epoch) domains.append(meta) diff --git a/var/www/templates/crawler/crawler_splash/last_crawled.html b/var/www/templates/crawler/crawler_splash/last_crawled.html index a097c47a..582e45cb 100644 --- a/var/www/templates/crawler/crawler_splash/last_crawled.html +++ b/var/www/templates/crawler/crawler_splash/last_crawled.html @@ -74,7 +74,7 @@ data-content="epoch: {{domain['epoch']}}
last status: {{ domain['status'] }}"> {{ domain['domain'] }} {{domain['first_seen']}} - {{domain['last_check']}} + {{domain['last']}} {% if domain['status_epoch'] %}