diff options
-rw-r--r-- | searx/templates/simple/new_issue.html | 2 | ||||
-rwxr-xr-x | searx/webapp.py | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/searx/templates/simple/new_issue.html b/searx/templates/simple/new_issue.html index a143cc7df..7ce30c059 100644 --- a/searx/templates/simple/new_issue.html +++ b/searx/templates/simple/new_issue.html @@ -63,7 +63,7 @@ or manually by executing the searx/webapp.py file? --> <input type="checkbox" id="step1"> <label for="step1">{{ _('Start submiting a new issue on GitHub') }}</label> <div class="step1 step_content"> - <p><a href="{{ get_setting('brand.issue_url') }}?q=is%3Aissue+Bug:%20{{ engine_name }}" target="_blank" rel="noreferrer noreferrer">{{ _('Please check for existing bugs about this engine on GitHub') }}</a></p> + <p><a href="{{ get_setting('brand.issue_url') }}?q=is%3Aissue+Bug:%20{{ engine_name }} {{ technical_report }}" target="_blank" rel="noreferrer noreferrer">{{ _('Please check for existing bugs about this engine on GitHub') }}</a></p> </div> <input class="step1 step1_delay" type="checkbox" id="step2"> <label class="step1 step1_delay" for="step2" >{{ _('I confirm there is no existing bug about the issue I encounter') }}</label> diff --git a/searx/webapp.py b/searx/webapp.py index a6cadcf6c..0901af8ea 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1161,6 +1161,21 @@ def stats(): reliability_order = 1 - reliability_order return (reliability_order, key, engine_stat['name']) + technical_report = [] + for error in engine_reliabilities.get(selected_engine_name, {}).get('errors', []): + technical_report.append( + f"\ + Error: {error['exception_classname'] or error['log_message']} \ + Parameters: {error['log_parameters']} \ + File name: {error['filename'] }:{ error['line_no'] } \ + Error Function: {error['function']} \ + Code: {error['code']} \ + ".replace( + ' ' * 12, '' + ).strip() + ) + technical_report = ' '.join(technical_report) + engine_stats['time'] = sorted(engine_stats['time'], reverse=reverse, key=get_key) return render( # fmt: off @@ -1170,6 +1185,7 @@ def stats(): engine_reliabilities = engine_reliabilities, selected_engine_name = selected_engine_name, searx_git_branch = GIT_BRANCH, + technical_report = technical_report, # fmt: on ) |