X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/97ee2e7bfcdb17fd195382b22a15f0f2752b8007..6c15255ad28cfa09cced3a6af2663d8adcc8ce4e:/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 6f52694070..e67772f7f9 100644
--- a/apps/workbench/app/views/users/home.html.erb
+++ b/apps/workbench/app/views/users/home.html.erb
@@ -1,104 +1,148 @@
-<% 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
+<% if current_user.andand.is_active %>
+
+
+
+
Account summary
+
+ <% [Human, Trait, Collection, 'File', PipelineTemplate, PipelineInstance].each do |aclass| %>
+
+
+ <% if aclass == 'File' %>
+ <%= Collection.limit(4000).where({}).collect(&:files).flatten(1).count %>
+ <% else %>
+ <%= aclass.limit(4000).where({}).count %>
+ <% end %>
+
+
+ <%= raw(aclass.to_s.pluralize.underscore.gsub '_', ' ') %>
+
+ <% end %>
+
+
- Project home page: developer docs, source code, background.
-
- <%= link_to raw('arvados.org ➜'), 'https://arvados.org/', class: "pull-right btn" %>
<% end %>
-
-
Setup
-
-
- SSH keys
- <%= @my_ssh_keys.count %>
-
- You’ll use public key authentication when logging in to a
- VM or use a hosted git repository.
-
- <%= 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" %>
+
+
+ <% if not current_user.andand.is_active %>
+ <%= render partial: 'request_activation' %>
<% 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 %>
+
Configuration
+
- 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 %>
-
- <% if content_for? :tutorials %>
- <%= yield :tutorials %>
+
+
Quick links
+
+
+ - <%= link_to "Introduction to Arvados", "https://arvados.org/projects/arvados/wiki/Introduction_to_Arvados" %>
+ - <%= link_to "API Reference", "http://doc.arvados.org/api/" %>
+ - <%= link_to "User Guide", "http://doc.arvados.org/api/" %>
+ - <%= link_to "Tutorial 1: Your first job", "http://doc.arvados.org/user/tutorial-job1.html" %>
+ - <%= link_to "Tutorial 2: GATK VariantFiltration", "http://doc.arvados.org/user/tutorial-gatk-variantfiltration.html" %>
+ - <%= link_to "Tutorial 3: Search PGP data by trait", "http://doc.arvados.org/user/tutorial-trait-search.html" %>
+ - <%= link_to "Tutorial 4: Create a new pipeline", "http://doc.arvados.org/user/tutorial-new-pipeline.html" %>
+
+
+
- <% 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| %>
+
+
+
+ <%= 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 %>
+ |
+
+ <% end %>
+
+ <%= link_to raw("Show more jobs / details →"), jobs_path, class: 'pull-right' %>
+ <% end %>
+