X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b0296ce4619e4e871a5c67cc77005d945cd3ec3c..5225a4deab9bf526d4e178cb5220f790b3d33e67:/apps/workbench/app/controllers/users_controller.rb diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index f48d3b2b92..f9a74e2c73 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -10,14 +10,34 @@ class UsersController < ApplicationController end def home + @showallalerts = false @my_ssh_keys = AuthorizedKey.where(authorized_user_uuid: current_user.uuid) - @my_vm_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#virtual_machine', link_class: 'permission', name: 'can_login') - @my_repo_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#repository', link_class: 'permission', name: 'can_write') + # @my_vm_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#virtual_machine', link_class: 'permission', name: 'can_login') + # @my_repo_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#repository', link_class: 'permission', name: 'can_write') + + @my_tag_links = {} + @my_jobs = Job. limit(10). order('created_at desc'). where(created_by: current_user.uuid) + @my_collections = Collection. + limit(10). + order('created_at desc'). + where(created_by: current_user.uuid) + + Link.limit(1000).where(head_uuid: @my_collections.collect(&:uuid), + link_class: 'tag').each do |link| + (@my_tag_links[link.head_uuid] ||= []) << link + end + + @my_pipelines = PipelineInstance. + limit(10). + order('created_at desc'). + where(created_by: current_user.uuid) + + # A Tutorial is a Link which has link_class "resources" and name # "wants", and is owned by the Tutorials Group (i.e., named # "Arvados Tutorials" and owned by the system user).