From 22ffd256190053852965b44dc5314a7feace9216 Mon Sep 17 00:00:00 2001 From: jsuelwald Date: Sun, 18 Dec 2022 07:20:42 +0100 Subject: [PATCH] Change time display on job Change "Processed 1 image in 150.65 seconds" to "Processed 1 Image in 2 minutes 30 seconds" to be consistent with the approx. time remaining while rendering --- ui/media/js/main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index ea3968ca..5dc5139e 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -623,19 +623,18 @@ function onTaskCompleted(task, reqBody, instance, outputContainer, stepUpdate) { task['stopTask'].innerHTML = ' Remove' task['taskStatusLabel'].style.display = 'none' - let time = Date.now() - task.startTime - time /= 1000 + let time = millisecondsToStr( Date.now() - task.startTime ) if (task.batchesDone == task.batchCount) { if (!task.outputMsg.innerText.toLowerCase().includes('error')) { - task.outputMsg.innerText = `Processed ${task.numOutputsTotal} images in ${time} seconds` + task.outputMsg.innerText = `Processed ${task.numOutputsTotal} images in ${time}` } task.progressBar.style.height = "0px" task.progressBar.style.border = "0px solid var(--background-color3)" task.progressBar.classList.remove("active") setStatus('request', 'done', 'success') } else { - task.outputMsg.innerText += `Task ended after ${time} seconds` + task.outputMsg.innerText += `Task ended after ${time}` } if (randomSeedField.checked) {