drupal11 / index.html
bleblond's picture
Add 3 files
41af726 verified
<!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>