This commit is contained in:
@@ -1813,11 +1813,19 @@ async function handlePopulateDatabase(event) {
|
||||
function showPopulateStatus() {
|
||||
const statusDiv = document.getElementById('populate-status');
|
||||
const resultsDiv = document.getElementById('populate-results');
|
||||
const progressBar = document.getElementById('populate-progress-bar');
|
||||
const progressText = document.getElementById('populate-progress-text');
|
||||
|
||||
if (statusDiv) {
|
||||
statusDiv.style.display = 'block';
|
||||
statusDiv.querySelector('.progress-fill').style.width = '0%';
|
||||
statusDiv.querySelector('.progress-text').textContent = 'Starting...';
|
||||
}
|
||||
|
||||
if (progressBar) {
|
||||
progressBar.style.width = '0%';
|
||||
}
|
||||
|
||||
if (progressText) {
|
||||
progressText.textContent = 'Starting...';
|
||||
}
|
||||
|
||||
if (resultsDiv) {
|
||||
@@ -1883,19 +1891,23 @@ function stopPopulatePolling() {
|
||||
}
|
||||
|
||||
function updatePopulateProgress(status) {
|
||||
const progressFill = document.querySelector('#populate-status .progress-fill');
|
||||
const progressText = document.querySelector('#populate-status .progress-text');
|
||||
const progressBar = document.getElementById('populate-progress-bar');
|
||||
const progressText = document.getElementById('populate-progress-text');
|
||||
const resultsDiv = document.getElementById('populate-results');
|
||||
|
||||
if (status.status === 'in_progress') {
|
||||
if (progressFill && progressText) {
|
||||
if (progressBar) {
|
||||
// Show indeterminate progress
|
||||
progressFill.style.width = '50%';
|
||||
progressBar.style.width = '50%';
|
||||
}
|
||||
if (progressText) {
|
||||
progressText.textContent = 'Populating database...';
|
||||
}
|
||||
} else if (status.status === 'completed') {
|
||||
if (progressFill && progressText) {
|
||||
progressFill.style.width = '100%';
|
||||
if (progressBar) {
|
||||
progressBar.style.width = '100%';
|
||||
}
|
||||
if (progressText) {
|
||||
progressText.textContent = 'Complete!';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user