Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/UI add builder info #13

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion static/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ export function renderTask(task)
const ended = task.tsEnded != 0 ? new Date(task.tsEnded * 1000).toLocaleString() : "--";
const status = renderStatus(task.status);

const timestamp = task.tsEnded != 0 ? "Ended @ " + ended : "Started @ " + started;
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;
return `
<div class="list-group-item list-group-item-hoverable">
<div class="row align-items-center">
Expand Down
3 changes: 3 additions & 0 deletions views/tasks/info.dt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ table.table.table-borderless.table-responsive
th Status
td
include tasks/status
tr
th Builder
td=task.allocatedBuilder
tr
th Architecture
td: span.badge=task.architecture
Expand Down
Loading