Spaces:
Running
Running
File size: 36,363 Bytes
4c675f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IronCore Mining Enterprise Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Legacy industrial styling */
.industrial-bg {
background-color: #e5e7eb;
background-image: linear-gradient(to bottom, #f3f4f6 0%, #e5e7eb 100%);
}
.industrial-header {
background: linear-gradient(to right, #1e40af, #1e3a8a);
border-bottom: 1px solid #9ca3af;
}
.industrial-sidebar {
background: linear-gradient(to bottom, #1f2937, #111827);
border-right: 1px solid #4b5563;
}
.industrial-card {
background: white;
border: 1px solid #d1d5db;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.industrial-button {
background: linear-gradient(to bottom, #f3f4f6, #e5e7eb);
border: 1px solid #9ca3af;
color: #374151;
}
.industrial-button:hover {
background: linear-gradient(to bottom, #e5e7eb, #d1d5db);
}
.industrial-button-primary {
background: linear-gradient(to bottom, #2563eb, #1d4ed8);
border: 1px solid #1e40af;
color: white;
}
.industrial-button-primary:hover {
background: linear-gradient(to bottom, #1d4ed8, #1e40af);
}
.industrial-chart {
background: white;
border: 1px solid #d1d5db;
}
.status-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
display: inline-block;
margin-right: 6px;
border: 1px solid rgba(0,0,0,0.1);
}
.status-active {
background-color: #10b981;
box-shadow: 0 0 5px #10b981;
}
.status-warning {
background-color: #f59e0b;
box-shadow: 0 0 5px #f59e0b;
}
.status-danger {
background-color: #ef4444;
box-shadow: 0 0 5px #ef4444;
}
.blink {
animation: blink-animation 1.5s infinite;
}
@keyframes blink-animation {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.gauge {
position: relative;
width: 100%;
height: 120px;
margin: 20px auto;
}
.gauge-body {
width: 100%;
height: 0;
padding-bottom: 50%;
position: relative;
border-top-left-radius: 100% 200%;
border-top-right-radius: 100% 200%;
overflow: hidden;
background: #d1d5db;
}
.gauge-fill {
position: absolute;
top: 100%;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to right, #10b981, #3b82f6, #ef4444);
transform-origin: center top;
transform: rotate(0.5turn);
transition: transform 0.5s ease-out;
}
.gauge-cover {
width: 75%;
height: 150%;
background: white;
border-radius: 50%;
position: absolute;
top: 25%;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5em;
font-weight: bold;
color: #1f2937;
border: 1px solid #d1d5db;
}
.legacy-border {
border: 1px solid #d1d5db;
box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.legacy-panel {
background: white;
border: 1px solid #d1d5db;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
</style>
</head>
<body class="industrial-bg font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Legacy Sidebar -->
<div class="industrial-sidebar text-gray-300 w-64 flex-shrink-0">
<div class="p-4 border-b border-gray-700 flex items-center">
<div class="bg-blue-600 p-2 rounded mr-3">
<i class="fas fa-industry text-white text-xl"></i>
</div>
<h1 class="text-xl font-bold text-white">IRONCORE MINING</h1>
</div>
<nav class="p-4">
<div class="mb-8">
<h2 class="text-gray-400 uppercase text-xs font-semibold mb-3 tracking-wider">MAIN</h2>
<ul>
<li class="mb-2">
<a href="#" class="flex items-center p-2 bg-gray-800 rounded-lg border-l-4 border-blue-500">
<i class="fas fa-tachometer-alt mr-3 text-blue-400"></i>
<span class="font-medium">Dashboard</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-chart-line mr-3 text-gray-400"></i>
<span>Production Analytics</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-hard-hat mr-3 text-gray-400"></i>
<span>Equipment Status</span>
</a>
</li>
</ul>
</div>
<div class="mb-8">
<h2 class="text-gray-400 uppercase text-xs font-semibold mb-3 tracking-wider">OPERATIONS</h2>
<ul>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-excavator mr-3 text-gray-400"></i>
<span>Excavation</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-truck-pickup mr-3 text-gray-400"></i>
<span>Haulage</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-industry mr-3 text-gray-400"></i>
<span>Processing</span>
</a>
</li>
</ul>
</div>
<div>
<h2 class="text-gray-400 uppercase text-xs font-semibold mb-3 tracking-wider">ADMINISTRATION</h2>
<ul>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-users mr-3 text-gray-400"></i>
<span>Personnel</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-cog mr-3 text-gray-400"></i>
<span>Settings</span>
</a>
</li>
<li class="mb-2">
<a href="#" class="flex items-center p-2 hover:bg-gray-800 rounded-lg">
<i class="fas fa-file-alt mr-3 text-gray-400"></i>
<span>Reports</span>
</a>
</li>
</ul>
</div>
</nav>
<div class="absolute bottom-0 left-0 right-0 p-4 border-t border-gray-700">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-blue-600 flex items-center justify-center text-white font-semibold mr-2">JS</div>
<div>
<div class="text-sm font-medium text-white">John Smith</div>
<div class="text-xs text-gray-400">Site Supervisor</div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Legacy Header -->
<header class="industrial-header shadow-sm">
<div class="flex items-center justify-between p-4">
<div class="flex items-center space-x-4">
<button class="text-gray-300 focus:outline-none lg:hidden">
<i class="fas fa-bars"></i>
</button>
<h1 class="text-xl font-semibold text-white">ENTERPRISE PRODUCTION DASHBOARD</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-300 focus:outline-none relative">
<i class="fas fa-bell"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</button>
</div>
<div class="text-sm text-gray-300">
<span class="font-medium">Site:</span> Iron Mountain Complex
</div>
<div class="text-sm text-gray-300">
<span class="font-medium">Shift:</span> B (07:00-15:00)
</div>
<div class="text-sm text-gray-300">
<span class="font-medium">Date:</span> <span id="current-date">Loading...</span>
</div>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-4">
<!-- Summary Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4">
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">DAILY PRODUCTION</h3>
<i class="fas fa-chart-bar text-blue-600"></i>
</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-gray-800 mb-2">24,580 <span class="text-sm text-gray-500">tons</span></div>
<div class="flex items-center">
<span class="status-indicator status-active"></span>
<span class="text-sm text-gray-600">12.5% above target</span>
</div>
</div>
</div>
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">MONTHLY TARGET</h3>
<i class="fas fa-bullseye text-orange-500"></i>
</div>
</div>
<div class="p-4">
<div class="gauge">
<div class="gauge-body">
<div class="gauge-fill" style="transform: rotate(0.6turn);"></div>
</div>
<div class="gauge-cover">78%</div>
</div>
<div class="text-center text-sm text-gray-600">512,000/650,000 tons</div>
</div>
</div>
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">EQUIPMENT UTILIZATION</h3>
<i class="fas fa-cogs text-green-600"></i>
</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-gray-800 mb-2">86%</div>
<div class="w-full bg-gray-200 rounded-full h-2 mb-2">
<div class="bg-green-600 h-2 rounded-full" style="width: 86%"></div>
</div>
<div class="text-sm text-gray-600">32/37 units active</div>
</div>
</div>
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">SAFETY RECORD</h3>
<i class="fas fa-shield-alt text-red-600"></i>
</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-gray-800 mb-2">127 <span class="text-sm text-gray-500">days</span></div>
<div class="flex items-center justify-between text-sm">
<div>
<span class="status-indicator status-active"></span>
<span class="text-gray-600">Current streak</span>
</div>
<div class="text-gray-600">Record: 183</div>
</div>
</div>
</div>
</div>
<!-- Main Charts -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 mb-4">
<!-- Production Trend -->
<div class="industrial-chart rounded-lg lg:col-span-2">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">PRODUCTION TREND (LAST 30 DAYS)</h3>
<div class="flex space-x-1">
<button class="industrial-button px-2 py-1 text-xs rounded">Tons</button>
<button class="industrial-button px-2 py-1 text-xs rounded">Grade</button>
</div>
</div>
</div>
<div class="p-4">
<div class="h-80">
<canvas id="productionChart"></canvas>
</div>
</div>
</div>
<!-- Iron Grade Distribution -->
<div class="industrial-chart rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">ORE GRADE DISTRIBUTION</h3>
<div class="text-xs text-gray-500">Current Shift</div>
</div>
</div>
<div class="p-4">
<div class="h-80">
<canvas id="gradeChart"></canvas>
</div>
</div>
</div>
</div>
<!-- Equipment Status and Alerts -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4">
<!-- Equipment Status -->
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<h3 class="font-bold text-gray-800">EQUIPMENT STATUS</h3>
</div>
<div class="p-4">
<div class="space-y-3">
<div class="legacy-panel p-3 rounded">
<div class="flex items-center justify-between mb-2">
<div>
<span class="status-indicator status-active"></span>
<span class="font-medium">Excavator #E-247</span>
</div>
<span class="text-sm bg-green-100 text-green-800 px-2 py-1 rounded">Active</span>
</div>
<div class="text-sm text-gray-600 mb-1">Pit 3 - North Section</div>
<div class="flex justify-between text-xs text-gray-500">
<span>Utilization: 92%</span>
<span>Hours: 1,247</span>
</div>
</div>
<div class="legacy-panel p-3 rounded">
<div class="flex items-center justify-between mb-2">
<div>
<span class="status-indicator status-warning"></span>
<span class="font-medium">Haul Truck #HT-512</span>
</div>
<span class="text-sm bg-yellow-100 text-yellow-800 px-2 py-1 rounded">Maintenance</span>
</div>
<div class="text-sm text-gray-600 mb-1">Pit 2 - Transport</div>
<div class="flex justify-between text-xs text-gray-500">
<span>Utilization: 65%</span>
<span>Hours: 3,512</span>
</div>
</div>
<div class="legacy-panel p-3 rounded">
<div class="flex items-center justify-between mb-2">
<div>
<span class="status-indicator status-danger"></span>
<span class="font-medium">Drill Rig #DR-108</span>
</div>
<span class="text-sm bg-red-100 text-red-800 px-2 py-1 rounded">Down</span>
</div>
<div class="text-sm text-gray-600 mb-1">Pit 1 - Blasting Zone</div>
<div class="flex justify-between text-xs text-gray-500">
<span>Utilization: 28%</span>
<span>Hours: 4,108</span>
</div>
</div>
<button class="industrial-button-primary w-full py-2 rounded text-sm font-medium">
VIEW ALL EQUIPMENT (37)
</button>
</div>
</div>
</div>
<!-- Production Alerts -->
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<h3 class="font-bold text-gray-800">PRODUCTION ALERTS</h3>
</div>
<div class="p-4">
<div class="space-y-3">
<div class="legacy-panel p-3 rounded border-l-4 border-red-500 bg-red-50">
<div class="flex items-start">
<div class="flex-shrink-0 text-red-500 mt-1">
<i class="fas fa-exclamation-triangle"></i>
</div>
<div class="ml-2">
<h4 class="text-sm font-medium text-red-800">Conveyor Belt Jam</h4>
<p class="text-xs text-red-700 mb-1">Processing Plant Line 2</p>
<p class="text-xs text-red-600">Alerted 25 min ago</p>
</div>
</div>
</div>
<div class="legacy-panel p-3 rounded border-l-4 border-yellow-500 bg-yellow-50">
<div class="flex items-start">
<div class="flex-shrink-0 text-yellow-500 mt-1">
<i class="fas fa-exclamation-circle"></i>
</div>
<div class="ml-2">
<h4 class="text-sm font-medium text-yellow-800">Low Iron Grade</h4>
<p class="text-xs text-yellow-700 mb-1">Section B, Pit 3 (Fe 58%)</p>
<p class="text-xs text-yellow-600">Alerted 1 hour ago</p>
</div>
</div>
</div>
<div class="legacy-panel p-3 rounded border-l-4 border-blue-500 bg-blue-50">
<div class="flex items-start">
<div class="flex-shrink-0 text-blue-500 mt-1">
<i class="fas fa-info-circle"></i>
</div>
<div class="ml-2">
<h4 class="text-sm font-medium text-blue-800">Preventive Maintenance</h4>
<p class="text-xs text-blue-700 mb-1">Crusher #CR-205 due in 2 days</p>
<p class="text-xs text-blue-600">Scheduled</p>
</div>
</div>
</div>
<button class="industrial-button-primary w-full py-2 rounded text-sm font-medium">
VIEW ALL ALERTS (8)
</button>
</div>
</div>
</div>
<!-- Shift Performance -->
<div class="industrial-card rounded-lg">
<div class="p-4 border-b border-gray-200 bg-gray-50">
<h3 class="font-bold text-gray-800">SHIFT PERFORMANCE</h3>
</div>
<div class="p-4">
<div class="flex items-center justify-between mb-4">
<div>
<p class="text-sm text-gray-500">Current Shift</p>
<h3 class="text-xl font-bold text-gray-800">SHIFT B</h3>
<p class="text-xs text-gray-500">07:00 - 15:00</p>
</div>
<div class="bg-green-100 text-green-800 px-3 py-1 rounded text-sm font-medium">
ON TARGET
</div>
</div>
<div class="space-y-4 mb-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-600">Production</span>
<span class="text-gray-800">1,850/2,400 tons</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 77%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-600">Equipment Used</span>
<span class="text-gray-800">18/22 units</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-600 h-2 rounded-full" style="width: 82%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-600">Safety Incidents</span>
<span class="text-gray-800">0</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-red-600 h-2 rounded-full" style="width: 0%"></div>
</div>
</div>
</div>
<div class="pt-4 border-t border-gray-200">
<h3 class="text-sm font-medium text-gray-800 mb-2">Next Shift: SHIFT C</h3>
<div class="flex items-center justify-between text-sm mb-3">
<span class="text-gray-600">Starts in</span>
<span class="font-medium text-gray-800 blink">1 hour 22 minutes</span>
</div>
<button class="industrial-button-primary w-full py-2 rounded text-sm font-medium">
PREPARE SHIFT HANDOVER
</button>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
// Set current date
const now = new Date();
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', options);
// Production Trend Chart
const productionCtx = document.getElementById('productionChart').getContext('2d');
const productionChart = new Chart(productionCtx, {
type: 'line',
data: {
labels: Array.from({length: 30}, (_, i) => `${i+1}`),
datasets: [
{
label: 'Ore Production (tons)',
data: Array.from({length: 30}, () => Math.floor(Math.random() * 3000) + 18000),
borderColor: '#1d4ed8',
backgroundColor: 'rgba(29, 78, 216, 0.05)',
borderWidth: 2,
fill: true,
tension: 0.3
},
{
label: 'Target',
data: Array(30).fill(22000),
borderColor: '#10b981',
borderWidth: 1,
borderDash: [5, 5],
pointRadius: 0
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
boxWidth: 12,
padding: 20,
font: {
size: 12
}
}
},
tooltip: {
mode: 'index',
intersect: false,
backgroundColor: '#1f2937',
titleFont: {
size: 14,
weight: 'bold'
},
bodyFont: {
size: 12
},
padding: 12,
cornerRadius: 4
}
},
scales: {
x: {
grid: {
display: false
},
ticks: {
font: {
size: 10
}
}
},
y: {
beginAtZero: false,
min: 15000,
grid: {
color: 'rgba(0,0,0,0.05)'
},
ticks: {
callback: function(value) {
return value.toLocaleString() + 't';
},
font: {
size: 10
}
}
}
},
elements: {
point: {
radius: 3,
hoverRadius: 5
}
}
}
});
// Grade Distribution Chart
const gradeCtx = document.getElementById('gradeChart').getContext('2d');
const gradeChart = new Chart(gradeCtx, {
type: 'doughnut',
data: {
labels: ['High Grade (Fe >62%)', 'Medium Grade (Fe 58-62%)', 'Low Grade (Fe <58%)'],
datasets: [{
data: [45, 35, 20],
backgroundColor: [
'#10b981',
'#f59e0b',
'#ef4444'
],
borderWidth: 0,
borderRadius: 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right',
labels: {
boxWidth: 12,
padding: 12,
font: {
size: 12
}
}
},
tooltip: {
backgroundColor: '#1f2937',
titleFont: {
size: 12,
weight: 'bold'
},
bodyFont: {
size: 12
},
padding: 10,
cornerRadius: 4,
callbacks: {
label: function(context) {
return context.label + ': ' + context.raw + '%';
}
}
}
},
cutout: '70%'
}
});
// Simulate real-time data updates
function updateProductionData() {
const newData = Array.from({length: 30}, () => Math.floor(Math.random() * 3000) + 18000);
productionChart.data.datasets[0].data = newData;
productionChart.update();
// Update summary card with random value ±500 from current
const currentProduction = document.querySelector('div:has(> h3:contains("DAILY PRODUCTION"))').nextElementSibling.firstChild;
const currentValue = parseInt(currentProduction.textContent.replace(/,/g, ''));
const newValue = currentValue + Math.floor(Math.random() * 1000) - 500;
currentProduction.textContent = newValue.toLocaleString() + ' tons';
// Update status indicator
const statusIndicator = document.querySelector('div:has(> h3:contains("DAILY PRODUCTION"))').nextElementSibling.lastElementChild.firstElementChild;
const statusText = document.querySelector('div:has(> h3:contains("DAILY PRODUCTION"))').nextElementSibling.lastElementChild.lastElementChild;
const diff = newValue - 22000;
const percentage = (diff / 22000 * 100).toFixed(1);
if (diff > 0) {
statusIndicator.className = 'status-indicator status-active';
statusText.textContent = `${percentage}% above target`;
} else {
statusIndicator.className = 'status-indicator status-danger';
statusText.textContent = `${Math.abs(percentage)}% below target`;
}
setTimeout(updateProductionData, 5000);
}
// Start updates after initial load
setTimeout(updateProductionData, 5000);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=pennypacker/deepsite-mining" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |