-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.html
34 lines (34 loc) · 924 Bytes
/
table.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<table>
<tr>
<td><a href="?path={{$.Parent}}">..</a></td>
<td> </td>
<td> </td>
</tr>
{{- range .Report}}
<tr>
<td style="background:
linear-gradient(90deg, #ddd {{.Percentage}}, #fff 0%)">
{{ if .IsDir }}<a href="?path={{$.Path}}/{{.Name}}">{{ end }}
{{.Name}}
{{ if .IsDir }}</a>{{ end }}
</td>
<td>{{.Size}}</td>
<td>{{.Percentage}}</td>
</tr>
{{- end}}
<tr>
<td>Total</td>
<td>{{.Total}}</td>
<td>100%</td>
</table>
{{ if .D3Data.Name }}
<h1>Zoomable icicle diagram</h1>
<script>
const data = {{ .D3Data }};
</script>
<script src="static/icicle.js"></script>
{{ else }}
<a href="javascript:document.location.search += '&d3=1'">Show icicle diagram</a>
{{ end }}
</body>
</html>