Skip to content

Commit

Permalink
on overview page with repos & builds, only show home disk usage once …
Browse files Browse the repository at this point in the history
…per repo

it would be the same value each time.
  • Loading branch information
mjl- committed Sep 26, 2024
1 parent 96d17e8 commit a67e6da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ const pageHome = async (): Promise<Page> => {
dom.td(b.Version, b.CommitHash ? attr.title('Commit '+b.CommitHash) : []),
dom.td(formatCoverage(rb.Repo, b)),
dom.td(formatBuildSize(b)),
dom.td(rb.Repo.UID ? dom.span(formatSize(rb.Repo.HomeDiskUsage), attr.title('Of reused home directory')) : []),
i === 0 ? dom.td(attr.rowspan(''+(rb.Builds || []).length), rb.Repo.UID ? dom.span(formatSize(rb.Repo.HomeDiskUsage), attr.title('Of reused home directory')) : []) : [],
dom.td(atexit.ageMins(b.Created, undefined)),
dom.td(style({textAlign: 'left'}), buildErrmsg(b)),
)
Expand Down
2 changes: 1 addition & 1 deletion web/ding.js
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ const pageHome = async () => {
if ((rb.Builds || []).length === 0) {
return dom.tr(dom.td(link('#repo/' + encodeURIComponent(rb.Repo.Name), rb.Repo.Name)));
}
return (rb.Builds || []).map((b, i) => dom.tr(i === 0 ? dom.td(link('#repo/' + encodeURIComponent(rb.Repo.Name), rb.Repo.Name), attr.rowspan('' + (rb.Builds || []).length)) : [], dom.td(link('#repo/' + encodeURIComponent(rb.Repo.Name) + '/build/' + b.ID, '' + b.ID)), dom.td(buildStatus(b)), dom.td(b.Start ? atexit.age(b.Start, b.Finish || undefined) : ''), dom.td(b.Branch), dom.td(b.Version, b.CommitHash ? attr.title('Commit ' + b.CommitHash) : []), dom.td(formatCoverage(rb.Repo, b)), dom.td(formatBuildSize(b)), dom.td(rb.Repo.UID ? dom.span(formatSize(rb.Repo.HomeDiskUsage), attr.title('Of reused home directory')) : []), dom.td(atexit.ageMins(b.Created, undefined)), dom.td(style({ textAlign: 'left' }), buildErrmsg(b))));
return (rb.Builds || []).map((b, i) => dom.tr(i === 0 ? dom.td(link('#repo/' + encodeURIComponent(rb.Repo.Name), rb.Repo.Name), attr.rowspan('' + (rb.Builds || []).length)) : [], dom.td(link('#repo/' + encodeURIComponent(rb.Repo.Name) + '/build/' + b.ID, '' + b.ID)), dom.td(buildStatus(b)), dom.td(b.Start ? atexit.age(b.Start, b.Finish || undefined) : ''), dom.td(b.Branch), dom.td(b.Version, b.CommitHash ? attr.title('Commit ' + b.CommitHash) : []), dom.td(formatCoverage(rb.Repo, b)), dom.td(formatBuildSize(b)), i === 0 ? dom.td(attr.rowspan('' + (rb.Builds || []).length), rb.Repo.UID ? dom.span(formatSize(rb.Repo.HomeDiskUsage), attr.title('Of reused home directory')) : []) : [], dom.td(atexit.ageMins(b.Created, undefined)), dom.td(style({ textAlign: 'left' }), buildErrmsg(b))));
}))));
};
render();
Expand Down

0 comments on commit a67e6da

Please sign in to comment.