18947: Remove errant uses of runsu.sh.
[arvados.git] / apps / workbench / app / views / users / storage.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% content_for :css do %>
6 table#users-storage-table th {
7     overflow-x: hidden;
8     text-align: center;
9 }
10 table#users-storage-table .byte-value {
11     text-align: right;
12 }
13 <% end %>
14 <table class="table table-condensed arv-index" id="users-storage-table">
15   <colgroup>
16     <col />
17   </colgroup>
18
19   <tr>
20     <th rowspan="2">User</th>
21     <th colspan="2">
22       Collections Read Size
23     </th>
24     <th colspan="2">
25       Collections Persisted Storage
26     </th>
27     <th rowspan="2">Measured At</th>
28   </tr>
29   <tr>
30     <% 2.times do %>
31     <th class="byte-value">
32       Total (unweighted)
33     </th>
34     <th class="byte-value">
35       Shared (weighted)
36     </th>
37     <% end %>
38   </tr>
39
40   <% @users.each do |user| %>
41   <tr>
42     <td>
43       <% if user.uuid %>
44       <small>
45         <%= link_to_if_arvados_object user, friendly_name: true %>
46       </small>
47       <% else %>
48       <b>Total</b>
49       <% end %>
50     </td>
51     <% [:read_collections_total_bytes, :read_collections_weighted_bytes, :persisted_collections_total_bytes, :persisted_collections_weighted_bytes].each do |key| %>
52     <td class="byte-value">
53       <%= human_readable_bytes_html(@user_storage[user.uuid].fetch(key,0).floor) %>
54     </td>
55     <% end %>
56     <% if @log_date.key?(user.uuid) %>
57     <td class="date" title="<%= @log_date[user.uuid] %>">
58       <%= @log_date[user.uuid].strftime('%F') %>
59     </td>
60     <% end %>
61   </tr>
62   <% end %>
63 </table>
64
65 <% content_for :footer_js do %>
66 $('#users-storage-table td small').each(function(){
67   if ($(this).html().trim() == '0')
68     $(this).css('opacity', '0.3');
69 });
70 <% end %>