6588: Added new pages in notifications menu for repositories, virtual machines,
[arvados.git] / apps / workbench / app / views / users / _manage_virtual_machines.html.erb
index f3756ac62151fbdde555904c88c3ae090a25de89..daa0fc95b67f9c90f60cfffb164ff83f98b71cb0 100644 (file)
@@ -9,12 +9,9 @@
 
 <div id="manage_virtual_machines" class="panel-body">
   <p>
-    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",
+    For more information see <%= link_to raw('Arvados Docs &rarr; User Guide &rarr; VM access'),
+  "#{Rails.configuration.arvados_docsite}/user/getting_started/vm-login-with-webshell.html",
   target: "_blank"%>.
-    <% if @my_virtual_machines.any? or true %>
-      A sample <code>~/.ssh/config</code> entry is provided below.
-    <% end %>
   </p>
 
   <% if !@my_virtual_machines.any? %>
@@ -66,6 +63,9 @@
           <th> Host name </th>
           <th> Login name </th>
           <th> Command line </th>
+          <% if Rails.configuration.shell_in_a_box_url %>
+            <th> Web shell <span class="label label-info">beta</span></th>
+          <% end %>
         </tr>
       </thead>
       <tbody>
                 <% end %>
               <% end %>
             </td>
-            <td>
-              <% if  Rails.configuration.shell_in_a_box_url %>
-                <%= link_to 'Login', webshell_path(login: @my_vm_logins[vm[:uuid]].first, hostname: vm[:hostname], vm_uuid: vm[:uuid]) %>
-              <% end %>
-            </td>
+            <% if Rails.configuration.shell_in_a_box_url %>
+              <td>
+                <% @my_vm_logins[vm[:uuid]].andand.each do |login| %>
+                  <%= link_to webshell_virtual_machine_path(vm, login: login), title: "Open a terminal session in your browser", class: 'btn btn-xs btn-default', target: "_blank" do %>
+                    Log in as <%= login %><br />
+                  <% end %>
+                <% end %>
+              </td>
+            <% end %>
           </tr>
         <% end %>
       </tbody>
     </table>
-
-    <p><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>