From 0a6c488417f83fc2fbfcdb8d80b5978a14c561c4 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 16 May 2021 14:18:42 +0200 Subject: [fix] make /stats more CSP compliant - simple theme Replace simple theme's *styles* (see below) by CSP compliant implementation in ``searx/static/themes/simple/less/stats.less`` :: ./simple/stats.html:26: ./simple/stats.html:28: ./simple/stats.html:29: ./simple/stats.html:32: ./simple/stats.html:37: ./simple/stats.html:106:
{{ th_sort('name', _("Engine name")) }}{{ th_sort('score', _('Scores')) }}{{ th_sort('reliability', _('Reliability')) }} ./simple/stats.html:90: {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}
./simple/stats.html:107: ./simple/stats.html:110: ./simple/stats.html:112: ./simple/stats.html:114: ./simple/stats.html:119: {{ param }} ./simple/stats.html:136: Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser --- searx/static/themes/__common__/less/stats.less | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'searx/static') diff --git a/searx/static/themes/__common__/less/stats.less b/searx/static/themes/__common__/less/stats.less index 6c2117b39..2204fb02b 100644 --- a/searx/static/themes/__common__/less/stats.less +++ b/searx/static/themes/__common__/less/stats.less @@ -1,3 +1,50 @@ +#main_stats { + + table { + margin: 0 auto 0 0; + } + + table .engine-name { + width: 20rem; + } + + table .engine-scores { + width: 7rem; + } + + table .result-count { + } + + table .response-time { + } + + table .engine-reliability { + text-align: right; + } + + table.engine-error { + max-width: 1280px; + margin: 1rem; + border: 1px solid gray; + } + + table.engine-error th.engine-error-type, + table.engine-error td.engine-error-type, + failed-test { + width: 10rem; + } + + table.engine-error span.log_parameters + { + border-right: 1px solid gray; + padding: 0 1rem 0 0; + margin: 0 0 0 0.5rem; + } +} + +@media screen and (max-width: 75em) { +} + .bar-chart-value { width: 3em; } -- cgit v1.2.3
{{ _('Exception') }}{{ error.exception_classname }}{{ _('Message') }}{{ error.log_message }}{{ _('Percentage') }}{{ error.percentage }}{{ _('Failed test') }}