diff options
Diffstat (limited to 'shardweb/lib')
-rw-r--r-- | shardweb/lib/shard_web/templates/page/index.html.eex | 9 | ||||
-rw-r--r-- | shardweb/lib/shard_web/views/page_view.ex | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/shardweb/lib/shard_web/templates/page/index.html.eex b/shardweb/lib/shard_web/templates/page/index.html.eex index 2efa030..efa651b 100644 --- a/shardweb/lib/shard_web/templates/page/index.html.eex +++ b/shardweb/lib/shard_web/templates/page/index.html.eex @@ -6,13 +6,12 @@ <th>Address</th> <th>Port</th> </tr> - <%= for {id, pid, ip, port} <- peer_list() do %> + <%= for {{:tcp4, ip, port}, pid, auth} <- conn_list() do %> <tr> <td> - <%= if pid == nil do %> - <%= peer_id_to_str(id) %> - <% else %> - <strong><%= peer_id_to_str(id) %></strong> + <%= case auth do %> + <% nil -> %>(anonymous) + <% %SNet.Auth{his_pk: his_pk} -> %> <%= his_pk %> <% end %> </td> <td><%= :inet_parse.ntoa(ip) %></td> diff --git a/shardweb/lib/shard_web/views/page_view.ex b/shardweb/lib/shard_web/views/page_view.ex index 533c9e5..99df99d 100644 --- a/shardweb/lib/shard_web/views/page_view.ex +++ b/shardweb/lib/shard_web/views/page_view.ex @@ -1,8 +1,8 @@ defmodule ShardWeb.PageView do use ShardWeb, :view - def peer_list do - Shard.Manager.list_peers + def conn_list do + Shard.Manager.list_connections end def peer_id_to_str(id) do |