[ARVADOS] updated: 1.3.0-1997-gcf43300ef

Git user git at public.arvados.org
Thu Dec 19 16:29:11 UTC 2019


Summary of changes:
 apps/workbench/app/helpers/application_helper.rb              | 6 +++++-
 apps/workbench/app/views/virtual_machines/_show_help.html.erb | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

       via  cf43300efe23a334136fef301a566ce8297f88c2 (commit)
      from  f3c89480b1f09c30708150f0733b2d430f4221da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit cf43300efe23a334136fef301a566ce8297f88c2
Author: Ward Vandewege <ward at jhvc.com>
Date:   Thu Dec 19 11:27:25 2019 -0500

    A few fixes for workbench in the way it displays the ARVADOS_API_HOST
    and ssh ProxyCommand.
    
    refs #14812
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at jhvc.com>

diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 0a872446d..330d30976 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -12,7 +12,11 @@ module ApplicationHelper
   end
 
   def current_api_host
-    "#{Rails.configuration.Services.Controller.ExternalURL.hostname}:#{Rails.configuration.Services.Controller.ExternalURL.port}"
+    if Rails.configuration.Services.Controller.ExternalURL.port == 443
+      "#{Rails.configuration.Services.Controller.ExternalURL.hostname}"
+    else
+      "#{Rails.configuration.Services.Controller.ExternalURL.hostname}:#{Rails.configuration.Services.Controller.ExternalURL.port}"
+    end
   end
 
   def current_uuid_prefix
diff --git a/apps/workbench/app/views/virtual_machines/_show_help.html.erb b/apps/workbench/app/views/virtual_machines/_show_help.html.erb
index 204e71a91..d989663fe 100644
--- a/apps/workbench/app/views/virtual_machines/_show_help.html.erb
+++ b/apps/workbench/app/views/virtual_machines/_show_help.html.erb
@@ -8,7 +8,7 @@ Sample <code>~/.ssh/config</code> section:
 
 <pre>
 Host *.arvados
-  ProxyCommand ssh -p2222 turnout at switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
+  ProxyCommand ssh -p2222 turnout at switchyard.<%= current_api_host.sub(/:.*$/,"") || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
 <% if @objects.first.andand.current_user_logins.andand.first %>
   User <%= @objects.first.current_user_logins.andand.first %>
 <% end %>
@@ -19,7 +19,7 @@ Sample login command:
 </p>
 
 <pre>
-ssh <%= @objects.first.andand.hostname.andand.sub('.'+current_api_host,'') or 'vm-hostname' %>.arvados
+ssh <%= @objects.first.andand.hostname.andand.sub('.'+current_api_host.sub(/:.*$/,""),'') or 'vm-hostname' %>.arvados
 </pre>
 
 <p>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list