14691: workbench update, bring in line with documentation
authorWard Vandewege <wvandewege@veritasgenetics.com>
Fri, 4 Jan 2019 21:02:54 +0000 (16:02 -0500)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Fri, 4 Jan 2019 21:02:54 +0000 (16:02 -0500)
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

apps/workbench/app/helpers/application_helper.rb
apps/workbench/app/views/users/_virtual_machines.html.erb
apps/workbench/package-build.version [new file with mode: 0644]
apps/workbench/test/the.patch [new file with mode: 0644]

index c4a801d68b0a645fe7c10de9cdee91f642ed4ab7..15bf77fa094f188e5b3f8be980c5c57e3d73bcfe 100644 (file)
@@ -15,6 +15,10 @@ module ApplicationHelper
     Rails.configuration.arvados_v1_base.gsub /https?:\/\/|\/arvados\/v1/,''
   end
 
+  def current_uuid_prefix
+    current_api_host[0..4]
+  end
+
   def render_markup(markup)
     allowed_tags = Rails::Html::Sanitizer.white_list_sanitizer.allowed_tags + %w(table tbody th tr td col colgroup caption thead tfoot)
     sanitize(raw(RedCloth.new(markup.to_s).to_html(:refs_arvados, :textile)), tags: allowed_tags) if markup
index 928f50f0b6f50fb0fab0701b7e8f61e7940847fd..c891b0c594af329b9f0a7790217596b11b0109fc 100644 (file)
@@ -85,7 +85,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
             <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>
+                  <code>ssh&nbsp;<%= login %>@<%= vm[:hostname] %>.<%= current_uuid_prefix || 'xyzzy' %></code>
                 <% end %>
               <% end %>
             </td>
@@ -106,7 +106,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 </div>
 </div>
   <p>In order to access virtual machines using SSH, <%= link_to ssh_keys_user_path(current_user) do%> add an SSH key to your account<%end%> and add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
-    <pre>Host *.arvados
+    <pre>Host *.<%= current_uuid_prefix || 'xyzzy' %>
       TCPKeepAlive yes
       ServerAliveInterval 60
       ProxyCommand ssh -p2222 turnout@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
diff --git a/apps/workbench/package-build.version b/apps/workbench/package-build.version
new file mode 100644 (file)
index 0000000..41eb2c7
--- /dev/null
@@ -0,0 +1 @@
+1.2.1.20181126194329
diff --git a/apps/workbench/test/the.patch b/apps/workbench/test/the.patch
new file mode 100644 (file)
index 0000000..5a55679
--- /dev/null
@@ -0,0 +1,3 @@
++    echo -n 'geckodriver: '
++    which geckodriver || fatal "No geckodriver. Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it somewhere on your PATH. More info at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver."
+