[ARVADOS] created: 4fce5c64b5bc0b106e14533378de6488fd030f98
git at public.curoverse.com
git at public.curoverse.com
Wed Mar 25 10:19:32 EDT 2015
at 4fce5c64b5bc0b106e14533378de6488fd030f98 (commit)
commit 4fce5c64b5bc0b106e14533378de6488fd030f98
Author: Radhika Chippada <radhika at curoverse.com>
Date: Wed Mar 25 10:16:27 2015 -0400
5556: Added select() to @logs in CollectionsController#show to avoid trasporting the unneeded log properties.
Also, added Accept-Encoding request header in workbench request to api server.
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index e883017..8d25e68 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -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,
diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb
index 992f8fd..aa3269a 100644
--- a/apps/workbench/app/models/arvados_api_client.rb
+++ b/apps/workbench/app/models/arvados_api_client.rb
@@ -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
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index a487081..f3d1792 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -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
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list