diff --git a/website/web/__init__.py b/website/web/__init__.py
index ca0a8293..6629cc5a 100644
--- a/website/web/__init__.py
+++ b/website/web/__init__.py
@@ -2240,15 +2240,17 @@ def post_table(table_name: str, value: str) -> Response:
'page': f"""
{cached.title}
{shorten_string(cached.url, 100, with_title=True)}""",
'capture_time': cached.timestamp.isoformat(),
}
- if not cached.redirects:
- to_append['redirects'] = 'No redirect'
- else:
+ to_append['redirects'] = {'display': 'No redirect', 'filter': ''}
+ if cached.redirects:
+ display = f"""
{shorten_string(cached.redirects[0], 50, with_title=True)}"""
+ filter_redirects = ' '.join(cached.redirects)
to_append['redirects'] = f"""
{shorten_string(cached.redirects[0], 50, with_title=True)}"""
if len(cached.redirects) > 1:
for counter, r in enumerate(cached.redirects[1:]):
- to_append['redirects'] += f"""
{" " * (counter + 1) * 2}↪{shorten_string(r, 50, with_title=True)}""" # type: ignore[operator]
- to_append['redirects'] += '
' # type: ignore[operator]
- to_append['redirects'] += f"""Download redirects""" # type: ignore[operator]
+ display += f"""
{" " * (counter + 1) * 2}↪{shorten_string(r, 50, with_title=True)}""" # type: ignore[operator]
+ display += '' # type: ignore[operator]
+ display += f"""Download redirects""" # type: ignore[operator]
+ to_append['redirects'] = {'display': display, 'filter': filter_redirects}
prepared_captures.append(to_append)
return jsonify(prepared_captures)
@@ -2533,8 +2535,8 @@ def post_table(table_name: str, value: str) -> Response:
'time_first': record.time_first_datetime.isoformat(),
'time_last': record.time_last_datetime.isoformat(),
'rrtype': record.rrtype,
- 'rdata': data,
- 'rrname': record.rrname
+ 'rdata': f'{data}',
+ 'rrname': f'{record.rrname}'
}
prepared_records.append(to_append)
return jsonify(prepared_records)
diff --git a/website/web/sri.txt b/website/web/sri.txt
index 9d4769e6..32677a63 100644
--- a/website/web/sri.txt
+++ b/website/web/sri.txt
@@ -32,7 +32,7 @@
"loader.gif": "ZZKD5vLSKBWKeUpa2KI9qheUJ49iTI/UULmVU/AX28fBfH00K3lLc2v5pVJZ4qXG1BbB13LTXzRKKU35H2XfNg==",
"lookyloo.jpeg": "i6wBj8CsIM5YAQLEMQfhs3CNOSKkErF8AMqqM6ZygSwCyQgv9CU8xt94veMZhM/ufBWoz7kAXmR+yywmxsTxug==",
"redirect.png": "PAjzlPV97rEFvH55mG1ZC9wRl98be3yMeX/nENuFkJcds6/AXgSR2ig/QyPULgobSnNgiYieLVWY/oqsgeywrQ==",
- "render_tables.js": "pBu3hTvXCuEPB6S/yuRAq1nCDWQIn96MN/mu1kXMJitReLB+0G5bWiGeRrIngpL4PjGBPIZY6ROoBVcVI2T44g==",
+ "render_tables.js": "4UhEfFnV6e+GaHKsVVARxwHPFHH91bXkKGzlylp+RDL8xHrITUWk+XriSx/3poiyrgiCudzsVzMMgYPnALD9rA==",
"secure.svg": "H8ni7t0d60nCJDVGuZpuxC+RBy/ipAjWT627D12HlZGg6LUmjSwPTQTUekm3UJupEP7TUkhXyq6WHc5gy7QBjg==",
"stats.css": "/kY943FwWBTne4IIyf7iBROSfbGd82TeBicEXqKkRwawMVRIvM/Pk5MRa7okUyGIxaDjFQGmV/U1vy+PhN6Jbw==",
"stats_graph.js": "S/sMNQK1UMMLD0xQeEa7sq3ce8o6oPxwxGlyKVtaHOODjair86dbBDm7cu6pa/elMRDJT1j09jEFjWp+5GbhTw==",
diff --git a/website/web/static/render_tables.js b/website/web/static/render_tables.js
index 09ba4baf..9257389e 100644
--- a/website/web/static/render_tables.js
+++ b/website/web/static/render_tables.js
@@ -18,7 +18,7 @@ function renderTables() {
columns : [
{ data: 'page', width: '40%' },
{ data: 'capture_time', width: '20%', render: DataTable.render.datetime_with_tz() },
- { data: 'redirects', width: '40%' }
+ { data: {_: 'redirects.display', filter: 'redirects.filter'}, width: '40%' }
],
})
}
diff --git a/website/web/templates/hostname_popup.html b/website/web/templates/hostname_popup.html
index 2c230230..593acc27 100644
--- a/website/web/templates/hostname_popup.html
+++ b/website/web/templates/hostname_popup.html
@@ -1,4 +1,7 @@
{% extends "main.html" %}
+
+{% from 'bootstrap5/utils.html' import render_icon %}
+
{% from "macros.html" import known_content_details %}
{% from "macros.html" import ressource_legitimacy_details %}
{% from "macros.html" import indexed_cookies %}
@@ -157,19 +160,16 @@ NS record for {{hostnode.ns[0]}}:
{# HTTPs or not #}
{% if url['encrypted'] %}
-

+ {{ render_icon('lock-fill') }}
{% else %}
-

+ {{ render_icon('unlock-fill') }}
{%endif%}
{# URL #}
... /{{ shorten_string(url['url_path'], 50)}}
{# Copy full URL to clipbard #}
{% if url['url_object'].ip_address %}