commit e80239e8ef92c7438e1df048fb8831e313ffe905
parent 27c57c8c77eff72b21b5d0dbc4006f75d5c508a5
Author: kristapsdz <kristaps@bsd.lv>
Date: Mon, 23 Mar 2020 13:34:28 +0000
parent 27c57c8c77eff72b21b5d0dbc4006f75d5c508a5
Author: kristapsdz <kristaps@bsd.lv>
Date: Mon, 23 Mar 2020 13:34:28 +0000
Use the maximum hosts done when computing freshness, not the total of reports, since this will account for older (upgraded) machines.
diff --git a/main.c b/main.c @@ -616,7 +616,7 @@ get_dash(struct kreq *r, time_t mtime) struct report_q *rq; struct report *rn; struct dash *dash = NULL, *curdash; - size_t i, dashsz = 0; + size_t i, dashsz = 0, maxdone = 0; struct tm tm; char *urlproj, *urlcommit; char datebuf[32], commitshort[8]; @@ -687,7 +687,8 @@ get_dash(struct kreq *r, time_t mtime) assert(i < dashsz); if (dash[i].nhash[0] != '\0' && strcmp(rn->fetchhead, dash[i].nhash) == 0) { - dash[i].finished++; + if (++dash[i].finished > maxdone) + maxdone = dash[i].finished; dash[i].success += rn->distcheck != 0; } else { dash[i].pending++; @@ -758,18 +759,13 @@ get_dash(struct kreq *r, time_t mtime) khtml_attr(&req, KELEM_DIV, KATTR_CLASS, "cell report-finished-pct", KATTR__MAX); - khtml_int(&req, floor(100 * dash[i].finished / - (dash[i].finished + dash[i].pending))); + khtml_int(&req, floor + (100 * dash[i].finished / maxdone)); khtml_closeelem(&req, 1); /* cell */ khtml_attr(&req, KELEM_DIV, KATTR_CLASS, "cell report-pending", KATTR__MAX); - khtml_elem(&req, KELEM_SPAN); khtml_int(&req, dash[i].finished); - khtml_closeelem(&req, 1); /* span */ - khtml_elem(&req, KELEM_SPAN); - khtml_int(&req, dash[i].pending); - khtml_closeelem(&req, 1); /* span */ khtml_closeelem(&req, 1); /* cell */ khtml_attr(&req, KELEM_DIV, KATTR_CLASS,
diff --git a/minci.css b/minci.css @@ -101,7 +101,7 @@ div.table > :first-child { display: none; .lefthead.project-name { padding: 0 0.3rem; } .lefthead.project-repo::before { content: 'commit:'; } .lefthead.report-env::before { content: 'Env: '; } -.lefthead.report-deps::before { content: 'Deps: '; } +.lefthead.report-deps::before { content: 'Config: '; } .lefthead.report-build::before { content: 'Build: '; } .lefthead.report-regress::before { content: 'Test: '; } .lefthead.report-install::before { content: 'Install: '; } @@ -113,8 +113,6 @@ div.table > :first-child { display: none; display: inline-block; padding-right: 0.25rem; } .report-pending { text-align: center; } -.report-pending > :first-child::after { content: ':'; - opacity: 0.5; } .report-failure::before { content: 'Report failure.'; color: red; } .report-success::before { content: 'Report success.'; @@ -136,10 +134,10 @@ div.table > :first-child { display: none; .cell.report-commit { display: inline-block; } .head.project-name::before { content: 'project'; } .head.report-finished-pct::before { content: 'fresh'; } - .head.report-pending::before { content: 'wait'; } + .head.report-pending::before { content: 'done'; } .head.report-start::before { content: 'date'; } .head.report-env::before { content: 'env'; } - .head.report-deps::before { content: 'deps'; } + .head.report-deps::before { content: 'config'; } .head.report-build::before { content: 'build'; } .head.report-regress::before { content: 'test'; } .head.report-install::before { content: 'install'; }
: nply/minci