diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-05-16 14:18:42 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-05-17 17:41:22 +0200 |
commit | 0a6c488417f83fc2fbfcdb8d80b5978a14c561c4 (patch) | |
tree | 23b50b4a30be13ac3a2e7558eaf0b05982a78258 /searx/static/themes/__common__ | |
parent | cdfb4b7ff9829cb9048b573f7f1775dc8029f75a (diff) | |
download | searxng-0a6c488417f83fc2fbfcdb8d80b5978a14c561c4.tar.gz searxng-0a6c488417f83fc2fbfcdb8d80b5978a14c561c4.zip |
[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: <table style="max-width: 1280px; margin: 0 auto 0 0;">
./simple/stats.html:28: <th scope="col" style="width:20rem;">{{ th_sort('name', _("Engine name")) }}</th>
./simple/stats.html:29: <th scope="col" style="width:7rem; text-align: right;">{{ th_sort('score', _('Scores')) }}</th>
./simple/stats.html:32: <th scope="col" style="text-align: right;">{{ th_sort('reliability', _('Reliability')) }}</th>
./simple/stats.html:37: <td style="text-align: right;">
./simple/stats.html:90: <td style="text-align: right;"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td>
./simple/stats.html:106: <table style="max-width: 1280px; margin: 1rem; border: 1px solid gray;">
./simple/stats.html:107: <tbody style="padding-top: 1rem;">
./simple/stats.html:110: <th scope="row" style="width: 10rem">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td>
./simple/stats.html:112: <th scope="row" style="width: 10rem">{{ _('Message') }}</th><td>{{ error.log_message }}</td>
./simple/stats.html:114: <th scope="row" style="width: 10rem">{{ _('Percentage') }}</th><td style="width: 10rem">{{ error.percentage }}</td>
./simple/stats.html:119: <span style="border-right: 1px solid gray; padding: 0 1rem 0 0; margin: 0 0 0 0.5rem;">{{ param }}</span>
./simple/stats.html:136: <th scope="col" style="width: 10rem">{{ _('Failed test') }}</th>
Reported-by: https://github.com/searxng/searxng/issues/57
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/static/themes/__common__')
-rw-r--r-- | searx/static/themes/__common__/less/stats.less | 47 |
1 files changed, 47 insertions, 0 deletions
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; } |