SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] make /stats more CSP compliant - oscar theme
Markus Heiser34859d0e5872
diff --git a/searx/templates/oscar/stats.html b/searx/templates/oscar/stats.htmlindex 8b57e39b6..d75a29d1f 100644--- a/searx/templates/oscar/stats.html+++ b/searx/templates/oscar/stats.html@@ -24,18 +24,18 @@{% include 'oscar/messages/no_data_available.html' %}</div>{% else %}- <table class="table table-hover table-condensed table-striped">+ <table class="table table-hover table-condensed table-striped engine-stats"><tr>- <th scope="col" style="width:20rem;">{{ th_sort('name', _("Engine name")) }}</th>- <th scope="col" style="width:7rem; text-align: right;">{{ th_sort('score', _('Scores')) }}</th>- <th scope="col">{{ th_sort('result_count', _('Result count')) }}</th>- <th scope="col">{{ th_sort('time', _('Response time')) }}</th>- <th scope="col" style="text-align: right;">{{ th_sort('reliability', _('Reliability')) }}</th>+ <th scope="col" class="engine-name">{{ th_sort('name', _("Engine name")) }}</th>+ <th scope="col" class="engine-scores">{{ th_sort('score', _('Scores')) }}</th>+ <th scope="col" class="result-count">{{ th_sort('result_count', _('Result count')) }}</th>+ <th scope="col" class="response-time">{{ th_sort('time', _('Response time')) }}</th>+ <th scope="col" class="engine-reliability">{{ th_sort('reliability', _('Reliability')) }}</th></tr>{% for engine_stat in engine_stats.get('time', []) %}<tr>- <td><a href="{{ url_for('stats', engine=engine_stat.name|e) }}">{{ engine_stat.name }}</a></td>- <td style="text-align: right;">+ <td class="engine-name"><a href="{{ url_for('stats', engine=engine_stat.name|e) }}">{{ engine_stat.name }}</a></td>+ <td class="engine-scores">{%- if engine_stat.score -%}<span aria-labelledby="{{engine_stat.name}}_score" >{{ engine_stat.score|round(1) }}</span><div class="engine-tooltip text-left" role="tooltip" id="{{engine_stat.name}}_score">{{- "" -}}@@ -43,7 +43,7 @@</div>{%- endif -%}</td>- <td>+ <td class="result-count">{%- if engine_stat.result_count -%}<div class="bar-chart-value">{{- engine_stat.result_count | int -}}</div>{{- "" -}}<div class="bar-chart-graph" aria-hidden="true">@@ -51,7 +51,7 @@</div>{%- endif -%}</td>- <td>+ <td class="response-time">{%- if engine_stat.total -%}<div class="bar-chart-value">{{- engine_stat.total | round(1) -}}</div>{{- "" -}}<div class="bar-chart-graph" aria-labelledby="{{engine_stat.name}}_time" aria-hidden="true">@@ -88,7 +88,7 @@</div>{%- endif -%}</td>- <td style="text-align: right;"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td>+ <td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td></tr>{% endfor %}</table>@@ -105,20 +105,20 @@{% set ns.first = false %}<h3>{% if secondary %}{{ _('Warnings') }}{% else %}{{ _('Errors and exceptions') }}{% endif %}</h3>{% endif %}- <table class="table table-striped table-bordered">- <tbody style="padding-top: 1rem;">+ <table class="table table-striped table-bordered engine-error">+ <tbody><tr>{%- if error.exception_classname -%}- <th scope="row" style="width: 10rem">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td>+ <th scope="row" class="engine-error-type">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td>{%- elif error.log_message -%}- <th scope="row" style="width: 10rem">{{ _('Message') }}</th><td>{{ error.log_message }}</td>+ <th scope="row" class="engine-error-type">{{ _('Message') }}</th><td>{{ error.log_message }}</td>{%- endif -%}- <th scope="row" style="width: 10rem">{{ _('Percentage') }}</th><td style="width: 10rem">{{ error.percentage }}</td>+ <th scope="row" class="engine-error-type">{{ _('Percentage') }}</th><td class="engine-error-type">{{ error.percentage }}</td></tr>{% if error.log_parameters and error.log_parameters != (None, None, None) %}<tr><th scope="row">{{ _('Parameter') }}</th>{{- '' -}}<td colspan="3">{%- for param in error.log_parameters -%}- <span style="border-right: 1px solid gray; padding: 0 1rem 0 0; margin: 0 0 0 0.5rem;">{{ param }}</span>+ <span class="log_parameters">{{ param }}</span>{%- endfor -%}</td></tr>@@ -135,7 +135,7 @@<h3>{{ _('Checker') }}</h3><table class="table table-striped table-bordered"><tr>- <th scope="col" style="width: 10rem">{{ _('Failed test') }}</th>+ <th scope="col" class="failed-test">{{ _('Failed test') }}</th><th scope="col">{{ _('Comment(s)') }}</th></tr>{% for test_name, results in engine_reliabilities[selected_engine_name].checker.items() %}