messiahx / index.html
wako13's picture
Add 2 files
58d8e39 verified
Raw History Blame Contribute Delete
85 kB
<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MeSSiahX - Analyse de Tendances Avancée</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .gradient-bg { background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%); } .sidebar-item:hover { background-color: rgba(255, 255, 255, 0.1); transform: translateX(5px); transition: all 0.3s ease; } .pulse-animation { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } } .fade-in { animation: fadeIn 0.5s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .terminal { background-color: #1a1a1a; color: #00ff00; font-family: 'Courier New', monospace; border-radius: 0.5rem; padding: 1rem; height: 300px; overflow-y: auto; } .terminal::-webkit-scrollbar { width: 5px; } .terminal::-webkit-scrollbar-thumb { background-color: #4f46e5; border-radius: 10px; } .tab-content { display: none; } .tab-content.active { display: block; animation: fadeIn 0.3s ease-in; } .tab-button { transition: all 0.3s ease; } .tab-button.active { background-color: rgba(59, 130, 246, 0.1); border-left: 3px solid #3b82f6; } .source-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); } .security-level { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%); } .security-indicator { width: 0%; height: 100%; border-radius: 4px; background-color: #3b82f6; transition: width 0.5s ease; } </style> </head> <body class="bg-gray-100 font-sans"> <div class="flex h-screen overflow-hidden"> <!-- Sidebar --> <div class="hidden md:flex md:flex-shrink-0"> <div class="flex flex-col w-64 gradient-bg text-white"> <div class="flex items-center justify-center h-16 px-4 border-b border-blue-800"> <div class="flex items-center space-x-2"> <i class="fas fa-brain text-2xl text-blue-300"></i> <span class="text-xl font-bold">MeSSiahX</span> </div> </div> <div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto"> <div class="space-y-1"> <div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center active" data-tab="dashboard"> <i class="fas fa-home mr-3"></i> <span>Dashboard</span> </div> <div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center" data-tab="analyse"> <i class="fas fa-chart-line mr-3"></i> <span>Analyse</span> </div> <div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center" data-tab="sources"> <i class="fas fa-database mr-3"></i> <span>Sources</span> </div> <div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center" data-tab="security"> <i class="fas fa-key mr-3"></i> <span>Sécurité</span> </div> <div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center" data-tab="settings"> <i class="fas fa-cog mr-3"></i> <span>Paramètres</span> </div> </div> <div class="mt-auto mb-4"> <div class="bg-blue-900 bg-opacity-30 p-4 rounded-lg"> <div class="flex items-center"> <div class="h-10 w-10 rounded-full bg-blue-500 flex items-center justify-center"> <i class="fas fa-user"></i> </div> <div class="ml-3"> <p class="text-sm font-medium">Administrateur</p> <p class="text-xs text-blue-200">Connecté</p> </div> </div> </div> </div> </div> </div> </div> <!-- Main content --> <div class="flex flex-col flex-1 overflow-hidden"> <!-- Top navigation --> <div class="flex items-center justify-between h-16 px-6 bg-white border-b border-gray-200"> <div class="flex items-center"> <button class="md:hidden text-gray-500 focus:outline-none" id="mobileMenuButton"> <i class="fas fa-bars"></i> </button> <div class="relative ml-4"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <i class="fas fa-search text-gray-400"></i> </div> <input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" placeholder="Rechercher..."> </div> </div> <div class="flex items-center space-x-4"> <button class="p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none"> <i class="fas fa-bell"></i> </button> <button class="p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none"> <i class="fas fa-question-circle"></i> </button> <div class="relative"> <button class="flex items-center space-x-2 focus:outline-none"> <div class="h-8 w-8 rounded-full bg-blue-500 flex items-center justify-center text-white"> <i class="fas fa-user"></i> </div> <span class="text-sm font-medium">Admin</span> </button> </div> </div> </div> <!-- Content --> <div class="flex-1 overflow-auto p-6"> <!-- Dashboard Tab --> <div id="dashboard" class="tab-content active"> <div class="mb-6"> <h1 class="text-3xl font-bold text-gray-800">Analyse de Tendances Avancée</h1> <p class="text-gray-600">Système d'analyse et de prédiction des tendances en temps réel</p> </div> <!-- Stats Cards --> <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6"> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Cycles</p> <p class="text-2xl font-semibold text-gray-800" id="cycleCount">0</p> </div> <div class="p-3 rounded-full bg-blue-100 text-blue-600"> <i class="fas fa-sync-alt"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Perte</p> <p class="text-2xl font-semibold text-gray-800" id="lossValue">0.0000</p> </div> <div class="p-3 rounded-full bg-green-100 text-green-600"> <i class="fas fa-chart-line"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Sources</p> <p class="text-2xl font-semibold text-gray-800" id="sourceCount">10</p> </div> <div class="p-3 rounded-full bg-purple-100 text-purple-600"> <i class="fas fa-database"></i> </div> </div> </div> <div class="bg-white rounded-lg shadow p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Sécurité</p> <p class="text-2xl font-semibold text-gray-800" id="securityStatus">Active</p> </div> <div class="p-3 rounded-full bg-red-100 text-red-600"> <i class="fas fa-shield-alt"></i> </div> </div> </div> </div> <!-- Main Content Area --> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> <!-- Left Column --> <div class="lg:col-span-2 space-y-6"> <!-- Control Panel --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Contrôle du Système</h2> </div> <div class="p-6"> <div class="mb-4"> <label for="searchQuery" class="block text-sm font-medium text-gray-700 mb-2">Instruction de recherche</label> <div class="flex space-x-2"> <input type="text" id="searchQuery" class="flex-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" value="explore random data"> <button id="runBtn" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> <i class="fas fa-play mr-2"></i> Lancer </button> <button id="stopBtn" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"> <i class="fas fa-stop mr-2"></i> Arrêter </button> </div> </div> <div class="flex space-x-2"> <button id="exportBtn" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> <i class="fas fa-file-export mr-2"></i> Exporter Rapport </button> <button id="discoverBtn" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"> <i class="fas fa-search-plus mr-2"></i> Découvrir Sources </button> </div> </div> </div> <!-- Performance Chart --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Performance du Modèle</h2> </div> <div class="p-6"> <canvas id="performanceChart" height="200"></canvas> </div> </div> </div> <!-- Right Column --> <div class="space-y-6"> <!-- Trends Panel --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Tendances Détectées</h2> </div> <div class="p-6"> <div id="trendsContainer" class="space-y-4"> <div class="fade-in"> <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3"> <i class="fas fa-project-diagram"></i> </div> <h3 class="font-medium">Cluster 0</h3> </div> <div class="mt-2 pl-11"> <div class="flex flex-wrap gap-2"> <span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">data</span> <span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">analysis</span> <span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded-full">trends</span> </div> </div> </div> <div class="fade-in"> <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-green-100 text-green-600 flex items-center justify-center mr-3"> <i class="fas fa-project-diagram"></i> </div> <h3 class="font-medium">Cluster 1</h3> </div> <div class="mt-2 pl-11"> <div class="flex flex-wrap gap-2"> <span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">security</span> <span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">encryption</span> <span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">keys</span> </div> </div> </div> </div> </div> </div> <!-- System Log --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <div class="flex items-center justify-between"> <h2 class="text-lg font-medium text-gray-800">Journal du Système</h2> <button id="clearLogBtn" class="text-sm text-gray-500 hover:text-gray-700"> <i class="fas fa-trash-alt mr-1"></i> Effacer </button> </div> </div> <div class="p-4"> <div class="terminal"> <div class="text-green-400">> Initialisation du système MeSSiahX...</div> <div class="text-green-400">> Chargement des sources de données...</div> <div class="text-green-400">> 10 sources chargées avec succès</div> <div class="text-green-400">> Module de chiffrement activé</div> <div class="text-green-400">> Prêt à lancer l'analyse</div> </div> </div> </div> </div> </div> </div> <!-- Analyse Tab --> <div id="analyse" class="tab-content"> <div class="mb-6"> <h1 class="text-3xl font-bold text-gray-800">Analyse Avancée</h1> <p class="text-gray-600">Visualisation des données et modèles d'apprentissage</p> </div> <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> <!-- Model Visualization --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Visualisation du Modèle</h2> </div> <div class="p-6"> <div class="flex justify-center items-center h-64 bg-gray-50 rounded-lg"> <div class="text-center"> <i class="fas fa-project-diagram text-4xl text-blue-500 mb-2"></i> <p class="text-gray-500">Architecture du réseau de neurones</p> </div> </div> <div class="mt-4 grid grid-cols-3 gap-4"> <div class="bg-blue-50 p-3 rounded-lg text-center"> <p class="text-sm text-gray-500">Couches</p> <p class="font-semibold">3</p> </div> <div class="bg-green-50 p-3 rounded-lg text-center"> <p class="text-sm text-gray-500">Neurones</p> <p class="font-semibold">194</p> </div> <div class="bg-purple-50 p-3 rounded-lg text-center"> <p class="text-sm text-gray-500">Paramètres</p> <p class="font-semibold">25,344</p> </div> </div> </div> </div> <!-- Data Clusters --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Clusters de Données</h2> </div> <div class="p-6"> <div class="flex justify-center items-center h-64 bg-gray-50 rounded-lg"> <canvas id="clusterChart" height="200"></canvas> </div> <div class="mt-4"> <div class="flex items-center justify-between mb-2"> <span class="text-sm font-medium text-gray-700">Cluster 0</span> <span class="text-sm font-medium text-blue-600">42%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-blue-600 h-2 rounded-full" style="width: 42%"></div> </div> </div> <div class="mt-4"> <div class="flex items-center justify-between mb-2"> <span class="text-sm font-medium text-gray-700">Cluster 1</span> <span class="text-sm font-medium text-green-600">58%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-green-600 h-2 rounded-full" style="width: 58%"></div> </div> </div> </div> </div> <!-- Training Metrics --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-2"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Métriques d'Entraînement</h2> </div> <div class="p-6"> <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> <div class="bg-white border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Précision</p> <p class="text-2xl font-semibold">0.92</p> </div> <div class="p-2 rounded-full bg-green-100 text-green-600"> <i class="fas fa-check-circle"></i> </div> </div> <div class="mt-2"> <div class="w-full bg-gray-200 rounded-full h-1"> <div class="bg-green-500 h-1 rounded-full" style="width: 92%"></div> </div> </div> </div> <div class="bg-white border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">Rappel</p> <p class="text-2xl font-semibold">0.87</p> </div> <div class="p-2 rounded-full bg-yellow-100 text-yellow-600"> <i class="fas fa-exclamation-circle"></i> </div> </div> <div class="mt-2"> <div class="w-full bg-gray-200 rounded-full h-1"> <div class="bg-yellow-500 h-1 rounded-full" style="width: 87%"></div> </div> </div> </div> <div class="bg-white border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500">F1-Score</p> <p class="text-2xl font-semibold">0.89</p> </div> <div class="p-2 rounded-full bg-blue-100 text-blue-600"> <i class="fas fa-chart-bar"></i> </div> </div> <div class="mt-2"> <div class="w-full bg-gray-200 rounded-full h-1"> <div class="bg-blue-500 h-1 rounded-full" style="width: 89%"></div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- Sources Tab --> <div id="sources" class="tab-content"> <div class="mb-6"> <h1 class="text-3xl font-bold text-gray-800">Gestion des Sources</h1> <p class="text-gray-600">Configuration et analyse des sources de données</p> </div> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> <!-- Sources List --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-2"> <div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center"> <h2 class="text-lg font-medium text-gray-800">Sources Disponibles</h2> <button class="text-sm bg-blue-600 text-white px-3 py-1 rounded-md hover:bg-blue-700"> <i class="fas fa-plus mr-1"></i> Ajouter </button> </div> <div class="p-6"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="sourcesList"> <!-- Sources will be added here dynamically --> </div> </div> </div> <!-- Source Analysis --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Analyse des Sources</h2> </div> <div class="p-6"> <div class="flex justify-center items-center h-48 bg-gray-50 rounded-lg mb-4"> <canvas id="sourceChart" height="150"></canvas> </div> <div class="space-y-3"> <div> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">Qualité Moyenne</span> <span>78%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-green-500 h-2 rounded-full" style="width: 78%"></div> </div> </div> <div> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">Actualisation</span> <span>2.4h</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-blue-500 h-2 rounded-full" style="width: 65%"></div> </div> </div> <div> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">Pertinence</span> <span>84%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-purple-500 h-2 rounded-full" style="width: 84%"></div> </div> </div> </div> </div> </div> <!-- Add Source Form --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-3"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Ajouter une Nouvelle Source</h2> </div> <div class="p-6"> <form class="space-y-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">URL de la Source</label> <input type="text" class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" placeholder="https://example.com/data"> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Nom</label> <input type="text" class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" placeholder="Nom descriptif"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Type</label> <select class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm"> <option>API</option> <option>Web Scraping</option> <option>Base de données</option> <option>Fichier</option> </select> </div> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Description</label> <textarea class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" rows="3"></textarea> </div> <div class="flex justify-end"> <button type="button" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Annuler </button> <button type="submit" class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Enregistrer </button> </div> </form> </div> </div> </div> </div> <!-- Security Tab --> <div id="security" class="tab-content"> <div class="mb-6"> <h1 class="text-3xl font-bold text-gray-800">Sécurité du Système</h1> <p class="text-gray-600">Gestion du chiffrement et des accès</p> </div> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> <!-- Encryption Status --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">État du Chiffrement</h2> </div> <div class="p-6"> <div class="flex items-center justify-between mb-4"> <div> <p class="text-sm font-medium text-gray-500">Niveau de Sécurité</p> <p class="text-2xl font-semibold">Élevé</p> </div> <div class="p-3 rounded-full bg-green-100 text-green-600"> <i class="fas fa-lock"></i> </div> </div> <div class="security-level mb-2"> <div class="security-indicator" style="width: 85%"></div> </div> <p class="text-xs text-gray-500 text-right">85% - AES-256 avec GCM</p> <div class="mt-6 space-y-3"> <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-green-100 text-green-600 flex items-center justify-center mr-3"> <i class="fas fa-check"></i> </div> <div> <p class="text-sm font-medium">Chiffrement Actif</p> <p class="text-xs text-gray-500">Toutes les données sont chiffrées</p> </div> </div> <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-green-100 text-green-600 flex items-center justify-center mr-3"> <i class="fas fa-check"></i> </div> <div> <p class="text-sm font-medium">Clés Rotatives</p> <p class="text-xs text-gray-500">Mutation automatique toutes les 5 cycles</p> </div> </div> <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3"> <i class="fas fa-sync-alt"></i> </div> <div> <p class="text-sm font-medium">Dernière Mutation</p> <p class="text-xs text-gray-500">Il y a 12 minutes</p> </div> </div> </div> </div> </div> <!-- Key Management --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Gestion des Clés</h2> </div> <div class="p-6"> <div class="mb-4"> <label class="block text-sm font-medium text-gray-700 mb-2">Clé Actuelle</label> <div class="flex"> <input type="text" class="flex-1 block w-full rounded-l-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" value="a3Bk...WJqZ" readonly> <button class="inline-flex items-center px-3 py-2 border border-l-0 border-gray-300 rounded-r-md bg-gray-50 text-gray-500 hover:bg-gray-100"> <i class="fas fa-copy"></i> </button> </div> </div> <div class="space-y-3"> <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> <i class="fas fa-redo mr-2"></i> Régénérer la Clé </button> <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"> <i class="fas fa-key mr-2"></i> Exporter la Clé </button> <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> <i class="fas fa-history mr-2"></i> Historique des Clés </button> </div> <div class="mt-6"> <label class="block text-sm font-medium text-gray-700 mb-2">Nouvelle Clé Manuelle</label> <textarea class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" rows="3" placeholder="Coller une nouvelle clé..."></textarea> <button class="mt-2 w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> <i class="fas fa-save mr-2"></i> Enregistrer </button> </div> </div> </div> <!-- Access Control --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-1"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Contrôle d'Accès</h2> </div> <div class="p-6"> <div class="space-y-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-2">Utilisateurs</label> <select class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm"> <option>Administrateur (vous)</option> <option>Analyste</option> <option>Consultant</option> <option>Invité</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-2">Permissions</label> <div class="space-y-2"> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked> <label class="ml-2 block text-sm text-gray-700">Accès complet</label> </div> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked> <label class="ml-2 block text-sm text-gray-700">Modification</label> </div> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <label class="ml-2 block text-sm text-gray-700">Exportation</label> </div> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <label class="ml-2 block text-sm text-gray-700">Administration</label> </div> </div> </div> <div class="pt-4 border-t border-gray-200"> <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> <i class="fas fa-user-plus mr-2"></i> Ajouter Utilisateur </button> </div> </div> </div> </div> <!-- Security Log --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-3"> <div class="px-6 py-4 border-b border-gray-200"> <div class="flex items-center justify-between"> <h2 class="text-lg font-medium text-gray-800">Journal de Sécurité</h2> <button class="text-sm bg-gray-100 px-3 py-1 rounded-md hover:bg-gray-200"> <i class="fas fa-filter mr-1"></i> Filtrer </button> </div> </div> <div class="p-6"> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Événement</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Utilisateur</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">IP</th> <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-15 14:32</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Mutation de clé</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">System</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">N/A</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Succès</span> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-15 13:45</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Connexion</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.5</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Succès</span> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-15 10:21</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Export rapport</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.5</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Complété</span> </td> </tr> <tr> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-07-14 18:03</td> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Tentative de connexion</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">guest</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.12</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Échec</span> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <!-- Settings Tab --> <div id="settings" class="tab-content"> <div class="mb-6"> <h1 class="text-3xl font-bold text-gray-800">Paramètres du Système</h1> <p class="text-gray-600">Configuration globale de l'application</p> </div> <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> <!-- General Settings --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-2"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Paramètres Généraux</h2> </div> <div class="p-6"> <form class="space-y-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Nom de l'Instance</label> <input type="text" class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" value="MeSSiahX Production"> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Langue</label> <select class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm"> <option>Français</option> <option>English</option> <option>Español</option> <option>Deutsch</option> </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Fuseau Horaire</label> <select class="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm"> <option>Europe/Paris (UTC+2)</option> <option>UTC</option> <option>America/New_York (UTC-4)</option> <option>Asia/Tokyo (UTC+9)</option> </select> </div> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Thème</label> <div class="grid grid-cols-3 gap-4"> <div class="cursor-pointer"> <div class="h-20 rounded-md bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center"> <span class="text-white font-medium">Bleu</span> </div> </div> <div class="cursor-pointer"> <div class="h-20 rounded-md bg-gradient-to-br from-gray-700 to-gray-900 flex items-center justify-center"> <span class="text-white font-medium">Sombre</span> </div> </div> <div class="cursor-pointer"> <div class="h-20 rounded-md bg-gradient-to-br from-green-500 to-green-700 flex items-center justify-center"> <span class="text-white font-medium">Vert</span> </div> </div> </div> </div> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked> <label class="ml-2 block text-sm text-gray-700">Activer les notifications</label> </div> <div class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> <label class="ml-2 block text-sm text-gray-700">Mode sombre</label> </div> <div class="flex justify-end pt-6 border-t border-gray-200"> <button type="button" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Annuler </button> <button type="submit" class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Enregistrer </button> </div> </form> </div> </div> <!-- System Information --> <div class="bg-white rounded-lg shadow overflow-hidden"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Information Système</h2> </div> <div class="p-6"> <div class="space-y-4"> <div> <p class="text-sm font-medium text-gray-500">Version</p> <p class="text-lg font-semibold">MeSSiahX 2.1.3</p> </div> <div> <p class="text-sm font-medium text-gray-500">Statut</p> <div class="flex items-center mt-1"> <span class="flex h-3 w-3 rounded-full bg-green-500 mr-2"></span> <span class="text-sm font-medium">Opérationnel</span> </div> </div> <div> <p class="text-sm font-medium text-gray-500">Uptime</p> <p class="text-sm">7 jours 12:34:21</p> </div> <div> <p class="text-sm font-medium text-gray-500">Dernière Mise à Jour</p> <p class="text-sm">2023-07-10</p> </div> <div class="pt-4 border-t border-gray-200"> <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> <i class="fas fa-sync-alt mr-2"></i> Vérifier les Mises à Jour </button> </div> <div class="pt-4 border-t border-gray-200"> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">Espace Disque</span> <span>45% utilisé</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-blue-500 h-2 rounded-full" style="width: 45%"></div> </div> </div> <div class="pt-2"> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">Mémoire</span> <span>62% utilisé</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-purple-500 h-2 rounded-full" style="width: 62%"></div> </div> </div> <div class="pt-2"> <div class="flex justify-between text-sm mb-1"> <span class="font-medium">CPU</span> <span>28% utilisé</span> </div> <div class="w-full bg-gray-200 rounded-full h-2"> <div class="bg-green-500 h-2 rounded-full" style="width: 28%"></div> </div> </div> </div> </div> </div> <!-- Backup & Restore --> <div class="bg-white rounded-lg shadow overflow-hidden lg:col-span-3"> <div class="px-6 py-4 border-b border-gray-200"> <h2 class="text-lg font-medium text-gray-800">Sauvegarde & Restauration</h2> </div> <div class="p-6"> <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> <div class="border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between mb-3"> <i class="fas fa-database text-2xl text-blue-500"></i> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded-full">Automatique</span> </div> <h3 class="font-medium mb-1">Sauvegarde Complète</h3> <p class="text-sm text-gray-500 mb-3">Toutes les données et configurations</p> <div class="text-xs text-gray-500 mb-2">Dernière sauvegarde: 2023-07-14 02:00</div> <button class="w-full mt-2 flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> <i class="fas fa-play mr-2"></i> Exécuter Maintenant </button> </div> <div class="border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between mb-3"> <i class="fas fa-file-export text-2xl text-green-500"></i> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Manuel</span> </div> <h3 class="font-medium mb-1">Exporter Configuration</h3> <p class="text-sm text-gray-500 mb-3">Paramètres système uniquement</p> <div class="text-xs text-gray-500 mb-2">Dernier export: 2023-06-30</div> <button class="w-full mt-2 flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> <i class="fas fa-download mr-2"></i> Exporter </button> </div> <div class="border border-gray-200 rounded-lg p-4"> <div class="flex items-center justify-between mb-3"> <i class="fas fa-file-import text-2xl text-purple-500"></i> <span class="text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded-full">Manuel</span> </div> <h3 class="font-medium mb-1">Restaurer</h3> <p class="text-sm text-gray-500 mb-3">Charger une sauvegarde</p> <div class="text-xs text-gray-500 mb-2">Sélectionner un fichier .backup</div> <button class="w-full mt-2 flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"> <i class="fas fa-upload mr-2"></i> Importer </button> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script> // Simulation des données et état de l'application const appState = { running: false, cycleCount: 0, lossValue: 0.0, bestLoss: Infinity, sources: [ {name: "Wikipedia", score: 0.9, lastUsed: "2 min ago", type: "Web"}, {name: "Google News", score: 0.8, lastUsed: "5 min ago", type: "API"}, {name: "Medium", score: 0.7, lastUsed: "12 min ago", type: "Web"}, {name: "ArXiv", score: 0.85, lastUsed: "8 min ago", type: "API"}, {name: "GitHub", score: 0.75, lastUsed: "15 min ago", type: "API"}, {name: "Stack Overflow", score: 0.7, lastUsed: "20 min ago", type: "Web"}, {name: "Reddit", score: 0.65, lastUsed: "25 min ago", type: "API"}, {name: "Google Trends", score: 0.8, lastUsed: "3 min ago", type: "Web"}, {name: "BBC", score: 0.75, lastUsed: "10 min ago", type: "Web"}, {name: "Google Scholar", score: 0.7, lastUsed: "18 min ago", type: "Web"} ], performanceHistory: [], keyHistory: [], trends: { 0: ["data", "analysis", "trends", "learning", "model"], 1: ["security", "encryption", "keys", "protection", "privacy"] }, intervalId: null, chart: null, clusterChart: null, sourceChart: null, securityLevel: 85 }; // Initialisation des graphiques function initCharts() { // Performance Chart const ctx = document.getElementById('performanceChart').getContext('2d'); appState.chart = new Chart(ctx, { type: 'line', data: { labels: Array.from({length: 20}, (_, i) => i + 1), datasets: [ { label: 'Perte', data: [], borderColor: '#3b82f6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }, { label: 'Mutations Clés', data: [], borderColor: '#ef4444', backgroundColor: 'rgba(239, 68, 68, 0.1)', borderDash: [5, 5], tension: 0.4, fill: true } ] }, options: { responsive: true, plugins: { legend: { position: 'top', }, tooltip: { mode: 'index', intersect: false, } }, scales: { y: { beginAtZero: true } }, animation: { duration: 1000 } } }); // Cluster Chart const clusterCtx = document.getElementById('clusterChart').getContext('2d'); appState.clusterChart = new Chart(clusterCtx, { type: 'scatter', data: { datasets: [ { label: 'Cluster 0', data: Array.from({length: 30}, () => ({ x: Math.random() * 3 + 1, y: Math.random() * 3 + 1 })), backgroundColor: 'rgba(59, 130, 246, 0.7)', borderColor: 'rgba(59, 130, 246, 1)', borderWidth: 1 }, { label: 'Cluster 1', data: Array.from({length: 30}, () => ({ x: Math.random() * 3 + 4, y: Math.random() * 3 + 4 })), backgroundColor: 'rgba(16, 185, 129, 0.7)', borderColor: 'rgba(16, 185, 129, 1)', borderWidth: 1 } ] }, options: { responsive: true, scales: { x: { display: false }, y: { display: false } }, plugins: { legend: { position: 'bottom', } } } }); // Source Chart const sourceCtx = document.getElementById('sourceChart').getContext('2d'); appState.sourceChart = new Chart(sourceCtx, { type: 'doughnut', data: { labels: ['Wikipedia', 'Google News', 'ArXiv', 'GitHub', 'Autres'], datasets: [{ data: [25, 20, 15, 10, 30], backgroundColor: [ '#3b82f6', '#10b981', '#6366f1', '#f59e0b', '#64748b' ], borderWidth: 0 }] }, options: { responsive: true, plugins: { legend: { position: 'bottom', } }, cutout: '70%' } }); } // Mise à jour du graphique de performance function updateChart() { if (appState.chart) { appState.chart.data.datasets[0].data = appState.performanceHistory; appState.chart.data.datasets[1].data = appState.keyHistory.map((_, i) => i % 5 === 0 ? 0.5 : null); appState.chart.update(); } } // Simulation d'un cycle d'analyse function simulateCycle() { if (!appState.running) return; appState.cycleCount++; document.getElementById('cycleCount').textContent = appState.cycleCount; // Générer une perte aléatoire qui tend à diminuer const loss = Math.max(0.001, (Math.random() * 0.1) * (1 - appState.cycleCount / 100)); appState.lossValue = loss.toFixed(4); document.getElementById('lossValue').textContent = appState.lossValue; if (loss < appState.bestLoss) { appState.bestLoss = loss; document.getElementById('lossValue').classList.add('text-green-600'); setTimeout(() => { document.getElementById('lossValue').classList.remove('text-green-600'); }, 1000); } appState.performanceHistory.push(loss); if (appState.performanceHistory.length > 20) { appState.performanceHistory.shift(); } // Mettre à jour les tendances périodiquement if (appState.cycleCount % 3 === 0) { updateTrends(); } // Ajouter une mutation de clé périodique if (appState.cycleCount % 5 === 0) { appState.keyHistory.push(appState.cycleCount); addLog(`Mutation de clé #${Math.floor(appState.cycleCount/5)} effectuée`); // Augmenter le niveau de sécurité appState.securityLevel = Math.min(100, appState.securityLevel + 2); updateSecurityLevel(); } updateChart(); } // Mettre à jour l'affichage des tendances function updateTrends() { // Générer des tendances aléatoires const topics = [ ["AI", "machine learning", "neural networks", "deep learning", "algorithms"], ["security", "encryption", "privacy", "cybersecurity", "blockchain"], ["data", "analytics", "visualization", "big data", "database"], ["cloud", "serverless", "microservices", "containers", "kubernetes"], ["startups", "funding", "venture capital", "innovation", "disruption"] ]; const randomCluster1 = topics[Math.floor(Math.random() * topics.length)]; let randomCluster2; do { randomCluster2 = topics[Math.floor(Math.random() * topics.length)]; } while (randomCluster2 === randomCluster1); appState.trends = { 0: randomCluster1, 1: randomCluster2 }; const trendsContainer = document.getElementById('trendsContainer'); trendsContainer.innerHTML = ''; Object.entries(appState.trends).forEach(([cluster, words], index) => { const clusterDiv = document.createElement('div'); clusterDiv.className = 'fade-in'; const colors = ['blue', 'green', 'purple', 'yellow', 'red']; const color = colors[index % colors.length]; clusterDiv.innerHTML = ` <div class="flex items-center"> <div class="h-8 w-8 rounded-full bg-${color}-100 text-${color}-600 flex items-center justify-center mr-3"> <i class="fas fa-project-diagram"></i> </div> <h3 class="font-medium">Cluster ${cluster}</h3> </div> <div class="mt-2 pl-11"> <div class="flex flex-wrap gap-2"> ${words.map(word => `<span class="px-2 py-1 bg-${color}-100 text-${color}-800 text-xs rounded-full">${word}</span>`).join('')} </div> </div> `; trendsContainer.appendChild(clusterDiv); }); addLog(`Mise à jour des tendances - ${randomCluster1[0]} / ${randomCluster2[0]}`); } // Mettre à jour le niveau de sécurité function updateSecurityLevel() { const indicator = document.querySelector('.security-indicator'); if (indicator) { indicator.style.width = `${appState.securityLevel}%`; // Mettre à jour le texte let statusText = "Moyen"; let statusClass = "text-yellow-600"; if (appState.securityLevel > 80) { statusText = "Élevé"; statusClass = "text-green-600"; } else if (appState.securityLevel < 50) { statusText = "Faible"; statusClass = "text-red-600"; } document.getElementById('securityStatus').textContent = statusText; document.getElementById('securityStatus').className = `text-2xl font-semibold ${statusClass}`; } } // Ajouter une entrée au journal function addLog(message) { const terminal = document.querySelector('.terminal'); const logEntry = document.createElement('div'); logEntry.className = 'text-green-400'; logEntry.innerHTML = `> ${new Date().toLocaleTimeString()}: ${message}`; terminal.appendChild(logEntry); terminal.scrollTop = terminal.scrollHeight; } // Remplir la liste des sources function populateSourcesList() { const sourcesList = document.getElementById('sourcesList'); if (!sourcesList) return; sourcesList.innerHTML = ''; appState.sources.forEach(source => { const sourceCard = document.createElement('div'); sourceCard.className = 'source-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-all duration-200'; const scoreColor = source.score > 0.8 ? 'bg-green-100 text-green-800' : source.score > 0.6 ? 'bg-blue-100 text-blue-800' : 'bg-yellow-100 text-yellow-800'; sourceCard.innerHTML = ` <div class="flex justify-between items-start mb-2"> <h3 class="font-medium">${source.name}</h3> <span class="text-xs ${scoreColor} px-2 py-1 rounded-full">${(source.score * 100).toFixed(0)}%</span> </div> <div class="flex items-center text-sm text-gray-500 mb-3"> <i class="fas fa-${source.type === 'API' ? 'plug' : 'globe'} mr-1"></i> <span>${source.type}</span> <span class="mx-2">•</span> <i class="fas fa-clock mr-1"></i> <span>${source.lastUsed}</span> </div> <div class="flex space-x-2"> <button class="text-xs bg-gray-100 hover:bg-gray-200 px-2 py-1 rounded"> <i class="fas fa-eye mr-1"></i> Voir </button> <button class="text-xs bg-blue-100 hover:bg-blue-200 text-blue-800 px-2 py-1 rounded"> <i class="fas fa-sync-alt mr-1"></i> Actualiser </button> <button class="text-xs bg-red-100 hover:bg-red-200 text-red-800 px-2 py-1 rounded"> <i class="fas fa-trash-alt mr-1"></i> Supprimer </button> </div> `; sourcesList.appendChild(sourceCard); }); } // Gestion des onglets function setupTabs() { const tabButtons = document.querySelectorAll('.tab-button'); const tabContents = document.querySelectorAll('.tab-content'); tabButtons.forEach(button => { button.addEventListener('click', () => { const tabId = button.getAttribute('data-tab'); // Désactiver tous les onglets tabButtons.forEach(btn => btn.classList.remove('active')); tabContents.forEach(content => content.classList.remove('active')); // Activer l'onglet sélectionné button.classList.add('active'); document.getElementById(tabId).classList.add('active'); // Mettre à jour les graphiques si nécessaire if (tabId === 'sources') { populateSourcesList(); } }); }); } // Gestion du menu mobile function setupMobileMenu() { const mobileMenuButton = document.getElementById('mobileMenuButton'); const sidebar = document.querySelector('.hidden.md\\:flex'); if (mobileMenuButton && sidebar) { mobileMenuButton.addEventListener('click', () => { sidebar.classList.toggle('hidden'); }); } } // </html>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MeSSiahX - Analyse de Tendances Avancée</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}
.sidebar-item:hover {
background-color: rgba(255, 255, 255, 0.1);
transform: translateX(5px);
transition: all 0.3s ease;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.terminal {
background-color: #1a1a1a;
color: #00ff00;
font-family: 'Courier New', monospace;
border-radius: 0.5rem;
padding: 1rem;
height: 300px;
overflow-y: auto;
}
.terminal::-webkit-scrollbar {
width: 5px;
}
.terminal::-webkit-scrollbar-thumb {
background-color: #4f46e5;
border-radius: 10px;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
animation: fadeIn 0.3s ease-in;
}
.tab-button {
transition: all 0.3s ease;
}
.tab-button.active {
background-color: rgba(59, 130, 246, 0.1);
border-left: 3px solid #3b82f6;
}
.source-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.security-level {
height: 8px;
border-radius: 4px;
background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
}
.security-indicator {
width: 0%;
height: 100%;
border-radius: 4px;
background-color: #3b82f6;
transition: width 0.5s ease;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="hidden md:flex md:flex-shrink-0">
<div class="flex flex-col w-64 gradient-bg text-white">
<div class="flex items-center justify-center h-16 px-4 border-b border-blue-800">
<div class="flex items-center space-x-2">
<i class="fas fa-brain text-2xl text-blue-300"></i>
<span class="text-xl font-bold">MeSSiahX</span>
</div>
</div>
<div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
<div class="space-y-1">
<div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center active" data-tab="dashboard">
<i class="fas fa-home mr-3"></i>
<span>Dashboard</span>
</div>
<div class="tab-button sidebar-item px-4 py-3 rounded-lg cursor-pointer flex items-center" data-tab="analyse">