Skip to content

Commit 03386ff

Browse files
author
SP1983
committed
add time column to recent builds table #64
1 parent c0f35ed commit 03386ff

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

bin/sparky-web.raku

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ sub create-cro-app ($pool) {
494494
for @rows -> $b {
495495
my %b = $b;
496496
%b<data> = [];
497+
%b<dt_ago> = time-ago(%b<dt>);
497498
my @data = "$reports-dir/{$b<project>}/build-{$b<id>}.txt".IO.lines.tail(3);
498499
for @data -> $l {
499500
my $msg = "{$l}";

templates/builds_latest.crotmp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ function connect() {
6565
thd2.appendChild(document.createTextNode('description'));
6666
var thd3 = document.createElement('td');
6767
thd3.appendChild(document.createTextNode('state'));
68+
var thd4 = document.createElement('td');
69+
thd4.appendChild(document.createTextNode('time'));
6870
th.appendChild(thd1);
6971
th.appendChild(thd2);
7072
th.appendChild(thd3);
73+
th.appendChild(thd4);
7174
table.appendChild(th);
7275
for (const build of builds) {
7376
var tr = document.createElement('tr');
@@ -103,9 +106,12 @@ function connect() {
103106
//console.log(build);
104107
var td3 = document.createElement('td');
105108
td3.appendChild(document.createTextNode(build_st_str));
109+
var td4 = document.createElement('td');
110+
td4.appendChild(document.createTextNode(build.dt_ago));
106111
tr.appendChild(td1);
107112
tr.appendChild(td2);
108113
tr.appendChild(td3);
114+
tr.appendChild(td4);
109115
table.appendChild(tr);
110116
}
111117
p_cont.appendChild(table)

0 commit comments

Comments
 (0)