diff options
Diffstat (limited to 'shardweb')
-rw-r--r-- | shardweb/lib/templates/page/shard_list.html.eex | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/shardweb/lib/templates/page/shard_list.html.eex b/shardweb/lib/templates/page/shard_list.html.eex index 27f70b4..489c1a5 100644 --- a/shardweb/lib/templates/page/shard_list.html.eex +++ b/shardweb/lib/templates/page/shard_list.html.eex @@ -21,13 +21,20 @@ <table class="table table-striped"> <tr> + <th></th> <th>Shard</th> <th>Id</th> - <th>State</th> </tr> - <%= for {id, manifest, state} <- shard_list() do %> + <%= for {id, manifest, why_have_it} <- shard_list() do %> <tr> <td> + <%= case why_have_it do %> + <% {:cached, _} -> %><span class="label label-warning">cache</span> + <% {:pinned, _, _} -> %><span class="label label-success">pinned</span> + <% {:req, a, _} -> %><span class="label label-default">req (<%= MapSet.size(a) %>)</span> + <% end %> + </td> + <td> <%= case manifest do %> <% %SApp.Identity.Manifest{pk: pk} -> %><i class="fa fa-user"></i> <%= SApp.Identity.get_nick(pk) %> @@ -46,11 +53,20 @@ <%= pk_list |> Enum.filter(&(&1!=@pk)) |> Enum.map(&SApp.Identity.get_nick/1) |> Enum.join(", ") %> </a> + <% %SApp.Directory.Manifest{owner: owner, public: public, name: name} -> %><i class="fa fa-folder"></i> + <%= SApp.Identity.get_nick(owner) %> + <a href="<%= identity_path(@conn, :view, owner|>Base.encode16) %>"> + <small><%= Shard.Keys.pk_display owner %></small> + </a> + / + <a href="#"><%= name %></a> + <%= if public do %><i class="fa fa-globe"></i><% else %><i class="fa fa-lock"></i><% end %> + + <% x -> %> <%= inspect x %> <% end %> </td> <td><small><%= id |> Base.encode16 %></small></td> - <td><%= inspect(state) %></td> </tr> <% end %> </table> |