[ARVADOS] updated: 2ed4ec45553b9931f78ca88b694f590102ed2bbd

git at public.curoverse.com git at public.curoverse.com
Wed Apr 23 16:55:13 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/users_controller.rb |    9 +-
 apps/workbench/app/views/users/storage.html.erb    |   22 ++--
 .../app/controllers/arvados/v1/users_controller.rb |    2 +-
 services/api/app/models/pipeline_instance.rb       |  101 +++++++++++++++
 .../20140422011506_pipeline_instance_state.rb      |   87 +++++++++++++
 services/api/db/schema.rb                          |    8 +-
 services/api/lib/current_api_client.rb             |    8 +-
 services/api/test/fixtures/pipeline_instances.yml  |    3 +
 .../functional/arvados/v1/users_controller_test.rb |   25 ++++
 services/api/test/test_helper.rb                   |   18 +++
 services/api/test/unit/application_test.rb         |   32 +++++
 services/api/test/unit/pipeline_instance_test.rb   |  129 +++++++++++++++++++-
 services/api/test/unit/user_test.rb                |    2 +
 13 files changed, 423 insertions(+), 23 deletions(-)
 create mode 100644 services/api/db/migrate/20140422011506_pipeline_instance_state.rb
 create mode 100644 services/api/test/fixtures/pipeline_instances.yml
 create mode 100644 services/api/test/unit/application_test.rb

       via  2ed4ec45553b9931f78ca88b694f590102ed2bbd (commit)
       via  ca0d33c522fad9b3467f4a58b8fe336665ed493b (commit)
       via  17e1d2d431280a8911ecd1f028de1924a7dc3aed (commit)
       via  22db59393203f550e0c77e65c650e664667492ab (commit)
       via  6a0ce3e88fc2122fe7749b6e4bc3eb01fb37b97c (commit)
       via  a955d5a89402d4b68ccec2d00c1ecf7d86334875 (commit)
       via  1059fd1f9e22ebcae51413d2b0fde0416c71c79b (commit)
       via  8072742e6557966b3e3d699e18fd3ee8656ed5b7 (commit)
       via  007a1e6edf9125990e286c71b00f51405470a4a6 (commit)
       via  c92d3fcdc2ab6bc3ec9bb03567de9203ff9b1f79 (commit)
       via  5cb205c567c312345376bcd2b7104075b5710d7f (commit)
       via  a3c5fac3f7849cab38bedd313b522b994be17b15 (commit)
      from  7f7cd27d5fc31dc5bbec7f95905fd394a5b317c7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2ed4ec45553b9931f78ca88b694f590102ed2bbd
Merge: ca0d33c 22db593
Author: Misha Zatsman <misha-arvados at zatsman.com>
Date:   Wed Apr 23 20:54:45 2014 +0000

    Merge branch 'master' of git.curoverse.com:arvados into 2612-workbench-displays-user-storage


commit ca0d33c522fad9b3467f4a58b8fe336665ed493b
Author: Misha Zatsman <misha-arvados at zatsman.com>
Date:   Wed Apr 23 20:54:01 2014 +0000

    Shortened date display, put long date view in mouseover text.

diff --git a/apps/workbench/app/views/users/storage.html.erb b/apps/workbench/app/views/users/storage.html.erb
index 99c8883..b82fd85 100644
--- a/apps/workbench/app/views/users/storage.html.erb
+++ b/apps/workbench/app/views/users/storage.html.erb
@@ -49,9 +49,11 @@ table#users-storage-table .byte-value {
       <%= human_readable_bytes_html(@user_storage[user.uuid].fetch(key,0).floor) %>
     </td>
     <% end %>
-    <td class="date">
-      <%= @log_date[user.uuid] %>
+    <% if @log_date.key?(user.uuid) %>
+    <td class="date" title="<%= @log_date[user.uuid] %>">
+      <%= @log_date[user.uuid].strftime('%F') %>
     </td>
+    <% end %>
   </tr>
   <% end %>
 </table>

commit 17e1d2d431280a8911ecd1f028de1924a7dc3aed
Author: Misha Zatsman <misha-arvados at zatsman.com>
Date:   Wed Apr 23 20:14:38 2014 +0000

    Made sizes human readable, added measurement date column.

diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 72d44f5..53f3d39 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -67,22 +67,21 @@ class UsersController < ApplicationController
     @breadcrumb_page_name = nil
     @users = User.limit(params[:limit] || 1000).all
     @user_storage = {}
+    @log_date = {}
     @users.each do |u|
       @user_storage[u.uuid] ||= {}
       storage_log = Log.
-        # filter([[:object_uuid, '=', u.uuid],
-        #         [:event_type, '=', 'user-storage-report']])
         filter([[:object_uuid, '=', u.uuid],
                 [:event_type, '=', 'user-storage-report']]).
         order(:created_at => :desc).
         limit(1)
       storage_log.each do |log_entry|
         @user_storage[u.uuid] = log_entry['properties']
+        @log_date[u.uuid] = log_entry['event_at']
       end
     end
-    @users = @users.sort_by do |u|
-      [- at user_storage[u.uuid].values.push(0).inject(:+), u.full_name]
-    end
+    @users = @users.sort_by { |u|
+      [- at user_storage[u.uuid].values.push(0).inject(:+), u.full_name]}
   end
 
   def show_pane_list
diff --git a/apps/workbench/app/views/users/storage.html.erb b/apps/workbench/app/views/users/storage.html.erb
index 51d0c2e..99c8883 100644
--- a/apps/workbench/app/views/users/storage.html.erb
+++ b/apps/workbench/app/views/users/storage.html.erb
@@ -1,15 +1,15 @@
 <% content_for :css do %>
 table#users-storage-table th {
     overflow-x: hidden;
+    text-align: center;
 }
-table#users-storage-table .cell-for-span-This-month,
-table#users-storage-table .cell-for-span-Last-month {
-    background: #eee;
+table#users-storage-table .byte-value {
+    text-align: right;
 }
 <% end %>
 <table class="table table-condensed arv-index" id="users-storage-table">
   <colgroup>
-    <col width="28%" />
+    <col />
   </colgroup>
 
   <tr>
@@ -20,13 +20,14 @@ table#users-storage-table .cell-for-span-Last-month {
     <th colspan="2">
       Collections Persisted Storage
     </th>
+    <th rowspan="2">Measured At</th>
   </tr>
   <tr>
     <% 2.times do %>
-    <th>
+    <th class="byte-value">
       Total (unweighted)
     </th>
-    <th>
+    <th class="byte-value">
       Shared (weighted)
     </th>
     <% end %>
@@ -44,10 +45,13 @@ table#users-storage-table .cell-for-span-Last-month {
       </small>
     </td>
     <% [:read_collections_total_bytes, :read_collections_weighted_bytes, :persisted_collections_total_bytes, :persisted_collections_weighted_bytes].each do |key| %>
-    <td>
-      <%= @user_storage[user.uuid][key].to_s %>
+    <td class="byte-value">
+      <%= human_readable_bytes_html(@user_storage[user.uuid].fetch(key,0).floor) %>
     </td>
     <% end %>
+    <td class="date">
+      <%= @log_date[user.uuid] %>
+    </td>
   </tr>
   <% end %>
 </table>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list