Peer list

<%= for {id, pid, ip, port} <- peer_list() do %> <% end %>
Peer ID Address Port
<%= if pid == nil do %> <%= peer_id_to_str(id) %> <% else %> <%= peer_id_to_str(id) %> <% end %> <%= :inet_parse.ntoa(ip) %> <%= port %>
<%= 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 %>