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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Gestion des Analyses - TextAnalyzer AI</title>
|
| 7 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.13.0/cdn.js" defer></script>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 9 |
+
<style>
|
| 10 |
+
* {
|
| 11 |
+
margin: 0;
|
| 12 |
+
padding: 0;
|
| 13 |
+
box-sizing: border-box;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
font-family: 'Inter', sans-serif;
|
| 18 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 19 |
+
min-height: 100vh;
|
| 20 |
+
color: #333;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.container {
|
| 24 |
+
max-width: 1400px;
|
| 25 |
+
margin: 0 auto;
|
| 26 |
+
padding: 20px;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.header {
|
| 30 |
+
background: rgba(255, 255, 255, 0.95);
|
| 31 |
+
backdrop-filter: blur(20px);
|
| 32 |
+
border-radius: 20px;
|
| 33 |
+
padding: 30px;
|
| 34 |
+
margin-bottom: 30px;
|
| 35 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
| 36 |
+
text-align: center;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.header h1 {
|
| 40 |
+
font-size: 2.5rem;
|
| 41 |
+
font-weight: 700;
|
| 42 |
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
| 43 |
+
-webkit-background-clip: text;
|
| 44 |
+
-webkit-text-fill-color: transparent;
|
| 45 |
+
margin-bottom: 10px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.header p {
|
| 49 |
+
color: #666;
|
| 50 |
+
font-size: 1.1rem;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.stats-grid {
|
| 54 |
+
display: grid;
|
| 55 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 56 |
+
gap: 20px;
|
| 57 |
+
margin-bottom: 30px;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.stat-card {
|
| 61 |
+
background: rgba(255, 255, 255, 0.95);
|
| 62 |
+
backdrop-filter: blur(20px);
|
| 63 |
+
border-radius: 15px;
|
| 64 |
+
padding: 25px;
|
| 65 |
+
text-align: center;
|
| 66 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
| 67 |
+
transition: transform 0.3s ease;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.stat-card:hover {
|
| 71 |
+
transform: translateY(-5px);
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.stat-number {
|
| 75 |
+
font-size: 2.5rem;
|
| 76 |
+
font-weight: 700;
|
| 77 |
+
color: #667eea;
|
| 78 |
+
margin-bottom: 10px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.stat-label {
|
| 82 |
+
color: #666;
|
| 83 |
+
font-weight: 500;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.controls {
|
| 87 |
+
background: rgba(255, 255, 255, 0.95);
|
| 88 |
+
backdrop-filter: blur(20px);
|
| 89 |
+
border-radius: 15px;
|
| 90 |
+
padding: 20px;
|
| 91 |
+
margin-bottom: 20px;
|
| 92 |
+
display: flex;
|
| 93 |
+
gap: 15px;
|
| 94 |
+
flex-wrap: wrap;
|
| 95 |
+
align-items: center;
|
| 96 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.search-box {
|
| 100 |
+
flex: 1;
|
| 101 |
+
min-width: 300px;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.search-box input {
|
| 105 |
+
width: 100%;
|
| 106 |
+
padding: 12px 15px;
|
| 107 |
+
border: 2px solid #e0e7ff;
|
| 108 |
+
border-radius: 10px;
|
| 109 |
+
font-size: 1rem;
|
| 110 |
+
transition: all 0.3s ease;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.search-box input:focus {
|
| 114 |
+
outline: none;
|
| 115 |
+
border-color: #667eea;
|
| 116 |
+
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.filter-buttons {
|
| 120 |
+
display: flex;
|
| 121 |
+
gap: 10px;
|
| 122 |
+
flex-wrap: wrap;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.filter-btn {
|
| 126 |
+
padding: 10px 20px;
|
| 127 |
+
border: none;
|
| 128 |
+
border-radius: 25px;
|
| 129 |
+
font-weight: 500;
|
| 130 |
+
cursor: pointer;
|
| 131 |
+
transition: all 0.3s ease;
|
| 132 |
+
background: #f1f5f9;
|
| 133 |
+
color: #64748b;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.filter-btn.active {
|
| 137 |
+
background: #667eea;
|
| 138 |
+
color: white;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.refresh-btn {
|
| 142 |
+
background: #10b981;
|
| 143 |
+
color: white;
|
| 144 |
+
border: none;
|
| 145 |
+
padding: 12px 24px;
|
| 146 |
+
border-radius: 10px;
|
| 147 |
+
cursor: pointer;
|
| 148 |
+
font-weight: 500;
|
| 149 |
+
transition: all 0.3s ease;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.refresh-btn:hover {
|
| 153 |
+
background: #059669;
|
| 154 |
+
transform: translateY(-2px);
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.analyses-grid {
|
| 158 |
+
display: grid;
|
| 159 |
+
gap: 20px;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.analysis-card {
|
| 163 |
+
background: rgba(255, 255, 255, 0.95);
|
| 164 |
+
backdrop-filter: blur(20px);
|
| 165 |
+
border-radius: 15px;
|
| 166 |
+
padding: 25px;
|
| 167 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
| 168 |
+
transition: all 0.3s ease;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.analysis-card:hover {
|
| 172 |
+
transform: translateY(-5px);
|
| 173 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.analysis-header {
|
| 177 |
+
display: flex;
|
| 178 |
+
justify-content: space-between;
|
| 179 |
+
align-items: flex-start;
|
| 180 |
+
margin-bottom: 20px;
|
| 181 |
+
flex-wrap: wrap;
|
| 182 |
+
gap: 15px;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.analysis-info h3 {
|
| 186 |
+
font-size: 1.3rem;
|
| 187 |
+
font-weight: 600;
|
| 188 |
+
color: #333;
|
| 189 |
+
margin-bottom: 5px;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.analysis-meta {
|
| 193 |
+
color: #666;
|
| 194 |
+
font-size: 0.9rem;
|
| 195 |
+
display: flex;
|
| 196 |
+
flex-wrap: wrap;
|
| 197 |
+
gap: 15px;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.meta-item {
|
| 201 |
+
display: flex;
|
| 202 |
+
align-items: center;
|
| 203 |
+
gap: 5px;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
.analysis-badges {
|
| 207 |
+
display: flex;
|
| 208 |
+
gap: 10px;
|
| 209 |
+
flex-wrap: wrap;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.badge {
|
| 213 |
+
padding: 6px 12px;
|
| 214 |
+
border-radius: 20px;
|
| 215 |
+
font-size: 0.8rem;
|
| 216 |
+
font-weight: 500;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.badge.deepthink {
|
| 220 |
+
background: #fef3c7;
|
| 221 |
+
color: #92400e;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
.badge.standard {
|
| 225 |
+
background: #dbeafe;
|
| 226 |
+
color: #1d4ed8;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.analysis-content {
|
| 230 |
+
display: grid;
|
| 231 |
+
gap: 20px;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.content-section {
|
| 235 |
+
border: 1px solid #e5e7eb;
|
| 236 |
+
border-radius: 10px;
|
| 237 |
+
overflow: hidden;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.content-header {
|
| 241 |
+
background: #f9fafb;
|
| 242 |
+
padding: 15px;
|
| 243 |
+
font-weight: 600;
|
| 244 |
+
color: #374151;
|
| 245 |
+
display: flex;
|
| 246 |
+
justify-content: space-between;
|
| 247 |
+
align-items: center;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.content-body {
|
| 251 |
+
padding: 20px;
|
| 252 |
+
max-height: 300px;
|
| 253 |
+
overflow-y: auto;
|
| 254 |
+
line-height: 1.6;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
.image-section {
|
| 258 |
+
text-align: center;
|
| 259 |
+
margin-bottom: 20px;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
.analysis-image {
|
| 263 |
+
max-width: 100%;
|
| 264 |
+
max-height: 200px;
|
| 265 |
+
border-radius: 10px;
|
| 266 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 267 |
+
cursor: pointer;
|
| 268 |
+
transition: transform 0.3s ease;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.analysis-image:hover {
|
| 272 |
+
transform: scale(1.05);
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
.consignes-section {
|
| 276 |
+
background: #f0f9ff;
|
| 277 |
+
border-left: 4px solid #0ea5e9;
|
| 278 |
+
padding: 15px;
|
| 279 |
+
border-radius: 8px;
|
| 280 |
+
margin-bottom: 20px;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
.consignes-section h4 {
|
| 284 |
+
color: #0c4a6e;
|
| 285 |
+
margin-bottom: 10px;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
.toggle-btn {
|
| 289 |
+
background: #667eea;
|
| 290 |
+
color: white;
|
| 291 |
+
border: none;
|
| 292 |
+
padding: 8px 16px;
|
| 293 |
+
border-radius: 6px;
|
| 294 |
+
cursor: pointer;
|
| 295 |
+
font-size: 0.9rem;
|
| 296 |
+
transition: all 0.3s ease;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
.toggle-btn:hover {
|
| 300 |
+
background: #5a67d8;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
.loading {
|
| 304 |
+
text-align: center;
|
| 305 |
+
padding: 50px;
|
| 306 |
+
color: #666;
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.spinner {
|
| 310 |
+
border: 4px solid #f3f4f6;
|
| 311 |
+
border-left: 4px solid #667eea;
|
| 312 |
+
border-radius: 50%;
|
| 313 |
+
width: 40px;
|
| 314 |
+
height: 40px;
|
| 315 |
+
animation: spin 1s linear infinite;
|
| 316 |
+
margin: 0 auto 20px;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
@keyframes spin {
|
| 320 |
+
0% { transform: rotate(0deg); }
|
| 321 |
+
100% { transform: rotate(360deg); }
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.no-data {
|
| 325 |
+
text-align: center;
|
| 326 |
+
padding: 50px;
|
| 327 |
+
color: #666;
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
.error {
|
| 331 |
+
background: #fef2f2;
|
| 332 |
+
color: #dc2626;
|
| 333 |
+
padding: 15px;
|
| 334 |
+
border-radius: 10px;
|
| 335 |
+
margin-bottom: 20px;
|
| 336 |
+
border-left: 4px solid #dc2626;
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
.back-button {
|
| 340 |
+
position: fixed;
|
| 341 |
+
top: 20px;
|
| 342 |
+
left: 20px;
|
| 343 |
+
background: rgba(255, 255, 255, 0.9);
|
| 344 |
+
color: #667eea;
|
| 345 |
+
border: 2px solid #667eea;
|
| 346 |
+
padding: 12px 20px;
|
| 347 |
+
border-radius: 25px;
|
| 348 |
+
text-decoration: none;
|
| 349 |
+
font-weight: 600;
|
| 350 |
+
transition: all 0.3s ease;
|
| 351 |
+
backdrop-filter: blur(10px);
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
.back-button:hover {
|
| 355 |
+
background: #667eea;
|
| 356 |
+
color: white;
|
| 357 |
+
transform: translateY(-2px);
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
/* Modal styles */
|
| 361 |
+
.modal {
|
| 362 |
+
position: fixed;
|
| 363 |
+
top: 0;
|
| 364 |
+
left: 0;
|
| 365 |
+
width: 100%;
|
| 366 |
+
height: 100%;
|
| 367 |
+
background: rgba(0, 0, 0, 0.8);
|
| 368 |
+
display: flex;
|
| 369 |
+
justify-content: center;
|
| 370 |
+
align-items: center;
|
| 371 |
+
z-index: 1000;
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
.modal-content {
|
| 375 |
+
background: white;
|
| 376 |
+
border-radius: 15px;
|
| 377 |
+
max-width: 90vw;
|
| 378 |
+
max-height: 90vh;
|
| 379 |
+
overflow: auto;
|
| 380 |
+
position: relative;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.modal-close {
|
| 384 |
+
position: absolute;
|
| 385 |
+
top: 15px;
|
| 386 |
+
right: 15px;
|
| 387 |
+
background: #dc2626;
|
| 388 |
+
color: white;
|
| 389 |
+
border: none;
|
| 390 |
+
width: 30px;
|
| 391 |
+
height: 30px;
|
| 392 |
+
border-radius: 50%;
|
| 393 |
+
cursor: pointer;
|
| 394 |
+
font-size: 1.2rem;
|
| 395 |
+
display: flex;
|
| 396 |
+
align-items: center;
|
| 397 |
+
justify-content: center;
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
.modal img {
|
| 401 |
+
max-width: 100%;
|
| 402 |
+
height: auto;
|
| 403 |
+
border-radius: 10px;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
@media (max-width: 768px) {
|
| 407 |
+
.container {
|
| 408 |
+
padding: 10px;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
.header h1 {
|
| 412 |
+
font-size: 2rem;
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
.stats-grid {
|
| 416 |
+
grid-template-columns: repeat(2, 1fr);
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
.analysis-header {
|
| 420 |
+
flex-direction: column;
|
| 421 |
+
align-items: flex-start;
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
.controls {
|
| 425 |
+
flex-direction: column;
|
| 426 |
+
align-items: stretch;
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
.search-box {
|
| 430 |
+
min-width: auto;
|
| 431 |
+
}
|
| 432 |
+
}
|
| 433 |
+
</style>
|
| 434 |
+
</head>
|
| 435 |
+
<body>
|
| 436 |
+
<a href="/" class="back-button">← Retour à l'accueil</a>
|
| 437 |
+
|
| 438 |
+
<div class="container" x-data="gestionApp()">
|
| 439 |
+
<div class="header">
|
| 440 |
+
<h1>Gestion des Analyses</h1>
|
| 441 |
+
<p>Visualisez et gérez toutes les analyses effectuées par les utilisateurs</p>
|
| 442 |
+
</div>
|
| 443 |
+
|
| 444 |
+
<!-- Statistics -->
|
| 445 |
+
<div class="stats-grid">
|
| 446 |
+
<div class="stat-card">
|
| 447 |
+
<div class="stat-number" x-text="stats.total"></div>
|
| 448 |
+
<div class="stat-label">Total Analyses</div>
|
| 449 |
+
</div>
|
| 450 |
+
<div class="stat-card">
|
| 451 |
+
<div class="stat-number" x-text="stats.deepthink"></div>
|
| 452 |
+
<div class="stat-label">DeepThink</div>
|
| 453 |
+
</div>
|
| 454 |
+
<div class="stat-card">
|
| 455 |
+
<div class="stat-number" x-text="stats.standard"></div>
|
| 456 |
+
<div class="stat-label">Standard</div>
|
| 457 |
+
</div>
|
| 458 |
+
<div class="stat-card">
|
| 459 |
+
<div class="stat-number" x-text="stats.avgTime + 's'"></div>
|
| 460 |
+
<div class="stat-label">Temps Moyen</div>
|
| 461 |
+
</div>
|
| 462 |
+
</div>
|
| 463 |
+
|
| 464 |
+
<!-- Controls -->
|
| 465 |
+
<div class="controls">
|
| 466 |
+
<div class="search-box">
|
| 467 |
+
<input
|
| 468 |
+
type="text"
|
| 469 |
+
placeholder="Rechercher par nom d'image, consignes..."
|
| 470 |
+
x-model="searchTerm"
|
| 471 |
+
@input="filterAnalyses()"
|
| 472 |
+
>
|
| 473 |
+
</div>
|
| 474 |
+
<div class="filter-buttons">
|
| 475 |
+
<button
|
| 476 |
+
class="filter-btn"
|
| 477 |
+
:class="{ 'active': filter === 'all' }"
|
| 478 |
+
@click="setFilter('all')"
|
| 479 |
+
>
|
| 480 |
+
Toutes
|
| 481 |
+
</button>
|
| 482 |
+
<button
|
| 483 |
+
class="filter-btn"
|
| 484 |
+
:class="{ 'active': filter === 'deepthink' }"
|
| 485 |
+
@click="setFilter('deepthink')"
|
| 486 |
+
>
|
| 487 |
+
DeepThink
|
| 488 |
+
</button>
|
| 489 |
+
<button
|
| 490 |
+
class="filter-btn"
|
| 491 |
+
:class="{ 'active': filter === 'standard' }"
|
| 492 |
+
@click="setFilter('standard')"
|
| 493 |
+
>
|
| 494 |
+
Standard
|
| 495 |
+
</button>
|
| 496 |
+
</div>
|
| 497 |
+
<button class="refresh-btn" @click="loadAnalyses()">
|
| 498 |
+
🔄 Actualiser
|
| 499 |
+
</button>
|
| 500 |
+
</div>
|
| 501 |
+
|
| 502 |
+
<!-- Error Message -->
|
| 503 |
+
<div class="error" x-show="error" x-text="error"></div>
|
| 504 |
+
|
| 505 |
+
<!-- Loading -->
|
| 506 |
+
<div class="loading" x-show="loading">
|
| 507 |
+
<div class="spinner"></div>
|
| 508 |
+
<p>Chargement des analyses...</p>
|
| 509 |
+
</div>
|
| 510 |
+
|
| 511 |
+
<!-- No Data -->
|
| 512 |
+
<div class="no-data" x-show="!loading && filteredAnalyses.length === 0 && !error">
|
| 513 |
+
<p>Aucune analyse trouvée</p>
|
| 514 |
+
</div>
|
| 515 |
+
|
| 516 |
+
<!-- Analyses Grid -->
|
| 517 |
+
<div class="analyses-grid">
|
| 518 |
+
<template x-for="analysis in filteredAnalyses" :key="analysis.id">
|
| 519 |
+
<div class="analysis-card">
|
| 520 |
+
<div class="analysis-header">
|
| 521 |
+
<div class="analysis-info">
|
| 522 |
+
<h3 x-text="analysis.image_name || 'Image sans nom'"></h3>
|
| 523 |
+
<div class="analysis-meta">
|
| 524 |
+
<div class="meta-item">
|
| 525 |
+
<span>📅</span>
|
| 526 |
+
<span x-text="formatDate(analysis.timestamp)"></span>
|
| 527 |
+
</div>
|
| 528 |
+
<div class="meta-item">
|
| 529 |
+
<span>🌐</span>
|
| 530 |
+
<span x-text="analysis.user_ip"></span>
|
| 531 |
+
</div>
|
| 532 |
+
<div class="meta-item">
|
| 533 |
+
<span>⏱️</span>
|
| 534 |
+
<span x-text="analysis.processing_time + 's'"></span>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
<div class="analysis-badges">
|
| 539 |
+
<span
|
| 540 |
+
class="badge"
|
| 541 |
+
:class="analysis.use_deepthink ? 'deepthink' : 'standard'"
|
| 542 |
+
x-text="analysis.use_deepthink ? 'DeepThink' : 'Standard'"
|
| 543 |
+
></span>
|
| 544 |
+
</div>
|
| 545 |
+
</div>
|
| 546 |
+
|
| 547 |
+
<!-- Image Section -->
|
| 548 |
+
<div class="image-section">
|
| 549 |
+
<img
|
| 550 |
+
:src="`/api/analysis/${analysis.id}/image`"
|
| 551 |
+
:alt="analysis.image_name"
|
| 552 |
+
class="analysis-image"
|
| 553 |
+
@click="showImageModal(analysis.id, analysis.image_name)"
|
| 554 |
+
@error="$event.target.style.display='none'"
|
| 555 |
+
>
|
| 556 |
+
</div>
|
| 557 |
+
|
| 558 |
+
<!-- Consignes Section -->
|
| 559 |
+
<div class="consignes-section" x-show="analysis.consignes">
|
| 560 |
+
<h4>Consignes utilisateur :</h4>
|
| 561 |
+
<p x-text="analysis.consignes"></p>
|
| 562 |
+
</div>
|
| 563 |
+
|
| 564 |
+
<!-- Content Sections -->
|
| 565 |
+
<div class="analysis-content">
|
| 566 |
+
<!-- Tableau -->
|
| 567 |
+
<div class="content-section">
|
| 568 |
+
<div class="content-header">
|
| 569 |
+
<span>📊 Tableau d'Analyse</span>
|
| 570 |
+
<button
|
| 571 |
+
class="toggle-btn"
|
| 572 |
+
@click="toggleSection(analysis.id, 'tableau')"
|
| 573 |
+
x-text="expandedSections[analysis.id + '_tableau'] ? 'Réduire' : 'Voir'"
|
| 574 |
+
></button>
|
| 575 |
+
</div>
|
| 576 |
+
<div
|
| 577 |
+
class="content-body"
|
| 578 |
+
x-show="expandedSections[analysis.id + '_tableau']"
|
| 579 |
+
x-transition
|
| 580 |
+
>
|
| 581 |
+
<pre x-text="analysis.tableau_output || 'Aucun contenu'"></pre>
|
| 582 |
+
</div>
|
| 583 |
+
</div>
|
| 584 |
+
|
| 585 |
+
<!-- Dissertation -->
|
| 586 |
+
<div class="content-section">
|
| 587 |
+
<div class="content-header">
|
| 588 |
+
<span>✍️ Dissertation</span>
|
| 589 |
+
<button
|
| 590 |
+
class="toggle-btn"
|
| 591 |
+
@click="toggleSection(analysis.id, 'dissertation')"
|
| 592 |
+
x-text="expandedSections[analysis.id + '_dissertation'] ? 'Réduire' : 'Voir'"
|
| 593 |
+
></button>
|
| 594 |
+
</div>
|
| 595 |
+
<div
|
| 596 |
+
class="content-body"
|
| 597 |
+
x-show="expandedSections[analysis.id + '_dissertation']"
|
| 598 |
+
x-transition
|
| 599 |
+
>
|
| 600 |
+
<pre x-text="analysis.dissertation_output || 'Aucun contenu'"></pre>
|
| 601 |
+
</div>
|
| 602 |
+
</div>
|
| 603 |
+
</div>
|
| 604 |
+
</div>
|
| 605 |
+
</template>
|
| 606 |
+
</div>
|
| 607 |
+
|
| 608 |
+
<!-- Image Modal -->
|
| 609 |
+
<div class="modal" x-show="showModal" x-transition @click="closeModal()">
|
| 610 |
+
<div class="modal-content" @click.stop>
|
| 611 |
+
<button class="modal-close" @click="closeModal()">×</button>
|
| 612 |
+
<img :src="modalImage" :alt="modalTitle">
|
| 613 |
+
</div>
|
| 614 |
+
</div>
|
| 615 |
+
</div>
|
| 616 |
+
|
| 617 |
+
<script>
|
| 618 |
+
function gestionApp() {
|
| 619 |
+
return {
|
| 620 |
+
analyses: [],
|
| 621 |
+
filteredAnalyses: [],
|
| 622 |
+
loading: true,
|
| 623 |
+
error: '',
|
| 624 |
+
searchTerm: '',
|
| 625 |
+
filter: 'all',
|
| 626 |
+
expandedSections: {},
|
| 627 |
+
showModal: false,
|
| 628 |
+
modalImage: '',
|
| 629 |
+
modalTitle: '',
|
| 630 |
+
stats: {
|
| 631 |
+
total: 0,
|
| 632 |
+
deepthink: 0,
|
| 633 |
+
standard: 0,
|
| 634 |
+
avgTime: 0
|
| 635 |
+
},
|
| 636 |
+
|
| 637 |
+
init() {
|
| 638 |
+
this.loadAnalyses();
|
| 639 |
+
},
|
| 640 |
+
|
| 641 |
+
async loadAnalyses() {
|
| 642 |
+
this.loading = true;
|
| 643 |
+
this.error = '';
|
| 644 |
+
|
| 645 |
+
try {
|
| 646 |
+
const response = await fetch('/api/analyses');
|
| 647 |
+
if (!response.ok) {
|
| 648 |
+
throw new Error('Erreur lors du chargement des données');
|
| 649 |
+
}
|
| 650 |
+
|
| 651 |
+
this.analyses = await response.json();
|
| 652 |
+
this.calculateStats();
|
| 653 |
+
this.filterAnalyses();
|
| 654 |
+
} catch (err) {
|
| 655 |
+
this.error = err.message;
|
| 656 |
+
console.error('Error loading analyses:', err);
|
| 657 |
+
} finally {
|
| 658 |
+
this.loading = false;
|
| 659 |
+
}
|
| 660 |
+
},
|
| 661 |
+
|
| 662 |
+
calculateStats() {
|
| 663 |
+
this.stats.total = this.analyses.length;
|
| 664 |
+
this.stats.deepthink = this.analyses.filter(a => a.use_deepthink).length;
|
| 665 |
+
this.stats.standard = this.stats.total - this.stats.deepthink;
|
| 666 |
+
|
| 667 |
+
if (this.stats.total > 0) {
|
| 668 |
+
const totalTime = this.analyses.reduce((sum, a) => sum + (a.processing_time || 0), 0);
|
| 669 |
+
this.stats.avgTime = Math.round(totalTime / this.stats.total * 100) / 100;
|
| 670 |
+
} else {
|
| 671 |
+
this.stats.avgTime = 0;
|
| 672 |
+
}
|
| 673 |
+
},
|
| 674 |
+
|
| 675 |
+
filterAnalyses() {
|
| 676 |
+
let filtered = this.analyses;
|
| 677 |
+
|
| 678 |
+
// Apply type filter
|
| 679 |
+
if (this.filter === 'deepthink') {
|
| 680 |
+
filtered = filtered.filter(a => a.use_deepthink);
|
| 681 |
+
} else if (this.filter === 'standard') {
|
| 682 |
+
filtered = filtered.filter(a => !a.use_deepthink);
|
| 683 |
+
}
|
| 684 |
+
|
| 685 |
+
// Apply search filter
|
| 686 |
+
if (this.searchTerm.trim()) {
|
| 687 |
+
const term = this.searchTerm.toLowerCase();
|
| 688 |
+
filtered = filtered.filter(a =>
|
| 689 |
+
(a.image_name && a.image_name.toLowerCase().includes(term)) ||
|
| 690 |
+
(a.consignes && a.consignes.toLowerCase().includes(term)) ||
|
| 691 |
+
(a.user_ip && a.user_ip.includes(term))
|
| 692 |
+
);
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
this.filteredAnalyses = filtered;
|
| 696 |
+
},
|
| 697 |
+
|
| 698 |
+
setFilter(newFilter) {
|
| 699 |
+
this.filter = newFilter;
|
| 700 |
+
this.filterAnalyses();
|
| 701 |
+
},
|
| 702 |
+
|
| 703 |
+
toggleSection(analysisId, sectionType) {
|
| 704 |
+
const key = analysisId + '_' + sectionType;
|
| 705 |
+
this.expandedSections[key] = !this.expandedSections[key];
|
| 706 |
+
},
|
| 707 |
+
|
| 708 |
+
showImageModal(analysisId, imageName) {
|
| 709 |
+
this.modalImage = `/api/analysis/${analysisId}/image`;
|
| 710 |
+
this.modalTitle = imageName;
|
| 711 |
+
this.showModal = true;
|
| 712 |
+
},
|
| 713 |
+
|
| 714 |
+
closeModal() {
|
| 715 |
+
this.showModal = false;
|
| 716 |
+
this.modalImage = '';
|
| 717 |
+
this.modalTitle = '';
|
| 718 |
+
},
|
| 719 |
+
|
| 720 |
+
formatDate(dateString) {
|
| 721 |
+
return new Date(dateString).toLocaleString('fr-FR', {
|
| 722 |
+
year: 'numeric',
|
| 723 |
+
month: 'short',
|
| 724 |
+
day: 'numeric',
|
| 725 |
+
hour: '2-digit',
|
| 726 |
+
minute: '2-digit'
|
| 727 |
+
});
|
| 728 |
+
}
|
| 729 |
+
}
|
| 730 |
+
}
|
| 731 |
+
</script>
|
| 732 |
+
</body>
|
| 733 |
+
</html>
|