From 360a794b8e9a9e51d18675b0f7f507593aeed4d2 Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 7 Aug 2024 16:50:38 +0300 Subject: [PATCH 1/6] added link for bug reports --- app/server.py | 4 +++- app/templates/intro_page.html | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/server.py b/app/server.py index b8dbc5b7..ef8a82ce 100644 --- a/app/server.py +++ b/app/server.py @@ -51,6 +51,7 @@ app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER app.config['CELERY_RESULT_BACKEND'] = os.environ.get("CELERY_RESULT_BACKEND", "redis://localhost:6379") app.config['CELERY_BROKER_URL'] = os.environ.get("CELERY_BROKER_URL", "redis://localhost:6379") +app.config['LINK_FOR_BUGS_REPORT'] = os.environ.get("LINK_FOR_BUGS_REPORT", f"") #here should be a link for bugs report app.register_blueprint(admin, url_prefix='/admin') app.register_blueprint(users, url_prefix='/users') @@ -720,7 +721,8 @@ def default(): if current_user.is_authenticated: return redirect(url_for("upload")) else: - return render_template("intro_page.html") + link_for_bugs_report = app.config['LINK_FOR_BUGS_REPORT'] + return render_template("intro_page.html", link_for_bugs_report=link_for_bugs_report) # Disable caching: diff --git a/app/templates/intro_page.html b/app/templates/intro_page.html index b47ee953..c2f62a1b 100644 --- a/app/templates/intro_page.html +++ b/app/templates/intro_page.html @@ -13,10 +13,14 @@

Добро пожаловать в Document Insight System

-

Для использования системы вам необходимо перейти из курса на +

Для использования системы вам необходимо перейти из курса на
https://e.moevm.info/

+ + {% endblock %} From 3a11a6c457574bed00f100170dcaa1d6bb9bd3b1 Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 7 Aug 2024 17:53:39 +0300 Subject: [PATCH 2/6] try ti fix actions --- .github/workflows/selenium_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/selenium_tests.yml b/.github/workflows/selenium_tests.yml index a31e1253..26796bc1 100644 --- a/.github/workflows/selenium_tests.yml +++ b/.github/workflows/selenium_tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build docker-compose with docker-compose-selenium (tests) run: | From 380f8113327a36a3cf9afbc8623c581d02e61b91 Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 7 Aug 2024 18:13:09 +0300 Subject: [PATCH 3/6] change spell docker-compose --- .github/workflows/selenium_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/selenium_tests.yml b/.github/workflows/selenium_tests.yml index 26796bc1..9c30bb76 100644 --- a/.github/workflows/selenium_tests.yml +++ b/.github/workflows/selenium_tests.yml @@ -13,11 +13,11 @@ jobs: run: | cp .env_example .env cp app/VERSION_example.json app/VERSION.json - docker-compose -f docker-compose.yml -f docker-compose-selenium.yml build + docker compose -f docker-compose.yml -f docker-compose-selenium.yml build - name: Run docker-compose with docker-compose-selenium (tests) run: | - docker-compose -f docker-compose.yml -f docker-compose-selenium.yml up -d + docker compose -f docker-compose.yml -f docker-compose-selenium.yml up -d chmod +x tests/scripts/docker_check_tests.sh ./tests/scripts/docker_check_tests.sh From e541efe1f78eebf5dae9dcf0c8cd9278f26f206e Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 7 Aug 2024 18:19:09 +0300 Subject: [PATCH 4/6] change spelling in all docs --- tests/scripts/docker_check_tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scripts/docker_check_tests.sh b/tests/scripts/docker_check_tests.sh index 67deee05..b09d55f9 100755 --- a/tests/scripts/docker_check_tests.sh +++ b/tests/scripts/docker_check_tests.sh @@ -1,7 +1,7 @@ # !/bin/bash service="selenium-tests" -container_id=$(docker-compose -f docker-compose.yml -f docker-compose-selenium.yml ps -q $service) +container_id=$(docker compose -f docker-compose.yml -f docker-compose-selenium.yml ps -q $service) if [ -z "$container_id" ]; then echo "Контейнер сервиса $service не найден." @@ -17,11 +17,11 @@ echo "tests are finished" EXIT_CODE=$(docker inspect "$container_id" --format='{{.State.ExitCode}}') echo "tests logs:" -docker-compose -f docker-compose.yml -f docker-compose-selenium.yml logs selenium-tests +docker compose -f docker-compose.yml -f docker-compose-selenium.yml logs selenium-tests echo "web logs:" -docker-compose logs web +docker compose logs web echo "worker logs:" -docker-compose logs worker +docker compose logs worker if [ "$EXIT_CODE" -eq 0 ]; then echo "tests finished with code $EXIT_CODE (OK)" From 7207a942d17135525b202dbfecedad00d82697f2 Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 4 Sep 2024 17:24:08 +0300 Subject: [PATCH 5/6] links and support added --- app/server.py | 6 ++++-- app/templates/intro_page.html | 33 ++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/server.py b/app/server.py index 6b10b015..b25e7d00 100644 --- a/app/server.py +++ b/app/server.py @@ -51,7 +51,8 @@ app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER app.config['CELERY_RESULT_BACKEND'] = os.environ.get("CELERY_RESULT_BACKEND", "redis://localhost:6379") app.config['CELERY_BROKER_URL'] = os.environ.get("CELERY_BROKER_URL", "redis://localhost:6379") -app.config['LINK_FOR_BUGS_REPORT'] = os.environ.get("LINK_FOR_BUGS_REPORT", f"") #here should be a link for bugs report +app.config['LINK_FOR_BUGS_REPORT'] = os.environ.get("LINK_FOR_BUGS_REPORT", f"") +app.config['SUPPORT_MAIL'] = os.environ.get("SUPPORT_MAIL", f"support@moevm.info") app.register_blueprint(admin, url_prefix='/admin') app.register_blueprint(users, url_prefix='/users') @@ -730,7 +731,8 @@ def default(): return redirect(url_for("upload")) else: link_for_bugs_report = app.config['LINK_FOR_BUGS_REPORT'] - return render_template("intro_page.html", link_for_bugs_report=link_for_bugs_report) + support_mail = app.config['SUPPORT_MAIL'] + return render_template("intro_page.html", link_for_bugs_report=link_for_bugs_report, support_mail=support_mail) # Disable caching: diff --git a/app/templates/intro_page.html b/app/templates/intro_page.html index c2f62a1b..25a7116f 100644 --- a/app/templates/intro_page.html +++ b/app/templates/intro_page.html @@ -1,26 +1,29 @@ {# Accepts: header dependicies #} - {% extends "root.html" %} {% block title %}Главная страница{% endblock %} {% block main %} - -
-
-

