blob: 9d7dd6d9c6849dfd69bb64a1f1624b05778924e7 (
plain) (
tree)
|
|
defmodule ShardWeb.PageView do
use ShardWeb, :view
def conn_list do
SNet.Manager.list_connections
end
def peer_id_to_str(id) do
id
|> binary_part(0, 8)
|> Base.encode16
|> String.downcase
end
def shard_list do
Shard.Manager.list_shards
|> Enum.sort_by(fn {_,m,_} -> m end)
end
end
|