Skip to content

Commit

Permalink
Prefer linking to REv2 Directory messages instead of Trees
Browse files Browse the repository at this point in the history
This reduces the amount of load clicking through large output
directory hierarchies, as it no longer requires REv2 Tree objects to get
loaded constantly.
  • Loading branch information
EdSchouten committed Jan 26, 2024
1 parent 0e6f8d2 commit efa0bb9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/bb_browser/templates/page_action.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,14 @@ <h2 class="my-4">Output files</h2>
{{range .OutputDirectories}}
<tr class="font-monospace">
<td style="white-space: nowrap">drwxr-xr-x</td>
<td style="text-align: right">{{.TreeDigest.SizeBytes}}</td>
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../tree/{{.TreeDigest.Hash}}-{{.TreeDigest.SizeBytes}}/">{{.Path}}</a>/</td>
{{$path := .Path}}
{{with .RootDirectoryDigest}}
<td style="text-align: right">{{.SizeBytes}}</td>
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../directory/{{.Hash}}-{{.SizeBytes}}/">{{$path}}</a>/</td>
{{else}}
<td style="text-align: right">{{.TreeDigest.SizeBytes}}</td>
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../tree/{{.TreeDigest.Hash}}-{{.TreeDigest.SizeBytes}}/">{{$path}}</a>/</td>
{{end}}
</tr>
{{end}}
{{range .OutputSymlinks}}
Expand Down

0 comments on commit efa0bb9

Please sign in to comment.