Commit 8ebc5827 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

Merge branch '81-show-backend' into 'master'

show Debug Info in error page

Closes #81

See merge request e/cloud/my-spot!101
parents dd485f0b 6ba87729
......@@ -10,4 +10,5 @@ SEARX_UI_DEFAULT_THEME=etheme
SEARX_PROXY_HTTP=socks5h://tor-socks-proxy:9150
SEARX_PROXY_HTTPS=socks5h://tor-socks-proxy:9150
FILTRON_PORT=8088
MORTY_PORT=8089
\ No newline at end of file
MORTY_PORT=8089
NODE_NAME=local
\ No newline at end of file
......@@ -12,4 +12,5 @@ SEARX_PROXY_HTTPS=http://proxy01.ecloud.global:1099
WIREGUARD_IP=127.0.0.1
FILTRON_PORT=8088
MORTY_PORT=8089
INTERNAL_NETWORK_NAME=default
\ No newline at end of file
INTERNAL_NETWORK_NAME=default
NODE_NAME=spot11
\ No newline at end of file
......@@ -89,6 +89,7 @@ deploy:spot.eeo.one.backend1:
SPOT_DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
SPOT_NGINX_DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
WIREGUARD_IP: ${BACKEND1_WG_IP}
NODE_NAME: ${NODE_NAME}
INTERNAL_NETWORK_NAME: staging-spot-default
FILTRON_PORT: 8088
MORTY_PORT: 8089
......@@ -130,6 +131,7 @@ deploy:spot.eeo.one.backend2:
SPOT_NGINX_DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
WIREGUARD_IP: ${BACKEND2_WG_IP}
INTERNAL_NETWORK_NAME: staging-spot-default
NODE_NAME: ${NODE_NAME}
FILTRON_PORT: 8088
MORTY_PORT: 8089
script:
......@@ -169,6 +171,7 @@ deploy:spot.ecloud.global.backend1:
SPOT_NGINX_DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
WIREGUARD_IP: ${BACKEND1_WG_IP}
INTERNAL_NETWORK_NAME: spot-default
NODE_NAME: ${NODE_NAME}
FILTRON_PORT: 8098
MORTY_PORT: 8099
script:
......@@ -208,6 +211,7 @@ deploy:spot.ecloud.global.backend2:
SPOT_NGINX_DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
WIREGUARD_IP: ${BACKEND2_WG_IP}
INTERNAL_NETWORK_NAME: spot-default
NODE_NAME: ${NODE_NAME}
FILTRON_PORT: 8098
MORTY_PORT: 8099
script:
......
......@@ -36,6 +36,7 @@ services:
SEARX_UI_DEFAULT_THEME: "${SEARX_UI_DEFAULT_THEME}"
GUNICORN_LOGGER: 1
GUNICORN_LEVEL: INFO
NODE_NAME: "${NODE_NAME}"
spot-nginx:
image: registry.gitlab.e.foundation:5000/e/cloud/my-spot/nginx:${SPOT_NGINX_DOCKER_TAG}
......
......@@ -31,6 +31,7 @@ services:
SEARX_UI_DEFAULT_THEME: "${SEARX_UI_DEFAULT_THEME}"
GUNICORN_LOGGER: 1
GUNICORN_LEVEL: INFO
NODE_NAME: ${NODE_NAME}
spot-nginx:
image: registry.gitlab.e.foundation:5000/e/cloud/my-spot/nginx:${SPOT_NGINX_DOCKER_TAG}
......
......@@ -9,6 +9,8 @@
<div id="unresponsive_engines" class="content-small-centered">
<section>
<p>{{ _('Some engines are not working as expected!') }}</p>
<p>{{ _('Debug info') }}</p>
<p><strong> {{ _('Node : ') }} {{ node_name }}</strong></p>
<pre>
{% for engine_name, error_type in unresponsive_engines %}
- {{ engine_name }} ({{ error_type }}){% if not loop.last %}<br/>{% endif %}
......
......@@ -754,6 +754,7 @@ def search():
engine_data=result_container.engine_data,
paging=result_container.paging,
unresponsive_engines=__get_translated_errors(result_container.unresponsive_engines),
node_name=__get_node_name(),
current_language=match_language(search_query.lang,
LANGUAGE_CODES,
fallback=request.preferences.get_value("language")),
......@@ -778,6 +779,10 @@ def __get_translated_errors(unresponsive_engines):
return translated_errors
def __get_node_name():
return os.getenv("NODE_NAME", None)
@app.route('/about', methods=['GET'])
def about():
"""Render about page"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment