[ARVADOS] updated: da56d26d09a6b315bdb93aed4473310b939e1bd7

git at public.curoverse.com git at public.curoverse.com
Tue Jul 28 11:18:31 EDT 2015


Summary of changes:
 apps/workbench/app/views/layouts/body.html.erb     | 19 ++++++++--------
 .../app/views/users/_manage_current_token.html.erb |  3 ++-
 .../app/views/users/_manage_repositories.html.erb  |  2 ++
 .../app/views/users/_manage_ssh_keys.html.erb      |  5 ++---
 .../views/users/_manage_virtual_machines.html.erb  |  9 ++++----
 .../test/integration/application_layout_test.rb    | 25 ++++++++++++++++++++++
 6 files changed, 45 insertions(+), 18 deletions(-)

       via  da56d26d09a6b315bdb93aed4473310b939e1bd7 (commit)
      from  6aac88a912ded276ed151501ac3977cfcc78600d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit da56d26d09a6b315bdb93aed4473310b939e1bd7
Author: Manoj <jonam33 at gmail.com>
Date:   Tue Jul 28 11:16:21 2015 -0400

    6588: Added new pages in notifications menu for repositories, virtual machines,
    current token and ssh keys. Added a test for these new pages.

diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index a32b41c..510aded 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -55,20 +55,21 @@
                   <%= current_user.email %>
                 </li>
                 <% if current_user.is_active %>
-                <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-home fa-fw"></i> Home project </a></li>
+                <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-lg fa-home fa-fw"></i> Home project </a></li>
 
-                <li role="menuitem"><%= link_to raw('<i class="fa fa-key fa-fw"></i> Virtual Machines'), manage_account_path(page: "manage_virtual_machines") %></li>
-                <li role="menuitem"><%= link_to raw('<i class="fa fa-key fa-fw"></i> Repositories'), manage_account_path(page: "manage_repositories") %></li>
-                <li role="menuitem"><%= link_to raw('<i class="fa fa-key fa-fw"></i> SSH Keys'), manage_account_path(page: "manage_ssh_keys") %></li>
-                <li role="menuitem"><%= link_to raw('<i class="fa fa-key fa-fw"></i> Current Token'), manage_account_path(page: "manage_current_token") %></li>
+                <li role="menuitem"><%= link_to raw('<i class="fa fa-lg fa-terminal fa-fw"></i> My Virtual Machines'), manage_account_path(page: "manage_virtual_machines") %></li>
+                <li role="menuitem"><%= link_to raw('<i class="fa fa-lg fa-code-fork fa-fw"></i> My Repositories'), manage_account_path(page: "manage_repositories") %></li>
+                <li role="menuitem"><%= link_to raw('<i class="fa fa-lg fa-ticket fa-fw"></i> My Current Token'), manage_account_path(page: "manage_current_token") %></li>
+                <li role="menuitem"><%= link_to raw('<i class="fa fa-lg fa-key fa-fw"></i> My SSH Keys'), manage_account_path(page: "manage_ssh_keys") %></li>
 
-                <li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage account</a></li>
+                <li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-lg fa-key fa-fw"></i> Manage account</a></li>
 
                 <% if Rails.configuration.user_profile_form_fields %>
-                  <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage profile</a></li>
+                  <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-lg fa-user fa-fw"></i> Manage profile</a></li>
                 <% end %>
                 <% end %>
-                <li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
+                <li role="presentation" class="divider"></li>
+                <li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-lg fa-sign-out fa-fw"></i> Log out</a></li>
                 <% if user_notifications.any? %>
                   <li role="presentation" class="divider"></li>
                   <% user_notifications.each_with_index do |n, i| %>
@@ -87,7 +88,7 @@
                 </a>
                 <ul class="dropdown-menu" role="menu">
                   <li role="presentation" class="dropdown-header">
-                    Settings
+                    Admin Settings
                   </li>
                   <li role="menuitem"><a href="/repositories">
                       <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
diff --git a/apps/workbench/app/views/users/_manage_current_token.html.erb b/apps/workbench/app/views/users/_manage_current_token.html.erb
index f4436ba..b4ed2e3 100644
--- a/apps/workbench/app/views/users/_manage_current_token.html.erb
+++ b/apps/workbench/app/views/users/_manage_current_token.html.erb
@@ -9,7 +9,7 @@
 
 <div id="#manage_current_token" class="panel-body">
 <p>The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados with the proper permissions. For more information see <%= link_to raw('Getting an API token'), "#{Rails.configuration.arvados_docsite}/user/reference/api-tokens.html", target: "_blank"%>.</p>
