INNER CODE UNIT · JavaScript

updateImportProgress

smithyhq/sqladmin · sqladmin/statics/js/main.js:132

function updateImportProgress(processed, total, imported, skipped) {
  const safeTotal = total > 0 ? total : 1;
  const percentage = Math.min(100, Math.round((processed / safeTotal) * 100));
  const isPersistingPhase = arguments.length > 4 && arguments[4] === 'persisting';

  lastProgressSnapshot = {
    processed: processed,
    total: total,
    imported: imported,
    skipped: skipped,
  };

  $('#modal-import-progress').removeClass('d-none');
  $('#modal-import-progress-bar').css('width', percentage + '%');

  if (isPersistingPhase) {
    startPersistingTicker(processed, total, imported, skipped);
    return;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…