{{template "shellTop" "notifications"}}
<h1>Notifications</h1>
{{if .Nudges}}<div class=scroll><table>
<tr><th>when</th><th>rule</th><th>channel</th><th>outcome</th><th>message</th></tr>
{{range .Nudges}}<tr>
<td class=hint>{{.Ts.Format "15:04"}}</td>
<td class=key>{{.Rule}}</td>
<td><span class=badge>{{.Channel}}</span></td>
<td class={{.Outcome}}>{{.Outcome}}</td>
<td class=text-max>{{.Message}}</td>
</tr>{{end}}</table></div>
{{else}}<div class=empty>
  <svg class=icon width="24" height="24"><use href="/ethos-icons.svg#i-bell"/></svg>
  <div>no notifications yet</div>
  <div class=hint>check back later or ask maven a question</div>
</div>{{end}}
<h2>Delivery outbox</h2>
<p class=hint>
  every send is recorded before it leaves, so a failure is visible rather than silent.
  <a href="/notifications">all</a> ·
  <a href="/notifications?status=dropped">dropped</a> ·
  <a href="/notifications?status=failed">failed</a> ·
  <a href="/notifications?status=pending">pending</a> ·
  <a href="/notifications?status=unknown">unknown</a>
</p>
{{if .Attempts}}<div class=scroll><table>
<tr><th>started</th><th>kind</th><th>rule</th><th>channel</th><th>status</th><th>finished</th></tr>
{{range .Attempts}}<tr>
<td class=hint>{{.Created}}</td>
<td>{{.Kind}}</td>
<td class=key>{{.Target}}</td>
<td><span class=badge>{{.Channel}}</span></td>
<td class={{.Status}}>{{.Status}}</td>
<td class=hint>{{.Completed}}</td>
</tr>{{end}}</table></div>
{{else}}<div class=empty>
  <div>no delivery attempts{{if .Status}} with status {{.Status}}{{end}}</div>
</div>{{end}}
{{template "shellBottom"}}
</html>
