aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-11 15:11:52 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-11 15:11:52 +0200
commit1646bc57eae9880fd408d23ca692364dc6fd6442 (patch)
tree0f65d47498f33772152b20ee082d34e218f16df4 /shardweb/lib
parenteb8c949551ffb8b3600357d7ff2bebe750af96e5 (diff)
downloadshard-1646bc57eae9880fd408d23ca692364dc6fd6442.tar.gz
shard-1646bc57eae9880fd408d23ca692364dc6fd6442.zip
Move somme functionnality to SNet.Manager
Diffstat (limited to 'shardweb/lib')
-rw-r--r--shardweb/lib/shard_web/controllers/page_controller.ex2
-rw-r--r--shardweb/lib/shard_web/templates/identity/view.html.eex2
-rw-r--r--shardweb/lib/shard_web/templates/page/index.html.eex2
-rw-r--r--shardweb/lib/shard_web/views/page_view.ex2
4 files changed, 4 insertions, 4 deletions
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 %>
</ul>
-<%= 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 @@
<th>Address</th>
<th>Port</th>
</tr>
- <%= for {{:inet, ip, port}, pid, auth} <- conn_list() do %>
+ <%= for {{:inet, ip, port}, _pid, auth} <- conn_list() do %>
<tr>
<td>
<%= 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