current token and ssh keys. Added a test for these new pages.
<%= 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| %>
</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
<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=*'
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>
<% 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>
<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 %>
<% 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@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
</pre>
- <% end %>
-</div>
-</div>
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