class UsersController < ApplicationController
- skip_before_filter :find_object_by_uuid, :only => [:welcome, :activity]
+ skip_before_filter :find_object_by_uuid, :only => [:welcome, :activity, :storage]
skip_around_filter :thread_with_mandatory_api_token, :only => :welcome
before_filter :ensure_current_user_is_admin, only: [:sudo, :unsetup, :setup]
@users = [OpenStruct.new(uuid: nil)] + @users
end
+ def storage
+ @breadcrumb_page_name = nil
+ @users = User.limit(params[:limit] || 1000).all
+ end
+
def show_pane_list
if current_user.andand.is_admin
super | %w(Admin)
--- /dev/null
+<% content_for :css do %>
+table#users-storage-table th {
+ overflow-x: hidden;
+}
+table#users-storage-table .cell-for-span-This-month,
+table#users-storage-table .cell-for-span-Last-month {
+ background: #eee;
+}
+<% end %>
+<table class="table table-condensed arv-index" id="users-storage-table">
+ <colgroup>
+ <col width="28%" />
+ </colgroup>
+
+ <tr>
+ <th rowspan="2">User</th>
+ <th colspan="2">
+ Collections Read Size
+ </th>
+ <th colspan="2">
+ Collections Persisted Storage
+ </th>
+ </tr>
+ <tr>
+ <% 2.times do %>
+ <th>
+ Total (unweighted)
+ </th>
+ <th>
+ Shared (weighted)
+ </th>
+ <% end %>
+ </tr>
+
+ <% @users.each do |user| %>
+ <tr>
+ <td>
+ <small>
+ <% if user.uuid %>
+ <%= link_to_if_arvados_object user, friendly_name: true %>
+ <% else %>
+ <b>Total</b>
+ <% end %>
+ </small>
+ </td>
+ </tr>
+ <% end %>
+</table>
+
+<% content_for :footer_js do %>
+$('#users-storage-table td small').each(function(){
+ if ($(this).html().trim() == '0')
+ $(this).css('opacity', '0.3');
+});
+<% end %>
get 'home', :on => :member
get 'welcome', :on => :collection
get 'activity', :on => :collection
+ get 'storage', :on => :collection
post 'sudo', :on => :member
post 'unsetup', :on => :member
get 'setup_popup', :on => :member