diff options
| -rw-r--r-- | client/simple/src/less/new_issue.less | 38 | ||||
| -rw-r--r-- | client/simple/src/less/style.less | 1 | ||||
| -rw-r--r-- | searx/brand.py | 13 | ||||
| -rw-r--r-- | searx/settings.yml | 1 | ||||
| -rw-r--r-- | searx/templates/simple/base.html | 6 | ||||
| -rw-r--r-- | searx/templates/simple/new_issue.html | 71 | ||||
| -rw-r--r-- | searx/templates/simple/stats.html | 2 | ||||
| -rwxr-xr-x | searx/webapp.py | 5 | ||||
| -rw-r--r-- | tests/robot/settings_robot.yml | 1 |
9 files changed, 5 insertions, 133 deletions
diff --git a/client/simple/src/less/new_issue.less b/client/simple/src/less/new_issue.less deleted file mode 100644 index 9ecffd206..000000000 --- a/client/simple/src/less/new_issue.less +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later - -.stats_endpoint { - .github-issue-button { - display: block; - font-size: 16px; - } - - .issue-hide { - display: none; - } - - input[type="checked"] { - position: absolute; - } - - label { - margin: 1rem 1rem 1rem 0; - } - - .step_content { - margin: 1rem 1rem 1rem 2rem; - } - - .step1, - .step2 { - visibility: hidden; - } - - .step1_delay { - transition: visibility 0s linear 4s; - } - - #step1:checked ~ .step1, - #step2:checked ~ .step2 { - visibility: visible; - } -} diff --git a/client/simple/src/less/style.less b/client/simple/src/less/style.less index 49c65345b..32c2fdfa1 100644 --- a/client/simple/src/less/style.less +++ b/client/simple/src/less/style.less @@ -11,7 +11,6 @@ @import "animations.less"; @import "embedded.less"; @import "info.less"; -@import "new_issue.less"; @import "stats.less"; @import "result_templates.less"; @import "weather.less"; diff --git a/searx/brand.py b/searx/brand.py index 9627da07d..af1a8eec8 100644 --- a/searx/brand.py +++ b/searx/brand.py @@ -53,16 +53,3 @@ class SettingsBrand(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): .. autoclass:: searx.brand.BrandCustom :members: """ - - # new_issue_url is a hackish solution tailored for only one hoster (GH). As - # long as we don't have a more general solution, we should support it in the - # given function, but it should not be expanded further. - - new_issue_url: str = "https://github.com/searxng/searxng/issues/new" - """If you host your own issue tracker not on GitHub, then unset this URL. - - Note: This URL will create a pre-filled GitHub bug report form for an - engine. Since this feature is implemented only for GH (and limited to - engines), it will probably be replaced by another solution in the near - future. - """ diff --git a/searx/settings.yml b/searx/settings.yml index 6b26d3338..2cf2c29ed 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -18,7 +18,6 @@ general: open_metrics: '' brand: - new_issue_url: https://github.com/searxng/searxng/issues/new docs_url: https://docs.searxng.org/ public_instances: https://searx.space wiki_url: https://github.com/searxng/searxng/wiki diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index ec2c7bb51..b07168a34 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -5,7 +5,7 @@ <meta name="endpoint" content="{{ endpoint }}"> <meta name="description" content="SearXNG — a privacy-respecting, open metasearch engine"> <meta name="keywords" content="SearXNG, search, search engine, metasearch, meta search"> - <meta name="generator" content="searxng/{{ searx_version }}"> + <meta name="generator" content="searxng/{{ searxng_version }}"> <meta name="referrer" content="no-referrer"> <meta name="robots" content="noarchive"> <meta name="viewport" content="width=device-width, initial-scale=1"> @@ -65,8 +65,8 @@ </main> <footer> <p> - {{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">SearXNG</a> - {{ searx_version }} — {{ _('a privacy-respecting, open metasearch engine') }}<br> - <a href="{{ searx_git_url }}">{{ _('Source code') }}</a> + {{ _('Powered by') }} <a href="{{ url_for('info', pagename='about') }}">SearXNG</a> - {{ searxng_version }} — {{ _('a privacy-respecting, open metasearch engine') }}<br> + <a href="{{ searxng_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') %} diff --git a/searx/templates/simple/new_issue.html b/searx/templates/simple/new_issue.html deleted file mode 100644 index f2d99c5f9..000000000 --- a/searx/templates/simple/new_issue.html +++ /dev/null @@ -1,71 +0,0 @@ -{% macro new_issue(engine_name, engine_reliability) %} -<form action="{{ get_setting('brand.new_issue_url') }}" method="GET"> - <input name="title" type="hidden" value="Bug: {{ engine_name }} engine"> - <input name="labels" type="hidden" value="bug"> - <input name="template" type="hidden" value="bug-report.md"> - <textarea name="body" class="issue-hide">{{- '' -}} - -**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** -{% if searx_git_url and searx_git_url != 'unknow' %} -Repository: {{ searx_git_url }} -Branch: {{ searx_git_branch }} -Version: {{ searx_version }} -<!-- Check if these values are correct --> - -{% else %} -<!-- If you are running on master branch using git execute this command -in order to fetch the latest commit ID: -``` -git log -1 -``` -If you are using searxng-docker then look at the bottom of the SearXNG page -and check for the version after "Powered by SearXNG" - -Please also stipulate if you are using a forked version of SearxNG and -include a link to the fork source code. ---> -{% endif %} -**How did you install SearXNG?** -<!-- Did you install SearXNG using the official wiki or using searxng-docker -or manually by executing the searx/webapp.py file? --> -**What happened?** -<!-- A clear and concise description of what the bug is. --> - -**How To Reproduce** -<!-- How can we reproduce this issue? (as minimally and as precisely as possible) --> - -**Expected behavior** -<!-- A clear and concise description of what you expected to happen. --> - -**Screenshots & Logs** -<!-- If applicable, add screenshots, logs to help explain your problem. --> - -**Additional context** -<!-- Add any other context about the problem here. --> - -**Technical report** - -{% for error in engine_reliability.errors %} -{% if secondary %}Warning{% else %}Error{% endif %} -{{'\n '}}* Error: {{ error.exception_classname or error.log_message }} -{{' '}}* Percentage: {{ error.percentage }} -{{' '}}* Parameters: `{{ error.log_parameters }}` -{{' '}}* File name: `{{ error.filename }}:{{ error.line_no }}` -{{' '}}* Function: `{{ error.function }}` -{{' '}}* Code: `{{ error.code }}` -{{'\n'-}} -{%- endfor -%} - </textarea> - <input type="checkbox" id="step1"> - <label for="step1">{{ _('Start submitting 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 }} {{ 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> - <div class="step2 step_content"> - <p>{{ _('If this is a public instance, please specify the URL in the bug report') }}</p> - <button type="submit" class="github-issue-button button" title="{{ get_setting('brand.new_issue_url') }}">{{ _('Submit a new issue on Github including the above information') }}</button> - </div> -</form> -{% endmacro %} diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html index 8c436c399..448a628ca 100644 --- a/searx/templates/simple/stats.html +++ b/searx/templates/simple/stats.html @@ -1,5 +1,4 @@ {% from 'simple/icons.html' import icon_big %} -{% from 'simple/new_issue.html' import new_issue with context %} {% extends "simple/page_with_header.html" %} @@ -124,7 +123,6 @@ {% endif %} {% endfor %} {% endfor %} - {{ new_issue(selected_engine_name, engine_reliabilities[selected_engine_name]) }} </div> {% endif %} diff --git a/searx/webapp.py b/searx/webapp.py index 23dd56e66..ed2deeabb 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -419,8 +419,8 @@ def render(template_name: str, **kwargs): # values from settings kwargs['search_formats'] = [x for x in settings['search']['formats'] if x != 'html'] kwargs['instance_name'] = get_setting('general.instance_name') - kwargs['searx_version'] = VERSION_STRING - kwargs['searx_git_url'] = GIT_URL + kwargs['searxng_version'] = VERSION_STRING + kwargs['searxng_git_url'] = GIT_URL kwargs['enable_metrics'] = get_setting('general.enable_metrics') kwargs['get_setting'] = get_setting kwargs['get_pretty_url'] = get_pretty_url @@ -1153,7 +1153,6 @@ def stats(): engine_stats = engine_stats, engine_reliabilities = engine_reliabilities, selected_engine_name = selected_engine_name, - searx_git_branch = GIT_BRANCH, technical_report = technical_report, # fmt: on ) diff --git a/tests/robot/settings_robot.yml b/tests/robot/settings_robot.yml index de5087e06..b098d95d1 100644 --- a/tests/robot/settings_robot.yml +++ b/tests/robot/settings_robot.yml @@ -4,7 +4,6 @@ general: brand: issue_url: https://github.com/searxng/searxng/issues - new_issue_url: https://github.com/searxng/searxng/issues/new docs_url: https://docs.searxng.org public_instances: https://searx.space wiki_url: https://github.com/searxng/searxng/wiki |
