Spaces:
Running
Running
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sentinel Core - Reporting & Analytics</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| </head> | |
| <body class="bg-slate-900 text-slate-200 font-sans antialiased h-screen flex flex-col overflow-hidden"> | |
| <sentinel-navbar></sentinel-navbar> | |
| <!-- Main Content --> | |
| <main class="flex-1 flex flex-col lg:flex-row overflow-hidden"> | |
| <!-- Sidebar: Filtres et Périodes --> | |
| <aside class="w-full lg:w-64 bg-slate-800 border-r border-slate-700 flex flex-col overflow-y-auto"> | |
| <div class="p-4 border-b border-slate-700"> | |
| <h2 class="text-xs font-bold uppercase tracking-wider text-cyan-400 mb-4">Période d'analyse</h2> | |
| <div class="space-y-2"> | |
| <button onclick="window.setPeriod('24h', this)" class="period-btn w-full text-left px-3 py-2 rounded text-sm bg-cyan-600 text-white transition">24 Heures</button> | |
| <button onclick="window.setPeriod('7d', this)" class="period-btn w-full text-left px-3 py-2 rounded text-sm text-slate-400 hover:bg-slate-700 transition">7 Jours</button> | |
| <button onclick="window.setPeriod('30d', this)" class="period-btn w-full text-left px-3 py-2 rounded text-sm text-slate-400 hover:bg-slate-700 transition">30 Jours</button> | |
| <button onclick="window.setPeriod('custom', this)" class="period-btn w-full text-left px-3 py-2 rounded text-sm text-slate-400 hover:bg-slate-700 transition">Personnalisé</button> | |
| </div> | |
| </div> | |
| <div class="p-4 border-b border-slate-700"> | |
| <h2 class="text-xs font-bold uppercase tracking-wider text-cyan-400 mb-4">Métriques</h2> | |
| <div class="space-y-2"> | |
| <label class="flex items-center gap-2 p-2 rounded hover:bg-slate-700 cursor-pointer"> | |
| <input type="checkbox" checked class="rounded border-slate-600 bg-slate-700 text-cyan-500"> | |
| <span class="text-sm text-slate-300">Détection d'objets</span> | |
| </label> | |
| <label class="flex items-center gap-2 p-2 rounded hover:bg-slate-700 cursor-pointer"> | |
| <input type="checkbox" checked class="rounded border-slate-600 bg-slate-700 text-cyan-500"> | |
| <span class="text-sm text-slate-300">Démarque inconnue</span> | |
| </label> | |
| <label class="flex items-center gap-2 p-2 rounded hover:bg-slate-700 cursor-pointer"> | |
| <input type="checkbox" class="rounded border-slate-600 bg-slate-700 text-cyan-500"> | |
| <span class="text-sm text-slate-300">Fréquentation client</span> | |
| </label> | |
| <label class="flex items-center gap-2 p-2 rounded hover:bg-slate-700 cursor-pointer"> | |
| <input type="checkbox" class="rounded border-slate-600 bg-slate-700 text-cyan-500"> | |
| <span class="text-sm text-slate-300">Anomalies techniques</span> | |
| </label> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <h2 class="text-xs font-bold uppercase tracking-wider text-cyan-400 mb-4">Export</h2> | |
| <button onclick="exportReport('pdf')" class="w-full bg-slate-700 hover:bg-slate-600 text-slate-300 px-3 py-2 rounded text-sm mb-2 flex items-center gap-2 transition"> | |
| <i data-feather="file-text" class="w-4 h-4"></i> Rapport PDF | |
| </button> | |
| <button onclick="exportReport('csv')" class="w-full bg-slate-700 hover:bg-slate-600 text-slate-300 px-3 py-2 rounded text-sm flex items-center gap-2 transition"> | |
| <i data-feather="download" class="w-4 h-4"></i> Données CSV | |
| </button> | |
| </div> | |
| </aside> | |
| <!-- Dashboard Content --> | |
| <section class="flex-1 bg-slate-900 overflow-y-auto p-6"> | |
| <header class="mb-6 flex justify-between items-center"> | |
| <div> | |
| <h1 class="text-2xl font-bold text-white">Tableau de Bord Analytics</h1> | |
| <p class="text-slate-400 text-sm mt-1">Analyse prédictive et détection d'anomalies IA</p> | |
| </div> | |
| <div class="flex gap-3"> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 flex items-center gap-2"> | |
| <i data-feather="calendar" class="w-4 h-4 text-slate-400"></i> | |
| <span class="text-sm text-slate-300" id="currentPeriod">Dernières 24 heures</span> | |
| </div> | |
| <button onclick="window.refreshData(this)" class="bg-cyan-600 hover:bg-cyan-500 text-white px-4 py-2 rounded-lg text-sm flex items-center gap-2 transition"> | |
| <i data-feather="refresh-cw" class="w-4 h-4"></i> Actualiser | |
| </button> | |
| </div> | |
| </header> | |
| <!-- KPI Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6"> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <div class="text-xs text-slate-500 uppercase">Alertes Démarque</div> | |
| <span class="text-red-400 bg-red-400/10 px-2 py-1 rounded text-xs">+12%</span> | |
| </div> | |
| <div class="text-2xl font-bold text-white" id="kpi-alerts">47</div> | |
| <div class="text-xs text-slate-400 mt-1">vs 42 hier</div> | |
| </div> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <div class="text-xs text-slate-500 uppercase">Précision IA</div> | |
| <span class="text-green-400 bg-green-400/10 px-2 py-1 rounded text-xs">+2.4%</span> | |
| </div> | |
| <div class="text-2xl font-bold text-white" id="kpi-accuracy">98.2%</div> | |
| <div class="text-xs text-slate-400 mt-1">Taux de confiance moyen</div> | |
| </div> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <div class="text-xs text-slate-500 uppercase">Objets Traqués</div> | |
| <span class="text-cyan-400 bg-cyan-400/10 px-2 py-1 rounded text-xs">+856</span> | |
| </div> | |
| <div class="text-2xl font-bold text-white" id="kpi-tracked">12,458</div> | |
| <div class="text-xs text-slate-400 mt-1">Articles suivis aujourd'hui</div> | |
| </div> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <div class="text-xs text-slate-500 uppercase">Temps Réponse</div> | |
| <span class="text-green-400 bg-green-400/10 px-2 py-1 rounded text-xs">-18%</span> | |
| </div> | |
| <div class="text-2xl font-bold text-white" id="kpi-response">2.4s</div> | |
| <div class="text-xs text-slate-400 mt-1">Moyenne de détection</div> | |
| </div> | |
| </div> | |
| <!-- Charts Grid --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"> | |
| <!-- Detection Timeline --> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <h3 class="text-sm font-bold text-slate-300 mb-4 flex items-center gap-2"> | |
| <i data-feather="activity" class="w-4 h-4 text-cyan-400"></i> | |
| Timeline des Détections | |
| </h3> | |
| <canvas id="detectionChart" height="250"></canvas> | |
| </div> | |
| <!-- Zone Activity --> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <h3 class="text-sm font-bold text-slate-300 mb-4 flex items-center gap-2"> | |
| <i data-feather="map" class="w-4 h-4 text-amber-400"></i> | |
| Activité par Zone | |
| </h3> | |
| <canvas id="zoneChart" height="250"></canvas> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> | |
| <!-- Alert Types --> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4"> | |
| <h3 class="text-sm font-bold text-slate-300 mb-4">Types d'Alertes</h3> | |
| <canvas id="alertTypeChart" height="200"></canvas> | |
| </div> | |
| <!-- Top Risk Articles --> | |
| <div class="bg-slate-800 border border-slate-700 rounded-lg p-4 lg:col-span-2"> | |
| <h3 class="text-sm font-bold text-slate-300 mb-4 flex items-center gap-2"> | |
| <i data-feather="alert-triangle" class="w-4 h-4 text-red-400"></i> | |
| Articles à Haut Risque | |
| </h3> | |
| <div class="overflow-x-auto"> | |
| <table class="w-full text-sm text-left text-slate-400"> | |
| <thead class="text-xs text-slate-500 uppercase bg-slate-900/50"> | |
| <tr> | |
| <th class="px-4 py-2 rounded-l">Article ID</th> | |
| <th class="px-4 py-2">Zone</th> | |
| <th class="px-4 py-2">Risque</th> | |
| <th class="px-4 py-2">Dernière Activité</th> | |
| <th class="px-4 py-2 rounded-r">Action</th> | |
| </tr> | |
| </thead> | |
| <tbody id="riskTable"> | |
| <tr class="border-b border-slate-700 hover:bg-slate-700/50 transition"> | |
| <td class="px-4 py-3 font-mono text-cyan-400">ART-892</td> | |
| <td class="px-4 py-3">Rayon Électronique</td> | |
| <td class="px-4 py-3"><span class="bg-red-500/20 text-red-400 px-2 py-1 rounded text-xs">Critique</span></td> | |
| <td class="px-4 py-3">Il y a 2 min</td> | |
| <td class="px-4 py-3"><button class="text-cyan-400 hover:text-cyan-300 text-xs">Investiguer</button></td> | |
| </tr> | |
| <tr class="border-b border-slate-700 hover:bg-slate-700/50 transition"> | |
| <td class="px-4 py-3 font-mono text-cyan-400">ART-445</td> | |
| <td class="px-4 py-3">Réserve</td> | |
| <td class="px-4 py-3"><span class="bg-amber-500/20 text-amber-400 px-2 py-1 rounded text-xs">Élevé</span></td> | |
| <td class="px-4 py-3">Il y a 15 min</td> | |
| <td class="px-4 py-3"><button class="text-cyan-400 hover:text-cyan-300 text-xs">Investiguer</button></td> | |
| </tr> | |
| <tr class="hover:bg-slate-700/50 transition"> | |
| <td class="px-4 py-3 font-mono text-cyan-400">ART-112</td> | |
| <td class="px-4 py-3">Sortie</td> | |
| <td class="px-4 py-3"><span class="bg-amber-500/20 text-amber-400 px-2 py-1 rounded text-xs">Élevé</span></td> | |
| <td class="px-4 py-3">Il y a 42 min</td> | |
| <td class="px-4 py-3"><button class="text-cyan-400 hover:text-cyan-300 text-xs">Investiguer</button></td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <script src="components/navbar.js"></script> | |
| <script src="reporting.js"></script> | |
| <script>feather.replace();</script> | |
| </body> | |
| </html> |