1 class UsersController < ApplicationController
2 skip_before_filter :find_object_by_uuid, :only => :welcome
3 skip_around_filter :thread_with_api_token, :only => :welcome
4 around_filter :thread_with_optional_api_token, :only => :welcome
8 params[:action] = 'home'
14 @showallalerts = false
15 @my_ssh_keys = AuthorizedKey.where(authorized_user_uuid: current_user.uuid)
16 # @my_vm_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#virtual_machine', link_class: 'permission', name: 'can_login')
17 # @my_repo_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#repository', link_class: 'permission', name: 'can_write')
23 order('created_at desc').
24 where(created_by: current_user.uuid)
26 @my_collections = Collection.
28 order('created_at desc').
29 where(created_by: current_user.uuid)
31 Link.limit(1000).where(head_uuid: @my_collections.collect(&:uuid),
32 link_class: 'tag').each do |link|
33 (@my_tag_links[link.head_uuid] ||= []) << link
36 @my_pipelines = PipelineInstance.
38 order('created_at desc').
39 where(created_by: current_user.uuid)
42 # A Tutorial is a Link which has link_class "resources" and name
43 # "wants", and is owned by the Tutorials Group (i.e., named
44 # "Arvados Tutorials" and owned by the system user).
45 @tutorial_group = Group.where(owner_uuid: User.system.uuid,
46 name: 'Arvados Tutorials').first
48 @tutorial_links = Link.where(tail_uuid: @tutorial_group.uuid,
49 link_class: 'resources',
54 @tutorial_complete = {
55 'Run a job' => @my_last_job
58 f.js { render template: 'users/home.js' }
59 f.html { render template: 'users/home' }