Combined contents of "Setting up SSH" into "Virtual Machines" panel. Added
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 30 Jul 2014 19:54:47 +0000 (15:54 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 30 Jul 2014 19:54:47 +0000 (15:54 -0400)
"Command line" column to "virtual machines" table which user can cut and paste
the ssh command line.

apps/workbench/app/views/users/_manage_account.html.erb
apps/workbench/app/views/users/_manage_current_token.html.erb
apps/workbench/app/views/users/_manage_repositories.html.erb
apps/workbench/app/views/users/_manage_setting_up_ssh_access.html.erb [deleted file]
apps/workbench/app/views/users/_manage_virtual_machines.html.erb

index 362abedeff6b1e1ffd6aa7027ffe3c12fcd6dfba..309d98221788adf3fcc626b5cc73e45b380e9484 100644 (file)
@@ -1,8 +1,7 @@
 <div class="col-sm-6">
   <div class="panel-group" id="arv-adv-accordion">
     <% ['Virtual Machines',
-       'Repositories',
-       'Current Token'].each do |section| %>
+       'Repositories'].each do |section| %>
       <% section_id = section.gsub(" ","_").downcase %>
       <div class="panel panel-default">
         <div class="panel-heading">
@@ -24,7 +23,7 @@
 <div class="col-sm-6">
   <div class="panel-group" id="arv-adv-accordion">
     <% ['SSH Keys',
-       'Setting up SSH access'].each do |section| %>
+      'Current Token'].each do |section| %>
       <% section_id = section.gsub(" ","_").downcase %>
       <div class="panel panel-default">
         <div class="panel-heading">
index 33633edc61464839e59fa1ca9e6798a83b88c0cd..246141040f06a6a402d6d81c290ec39a74013e47 100644 (file)
@@ -1,9 +1,9 @@
-### Pasting the following lines at a shell prompt will allow Arvados SDKs</br>
-### to authenticate to your account, <%= current_user.email %></br>
-export ARVADOS_API_TOKEN=<%= Thread.current[:arvados_api_token] %></br>
-export ARVADOS_API_TOKEN ARVADOS_API_HOST=<%= current_api_host %></br>
+<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>
+
+<pre>export ARVADOS_API_TOKEN=<%= Thread.current[:arvados_api_token] %>
+export ARVADOS_API_HOST=<%= current_api_host %>
 <% if Rails.configuration.arvados_insecure_https %>
-export ARVADOS_API_HOST_INSECURE=true</br>
+export ARVADOS_API_HOST_INSECURE=true
 <% else %>
-unset ARVADOS_API_HOST_INSECURE</br>
-<% end %>
+unset ARVADOS_API_HOST_INSECURE
+<% end %></pre>
index 7ff11bd2161c044fceedad4bc52daf7872a89f58..33746be7eabcc825ebac501eeddeb73fe7361055 100644 (file)
@@ -27,7 +27,7 @@
             <%= repo[:push_url] != nil %>
           </td>
           <td style="word-break:break-all;">
-            <%= repo[:fetch_url] %>
+            <code><%= repo[:fetch_url] %></code>
           </td>
         </tr>
       <% end %>
diff --git a/apps/workbench/app/views/users/_manage_setting_up_ssh_access.html.erb b/apps/workbench/app/views/users/_manage_setting_up_ssh_access.html.erb
deleted file mode 100644 (file)
index 903fc7f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<div>
-<p>
-Sample <code>~/.ssh/config</code>:
-</p>
-
-<pre>
-Host *.arvados
-  ProxyCommand ssh -p2222 turnout@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
-<% if @my_vm_logins.andand.first %>
-  User <%= @my_vm_logins[@my_vm_logins.andand.keys.first].andand.first %>
-<% end %>
-</pre>
-
-<p>
-Sample login command:
-</p>
-
-<pre>
-ssh <%= @my_virtual_machines.first.andand.hostname.andand.sub('.'+current_api_host,'') or 'vm-hostname' %>.arvados
-</pre>
-
-<p>
-  See also:
-  <%= link_to raw('Arvados Docs &rarr; User Guide &rarr; SSH access'),
-  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
-  target: "_blank"%>.
-</p>
-</div>
index a3191c2085ef6f2c2ce1829c71c36da4b64a786f..8215f1f907d164e93d7227e6cdfecc4aecc6550a 100644 (file)
@@ -1,18 +1,21 @@
 <div>
   <p>
-    For more information see <%= link_to raw('Setting up SSH access'),
-    "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html", target: "_blank"%>.
+    For more information see <%= link_to raw('Arvados Docs &rarr; User Guide &rarr; SSH access'),
+  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
+  target: "_blank"%>.  A sample <i>~/.ssh/config</i> entry is provided below.
   </p>
 
   <table class="table virtual-machines-table">
     <colgroup>
-      <col style="width: 50%" />
+      <col style="width: 25%" />
+      <col style="width: 25%" />
       <col style="width: 50%" />
     </colgroup>
     <thead>
       <tr>
         <th> Host name </th>
         <th> Login name </th>
+        <th> Command line </th>
       </tr>
     </thead>
     <tbody>
           <td style="word-break:break-all;">
             <%= @my_vm_logins[vm[:uuid]].andand.compact.andand.join(", ") %>
           </td>
+          <td style="word-break:break-all;">
+            <% if @my_vm_logins[vm[:uuid]] %>
+              <% @my_vm_logins[vm[:uuid]].each do |login| %>
+                <code>ssh&nbsp;<%= login %>@<%= vm[:hostname] %>.arvados</code>
+              <% end %>
+            <% end %>
+          </td>
         </tr>
       <% end %>
     </tbody>
   </table>
 
-  <%
-    login_name = @my_vm_logins[@my_vm_logins.andand.keys.first].andand.first
-    api_host = @my_virtual_machines.first.andand.hostname.andand.sub('.'+current_api_host,'')
-    if (login_name && api_host)
-  %>
-    <p>
-      To log in to <b><%=api_host%></b> using the login name <b><%=login_name%></b>, use <b><%=login_name%>@<%=api_host%>.arvados</b>.
-      Please see the <b>Setting up SSH access</b> section to the right for more detail.
-    </p>
-  <% end %>
+<p><i>~/.ssh/config:</i></p>
+<pre>Host *.arvados
+  ProxyCommand ssh -p2222 turnout@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
+</pre>
 
 </div>