diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-15 16:15:35 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-15 16:15:35 +0200 |
commit | 181baf7e0c26c51d7c605bc9797f77ced9188455 (patch) | |
tree | b8520b756c25df1648006f9390d51974b94ea9c1 /shardweb/lib/templates/page | |
parent | 8c49dd71d29359447c24b1cd4f48a8faf0c4fdca (diff) | |
download | shard-181baf7e0c26c51d7c605bc9797f77ced9188455.tar.gz shard-181baf7e0c26c51d7c605bc9797f77ced9188455.zip |
Basic infrastructure for dependency between shards
Diffstat (limited to 'shardweb/lib/templates/page')
-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> |