X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9bd3ce87b941fe7e95523e4a090c72b6e514010a..deff28548be930b4c6600aafbbfd5440da26e0b7:/apps/workbench/app/views/users/home.html.erb diff --git a/apps/workbench/app/views/users/home.html.erb b/apps/workbench/app/views/users/home.html.erb index 09185c62d9..7ae47eb28e 100644 --- a/apps/workbench/app/views/users/home.html.erb +++ b/apps/workbench/app/views/users/home.html.erb @@ -1,114 +1,146 @@ -<% if @tutorial_links.any? %> -<% content_for :tutorials do %> -

Tutorials

-<% @tutorial_links.each do |tut| %> -
-
- <%= tut.properties[:page_title] %> - <% if @tutorial_complete[tut.properties[:page_title]] %> - - <% else %> - - <% end %> -
- <%= render_content_from_database tut.properties[:page_subtitle] %> -
- <%= link_to raw('Tutorial: ' + tut.properties[:page_title] + ' ➜'), link_path(tut.uuid), class: "pull-right btn btn-primary" %> -
-<% end %> -<% end %> +<% content_for :head do %> + <% end %> -<% content_for :references do %> -

References

-
-
- API Reference -
- API calls for running jobs, building pipelines, and developing apps. -
- <%= link_to raw('API Reference ➜'), 'http://doc.arvados.org/api/', class: "pull-right btn" %> -
-
-
- User Guide -
- Getting acquainted with the Arvados platform. -
- <%= link_to raw('User Guide ➜'), 'http://doc.arvados.org/user/', class: "pull-right btn" %> -
-
-
- arvados.org -
- Project home page: developer docs, source code, background. -
- <%= link_to raw('arvados.org ➜'), 'https://arvados.org/', class: "pull-right btn" %> -
+
+
+
+

Account summary

+
+ <% [Human, Specimen, Trait, Collection, PipelineTemplate, PipelineInstance].each do |aclass| %> +
+ + <% if [Human, Specimen, Trait, Collection].index aclass %> + <%= aclass.limit(4000).where({}).count %> + <% else %> + <%= aclass.limit(1000).where({owner_uuid:current_user.uuid}).count %> + <% end %> + +
+ <%= raw(aclass.to_s.pluralize.underscore.gsub '_', ' ') %> +
<% end %> - -<% if current_user.andand.is_active %> -<% content_for :manage_access do %> -

Setup

-
-
- SSH keys - <%= @my_ssh_keys.count %> -
- You’ll use public key authentication for logging in to - VMs and using hosted git repositories. -
- <%= link_to raw('Add/edit keys ➜'), authorized_keys_path, class: "pull-right btn #{'btn-primary' if @my_ssh_keys.empty?}" %> -
-
-
- Virtual machines - <%= @my_vm_perms.collect(&:head_uuid).uniq.count %> +
+
- Arvados includes virtual machines with SDKs installed and ready to use. -
- <% if @my_vm_perms.any? %> - <%= link_to raw('Show VMs ➜'), virtual_machines_path, class: "pull-right btn" %> - <% elsif @my_ssh_keys.any? %> - <%= link_to raw('Request a VM ➜'), virtual_machines_path, class: "pull-right btn btn-primary" %> - <% else %> - <%= link_to raw('Request a VM ➜'), virtual_machines_path, { :class => "pull-right btn disabled", :"data-toggle" => "tooltip", :"data-placement" => "bottom", :title => "Add an SSH public key first!" } %> - <% end %>
-
-
- Git repositories - <%= @my_repo_perms.collect(&:head_uuid).uniq.count %> -
- In order to run jobs using your own code, you need to push your code to a git repository. We provide hosted git repositories to make this easy. -
- <% if @my_repo_perms.any? %> - <%= link_to raw('Show repositories ➜'), repositories_path, class: "pull-right btn" %> - <% elsif @my_ssh_keys.any? %> - <%= link_to raw('Request a repository ➜'), repositories_path, class: "pull-right btn btn-primary" %> - <% else %> - <%= link_to raw('Request a repository ➜'), repositories_path, { :class => "pull-right btn disabled", :"data-toggle" => "tooltip", :"data-placement" => "bottom", :title => "Add an SSH public key first!" } %> - <% end %> -
-<% end %> -<% end %>
-
- <% if content_for? :manage_access %> - <%= yield :manage_access %> - <% else %> - <%= render partial: 'request_activation' %> - <% end %> + - - <% if content_for? :tutorials %>
- <%= yield :tutorials %> +
+

Quick links

+
+ +
+
- <% end %> - -
- <%= yield :references %> +
+
+

Recent jobs

+ <% if not current_user.andand.is_active or @my_jobs.empty? %> + (None) + <% else %> + + <% @my_jobs[0..8].each do |j| %> + + + + + + + <% end %> +
+ + <%= link_to j.script[0..31], job_path(j.uuid) %> + + + + <%= j.script_version[0..7] %> + + + + <%= j.script_parameters.andand[:input].andand.to_s.andand[0..7] %> + + + <% if j.success %> + finished + <% elsif j.success == false %> + failed + <% elsif j.running and j.started_at and not j.finished_at %> + <% percent_total_tasks = 100 / (j.tasks_summary[:running] + j.tasks_summary[:done] + j.tasks_summary[:todo]) rescue 0 %> +
+
+
+
+ <% else %> + queued + <% end %> +
+ <%= link_to raw("Show more jobs / details →"), jobs_path, class: 'pull-right' %> + <% end %> +