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"
This commit is contained in:
Alexandre FLAMENT 2022-09-02 08:52:23 +00:00
parent 94a28ebe53
commit 66f72a006f
3 changed files with 8 additions and 7 deletions

View file

@ -450,6 +450,7 @@ def render(template_name: str, **kwargs):
kwargs['instance_name'] = get_setting('general.instance_name')
kwargs['searx_version'] = VERSION_STRING
kwargs['searx_git_url'] = GIT_URL
kwargs['enable_metrics'] = get_setting('general.enable_metrics')
kwargs['get_setting'] = get_setting
kwargs['get_pretty_url'] = get_pretty_url