From 8c8391fa8c763032742bdc0d6fa0c02ca336a82a Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 30 Dec 2013 11:54:28 -0500 Subject: [PATCH] New two-column dashboard layout suggested by Adam --- .../app/views/layouts/application.html.erb | 8 +- apps/workbench/app/views/users/home.html.erb | 301 +++++++++++------- sdk/cli/Gemfile.lock | 46 +++ 3 files changed, 234 insertions(+), 121 deletions(-) diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb index c295dc3660..e7c7d5d712 100644 --- a/apps/workbench/app/views/layouts/application.html.erb +++ b/apps/workbench/app/views/layouts/application.html.erb @@ -93,10 +93,10 @@ Docs diff --git a/apps/workbench/app/views/users/home.html.erb b/apps/workbench/app/views/users/home.html.erb index d99b29a716..bf14fdd854 100644 --- a/apps/workbench/app/views/users/home.html.erb +++ b/apps/workbench/app/views/users/home.html.erb @@ -27,7 +27,7 @@ font-weight: bold; } .dax { - max-width: 5%; + max-width: 10%; margin-right: 1em; float: left } @@ -39,116 +39,72 @@ <% if current_user.andand.is_active %> +
+ +
-<% if @my_ssh_keys.count == 0%> -
- - <%= image_tag "dax.png", class: "dax" %> -
- Hi, I noticed that you have not yet set up an SSH public key for use with Arvados. - <%= link_to "Click here to learn about SSH keys in Arvados.", - "http://doc.arvados.org/user/getting_started/ssh-access.html", style: "font-weight: bold" %> - Once have an SSH key you would like to use, paste your SSH public key - in the text box. -
- <%= form_for AuthorizedKey.new do |f| %> - <%= hidden_field_tag :return_to, request.original_url %> - <%= f.text_area :public_key, cols: 50, rows: 4, placeholder: "Paste your public key here", style: "width: 40%" %> - <%= f.submit :Save, value: raw("✓"), class: "btn btn-primary", style: "vertical-align: top" %> - <% end %> -
-<% end %> - -<% if @my_collections.count == 0 %> -
- - <%= image_tag "dax.png", class: "dax" %> -

- Hi, I noticed you haven't uploaded a new collection yet. - <%= link_to "Click here to learn how to upload data to Arvados Keep.", "http://doc.arvados.org/user/tutorials/tutorial-keep.html", style: "font-weight: bold" %> -

-
- -<% end %> - -<% if @my_jobs.count == 0 %> -
- -

<%= image_tag "dax.png", class: "dax" %> - Hi, I noticed you haven't run a job yet. - <%= link_to "Click here to learn how to run an Arvados Crunch job.", "http://doc.arvados.org/user/tutorials/tutorial-job1.html", style: "font-weight: bold" %> -

-
-<% end %> - -<% if @my_pipelines.count == 0 %> -
- -

<%= image_tag "dax.png", class: "dax" %> - Hi, I noticed you haven't run a pipeline yet. - <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.", "http://doc.arvados.org/user/tutorials/tutorial-new-pipeline.html", style: "font-weight: bold" %> -

-
-<% end %> - -
- -
-
-

Recent collections

- <% if not current_user.andand.is_active or @my_collections.empty? %> +
+ Recent jobs + <%= link_to raw("Show all jobs →"), jobs_path, class: 'pull-right' %> + <% if not current_user.andand.is_active or @my_jobs.empty? %> (None) <% else %> - - + + + + + - <% @my_collections[0..8].each do |c| %> + + + + + + + + + + <% @my_jobs[0..6].each do |j| %> - - - <% end %> -
ScriptOutputLogStatusAge
- - <% c.files.each do |file| %> - <%= "#{file[0]}/#{file[1]}" %> - <% end %> - - - - -<%= raw(distance_of_time_in_words(c[:created_at], Time.now).sub('about -','~').sub(' ',' ')) if c[:created_at] %> ago + <%= link_to j.script[0..31], job_path(j.uuid) %>
- <%= link_to raw("Show all collections →"), collections_path, class: 'pull-right' %> - <% end %> -
-
-
-
-

Recent jobs

- <% if not current_user.andand.is_active or @my_jobs.empty? %> - (None) - <% else %> - - - - - - + + + - <% @my_jobs[0..8].each do |j| %> - + - <% end %>
+ + <% if j.success %> + + + <% Collection.limit(1).where(uuid: j.output).each do |c| + c.files.each do |file| %> + <%= "#{file[0]}/#{file[1]}" %> + <% end %> + <% end %> + + + <% end %> + + + + <% if j.success %> + Log + <% end %> + +
- <%= link_to j.script[0..31], job_path(j.uuid) %> +<%= raw(distance_of_time_in_words(j[:created_at], Time.now).sub('about +','~').sub(' ',' ')) if j[:created_at] %> ago <% if j.success %> finished @@ -164,42 +120,33 @@ queued <% end %> - - <% if j.success %> - - <% Collection.limit(1).where(uuid: j.output).each do |c| - c.files.each do |file| %> - <%= "#{file[0]}/#{file[1]}" %> - <% end %> - <% end %> - - - <% end %> - -
- <%= link_to raw("Show all jobs →"), jobs_path, class: 'pull-right' %> <% end %>
-
-
-
-

Recent pipeline instances

