From 1646bc57eae9880fd408d23ca692364dc6fd6442 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 11 Oct 2018 15:11:52 +0200 Subject: Move somme functionnality to SNet.Manager --- shardweb/lib/shard_web/controllers/page_controller.ex | 2 +- shardweb/lib/shard_web/templates/identity/view.html.eex | 2 +- shardweb/lib/shard_web/templates/page/index.html.eex | 2 +- shardweb/lib/shard_web/views/page_view.ex | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shardweb') diff --git a/shardweb/lib/shard_web/controllers/page_controller.ex b/shardweb/lib/shard_web/controllers/page_controller.ex index 620d779..261b5d6 100644 --- a/shardweb/lib/shard_web/controllers/page_controller.ex +++ b/shardweb/lib/shard_web/controllers/page_controller.ex @@ -18,7 +18,7 @@ defmodule ShardWeb.PageController do end end {port_num, _} = Integer.parse port - Shard.Manager.add_peer({:inet, ip_tuple, port_num}) + SNet.Manager.add_peer({:inet, ip_tuple, port_num}) rescue _ -> nil end diff --git a/shardweb/lib/shard_web/templates/identity/view.html.eex b/shardweb/lib/shard_web/templates/identity/view.html.eex index b9210f2..7252f7c 100644 --- a/shardweb/lib/shard_web/templates/identity/view.html.eex +++ b/shardweb/lib/shard_web/templates/identity/view.html.eex @@ -35,6 +35,6 @@ <% end %> -<%= form_for @conn, identity_path(@conn, :create), [class: "form-inline"], fn f -> %> +<%= form_for @conn, identity_path(@conn, :create), [class: "form-inline"], fn _f -> %> <%= submit "Create new identity", [class: "btn btn-danger"] %> <% end %> diff --git a/shardweb/lib/shard_web/templates/page/index.html.eex b/shardweb/lib/shard_web/templates/page/index.html.eex index 34441e5..44a8aa0 100644 --- a/shardweb/lib/shard_web/templates/page/index.html.eex +++ b/shardweb/lib/shard_web/templates/page/index.html.eex @@ -6,7 +6,7 @@ Address Port - <%= for {{:inet, ip, port}, pid, auth} <- conn_list() do %> + <%= for {{:inet, ip, port}, _pid, auth} <- conn_list() do %> <%= case auth do %> diff --git a/shardweb/lib/shard_web/views/page_view.ex b/shardweb/lib/shard_web/views/page_view.ex index 99df99d..6bd8e4b 100644 --- a/shardweb/lib/shard_web/views/page_view.ex +++ b/shardweb/lib/shard_web/views/page_view.ex @@ -2,7 +2,7 @@ defmodule ShardWeb.PageView do use ShardWeb, :view def conn_list do - Shard.Manager.list_connections + SNet.Manager.list_connections end def peer_id_to_str(id) do -- cgit v1.2.3