5556: Added select() to @logs in CollectionsController#show to avoid trasporting...
authorRadhika Chippada <radhika@curoverse.com>
Wed, 25 Mar 2015 14:16:27 +0000 (10:16 -0400)
committerRadhika Chippada <radhika@curoverse.com>
Wed, 25 Mar 2015 14:16:27 +0000 (10:16 -0400)
Also, added Accept-Encoding request header in workbench request to api server.

apps/workbench/app/controllers/collections_controller.rb
apps/workbench/app/models/arvados_api_client.rb
apps/workbench/config/application.default.yml

index e883017070d20ccdc7613e8f6c88ea9acaf1930e..8d25e68eef49fdf28e74d17ac44ad4bc5210844e 100644 (file)
@@ -224,6 +224,7 @@ class CollectionsController < ApplicationController
           .where(head_uuid: @object.uuid, link_class: 'permission',
                  name: 'can_read').results
         @logs = Log.limit(RELATION_LIMIT).order("created_at DESC")
+          .select(%w(uuid event_type object_uuid event_at summary))
           .where(object_uuid: @object.uuid).results
         @is_persistent = Link.limit(1)
           .where(head_uuid: @object.uuid, tail_uuid: current_user.uuid,
index 992f8fd896989a408b9939c16dc893b85aa58964..aa3269a43d13055cbcd52928ba000551e5426639 100644 (file)
@@ -130,6 +130,9 @@ class ArvadosApiClient
     end
 
     header = {"Accept" => "application/json"}
+    if Rails.configuration.include_accept_encoding_header_in_api_requests
+      header["Accept-Encoding"] = "gzip, deflate"
+    end
 
     profile_checkpoint { "Prepare request #{url} #{query[:uuid]} #{query[:where]} #{query[:filters]} #{query[:order]}" }
     msg = @client_mtx.synchronize do
index a4870818800b87e5f03a3774528acaef1d1ff492..f3d179238a38857530bb5db3e0b38d4b7974f1fe 100644 (file)
@@ -201,3 +201,6 @@ common:
   # the token by running "bundle exec ./script/get_anonymous_user_token.rb"
   # in the directory where your API server is running.
   anonymous_user_token: false
+
+  # Include Accept-Encoding header when making API requests
+  include_accept_encoding_header_in_api_requests: true