Добро пожаловать в Document Insight System

-
-

Для использования системы вам необходимо перейти из курса на -
https://e.moevm.info/
-

+
+ +
+
+

Добро пожаловать в Document Insight System

+
+

Для использования системы вам необходимо перейти из курса на +
https://e.moevm.info/
+

+
+
+

Если вы обнаружили ошибку, пожалуйста, + сообщите здесь +
Адрес поддержки: {{ support_mail }} +

+
- - {% endblock %} From e2a1e5822d59bce4b93f28d90397cd0a78272f1c Mon Sep 17 00:00:00 2001 From: Marina Date: Fri, 20 Sep 2024 17:12:13 +0300 Subject: [PATCH 6/6] send constants to html directly --- app/server.py | 5 +---- app/templates/intro_page.html | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/server.py b/app/server.py index b25e7d00..11c652f3 100644 --- a/app/server.py +++ b/app/server.py @@ -730,10 +730,7 @@ def default(): if current_user.is_authenticated: return redirect(url_for("upload")) else: - link_for_bugs_report = app.config['LINK_FOR_BUGS_REPORT'] - support_mail = app.config['SUPPORT_MAIL'] - return render_template("intro_page.html", link_for_bugs_report=link_for_bugs_report, support_mail=support_mail) - + return render_template("intro_page.html") # Disable caching: diff --git a/app/templates/intro_page.html b/app/templates/intro_page.html index 25a7116f..0fa035d0 100644 --- a/app/templates/intro_page.html +++ b/app/templates/intro_page.html @@ -21,8 +21,8 @@

Добро пожаловать в Doc

Если вы обнаружили ошибку, пожалуйста, - сообщите здесь -
Адрес поддержки: {{ support_mail }} + сообщите здесь +
Адрес поддержки: {{ config.SUPPORT_MAIL }}