-<p>Paste the following lines at a shell prompt to set up the necessary environment for Arvados SDKs to authenticate to your account, <b><%= current_user.email %></b></p>
+<p>Paste the following lines at a shell prompt to set up the necessary environment for Arvados SDKs to authenticate to your <b><%= current_user.username %></b> account.</p>
 
 <pre>
 HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'
@@ -21,5 +21,6 @@ export ARVADOS_API_HOST_INSECURE=true
 unset ARVADOS_API_HOST_INSECURE
 <% end %>
 </pre>
+<p>Arvados <%= link_to raw('virtual machines'), manage_account_path(page: "manage_virtual_machines") %> do this for you automatically. This setup is needed only when you use the API remotely (e.g., from your own workstation).</p>
 </div>
 </div>
diff --git a/apps/workbench/app/views/users/_manage_repositories.html.erb b/apps/workbench/app/views/users/_manage_repositories.html.erb
index b616b6d..d1cfef5 100644
--- a/apps/workbench/app/views/users/_manage_repositories.html.erb
+++ b/apps/workbench/app/views/users/_manage_repositories.html.erb
@@ -61,3 +61,5 @@
   <% end %>
 </div>
 </div>
+  <p>In order to clone git repositories using SSH, <%= link_to raw('add an SSH key to your account'), manage_account_path(page: "manage_ssh_keys") %> and clone the git@ URLs.</p>
+  <p>When you are using an Arvados virtual machine, you should clone the https:// URLs. This will authenticate automatically using your API token.</p>
diff --git a/apps/workbench/app/views/users/_manage_ssh_keys.html.erb b/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
index 951b79c..8a11d37 100644
--- a/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
+++ b/apps/workbench/app/views/users/_manage_ssh_keys.html.erb
@@ -14,11 +14,10 @@
 
 <div id="manage_ssh_keys" class="panel-body">
   <% if !@my_ssh_keys.any? %>
-     <p> You have not yet set up an SSH public key for use with Arvados. </p>
-     <p>  <%= link_to "Click here",
+     <p> You have not yet set up an SSH public key for use with Arvados. <%= link_to "Learn more.",
                   "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
                   style: "font-weight: bold",
-                  target: "_blank" %>  to learn about SSH keys in Arvados.
+                  target: "_blank" %>
      </p>
      <p> When you have an SSH key you would like to use, add it using the <b>Add</b> button. </p>
   <% else %>
diff --git a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb b/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
index 295311d..daa0fc9 100644
--- a/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
+++ b/apps/workbench/app/views/users/_manage_virtual_machines.html.erb
@@ -97,13 +97,12 @@
         <% end %>
       </tbody>
     </table>
-
-    <p>Sample SSH Conig  <i>~/.ssh/config:</i></p>
+  <% end %>
+</div>
+</div>
+  <p>In order to access virtual machines using SSH, <%= link_to raw('add an SSH key to your account'), manage_account_path(page: "manage_ssh_keys") %> and add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
     <pre>Host *.arvados
       TCPKeepAlive yes
       ServerAliveInterval 60
       ProxyCommand ssh -p2222 turnout at switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
     </pre>
-  <% end %>
-</div>
-</div>
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index 31a297f..d9472d8 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -240,4 +240,29 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       assert page.has_text? look_for
     end
   end
+
+  [
+    ['My Virtual Machines', nil, 'Host name'],
+    ['My Repositories', 'Add new repository', 'It may take a minute or two before you can clone your new repository.'],
+    ['My SSH Keys', 'Add new SSH key', 'Click here to learn about SSH keys in Arvados.'],
+    ['My Current Token', nil, 'HISTIGNORE=$HISTIGNORE'],
+  ].each do |page_name, button_name, look_for|
+    test "test notification menu for page #{page_name}" do
+      visit page_with_token('admin')
+      within('.navbar-fixed-top') do
+          page.find("#notifications-menu").click
+          within('.dropdown-menu') do
+            assert_selector 'a', text: page_name
+            find('a', text: page_name).click
+          end
+      end
+
+      if button_name
+        assert_selector 'a', text: button_name
+        find('a', text: button_name).click
+      end
+
+      assert page.has_text? look_for
+    end
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list