Skip to content

Commit

Permalink
static/tasks: Part revert, keep tasks.js working for now
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <[email protected]>
  • Loading branch information
ikeycode committed Sep 22, 2024
1 parent 91307a7 commit dd42ffe
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions static/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@ export function renderTask(task)
const ended = task.tsEnded != 0 ? new Date(task.tsEnded * 1000).toLocaleString() : "--";
const status = renderStatus(task.status);

if (task.tsEnded != 0) {
const difference = started - ended;
//Arrange the difference of date in hours, minutes, and seconds format
const hours = Math.floor((difference / (1000 * 60 * 60)));
const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((difference % (1000 * 60)) / 1000);
const duration = hours + "h" + minutes + "m" + seconds + "s";
}
const timestamp = task.tsEnded != 0 ? "Ended @ " + ended + " (" + duration + " on " + task.allocatedBuilder + ")" : "Started @ " + started + " on " + task.allocatedBuilder;
const timestamp = task.tsEnded != 0 ? "Ended @ " + ended : "Started @ " + started;
return `
<div class="list-group-item list-group-item-hoverable">
<div class="row align-items-center">
Expand Down

0 comments on commit dd42ffe

Please sign in to comment.