Merge branch '4158-fix-compute-node-detail' closes #4158
[arvados.git] / apps / workbench / app / views / users / _manage_ssh_keys.html.erb
index 1165ffa3e19b73c462e4a3638cab7758048174ab..1ea8f0bf87f698a5199cd357163c7f07df973796 100644 (file)
@@ -2,9 +2,9 @@
   <% 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",
-                 "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html", 
-                 style: "font-weight: bold",
-                 target: "_blank" %>  to learn about SSH keys in Arvados.
+                  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
+                  style: "font-weight: bold",
+                  target: "_blank" %>  to learn about SSH keys in Arvados.
      </p>
      <p> When you have an SSH key you would like to use, add it using the <b>Add</b> button. </p>
   <% else %>
             <td style="word-break:break-all;">
               <% if key[:public_key] && key[:public_key].size > 0 %>
                 <div>
-                  <span title="<%=key[:public_key]%>"> <%= SSHKey.fingerprint key[:public_key] %> </span>
+                  <span title="<%=key[:public_key]%>"> <%=
+                    begin
+                      SSHKey.fingerprint key[:public_key]
+                    rescue
+                      "INVALID KEY: " + key[:public_key]
+                    end
+                   %> </span>
                 </div>
               <% else %>
                   <%= key[:public_key] %>
               <% end %>
             </td>
             <td>
-              <%= link_to(authorized_key_path(id: key[:uuid]), method: 'delete', class: 'btn btn-sm', data: {confirm: "Really delete key?"}) do %>
+              <%= link_to(authorized_key_path(id: key[:uuid]), method: :delete, class: 'btn btn-sm', data: {confirm: "Really delete key?"}) do %>
                   <i class="fa fa-fw fa-trash-o"></i>
               <% end %>
             </td>