mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
Fix frontend
This commit is contained in:
+10
-10
@@ -10,13 +10,13 @@ Non effettuare test da Browser, ci penso io
|
||||
|
||||
Questi i container:
|
||||
|
||||
pecflow-worker-1
|
||||
pecflow-frontend-1
|
||||
pecflow-backend-1
|
||||
pecflow-nginx-1
|
||||
pecflow-db-1
|
||||
pecflow-redis-1
|
||||
pecflow-minio-1
|
||||
pechub-worker-1
|
||||
pechub-frontend-1
|
||||
pechub-backend-1
|
||||
pechub-nginx-1
|
||||
pechub-db-1
|
||||
pechub-redis-1
|
||||
pechub-minio-1
|
||||
|
||||
Queste le caselle PEC e i loro parametri IMAP/SMTP che puoi usare per test, non effettuare invii per adesso
|
||||
|
||||
@@ -36,7 +36,7 @@ Tutto il frontend deve essere in italiano
|
||||
|
||||
Credenziali admin
|
||||
Ruolo Email Password
|
||||
Super Admin superadmin@pecflow.it SuperAdmin@PecFlow2026!
|
||||
Admin (tenant demo) admin@demo.pecflow.it Demo@PecFlow2026!
|
||||
Operator (tenant demo) operator@demo.pecflow.it Oper@PecFlow2026!
|
||||
Super Admin superadmin@pechub.it SuperAdmin@PEChub2026!
|
||||
Admin (tenant demo) admin@demo.pechub.it Demo@PEChub2026!
|
||||
Operator (tenant demo) operator@demo.pechub.it Oper@PEChub2026!
|
||||
Per accedere all'applicazione usa le credenziali Admin del tenant demo.
|
||||
@@ -94,7 +94,7 @@ async def send_message(
|
||||
async def send_test_message(
|
||||
bot_token: str,
|
||||
chat_id: str,
|
||||
channel_name: str = "PecFlow",
|
||||
channel_name: str = "PEChub",
|
||||
) -> dict:
|
||||
"""
|
||||
Invia un messaggio di test formattato al canale configurato.
|
||||
@@ -106,7 +106,7 @@ async def send_test_message(
|
||||
|
||||
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
text = (
|
||||
f"✅ <b>PecFlow – Test canale Telegram</b>\n\n"
|
||||
f"✅ <b>PEChub – Test canale Telegram</b>\n\n"
|
||||
f"Il canale <b>{channel_name}</b> è configurato correttamente.\n\n"
|
||||
f"🕐 <i>{ts}</i>"
|
||||
)
|
||||
|
||||
@@ -10,12 +10,12 @@ Testa:
|
||||
4. Test via NotificationService.test_channel (flusso completo)
|
||||
|
||||
Eseguire DENTRO il container backend:
|
||||
docker exec pecflow-backend-1 python \
|
||||
docker exec pechub-backend-1 python \
|
||||
/app/tests/integration/test_telegram_real.py
|
||||
|
||||
Oppure specificando credenziali manuali via env:
|
||||
docker exec -e TELEGRAM_BOT_TOKEN=xxx -e TELEGRAM_CHAT_ID=-100yyy \
|
||||
pecflow-backend-1 python /app/tests/integration/test_telegram_real.py
|
||||
pechub-backend-1 python /app/tests/integration/test_telegram_real.py
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
@@ -28,7 +28,7 @@ from datetime import datetime
|
||||
# ─── Variabili d'ambiente ─────────────────────────────────────────────────────
|
||||
os.environ.setdefault("ENCRYPTION_KEY", "6465762d656e6372797074696f6e2d6b65792d6e6f742d666f722d70726f6400")
|
||||
os.environ.setdefault("SECRET_KEY", "dev-secret-key-not-for-production-use-only-for-local-0000000000000")
|
||||
os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://pecflow:pecflow_dev_password@db:5432/pecflow")
|
||||
os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://pechub:pechub_dev_password@db:5432/pechub")
|
||||
os.environ.setdefault("REDIS_URL", "redis://redis:6379/0")
|
||||
os.environ.setdefault("MINIO_ENDPOINT", "minio:9000")
|
||||
|
||||
@@ -41,7 +41,7 @@ def _sep(char: str = "─", width: int = 60) -> None:
|
||||
|
||||
def _banner(bot_token_masked: str, chat_id: str) -> None:
|
||||
_sep("═")
|
||||
print(" PecFlow – Test Telegram Reale")
|
||||
print(" PEChub – Test Telegram Reale")
|
||||
_sep("═")
|
||||
print(f" Timestamp : {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
print(f" Bot Token : {bot_token_masked}")
|
||||
@@ -145,7 +145,7 @@ async def test_direct_send(bot_token: str, chat_id: str) -> bool:
|
||||
|
||||
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
text = (
|
||||
f"🧪 <b>PecFlow – Test integrazione</b>\n\n"
|
||||
f"🧪 <b>PEChub – Test integrazione</b>\n\n"
|
||||
f"Test invio diretto via <code>send_message()</code>\n\n"
|
||||
f"🕐 <i>{ts}</i>"
|
||||
)
|
||||
@@ -201,14 +201,14 @@ async def test_send_test_message(bot_token: str, chat_id: str) -> bool:
|
||||
|
||||
from app.notifications.telegram import TelegramError, send_test_message
|
||||
|
||||
print(" Chiamata: send_test_message(channel_name='Test PecFlow')")
|
||||
print(" Chiamata: send_test_message(channel_name='Test PEChub')")
|
||||
print()
|
||||
|
||||
try:
|
||||
result = await send_test_message(
|
||||
bot_token=bot_token,
|
||||
chat_id=chat_id,
|
||||
channel_name="Test PecFlow",
|
||||
channel_name="Test PEChub",
|
||||
)
|
||||
msg_id = result.get("message_id")
|
||||
print(f" ✅ INVIO OK – message_id={msg_id}")
|
||||
|
||||
Reference in New Issue
Block a user