{{define "body" -}}
<p>
  <a href="/admin/network/delete/?NetworkID={{.Network.NetworkID}}">Delete</a> /
  <a href="/admin/network/hosts/?NetworkID={{.Network.NetworkID}}">Hosts</a>
</p>

<table class="def-list">
  <tr>
    <td>Network</td>
    <td>{{ipToString .Network.Network}}/24</td>
  </tr>
</table>

<h3>Peers</h3>

<p>
  <a href="/admin/peer/create/?NetworkID={{.Network.NetworkID}}">Create</a>
</p>

{{if .Peers -}}
<table>
  <thead>
    <tr>
      <th>PeerIP</th>
      <th>Name</th>
      <th>Public IP</th>
      <th>Port</th>
      <th>Relay</th>
    </tr>
  </thead>
  <tbody>
  {{range .Peers -}}
  <tr>
    <td>
      <a href="/admin/peer/view/?NetworkID={{$.Network.NetworkID}}&PeerIP={{.PeerIP}}">
        {{.PeerIP}}
      </a>
    </td>
    <td>{{.Name}}</td>
    <td>{{ipToString .PublicIP}}</td>
    <td>{{.Port}}</td>
    <td>{{if .Relay}}T{{else}}F{{end}}</td>
  </tr>
  </tbody>
  {{- end}}
</table>
{{- else}}
<p>No peers.</p>
{{- end}}
{{- end}}
