1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% content_for :css do %>
6 table#users-activity-table th {
9 table#users-activity-table .cell-for-span-This-month,
10 table#users-activity-table .cell-for-span-Last-month {
14 <table class="table table-condensed arv-index" id="users-activity-table">
18 <% @spans.each do |_| %>
21 <col width="<%= (72 / @spans.count / 3).floor %>%" />
27 <th rowspan="2">User</th>
28 <% @spans.each do |span, start_at, end_at| %>
29 <th colspan="3" class="cell-for-span-<%= span.gsub ' ','-' %>">
32 <%= start_at.strftime('%b %-d') %>
34 <%= (end_at-1.second).strftime('%b %-d') %>
39 <% @spans.each do |span, _| %>
40 <th class="cell-for-span-<%= span.gsub ' ','-' %>">Logins</th>
41 <th class="cell-for-span-<%= span.gsub ' ','-' %>">Jobs</th>
42 <th class="cell-for-span-<%= span.gsub ' ','-' %>">Pipelines</th>
46 <% @users.each do |user| %>
51 <%= link_to_if_arvados_object user, friendly_name: true %>
58 <% @spans.each do |span, _| %>
59 <% ['logins', 'jobs', 'pipeline_instances'].each do |type| %>
60 <td class="cell-for-span-<%= span.gsub ' ','-' %>">
62 <%= @user_activity[user.uuid][span + " " + type].to_s %>
71 <% content_for :footer_js do %>
72 $('#users-activity-table td small').each(function(){
73 if ($(this).html().trim() == '0')
74 $(this).css('opacity', '0.3');