build_my_wanted_projects_tree current_user
rescue ArvadosApiClient::ApiError
# Fall back to the default-setting code later.
build_my_wanted_projects_tree current_user
rescue ArvadosApiClient::ApiError
# Fall back to the default-setting code later.
elsif filters.is_a? Array
filters = filters.collect do |filter|
if filter.is_a? String
# Accept filters[]=["foo","=","bar"]
elsif filters.is_a? Array
filters = filters.collect do |filter|
if filter.is_a? String
# Accept filters[]=["foo","=","bar"]
if objects.respond_to?(:result_offset) and
objects.respond_to?(:result_limit)
next_offset = objects.result_offset + objects.result_limit
if objects.respond_to?(:result_offset) and
objects.respond_to?(:result_limit)
next_offset = objects.result_offset + objects.result_limit
next_offset
elsif @objects.results.size > 0 and (params[:count] == 'none' or
(params[:controller] == 'search' and params[:action] == 'choose'))
next_offset
elsif @objects.results.size > 0 and (params[:count] == 'none' or
(params[:controller] == 'search' and params[:action] == 'choose'))
@updates.keys.each do |attr|
if @object.send(attr).is_a? Hash
if @updates[attr].is_a? String
@updates.keys.each do |attr|
if @object.send(attr).is_a? Hash
if @updates[attr].is_a? String
end
if params[:merge] || params["merge_#{attr}".to_sym]
# Merge provided Hash with current Hash, instead of
end
if params[:merge] || params["merge_#{attr}".to_sym]
# Merge provided Hash with current Hash, instead of
redirect_to arvados_api_client.arvados_login_url(return_to: strip_token_from_path(request.url))
else
flash[:error] = "Either you are not logged in, or your session has timed out. I can't automatically log you in and re-attempt this request."
redirect_to arvados_api_client.arvados_login_url(return_to: strip_token_from_path(request.url))
else
flash[:error] = "Either you are not logged in, or your session has timed out. I can't automatically log you in and re-attempt this request."
if current_user && !profile_config.empty?
current_user_profile = current_user.prefs[:profile]
profile_config.each do |k, entry|
if current_user && !profile_config.empty?
current_user_profile = current_user.prefs[:profile]
profile_config.each do |k, entry|
if !current_user_profile ||
!current_user_profile[k] ||
current_user_profile[k].empty?
if !current_user_profile ||
!current_user_profile[k] ||
current_user_profile[k].empty?
- filter([['group_class','=','project']]).order('name')
+ filter([['group_class','IN',['project','filter']]]).order('name')
- crs = ContainerRequest.limit(lim).with_count("none").order(["created_at desc"]).filter([["requesting_container_uuid", "=", nil]])
+ crs = ContainerRequest.limit(lim).with_count("none").order(["created_at desc"]).filter([["requesting_container_uuid", "=", nil]]).select(
+ ["uuid", "name", "container_uuid", "output_uuid", "state", "created_at", "modified_at"])
crs.results.each { |c| procs[c] = c.created_at }
Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
crs.results.each { |c| procs[c] = c.created_at }
Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
return if defined?(@starred_projects) && @starred_projects
links = Link.filter([['owner_uuid', 'in', ["#{Rails.configuration.ClusterID}-j7d0g-publicfavorites", user.uuid]],
['link_class', '=', 'star'],
['head_uuid', 'is_a', 'arvados#group']]).with_count("none").select(%w(head_uuid))
uuids = links.collect { |x| x.head_uuid }
return if defined?(@starred_projects) && @starred_projects
links = Link.filter([['owner_uuid', 'in', ["#{Rails.configuration.ClusterID}-j7d0g-publicfavorites", user.uuid]],
['link_class', '=', 'star'],
['head_uuid', 'is_a', 'arvados#group']]).with_count("none").select(%w(head_uuid))
uuids = links.collect { |x| x.head_uuid }
- starred_projects = Group.filter([['uuid', 'in', uuids]]).order('name').with_count("none")
+ if group_class == ""
+ starred_projects = Group.filter([['uuid', 'in', uuids]]).order('name').with_count("none")
+ else
+ starred_projects = Group.filter([['uuid', 'in', uuids],['group_class', '=', group_class]]).order('name').with_count("none")
+ end
@too_many_projects = false
@reached_level_limit = false
while from_top.size <= page_size*2
@too_many_projects = false
@reached_level_limit = false
while from_top.size <= page_size*2
- current_level = Group.filter([['group_class','=','project'],
+ current_level = Group.filter([['group_class','IN',['project','filter']],
['owner_uuid', 'in', uuids]])
.order('name').limit(page_size*2)
break if current_level.results.size == 0
['owner_uuid', 'in', uuids]])
.order('name').limit(page_size*2)
break if current_level.results.size == 0
# helper method to preload objects for given dataclass and uuids
helper_method :preload_objects_for_dataclass
# helper method to preload objects for given dataclass and uuids
helper_method :preload_objects_for_dataclass
- def preload_objects_for_dataclass dataclass, uuids, by_attr=nil
+ def preload_objects_for_dataclass dataclass, uuids, by_attr=nil, select_fields=nil
@objects_for[obj.uuid] = obj
if dataclass == Collection
# The collecions#index defaults to "all attributes except manifest_text"
@objects_for[obj.uuid] = obj
if dataclass == Collection
# The collecions#index defaults to "all attributes except manifest_text"