blob: 2efa030f9c97ecead7de6772161f67bb38ed1840 (
plain) (
tree)
|
|
<h4>Peer list</h4>
<table class="table table-striped">
<tr>
<th>Peer ID</th>
<th>Address</th>
<th>Port</th>
</tr>
<%= for {id, pid, ip, port} <- peer_list() do %>
<tr>
<td>
<%= if pid == nil do %>
<%= peer_id_to_str(id) %>
<% else %>
<strong><%= peer_id_to_str(id) %></strong>
<% end %>
</td>
<td><%= :inet_parse.ntoa(ip) %></td>
<td><%= port %></td>
</tr>
<% end %>
</table>
<%= form_for @conn, page_path(@conn, :add_peer), [class: "form-inline"], fn f -> %>
<%= text_input f, :ip, [class: "form-control", placeholder: "Hostname / IP address"] %>
<%= text_input f, :port, [class: "form-control", placeholder: "Port", value: "4044"] %>
<%= submit "Add peer", [class: "btn btn-default"] %>
<% end %>
|