diff options
author | Alexandre FLAMENT <alexandre.flament@hesge.ch> | 2022-09-02 08:52:23 +0000 |
---|---|---|
committer | Alexandre FLAMENT <alexandre.flament@hesge.ch> | 2022-09-02 08:52:23 +0000 |
commit | 66f72a006ff0b15d30457a645e562c08ca6c0662 (patch) | |
tree | 102c044088f44d7a805c3743a510e2649706df3f /searx/templates/simple | |
parent | 94a28ebe5302dfe1b4a757853bb872f16144f791 (diff) | |
download | searxng-66f72a006ff0b15d30457a645e562c08ca6c0662.tar.gz searxng-66f72a006ff0b15d30457a645e562c08ca6c0662.zip |
template: when enable_metrics are disabled, hide the empty stats
when metrics are disabled:
* hide the link to /stats at the bottom of the pages
* in /preferences, hide the columns "Response time" and "Reliability"
Diffstat (limited to 'searx/templates/simple')
-rw-r--r-- | searx/templates/simple/base.html | 6 | ||||
-rw-r--r-- | searx/templates/simple/preferences.html | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index a2464a1a5..66c1b7434 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -62,9 +62,9 @@ <footer> <p> {{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> - <a href="{{ searx_git_url }}">{{ _('Source code') }}</a> | - <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> | - <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a> + <a href="{{ searx_git_url }}">{{ _('Source code') }}</a> + | <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> + {% if enable_metrics %}| <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a>{% endif %} {% if get_setting('brand.public_instances') %} | <a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a> {% endif %} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 7f9be5693..b6fba439c 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -310,9 +310,9 @@ <th>{{ _("Supports selected language") }}</th>{{- "" -}} <th>{{ _("SafeSearch") }}</th>{{- "" -}} <th>{{ _("Time range") }}</th>{{- "" -}} - <th>{{ _("Response time") }}</th>{{- "" -}} + {%- if enable_metrics %}<th>{{ _("Response time") }}</th>{% endif -%} <th>{{ _("Max time") }}</th>{{- "" -}} - <th>{{ _("Reliability") }}</th>{{- "" -}} + {%- if enable_metrics %}<th>{{ _("Reliability") }}</th>{% endif -%} </tr> {% for group, engines in engines_by_category[categ] | group_engines_in_tab %} {% if loop.length > 1 %} @@ -336,9 +336,9 @@ <td>{{ checkbox(None, supports[search_engine.name]['supports_selected_language'], true) }}</td>{{- "" -}} <td>{{ checkbox(None, supports[search_engine.name]['safesearch'], true) }}</td>{{- "" -}} <td>{{ checkbox(None, supports[search_engine.name]['time_range_support'], true) }}</td>{{- "" -}} - {{- engine_time(search_engine.name) -}} + {%- if enable_metrics %}{{- engine_time(search_engine.name) -}}{% endif -%} <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>{{- "" -}} - {{ engine_reliability(search_engine.name) -}} + {%- if enable_metrics %}{{ engine_reliability(search_engine.name) -}}{% endif -%} </tr> {% endif %} {% endfor %} |