From 0249b9eda9ee32898a7e250f819a7bde117cfeb6 Mon Sep 17 00:00:00 2001 From: Luftmensch Date: Thu, 3 Sep 2026 16:27:05 +0700 Subject: [PATCH] feat: add optional dev mode and analyzer tool upload role --- Dockerfile | 2 +- app/templates/admin_tools.html | 21 ++++++++++---- app/templates/index.html | 2 +- app/web_app_fastapi.py | 53 ++++++++++++++++++++++++++++++---- docker-compose.yml | 3 ++ 5 files changed, 68 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7dee11e..1cec492 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ EXPOSE 8000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ - CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/', timeout=5)" || exit 1 + CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8888/', timeout=5)" || exit 1 # Set entrypoint ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/app/templates/admin_tools.html b/app/templates/admin_tools.html index c322346..2a4c73a 100644 --- a/app/templates/admin_tools.html +++ b/app/templates/admin_tools.html @@ -290,7 +290,7 @@ style="padding: 10px 20px; background: var(--card-bg); color: var(--text-main); text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 14px; transition: all 0.3s ease; border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05);">🏠 Trang chủ 📁 File của tôi - {% if user_info and user_info.role == 'admin' %} + {% if user_info and user_info.role in ['admin', 'analyzer'] %} ⚙️ Quản trị {% endif %} @@ -403,11 +403,13 @@
⬇️ Tải + {% if user_info and user_info.role == 'admin' %}
+ {% endif %}
{% else %} - @@ -425,6 +427,7 @@ {% endif %} + {% if user_info and user_info.role == 'admin' %}
@@ -516,6 +519,9 @@ {% endif %}
+ {% endif %} + + {% if user_info and user_info.role == 'admin' %}
@@ -583,6 +589,9 @@
+ {% endif %} + + {% if user_info and user_info.role == 'admin' %}
@@ -623,15 +632,17 @@
{% endif %}
+ {% endif %}