diff --git a/server/job/job-lifecycle.js b/server/job/job-lifecycle.js index ddd58a834..7076069f6 100644 --- a/server/job/job-lifecycle.js +++ b/server/job/job-lifecycle.js @@ -81,7 +81,7 @@ const jobLifecycle = async (req, res) => { const percentage = finalTotal > 0 ? (value / finalTotal) * 100 : 0; const color = getLifecycleStatusColor(status); const roundedPercentage = `${Math.round(percentage)}%`; - const averageValue = _size(jobIDs) > 0 ? value / jobIDs.length : 0; + const averageValue = _.size(jobIDs) > 0 ? value / jobIDs.length : 0; const averageHumanReadable = durationToHumanReadable(moment.duration(averageValue)); finalSummations.push({ status, @@ -105,9 +105,9 @@ const jobLifecycle = async (req, res) => { total: finalTotal, statusCounts: finalStatusCounts, humanReadable: durationToHumanReadable(moment.duration(finalTotal)), - averageValue: _size(jobIDs) > 0 ? finalTotal / jobIDs.length : 0, + averageValue: _.size(jobIDs) > 0 ? finalTotal / jobIDs.length : 0, averageHumanReadable: - _size(jobIDs) > 0 + _.size(jobIDs) > 0 ? durationToHumanReadable(moment.duration(finalTotal / jobIDs.length)) : durationToHumanReadable(moment.duration(0)) }