File size: 41,719 Bytes
41af726 |
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 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drupal Migration Assistant | D7 to D11</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.progress-bar {
height: 6px;
transition: width 0.3s ease;
}
.file-drop-area {
border: 2px dashed #cbd5e0;
transition: all 0.3s ease;
}
.file-drop-area.active {
border-color: #4f46e5;
background-color: #eef2ff;
}
.step-indicator {
width: 40px;
height: 40px;
}
.module-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.migration-log {
max-height: 300px;
overflow-y: auto;
}
</style>
</head>
<body class="bg-gray-50">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="mb-10 text-center">
<h1 class="text-4xl font-bold text-indigo-800 mb-2">Drupal Migration Assistant</h1>
<p class="text-xl text-gray-600">Migrate from Drupal 7 to Drupal 11 using your .sitearchive.tar.zip file</p>
<div class="mt-4">
<span class="inline-block px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm font-medium">
<i class="fas fa-exclamation-triangle mr-1"></i> Experimental
</span>
</div>
</header>
<!-- Progress Steps -->
<div class="flex justify-between items-center mb-12 relative">
<div class="absolute top-1/2 left-0 right-0 h-1 bg-gray-200 -z-10"></div>
<div class="absolute top-1/2 left-0 h-1 bg-indigo-600 -z-10 transition-all duration-500" id="progress-line" style="width: 0%"></div>
<div class="step-group flex flex-col items-center" data-step="1">
<div class="step-indicator bg-indigo-600 text-white rounded-full flex items-center justify-center mb-2">
<span>1</span>
</div>
<span class="text-sm font-medium text-indigo-600">Upload Archive</span>
</div>
<div class="step-group flex flex-col items-center" data-step="2">
<div class="step-indicator bg-gray-200 text-gray-500 rounded-full flex items-center justify-center mb-2">
<span>2</span>
</div>
<span class="text-sm font-medium text-gray-500">Analyze</span>
</div>
<div class="step-group flex flex-col items-center" data-step="3">
<div class="step-indicator bg-gray-200 text-gray-500 rounded-full flex items-center justify-center mb-2">
<span>3</span>
</div>
<span class="text-sm font-medium text-gray-500">Configure</span>
</div>
<div class="step-group flex flex-col items-center" data-step="4">
<div class="step-indicator bg-gray-200 text-gray-500 rounded-full flex items-center justify-center mb-2">
<span>4</span>
</div>
<span class="text-sm font-medium text-gray-500">Migrate</span>
</div>
<div class="step-group flex flex-col items-center" data-step="5">
<div class="step-indicator bg-gray-200 text-gray-500 rounded-full flex items-center justify-center mb-2">
<span>5</span>
</div>
<span class="text-sm font-medium text-gray-500">Complete</span>
</div>
</div>
<!-- Step 1: Upload Archive -->
<div id="step-1" class="step-content">
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Upload Your Drupal 7 Site Archive</h2>
<p class="text-gray-600 mb-6">Please upload your Drupal 7 site archive file (.sitearchive.tar.zip) to begin the migration process. This file should contain your database dump and all site files.</p>
<div id="file-drop-area" class="file-drop-area rounded-lg p-8 text-center cursor-pointer">
<div class="flex flex-col items-center justify-center">
<i class="fas fa-file-archive text-5xl text-indigo-400 mb-4"></i>
<p class="text-lg font-medium text-gray-700 mb-2">Drag & drop your .sitearchive.tar.zip file here</p>
<p class="text-gray-500 mb-4">or</p>
<label for="file-input" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition cursor-pointer">
<i class="fas fa-upload mr-2"></i> Select File
</label>
<input type="file" id="file-input" class="hidden" accept=".zip,.tar.gz,.sitearchive.tar.zip">
</div>
</div>
<div id="file-info" class="hidden mt-6 p-4 bg-indigo-50 rounded-lg">
<div class="flex items-center">
<i class="fas fa-file-archive text-indigo-500 text-2xl mr-4"></i>
<div>
<p class="font-medium text-gray-800" id="file-name">filename.sitearchive.tar.zip</p>
<p class="text-sm text-gray-600" id="file-size">25.4 MB</p>
</div>
<button id="remove-file" class="ml-auto text-red-500 hover:text-red-700">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="mt-8">
<button id="next-step-1" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition disabled:opacity-50 disabled:cursor-not-allowed" disabled>
Analyze Archive <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6">
<h3 class="text-xl font-semibold text-gray-800 mb-4">Migration Requirements</h3>
<ul class="space-y-3">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
<span>Drupal 7 site archive must include both database and files</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
<span>Archive should be created using Backup and Migrate module or Drush</span>
</li>
<li class="flex items-start">
<i class="fas fa-exclamation-triangle text-yellow-500 mt-1 mr-3"></i>
<span>Large sites (>500MB) may take longer to process</span>
</li>
<li class="flex items-start">
<i class="fas fa-info-circle text-blue-500 mt-1 mr-3"></i>
<span>Ensure you have a complete backup before proceeding</span>
</li>
</ul>
</div>
</div>
<!-- Step 2: Analyze -->
<div id="step-2" class="step-content hidden">
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Analyzing Your Drupal 7 Site</h2>
<p class="text-gray-600 mb-6">We're examining your site archive to identify all components that need to be migrated to Drupal 11.</p>
<div class="mb-6">
<div class="flex justify-between mb-2">
<span class="text-sm font-medium text-gray-700">Analysis Progress</span>
<span class="text-sm font-medium text-indigo-600" id="progress-percent">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="analysis-progress" class="progress-bar bg-indigo-600 rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-blue-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-database text-blue-500 mr-2"></i>
<span class="font-medium">Database</span>
</div>
<p class="text-sm text-gray-600" id="db-status">Waiting to analyze...</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-file-code text-purple-500 mr-2"></i>
<span class="font-medium">Modules</span>
</div>
<p class="text-sm text-gray-600" id="modules-status">Waiting to analyze...</p>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-image text-green-500 mr-2"></i>
<span class="font-medium">Files</span>
</div>
<p class="text-sm text-gray-600" id="files-status">Waiting to analyze...</p>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-6">
<h4 class="font-medium text-gray-800 mb-3">Analysis Log</h4>
<div id="analysis-log" class="migration-log text-sm text-gray-700 font-mono bg-white p-3 rounded">
<div class="log-entry text-gray-500">Starting analysis process...</div>
</div>
</div>
<div class="flex justify-between">
<button class="step-back px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button id="next-step-2" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition disabled:opacity-50 disabled:cursor-not-allowed" disabled>
Configure Migration <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
<!-- Step 3: Configure -->
<div id="step-3" class="step-content hidden">
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Migration Configuration</h2>
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-800 mb-4">Site Information</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label class="block text-gray-700 mb-2">Site Name</label>
<input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" value="My Drupal Site">
</div>
<div>
<label class="block text-gray-700 mb-2">Site Email</label>
<input type="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" value="admin@example.com">
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-800 mb-4">Content Migration</h3>
<div class="space-y-4">
<div class="flex items-center">
<input type="checkbox" id="migrate-content" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="migrate-content" class="ml-3 text-gray-700">Migrate all content (nodes, taxonomy, etc.)</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="migrate-users" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="migrate-users" class="ml-3 text-gray-700">Migrate users and roles</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="migrate-files" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="migrate-files" class="ml-3 text-gray-700">Migrate files and media</label>
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-800 mb-4">Module Migration</h3>
<p class="text-gray-600 mb-4">Select which modules to migrate to their Drupal 11 equivalents.</p>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-views" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-views" class="ml-2 font-medium">Views</label>
</div>
<p class="text-sm text-gray-600">Will be migrated to Drupal 11 Views</p>
</div>
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-ctools" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-ctools" class="ml-2 font-medium">CTools</label>
</div>
<p class="text-sm text-gray-600">Functionality included in core</p>
</div>
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-pathauto" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-pathauto" class="ml-2 font-medium">Pathauto</label>
</div>
<p class="text-sm text-gray-600">Will be migrated to Drupal 11 Pathauto</p>
</div>
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-token" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-token" class="ml-2 font-medium">Token</label>
</div>
<p class="text-sm text-gray-600">Functionality included in core</p>
</div>
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-webform" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-webform" class="ml-2 font-medium">Webform</label>
</div>
<p class="text-sm text-gray-600">Will be migrated to Drupal 11 Webform</p>
</div>
<div class="module-card bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition">
<div class="flex items-center mb-3">
<input type="checkbox" id="module-panels" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="module-panels" class="ml-2 font-medium">Panels</label>
</div>
<p class="text-sm text-gray-600">Consider migrating to Layout Builder</p>
</div>
</div>
</div>
<div class="mb-8">
<h3 class="text-xl font-medium text-gray-800 mb-4">Advanced Options</h3>
<div class="space-y-4">
<div>
<label class="block text-gray-700 mb-2">Content Language</label>
<select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
<option>English (en)</option>
<option>French (fr)</option>
<option>Spanish (es)</option>
<option>German (de)</option>
</select>
</div>
<div class="flex items-center">
<input type="checkbox" id="preserve-ids" class="h-5 w-5 text-indigo-600 rounded">
<label for="preserve-ids" class="ml-3 text-gray-700">Preserve original content IDs</label>
</div>
<div class="flex items-center">
<input type="checkbox" id="generate-report" class="h-5 w-5 text-indigo-600 rounded" checked>
<label for="generate-report" class="ml-3 text-gray-700">Generate migration report</label>
</div>
</div>
</div>
<div class="flex justify-between">
<button class="step-back px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button id="next-step-3" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
Start Migration <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
<!-- Step 4: Migrate -->
<div id="step-4" class="step-content hidden">
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8">
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Migrating to Drupal 11</h2>
<p class="text-gray-600 mb-6">We're now migrating your Drupal 7 site to Drupal 11. This process may take several minutes depending on your site size.</p>
<div class="mb-6">
<div class="flex justify-between mb-2">
<span class="text-sm font-medium text-gray-700">Migration Progress</span>
<span class="text-sm font-medium text-indigo-600" id="migration-percent">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="migration-progress" class="progress-bar bg-indigo-600 rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-blue-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-database text-blue-500 mr-2"></i>
<span class="font-medium">Database</span>
</div>
<p class="text-sm text-gray-600" id="migrate-db-status">Waiting to migrate...</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-file-code text-purple-500 mr-2"></i>
<span class="font-medium">Content</span>
</div>
<p class="text-sm text-gray-600" id="migrate-content-status">Waiting to migrate...</p>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-image text-green-500 mr-2"></i>
<span class="font-medium">Configuration</span>
</div>
<p class="text-sm text-gray-600" id="migrate-config-status">Waiting to migrate...</p>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-6">
<h4 class="font-medium text-gray-800 mb-3">Migration Log</h4>
<div id="migration-log" class="migration-log text-sm text-gray-700 font-mono bg-white p-3 rounded">
<div class="log-entry text-gray-500">Preparing migration environment...</div>
</div>
</div>
<div class="flex justify-between">
<button class="step-back px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button id="next-step-4" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition disabled:opacity-50 disabled:cursor-not-allowed" disabled>
Complete <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
<!-- Step 5: Complete -->
<div id="step-5" class="step-content hidden">
<div class="bg-white rounded-xl shadow-md overflow-hidden p-6 mb-8 text-center">
<div class="mb-8">
<div class="inline-flex items-center justify-center w-20 h-20 bg-green-100 rounded-full mb-4">
<i class="fas fa-check-circle text-green-500 text-4xl"></i>
</div>
<h2 class="text-2xl font-semibold text-gray-800 mb-2">Migration Complete!</h2>
<p class="text-gray-600 mb-6">Your Drupal 7 site has been successfully migrated to Drupal 11.</p>
</div>
<div class="max-w-2xl mx-auto mb-8">
<div class="bg-green-50 border-l-4 border-green-500 p-4 mb-6">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-info-circle text-green-500 mt-1 mr-3"></i>
</div>
<div>
<p class="text-sm text-green-700">
Your new Drupal 11 site is ready. You can now log in with your Drupal 7 credentials.
</p>
</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
<div class="bg-white border border-gray-200 rounded-lg p-6">
<h3 class="text-lg font-medium text-gray-800 mb-3">Migration Summary</h3>
<ul class="space-y-2 text-left text-sm text-gray-600">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span><span class="font-medium">142</span> content items migrated</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span><span class="font-medium">28</span> users migrated</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span><span class="font-medium">15</span> taxonomy terms migrated</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span><span class="font-medium">326</span> files migrated</span>
</li>
</ul>
</div>
<div class="bg-white border border-gray-200 rounded-lg p-6">
<h3 class="text-lg font-medium text-gray-800 mb-3">Next Steps</h3>
<ul class="space-y-3 text-left text-sm text-gray-600">
<li class="flex items-start">
<i class="fas fa-lightbulb text-yellow-500 mt-1 mr-2"></i>
<span>Review your site content and configuration</span>
</li>
<li class="flex items-start">
<i class="fas fa-lightbulb text-yellow-500 mt-1 mr-2"></i>
<span>Update any custom themes for Drupal 11</span>
</li>
<li class="flex items-start">
<i class="fas fa-lightbulb text-yellow-500 mt-1 mr-2"></i>
<span>Test all critical site functionality</span>
</li>
<li class="flex items-start">
<i class="fas fa-lightbulb text-yellow-500 mt-1 mr-2"></i>
<span>Consider implementing a new Drupal 11 theme</span>
</li>
</ul>
</div>
</div>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<a href="#" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
<i class="fas fa-external-link-alt mr-2"></i> Visit Your New Site
</a>
<a href="#" class="px-6 py-3 bg-white border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition">
<i class="fas fa-download mr-2"></i> Download Migration Report
</a>
</div>
</div>
</div>
</div>
</div>
<script>
// Current step tracking
let currentStep = 1;
// DOM elements
const stepContents = document.querySelectorAll('.step-content');
const stepGroups = document.querySelectorAll('.step-group');
const progressLine = document.getElementById('progress-line');
const fileDropArea = document.getElementById('file-drop-area');
const fileInput = document.getElementById('file-input');
const fileInfo = document.getElementById('file-info');
const fileName = document.getElementById('file-name');
const fileSize = document.getElementById('file-size');
const removeFileBtn = document.getElementById('remove-file');
const nextStep1Btn = document.getElementById('next-step-1');
// File upload handling
fileDropArea.addEventListener('click', () => fileInput.click());
fileDropArea.addEventListener('dragover', (e) => {
e.preventDefault();
fileDropArea.classList.add('active');
});
fileDropArea.addEventListener('dragleave', () => {
fileDropArea.classList.remove('active');
});
fileDropArea.addEventListener('drop', (e) => {
e.preventDefault();
fileDropArea.classList.remove('active');
if (e.dataTransfer.files.length) {
handleFileUpload(e.dataTransfer.files[0]);
}
});
fileInput.addEventListener('change', () => {
if (fileInput.files.length) {
handleFileUpload(fileInput.files[0]);
}
});
removeFileBtn.addEventListener('click', (e) => {
e.stopPropagation();
fileInput.value = '';
fileInfo.classList.add('hidden');
nextStep1Btn.disabled = true;
});
function handleFileUpload(file) {
if (!file.name.endsWith('.sitearchive.tar.zip') && !file.name.endsWith('.zip') && !file.name.endsWith('.tar.gz')) {
alert('Please upload a valid Drupal site archive file (.sitearchive.tar.zip, .zip, or .tar.gz)');
return;
}
fileName.textContent = file.name;
fileSize.textContent = formatFileSize(file.size);
fileInfo.classList.remove('hidden');
nextStep1Btn.disabled = false;
}
function formatFileSize(bytes) {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
}
// Step navigation
document.querySelectorAll('.step-back').forEach(btn => {
btn.addEventListener('click', () => navigateToStep(currentStep - 1));
});
document.getElementById('next-step-1').addEventListener('click', () => {
navigateToStep(2);
simulateAnalysis();
});
document.getElementById('next-step-2').addEventListener('click', () => {
navigateToStep(3);
});
document.getElementById('next-step-3').addEventListener('click', () => {
navigateToStep(4);
simulateMigration();
});
document.getElementById('next-step-4').addEventListener('click', () => {
navigateToStep(5);
});
function navigateToStep(step) {
// Hide current step
document.getElementById(`step-${currentStep}`).classList.add('hidden');
// Update step indicators
stepGroups.forEach(group => {
const groupStep = parseInt(group.dataset.step);
const indicator = group.querySelector('.step-indicator');
const text = group.querySelector('span:last-child');
if (groupStep === step) {
indicator.classList.remove('bg-gray-200', 'text-gray-500');
indicator.classList.add('bg-indigo-600', 'text-white');
text.classList.remove('text-gray-500');
text.classList.add('text-indigo-600');
} else if (groupStep < step) {
indicator.classList.remove('bg-gray-200', 'text-gray-500');
indicator.classList.add('bg-green-500', 'text-white');
text.classList.remove('text-gray-500');
text.classList.add('text-green-600');
} else {
indicator.classList.remove('bg-indigo-600', 'text-white', 'bg-green-500');
indicator.classList.add('bg-gray-200', 'text-gray-500');
text.classList.remove('text-indigo-600', 'text-green-600');
text.classList.add('text-gray-500');
}
});
// Update progress line
const progressPercent = ((step - 1) / 4) * 100;
progressLine.style.width = `${progressPercent}%`;
// Show new step
document.getElementById(`step-${step}`).classList.remove('hidden');
currentStep = step;
// Scroll to top
window.scrollTo({ top: 0, behavior: 'smooth' });
}
// Simulation functions for demo purposes
function simulateAnalysis() {
const progressBar = document.getElementById('analysis-progress');
const percentText = document.getElementById('progress-percent');
const analysisLog = document.getElementById('analysis-log');
const nextStep2Btn = document.getElementById('next-step-2');
const statusElements = {
db: document.getElementById('db-status'),
modules: document.getElementById('modules-status'),
files: document.getElementById('files-status')
};
let progress = 0;
const interval = setInterval(() => {
progress += Math.random() * 5;
if (progress > 100) progress = 100;
progressBar.style.width = `${progress}%`;
percentText.textContent = `${Math.round(progress)}%`;
// Update status messages at certain intervals
if (progress > 10 && progress < 20) {
statusElements.db.textContent = 'Extracting database...';
addLogEntry(analysisLog, 'Extracting database from archive...');
}
if (progress > 25 && progress < 35) {
statusElements.db.textContent = 'Analyzing database structure...';
addLogEntry(analysisLog, 'Found 28 content types in database');
}
if (progress > 35 && progress < 45) {
statusElements.modules.textContent = 'Scanning for modules...';
addLogEntry(analysisLog, 'Scanning for contributed modules...');
}
if (progress > 50 && progress < 60) {
statusElements.modules.textContent = '32 modules detected';
statusElements.files.textContent = 'Scanning files directory...';
addLogEntry(analysisLog, 'Found 32 enabled modules');
}
if (progress > 70 && progress < 80) {
statusElements.files.textContent = '1,248 files detected';
addLogEntry(analysisLog, 'Found 1,248 files in sites/default/files');
}
if (progress > 85 && progress < 95) {
statusElements.db.textContent = 'Database analysis complete';
statusElements.modules.textContent = 'Module analysis complete';
statusElements.files.textContent = 'File analysis complete';
addLogEntry(analysisLog, 'Generating migration plan...');
}
if (progress === 100) {
clearInterval(interval);
addLogEntry(analysisLog, 'Analysis complete. Ready for migration configuration.', 'text-green-600');
nextStep2Btn.disabled = false;
}
}, 300);
}
function simulateMigration() {
const progressBar = document.getElementById('migration-progress');
const percentText = document.getElementById('migration-percent');
const migrationLog = document.getElementById('migration-log');
const nextStep4Btn = document.getElementById('next-step-4');
const statusElements = {
db: document.getElementById('migrate-db-status'),
content: document.getElementById('migrate-content-status'),
config: document.getElementById('migrate-config-status')
};
let progress = 0;
const interval = setInterval(() => {
progress += Math.random() * 3;
if (progress > 100) progress = 100;
progressBar.style.width = `${progress}%`;
percentText.textContent = `${Math.round(progress)}%`;
// Update status messages at certain intervals
if (progress > 5 && progress < 15) {
statusElements.db.textContent = 'Creating Drupal 11 database...';
addLogEntry(migrationLog, 'Initializing Drupal 11 environment...');
}
if (progress > 20 && progress < 30) {
statusElements.db.textContent = 'Database created';
statusElements.config.textContent = 'Migrating configuration...';
addLogEntry(migrationLog, 'Created Drupal 11 database structure');
}
if (progress > 35 && progress < 45) {
statusElements.config.textContent = '42 configuration items migrated';
statusElements.content.textContent = 'Preparing content migration...';
addLogEntry(migrationLog, 'Migrated site configuration');
}
if (progress > 50 && progress < 60) {
statusElements.content.textContent = 'Migrating content (12/142)...';
addLogEntry(migrationLog, 'Started content migration process');
}
if (progress > 65 && progress < 75) {
statusElements.content.textContent = 'Migrating content (87/142)...';
addLogEntry(migrationLog, 'Migrating taxonomy terms...');
}
if (progress > 80 && progress < 90) {
statusElements.content.textContent = 'Migrating content (142/142)';
addLogEntry(migrationLog, 'Content migration complete');
}
if (progress > 92 && progress < 98) {
statusElements.content.textContent = 'Content migration complete';
statusElements.config.textContent = 'Configuration migration complete';
addLogEntry(migrationLog, 'Finalizing migration...');
}
if (progress === 100) {
clearInterval(interval);
addLogEntry(migrationLog, 'Migration completed successfully!', 'text-green-600');
nextStep4Btn.disabled = false;
}
}, 300);
}
function addLogEntry(logElement, message, colorClass = '') {
const entry = document.createElement('div');
entry.className = `log-entry ${colorClass}`;
entry.textContent = `[${new Date().toLocaleTimeString()}] ${message}`;
logElement.appendChild(entry);
logElement.scrollTop = logElement.scrollHeight;
}
</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=bleblond/drupal11" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |