Skip to content

Commit efa0bb9

Browse files
committed
Prefer linking to REv2 Directory messages instead of Trees
This reduces the amount of load clicking through large output directory hierarchies, as it no longer requires REv2 Tree objects to get loaded constantly.
1 parent 0e6f8d2 commit efa0bb9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/bb_browser/templates/page_action.html

+8-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,14 @@ <h2 class="my-4">Output files</h2>
128128
{{range .OutputDirectories}}
129129
<tr class="font-monospace">
130130
<td style="white-space: nowrap">drwxr-xr-x</td>
131-
<td style="text-align: right">{{.TreeDigest.SizeBytes}}</td>
132-
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../tree/{{.TreeDigest.Hash}}-{{.TreeDigest.SizeBytes}}/">{{.Path}}</a>/</td>
131+
{{$path := .Path}}
132+
{{with .RootDirectoryDigest}}
133+
<td style="text-align: right">{{.SizeBytes}}</td>
134+
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../directory/{{.Hash}}-{{.SizeBytes}}/">{{$path}}</a>/</td>
135+
{{else}}
136+
<td style="text-align: right">{{.TreeDigest.SizeBytes}}</td>
137+
<td style="width: 100%; word-break: break-all"><a class="text-success" href="../../tree/{{.TreeDigest.Hash}}-{{.TreeDigest.SizeBytes}}/">{{$path}}</a>/</td>
138+
{{end}}
133139
</tr>
134140
{{end}}
135141
{{range .OutputSymlinks}}

0 commit comments

Comments
 (0)