INNER CODE UNIT · Go
GetAuditTablesTemplate
simagix/hatchet · audit_template.go:20
func GetAuditTablesTemplate(download string) (*template.Template, error) {
html := headers
if download == "" {
html += getContentHTML()
}
html += `{{$name := .Hatchet}}
<script>
function downloadAudit() {
anchor = document.createElement('a');
anchor.download = '{{.Hatchet}}_audit.html';
anchor.href = '/hatchets/{{.Hatchet}}/stats/audit?download=true';
anchor.dataset.downloadurl = ['text/html', anchor.download, anchor.href].join(':');
anchor.click();
}
</script>`
if download == "" {
html += `
<!-- Header Bar -->