+
+ Recent pipeline instances + <%= link_to raw("Show all pipeline instances →"), jobs_path, class: 'pull-right' %> <% if not current_user.andand.is_active or @my_pipelines.empty? %> (None) <% else %> - - + + + - <% @my_pipelines[0..8].each do |p| %> + + + + + + + <% @my_pipelines[0..6].each do |p| %> + + + + + + <% end %> +
Pipeline templateAgeStatus
@@ -208,6 +155,14 @@ <% end %> + +<%= raw(distance_of_time_in_words(p[:created_at], Time.now).sub('about +','~').sub(' ',' ')) if p[:created_at] %> ago + + <% if p.success %> finished @@ -219,15 +174,127 @@ queued <% end %>
+ <% end %> +
+ +
+ Recent collections + <%= link_to raw("Show all collections →"), collections_path, class: 'pull-right' %> + <% if not current_user.andand.is_active or @my_collections.empty? %> + (None) + <% else %> + + + + + + + + + + + + <% @my_collections[0..6].each do |c| %> + + + <% end %>
ContentsAge
+ + + <% c.files.each do |file| %> + <%= "#{file[0]}/#{file[1]}" %> + <% end %> + + + + +<%= raw(distance_of_time_in_words(c[:created_at], Time.now).sub('about +','~').sub(' ',' ')) if c[:created_at] %> ago + +
- <%= link_to raw("Show all pipeline instances →"), jobs_path, class: 'pull-right' %> <% end %>
+
+<% if @my_ssh_keys.count == 0%> +
+ + <%= image_tag "dax.png", class: "dax" %> +
+ Hi, I noticed that you have not yet set up an SSH public key for use with Arvados. + <%= link_to "Click here to learn about SSH keys in Arvados.", + "http://doc.arvados.org/user/getting_started/ssh-access.html", + style: "font-weight: bold", + target: "_blank" %> + When you have an SSH key you would like to use, paste the SSH public key + in the text box. +
+ <%= form_for AuthorizedKey.new do |f| %> + <%= hidden_field_tag :return_to, request.original_url %> + <%= f.text_area :public_key, cols: 50, rows: 4, placeholder: "Paste your public key here", style: "width: 100%" %> + <%= f.submit :Save, value: raw("✓"), class: "btn btn-primary pull-right" %> + <% end %> +
+<% end %> +<% if @my_collections.count == 0 %> +
+ + <%= image_tag "dax.png", class: "dax" %> +

+ Hi, I noticed you haven't uploaded a new collection yet. + <%= link_to "Click here to learn how to upload data to Arvados Keep.", + "http://doc.arvados.org/user/tutorials/tutorial-keep.html", + style: "font-weight: bold", target: "_blank" %> +

+
+ +<% end %> + +<% if @my_jobs.count == 0 %> +
+ +

<%= image_tag "dax.png", class: "dax" %> + Hi, I noticed you haven't run a job yet. + <%= link_to "Click here to learn how to run an Arvados Crunch job.", + "http://doc.arvados.org/user/tutorials/tutorial-job1.html", + style: "font-weight: bold", + target: "_blank" %> +

+
+<% end %> + +<% if @my_pipelines.count == 0 %> +
+ +

<%= image_tag "dax.png", class: "dax" %> + Hi, I noticed you haven't run a pipeline yet. + <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.", + "http://doc.arvados.org/user/tutorials/tutorial-new-pipeline.html", + style: "font-weight: bold", + target: "_blank" %> +

+
+<% end %> + +
+

Useful links

+

    +
  • <%= link_to "Arvados project page", "http://arvados.org", target: "_blank" %>
  • +
  • <%= link_to "Tutorials and user guide", + "http://doc.arvados.org/user/", target: "_blank" %>
  • +
+

+
+ +
<% elsif current_user %> diff --git a/sdk/cli/Gemfile.lock b/sdk/cli/Gemfile.lock index afbc57345a..b14404a0cb 100644 --- a/sdk/cli/Gemfile.lock +++ b/sdk/cli/Gemfile.lock @@ -1,12 +1,58 @@ GEM remote: https://rubygems.org/ specs: + activesupport (3.2.16) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + addressable (2.3.5) + andand (1.3.3) + autoparse (0.3.3) + addressable (>= 2.3.1) + extlib (>= 0.9.15) + multi_json (>= 1.0.0) + curb (0.8.5) + extlib (0.9.16) + faraday (0.8.8) + multipart-post (~> 1.2.0) + google-api-client (0.6.4) + addressable (>= 2.3.2) + autoparse (>= 0.3.3) + extlib (>= 0.9.15) + faraday (~> 0.8.4) + jwt (>= 0.1.5) + launchy (>= 2.1.1) + multi_json (>= 1.0.0) + signet (~> 0.4.5) + uuidtools (>= 2.1.0) + i18n (0.6.9) + json (1.8.1) + jwt (0.1.8) + multi_json (>= 1.5) + launchy (2.4.2) + addressable (~> 2.3) minitest (5.0.8) + multi_json (1.8.2) + multipart-post (1.2.0) + oj (2.5.1) rake (10.1.0) + signet (0.4.5) + addressable (>= 2.2.3) + faraday (~> 0.8.1) + jwt (>= 0.1.5) + multi_json (>= 1.0.0) + trollop (2.0) + uuidtools (2.1.4) PLATFORMS ruby DEPENDENCIES + activesupport (>= 3.2.13) + andand (>= 1.3.3) + curb (~> 0.8) + google-api-client (>= 0.6.3) + json (>= 1.7.7) minitest + oj (>= 2.0.3) rake + trollop (>= 2.0) -- 2.30.2