Development
This commit is contained in:
parent
0c4ee8a848
commit
a2c2d05d58
1 changed files with 4 additions and 4 deletions
|
|
@ -36,7 +36,7 @@ def _dnsblocking_log_tail(cfg):
|
|||
return '(error reading log)', ''
|
||||
|
||||
|
||||
WARN_ICON = ' <span class="tooltip-wrap" data-tooltip="Cached blocklist used. Verify URL is correct." style="display:inline-flex;align-items:center;"><img src="/www/icons/warning.svg" style="width:1em;height:1em;"></span>'
|
||||
WARN_ICON = ' <span class="tooltip-wrap" data-tooltip="Stale blocklist used. Verify URL is correct." style="display:inline-flex;align-items:center;"><img src="/www/icons/warning.svg" style="width:1em;height:1em;"></span>'
|
||||
ERROR_ICON = ' <span class="tooltip-wrap" data-tooltip="Blocklist not found. No cached version available." style="display:inline-flex;align-items:center;"><img src="/www/icons/error.svg" style="width:1em;height:1em;"></span>'
|
||||
|
||||
|
||||
|
|
@ -65,17 +65,17 @@ def blocklist_stats_html(cfg):
|
|||
size_str = config_utils.fmt_bytes(os.path.getsize(bl_path))
|
||||
except Exception:
|
||||
size_str = '-'
|
||||
last_refreshed = 'Local'
|
||||
last_refreshed = 'Local file'
|
||||
warn = ''
|
||||
else:
|
||||
fetched_at = db.get('fetched_at')
|
||||
if fetched_at:
|
||||
last_refreshed = (
|
||||
f'{datetime.fromtimestamp(fetched_at).strftime("%Y-%m-%d %H:%M")}'
|
||||
f'Downloaded {datetime.fromtimestamp(fetched_at).strftime("%Y-%m-%d %H:%M")}'
|
||||
f' ({config_utils.relative_time(fetched_at, datetime.now(tz=timezone.utc).timestamp())} ago)'
|
||||
)
|
||||
else:
|
||||
last_refreshed = 'Never'
|
||||
last_refreshed = 'Never downloaded'
|
||||
save_as = bl.get('save_as', '')
|
||||
bl_path = f'{config_utils.BLOCKLISTS_DIR}/{save_as}' if save_as else ''
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue