Skip to content

Commit 55de3e9

Browse files
committed
Value formatting on status page
1 parent 45262a7 commit 55de3e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/js/status.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ $(document).ready(function () {
2424
{ data: 1, title: 'Name'},
2525
{ data: 2, title: 'Available'},
2626
{ data: 3, title: 'Status'},
27-
{ data: 4, title: 'Status date'},
27+
{ data: 4, title: 'Status date', render: (el) => el == null ? '-' : dateToYMD(new Date(el)) },
2828
{ data: 5, title: 'Cooldown after Job', render: function(el) {
29-
return (el == null) ? 'awaiting info': `${el/60} Minutes`;
29+
return (el == null) ? 'awaiting info': `${Math.round(el/60)} Minutes`;
3030
}},
3131
{ data: 6, title: 'Waiting Jobs'},
3232
{ data: 7, title: 'Estimated waiting time', render: function(el, type, row) {
3333

34-
return (row[5] == null || row[7] == null) ? 'awaiting info' : `${( (row[7]+row[5]) * row[6]) / 60} Minutes`
34+
return (row[5] == null || row[7] == null) ? 'awaiting info' : `${Math.round(( (row[7]+row[5]) * row[6]) / 60)} Minutes`
3535
}},
3636
],
3737
deferRender: true,

0 commit comments

Comments
 (0)