Skip to content

Commit

Permalink
Show oudated binaries as fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 4, 2025
1 parent c710325 commit b8de9f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 4 additions & 2 deletions routes/pkginfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function format_count(count){
function summarize_checks(pkgdata){
var results = pkgdata._status.match('suc') ? {OK:1} : {ERROR:1};
pkgdata._binaries.filter(x => x.check).forEach(function(bin){
if(bin.commit != pkgdata._commit.id)
bin.check = 'FAILURE';
if(!results[bin.check]){
results[bin.check] = 1
} else {
Expand All @@ -50,9 +52,9 @@ function summarize_checks(pkgdata){
});
var out = [];
for (const [key, value] of Object.entries(results)) {
out.push(`${key}: ${value}`)
out.push(`${value} ${key}`)
}
return out.join(" ");
return out.join(", ");
}

function group_binaries(x){
Expand Down
13 changes: 8 additions & 5 deletions views/pkginfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ block content
| )

| . Checks:
if _checksummary.includes('ERROR')
if _checksummary.match(/(ERROR|FAIL)/)
a.ms-1.link-underline-dark.text-danger.fw-bold(data-bs-toggle='collapse' href='#checktable') #{_checksummary}
else if _checksummary.includes('WARNING')
a.ms-1.link-underline-dark.text-warning.fw-bold(data-bs-toggle='collapse' href='#checktable') #{_checksummary}
Expand All @@ -241,7 +241,7 @@ block content
tr
th Target
th Result
th Date
th Latest binary
tbody
tr
td Doc / Vignettes
Expand All @@ -256,14 +256,17 @@ block content
tr
td R-#{bin.r.substring(0,3)}-#{bin.os}#{bin.arch ? `-${bin.arch}` : '' }
td
a(target="_blank" href=bin.buildurl)
if bin.check == 'ERROR'
a(target="_blank" href=_buildurl)
if _commit.id != bin.commit
span.text-danger OUTDATED
else if bin.check == 'ERROR'
span.text-danger #{bin.check}
else if bin.check == 'WARNING'
span.text-warning #{bin.check}
else
span.text-dark #{bin.check}
td #{date_to_string(bin.date)}
td
a.text-dark(target="_blank" href=bin.buildurl) #{date_to_string(bin.date)}



Expand Down

0 comments on commit b8de9f9

Please sign in to comment.