Loading www/modules/containers.js +5 −4 Changes for www/modules/containers.js: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -153,9 +153,10 @@ async function loadApps() { const job = storeJob !== null ? (data.jobs || []).find(j => j.id === storeJob) : null; const reading = job && job.state === 'running'; if (store && !(job && !reading)) return; if (job && !reading) { storeError = job.state === 'failed' ? (job.error || t('failed')) : ''; const ended = storeJob !== null && !reading; // or gone with a restarted containerd if (store && !ended) return; if (ended) { storeError = job && job.state === 'failed' ? (job.error || t('failed')) : ''; storeJob = null; } try { Loading @@ -180,7 +181,7 @@ // quicker while something is on its way function schedule() { clearTimeout(timer); const busy = data && (jobs.running(data.jobs) || const busy = data && (storeJob !== null || jobs.running(data.jobs) || (data.containers || []).some(c => c.state === 'starting' || c.state === 'stopping')); timer = setTimeout(() => { if (!document.querySelector('dialog')) load(); else schedule(); }, busy ? 2000 : 15000); } Loading Loading
www/modules/containers.js +5 −4 Changes for www/modules/containers.js: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -153,9 +153,10 @@ async function loadApps() { const job = storeJob !== null ? (data.jobs || []).find(j => j.id === storeJob) : null; const reading = job && job.state === 'running'; if (store && !(job && !reading)) return; if (job && !reading) { storeError = job.state === 'failed' ? (job.error || t('failed')) : ''; const ended = storeJob !== null && !reading; // or gone with a restarted containerd if (store && !ended) return; if (ended) { storeError = job && job.state === 'failed' ? (job.error || t('failed')) : ''; storeJob = null; } try { Loading @@ -180,7 +181,7 @@ // quicker while something is on its way function schedule() { clearTimeout(timer); const busy = data && (jobs.running(data.jobs) || const busy = data && (storeJob !== null || jobs.running(data.jobs) || (data.containers || []).some(c => c.state === 'starting' || c.state === 'stopping')); timer = setTimeout(() => { if (!document.querySelector('dialog')) load(); else schedule(); }, busy ? 2000 : 15000); } Loading