diff --git a/CHANGELOG.md b/CHANGELOG.md index f7d33b655..ee356b6b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -224,6 +224,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Capitals: page and window titles, menu items and buttons are in Title Case - New Ticket, Mark Reviewed, Back Up Now, Turn Off Portal Access - and field labels, section headings, tabs and help are in sentence case - Postal code, Tax rate, Physical location - in the agent pages, Admin and the client portal alike. The settings pages in the menu are now Company Details, Invoices and Billing, Purchase Orders, Client Portal and Single Sign-on. - Lists: the first click on a column you aren't sorting by sorts names A-Z and dates, money and counts newest or largest first, and a second click flips it. It used to go the opposite way to the column you were on, so the first click could go either way. - Badges and blanks: every badge is a rounded pill, the menu counts included, and an empty value shows as a grey dash everywhere. A request that can't be done - credit over the balance, say - shows in red like every other error, and the client portal's search boxes read Search ... like the agent pages'. +- Lengths of time: booking lengths, the dispatch board and how long a cron job ran are written 1h 30m like time logged everywhere else - they read 1 hour 30 min and 2 min 5 s - and hours as a number are 12.5 h, project hours included. ### Bug Fixes diff --git a/admin/cron.php b/admin/cron.php index 12064c892..7e575f6e0 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -189,16 +189,16 @@ $took = function ($seconds) { return 'under 0.1 s'; } if ($seconds < 10) { - return rtrim(rtrim(number_format($seconds, 1), '0'), '.') . ' s'; + return rtrim(rtrim(number_format($seconds, 1), '0'), '.') . 's'; } if ($seconds < 60) { - return round($seconds) . ' s'; + return round($seconds) . 's'; } $minutes = intdiv(intval(round($seconds)), 60); if ($minutes < 60) { - return $minutes . ' min ' . (intval(round($seconds)) % 60) . ' s'; + return $minutes . 'm ' . (intval(round($seconds)) % 60) . 's'; } - return intdiv($minutes, 60) . ' h ' . ($minutes % 60) . ' min'; + return intdiv($minutes, 60) . 'h ' . ($minutes % 60) . 'm'; }; // Job names in a sentence - "Mail Queue", "Mail Queue and Backup", "Mail Queue, Backup and Nightly Tasks" - each a link to its row $job_names = function ($list) { diff --git a/agent/js/dispatch.js b/agent/js/dispatch.js index 758962cc4..342f4956d 100644 --- a/agent/js/dispatch.js +++ b/agent/js/dispatch.js @@ -82,7 +82,7 @@ function lengthText(minutes) { const h = Math.floor(minutes / 60); const m = minutes % 60; - return ((h ? h + (h > 1 ? ' hours' : ' hour') : '') + (m ? ' ' + m + ' min' : '')).trim(); + return ((h ? h + 'h' : '') + (m ? ' ' + m + 'm' : '')).trim(); } function minutesBetween(start, end) { const a = parseDateTime(start); @@ -886,7 +886,7 @@ function bar(minutes, capacity) { const pct = capacity ? Math.min(100, Math.round(minutes / capacity * 100)) : 0; const tone = capacity && minutes > capacity ? 'bg-danger' : (pct >= 85 ? 'bg-warning' : 'bg-primary'); - return '