Files
rpa_vision_v3/test_dashboard_api_current.py
Dom a27b74cf22 v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40)
- Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard)
- Ollama GPU fonctionnel
- Self-healing interactif
- Dashboard confiance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:23:51 +01:00

37 lines
1.3 KiB
Python

#!/usr/bin/env python3
"""Test de l'API dashboard actuelle pour diagnostiquer le problème"""
import requests
import json
def test_dashboard_api():
base_url = "http://127.0.0.1:5001"
print("🧪 Test de l'API Dashboard")
print("=" * 50)
# Test Sessions API
try:
response = requests.get(f"{base_url}/api/agent/sessions", timeout=5)
print(f"✅ Sessions API: {response.status_code}")
if response.status_code == 200:
data = response.json()
sessions = data.get('sessions', [])
total = data.get('total', 0)
print(f" Total sessions: {total}")
if total == 0:
print(" ⚠️ PROBLÈME: Aucune session trouvée par l'API")
print(" 📝 Cause: Dashboard utilise l'ancienne version du code")
print(" 🔧 Solution: Redémarrer avec la version corrigée")
else:
print(" 📋 Sessions trouvées:")
for session in sessions[:5]:
print(f"{session.get('session_id', 'N/A')}")
else:
print(f" ❌ Erreur API: {response.text}")
except Exception as e:
print(f"❌ Sessions API failed: {e}")
if __name__ == "__main__":
test_dashboard_api()