{{define "page"}}

<script src="/public/js/graph.js"></script>

<h1>Hooks</h1>

{{range $index, $element := .}}
	<div>
		<h2><a href="/hooks/edit/{{.ID}}">{{.ID}}</a> ({{.Count.Total}})</h2>
		<div id="graph{{$index}}" class="graph">
		</div>
		<script>draw_graph("#graph{{$index}}", {{.Count.Recent}})</script>
	</div>
{{else}}
	No hooks configured yet.
{{end}}

<p>
	<a href="/hooks/new">New hook</a>
</p>

{{end}}

{{define "page"}}

<script src="/public/js/graph.js"></script>

<h1>Hooks</h1>

{{range $index, $element := .}}
	<div>
		<h2><a href="/hooks/edit/{{.ID}}">{{.ID}}</a> ({{.Count.Total}})</h2>

		<div id="graph{{$index}}" class="graph">
		</div>
		<small>Incoming requests of the last 48 hours</small>
		<script>draw_graph("#graph{{$index}}", {{.Count.Recent}})</script>
	</div>
{{else}}
	No hooks configured yet.
{{end}}

<p>
	<a href="/hooks/new">New hook</a>
</p>

{{end}}

Add legend to bar charts
Add legend to bar charts
