14812: Finish first pass migrating config items
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Thu, 27 Jun 2019 19:18:39 +0000 (15:18 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 1 Jul 2019 16:22:25 +0000 (12:22 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

45 files changed:
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/controllers/collections_controller.rb
apps/workbench/app/controllers/container_requests_controller.rb
apps/workbench/app/controllers/containers_controller.rb
apps/workbench/app/controllers/jobs_controller.rb
apps/workbench/app/controllers/pipeline_instances_controller.rb
apps/workbench/app/controllers/pipeline_templates_controller.rb
apps/workbench/app/controllers/projects_controller.rb
apps/workbench/app/controllers/users_controller.rb
apps/workbench/app/controllers/virtual_machines_controller.rb
apps/workbench/app/controllers/workflows_controller.rb
apps/workbench/app/mailers/issue_reporter.rb
apps/workbench/app/mailers/request_shell_access_reporter.rb
apps/workbench/app/models/arvados_api_client.rb
apps/workbench/app/models/repository.rb
apps/workbench/app/views/api_client_authorizations/_show_help.html.erb
apps/workbench/app/views/application/_breadcrumbs.html.erb
apps/workbench/app/views/application/_report_error.html.erb
apps/workbench/app/views/application/_report_issue_popup.html.erb
apps/workbench/app/views/application/_show_sharing.html.erb
apps/workbench/app/views/collections/show_file_links.html.erb
apps/workbench/app/views/getting_started/_getting_started_popup.html.erb
apps/workbench/app/views/jobs/_show_log.html.erb
apps/workbench/app/views/layouts/application.html.erb
apps/workbench/app/views/layouts/body.html.erb
apps/workbench/app/views/notifications/_collections_notification.html.erb
apps/workbench/app/views/notifications/_jobs_notification.html.erb
apps/workbench/app/views/notifications/_pipelines_notification.html.erb
apps/workbench/app/views/projects/_show_dashboard.html.erb
apps/workbench/app/views/repositories/_show_help.html.erb
apps/workbench/app/views/user_agreements/index.html.erb
apps/workbench/app/views/users/_add_ssh_key_popup.html.erb
apps/workbench/app/views/users/_current_token.html.erb
apps/workbench/app/views/users/_setup_popup.html.erb
apps/workbench/app/views/users/_ssh_keys.html.erb
apps/workbench/app/views/users/_tables.html.erb
apps/workbench/app/views/users/_virtual_machines.html.erb
apps/workbench/app/views/users/profile.html.erb
apps/workbench/app/views/users/welcome.html.erb
apps/workbench/app/views/virtual_machines/_show_help.html.erb
apps/workbench/app/views/virtual_machines/webshell.html.erb
apps/workbench/app/views/work_units/_show_log.html.erb
apps/workbench/config/arvados_config.rb
lib/config/config.default.yml
services/login-sync/Gemfile.lock

index f913a15ffe23c997c7e5554f9755a470599c2e4c..c14f676a242259dfb9b267f470d13ace27a2b2da 100644 (file)
@@ -756,8 +756,8 @@ class ApplicationController < ActionController::Base
   def missing_required_profile?
     missing_required = false
 
-    profile_config = Rails.configuration.user_profile_form_fields
-    if current_user && profile_config
+    profile_config = Rails.configuration.Workbench.UserProfileFormFields
+    if current_user && !profile_config.empty?
       current_user_profile = current_user.prefs[:profile]
       profile_config.kind_of?(Array) && profile_config.andand.each do |entry|
         if entry['required']
@@ -775,13 +775,13 @@ class ApplicationController < ActionController::Base
   end
 
   def select_theme
-    return Rails.configuration.arvados_theme
+    return Rails.configuration.Workbench.Theme
   end
 
   @@notification_tests = []
 
   @@notification_tests.push lambda { |controller, current_user|
-    return nil if Rails.configuration.shell_in_a_box_url
+    return nil if Rails.configuration.Services.WebShell.ExternalURL != URI("")
     AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
       return nil
     end
@@ -815,7 +815,7 @@ class ApplicationController < ActionController::Base
   helper_method :user_notifications
   def user_notifications
     @errors = nil if !defined?(@errors)
-    return [] if @errors or not current_user.andand.is_active or not Rails.configuration.show_user_notifications
+    return [] if @errors or not current_user.andand.is_active or not Rails.configuration.Workbench.ShowUserNotifications
     @notifications ||= @@notification_tests.map do |t|
       t.call(self, current_user)
     end.compact
index 2c8cf7e443a650f645571675a55d81c6dcd2be1e..d826e970b84488242bea70daa5524ec2f15f2dda 100644 (file)
@@ -335,24 +335,23 @@ class CollectionsController < ApplicationController
 
   def keep_web_url(uuid_or_pdh, file, opts)
     munged_id = uuid_or_pdh.sub('+', '-')
-    fmt = {uuid_or_pdh: munged_id}
 
-    tmpl = Rails.configuration.keep_web_url
-    if Rails.configuration.keep_web_download_url and
+    tmpl = Rails.configuration.Services.WebDAV.ExternalURL.to_s
+    if !Rails.configuration.Services.WebDAVDownload.ExternalURL.empty? and
         (!tmpl or opts[:disposition] == 'attachment')
       # Prefer the attachment-only-host when we want an attachment
       # (and when there is no preview link configured)
-      tmpl = Rails.configuration.keep_web_download_url
-    elsif not Rails.configuration.trust_all_content
-      check_uri = URI.parse(tmpl % fmt)
+      tmpl = Rails.configuration.Services.WebDAVDownload.ExternalURL.to_s
+    elsif not Rails.configuration.Workbench.TrustAllContent
+      check_uri = URI.parse(tmpl.sub("*", munged_id))
       if opts[:query_token] and
           not check_uri.host.start_with?(munged_id + "--") and
           not check_uri.host.start_with?(munged_id + ".")
         # We're about to pass a token in the query string, but
         # keep-web can't accept that safely at a single-origin URL
         # template (unless it's -attachment-only-host).
-        tmpl = Rails.configuration.keep_web_download_url
-        if not tmpl
+        tmpl = Rails.configuration.Services.WebDAVDownload.ExternalURL.to_s
+        if tmpl.empty?
           raise ArgumentError, "Download precluded by site configuration"
         end
         logger.warn("Using download link, even though inline content " \
@@ -360,13 +359,16 @@ class CollectionsController < ApplicationController
       end
     end
 
-    if tmpl == Rails.configuration.keep_web_download_url
+    if tmpl == Rails.configuration.Services.WebDAVDownload.ExternalURL.to_s
       # This takes us to keep-web's -attachment-only-host so there is
       # no need to add ?disposition=attachment.
       opts.delete :disposition
     end
 
-    uri = URI.parse(tmpl % fmt)
+    uri = URI.parse(tmpl.sub("*", munged_id))
+    if tmpl.index("*").nil?
+      uri.path += "/c=#{munged_id}"
+    end
     uri.path += '/' unless uri.path.end_with? '/'
     if opts[:path_token]
       uri.path += 't=' + opts[:path_token] + '/'
index d5627076f5e1d0b0dee23531fbe884dacb16aa64..385d9dc6d7292c8cc5d47cf18b94ecf5189b8354 100644 (file)
@@ -4,7 +4,7 @@
 
 class ContainerRequestsController < ApplicationController
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
index a8549cd5b82e8b9e82420d7f7478b2c3a9660247..4b5606778f409f072fd44e4449200eb73ed788d0 100644 (file)
@@ -4,7 +4,7 @@
 
 class ContainersController < ApplicationController
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
index 2caa8ff43a0d094e2714a6805ab64d2efa51f54e..1701052c29ef0f47a7cd59e5badc8de9e5dc8e89 100644 (file)
@@ -67,7 +67,7 @@ class JobsController < ApplicationController
 
   def logs
     @logs = @object.
-      stderr_log_query(Rails.configuration.running_job_log_records_to_fetch).
+      stderr_log_query(Rails.configuration.RunningJobLogRecordsToFetch).
       map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
     respond_to do |format|
       format.json { render json: @logs }
index 26a9f85d4e4e890b85ab722151737afe12d2dd12..c8863653a1b8f30433ce77d2570bd831cc7cfbd7 100644 (file)
@@ -6,7 +6,7 @@ class PipelineInstancesController < ApplicationController
   skip_before_action :find_object_by_uuid, only: :compare
   before_action :find_objects_by_uuid, only: :compare
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
index c497c70d434c4b67edb1dab42c2558bdd8242b16..aa444c153b6163d3a65d43bbeb790d2c06688844 100644 (file)
@@ -4,7 +4,7 @@
 
 class PipelineTemplatesController < ApplicationController
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
index 8237dc7152c9e72dddf2ace2515bf8b80f0b1294..b3efe9bce717cfeb2589d058be8386d32a4236db 100644 (file)
@@ -5,7 +5,7 @@
 class ProjectsController < ApplicationController
   before_action :set_share_links, if: -> { defined? @object and @object}
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     %w(show tab_counts public).include? ctrl.action_name
   }
 
@@ -315,7 +315,7 @@ class ProjectsController < ApplicationController
   end
 
   def public  # Yes 'public' is the name of the action for public projects
-    return render_not_found if not Rails.configuration.anonymous_user_token or not Rails.configuration.enable_public_projects_page
+    return render_not_found if Rails.configuration.Users.AnonymousUserToken.empty? or not Rails.configuration.enable_public_projects_page
     @objects = using_specific_api_token Rails.configuration.anonymous_user_token do
       Group.where(group_class: 'project').order("modified_at DESC")
     end
index d934af796509e2c172dcda8d2941daf889acd716..099189811a1b1fb199b5b1e265667383d00ef8d2 100644 (file)
@@ -202,7 +202,7 @@ class UsersController < ApplicationController
     respond_to do |format|
       if current_user.andand.is_admin
         setup_params = {}
-        setup_params[:send_notification_email] = "#{Rails.configuration.send_user_setup_notification_email}"
+        setup_params[:send_notification_email] = "#{Rails.configuration.Users.SendUserSetupNotificationEmail}"
         if params['user_uuid'] && params['user_uuid'].size>0
           setup_params[:uuid] = params['user_uuid']
         end
index 6809e141fddbfaaa976f8e9b6e429c9e95126f7c..764571c4c5b635352439fa7d0e09f2d2431e39e9 100644 (file)
@@ -25,11 +25,14 @@ class VirtualMachinesController < ApplicationController
   end
 
   def webshell
-    return render_not_found if Rails.configuration.Workbench.ShellInABoxURL.empty?
-    @webshell_url = Rails.configuration.Workbench.ShellInABoxURL % {
-      uuid: @object.uuid,
-      hostname: @object.hostname,
-    }
+    return render_not_found if Rails.configuration.Workbench.ShellInABoxURL == URI("")
+    webshell_url = URI(Rails.configuration.Workbench.ShellInABoxURL)
+    if webshell_url.host.index("*") != nil
+      webshell_url.host = webshell_url.host.sub("*", @object.hostname)
+    else
+      webshell_url.path = "/#{@object.hostname}"
+    end
+    @webshell_url = webshell_url.to_s
     render layout: false
   end
 
index b7f99e855e69dab591e633d9a07a54baa6f03282..4d78ca7ed92f834086b91c6f83a04d31ea2e94b1 100644 (file)
@@ -4,7 +4,7 @@
 
 class WorkflowsController < ApplicationController
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
index de07122c2fba3a86a169ad32c6a9ed62dc5e81e5..8066b0b5bb83112c4309e0958eae97a8899e5e92 100644 (file)
@@ -3,8 +3,8 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 class IssueReporter < ActionMailer::Base
-  default from: Rails.configuration.issue_reporter_email_from
-  default to: Rails.configuration.issue_reporter_email_to
+  default from: Rails.configuration.Mail.IssueReporterEmailFrom
+  default to: Rails.configuration.Mail.IssueReporterEmailTo
 
   def send_report(user, params)
     @user = user
index 8615cea3a86648ec88a28d0421c039852f470ff6..d6413c92bee793109eccddfe234dc3aed51786df 100644 (file)
@@ -3,8 +3,8 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 class RequestShellAccessReporter < ActionMailer::Base
-  default from: Rails.configuration.email_from
-  default to: Rails.configuration.support_email_address
+  default from: Rails.configuration.EmailFrom
+  default to: Rails.configuration.SupportEmailAddress
 
   def send_request(user, params)
     @user = user
index ce91cd3057bf4915d8e673af9c93e9ec6fbea75d..3f619c9740387d94a5493830f6c933b12b3e9bd6 100644 (file)
@@ -89,10 +89,10 @@ class ArvadosApiClient
     if not @api_client
       @client_mtx.synchronize do
         @api_client = HTTPClient.new
-        @api_client.ssl_config.timeout = Rails.configuration.api_client_connect_timeout
-        @api_client.connect_timeout = Rails.configuration.api_client_connect_timeout
-        @api_client.receive_timeout = Rails.configuration.api_client_receive_timeout
-        if Rails.configuration.arvados_insecure_https
+        @api_client.ssl_config.timeout = Rails.configuration.Workbench.APIClientConnectTimeout
+        @api_client.connect_timeout = Rails.configuration.Workbench.APIClientConnectTimeout
+        @api_client.receive_timeout = Rails.configuration.Workbench.APIClientReceiveTimeout
+        if Rails.configuration.TLS.Insecure
           @api_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
         else
           # Use system CA certificates
@@ -113,7 +113,7 @@ class ArvadosApiClient
     # Clean up /arvados/v1/../../discovery/v1 to /discovery/v1
     url.sub! '/arvados/v1/../../', '/'
 
-    anon_tokens = [Rails.configuration.anonymous_user_token].select { |x| x && include_anon_token }
+    anon_tokens = [Rails.configuration.Users.AnonymousUserToken].select { |x| !x.empty? && include_anon_token }
 
     query = {
       'reader_tokens' => ((tokens[:reader_tokens] ||
@@ -236,9 +236,7 @@ class ArvadosApiClient
 
   def arvados_login_url(params={})
     if Rails.configuration.respond_to? :arvados_login_base
-      uri = Rails.configuration.arvados_login_base
-    else
-      uri = self.arvados_v1_base.sub(%r{/arvados/v\d+.*}, '/login')
+      uri = Rails.configuration.Services.Controller.ExternalURL.to_s + "/login"
     end
     if params.size > 0
       uri += '?' << params.collect { |k,v|
@@ -253,7 +251,7 @@ class ArvadosApiClient
   end
 
   def arvados_v1_base
-    Rails.configuration.arvados_v1_base
+    Rails.configuration.Services.Controller.ExternalURL.to_s + "/arvados/v1"
   end
 
   def discovery
index 6e8b68bd6e0bac1eb06a8501e3520b68bc6817ba..8b89d57ee904d92bc481d8b2b54dedf6c2cdb140 100644 (file)
@@ -76,9 +76,9 @@ class Repository < ArvadosBase
   # non-zero.
   def run_git *gitcmd
     if not @workdir
-      workdir = File.expand_path uuid+'.git', Rails.configuration.repository_cache
+      workdir = File.expand_path uuid+'.git', Rails.configuration.Workbench.RepositoryCache
       if not File.exists? workdir
-        FileUtils.mkdir_p Rails.configuration.repository_cache
+        FileUtils.mkdir_p Rails.configuration.Workbench.RepositoryCache
         [['git', 'init', '--bare', workdir],
         ].each do |cmd|
           system *cmd
@@ -94,7 +94,7 @@ class Repository < ArvadosBase
       '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred'],
      ['git', '--git-dir', @workdir, 'config', '--local',
            'http.sslVerify',
-           Rails.configuration.arvados_insecure_https ? 'false' : 'true'],
+           Rails.configuration.TLS.Insecure ? 'false' : 'true'],
      ].each do |cmd|
       system *cmd
       raise GitCommandError.new($?.to_s) unless $?.exitstatus == 0
index 0118390e5b6ad923727bdafef31728e3955766fa..18907ed71b6fe433dc06eb35b8f68a2799866891 100644 (file)
@@ -10,7 +10,7 @@ read ARVADOS_API_TOKEN &lt;&lt;EOF
 <%= Thread.current[:arvados_api_token] %>
 EOF
 export ARVADOS_API_TOKEN ARVADOS_API_HOST=<%= current_api_host %>
-<% if Rails.configuration.arvados_insecure_https %>
+<% if Rails.configuration.TLS.Insecure %>
 export ARVADOS_API_HOST_INSECURE=true
 <% else %>
 unset ARVADOS_API_HOST_INSECURE
index 7a2d08e54a1afa4faacb3041f0268eaec47f0094..8be27fc7be6117f341818437cbe8f50870f1939d 100644 (file)
@@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                     <i class="glyphicon fa-fw glyphicon-search"></i> Search all projects ...
                   <% end %>
                </li>
-              <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
+              <% if !Rails.configuration.Users.AnonymousUserToken.empty? and Rails.configuration.enable_public_projects_page %>
                 <li role="menuitem"><a href="/projects/public" role="menuitem"><i class="fa fa-fw fa-list"></i> Browse public projects </a>
                 </li>
               <% end %>
index ab0fd67d3a11cada3052dba88e29414229da6799..6027208b28272f2d01fc3936258e3088d1fd4a4a 100644 (file)
@@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
 or
 
-<%= mail_to(Rails.configuration.support_email_address, "email us",
+<%= mail_to(Rails.configuration.Mail.SupportEmailAddress, "email us",
             subject: "Workbench problem report",
             body: "Problem while viewing page #{request.url}") %>
 
index 8823fdd5f78f8ebfe7c4a336c3a144bc479de26f..3dc332651fd40aaa17c2104833e0257bdb02f13d 100644 (file)
@@ -4,8 +4,8 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
 <%
   generated_at = arvados_api_client.discovery[:generatedAt]
-  arvados_base = Rails.configuration.arvados_v1_base
-  support_email = Rails.configuration.support_email_address
+  arvados_base = Rails.configuration.Services.Controller.ExternalURL.to_s + "/arvados/v1"
+  support_email = Rails.configuration.Mail.SupportEmailAddress
 
   additional_info = {}
   additional_info['Current location'] = params[:current_location]
index 8403ee0b4fe20345d92cbf2e30fe843150b6d635..7877e60d3018096bdc3ad6b9ef4c4bd892631925 100644 (file)
@@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
    choose_filters = {
      "groups" => [["group_class", "=", "role"]],
    }
-   if not Rails.configuration.anonymous_user_token
+   if Rails.configuration.Users.AnonymousUserToken.empty?
      # It would be ideal to filter out the anonymous group by UUID,
      # but that's not readily doable.  Workbench can't generate the
      # UUID for a != filter, because it can't introspect the API
index 8a2ce6b8268195605ba370153c1292be0a2a0c03..a82d2556e7c94a2be04d376447016635ff92e5f7 100644 (file)
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 <head>
   <meta charset="utf-8">
   <title>
-    <%= coll_name %> / <%= Rails.configuration.site_name %>
+    <%= coll_name %> / <%= Rails.configuration.Workbench.SiteName %>
   </title>
   <meta name="description" content="">
   <meta name="author" content="">
index fa75ec26e27cad11f8d896efe8867e63977e041d..99880f2416e4a8a88371e2c06c76cf904b38900f 100644 (file)
@@ -98,7 +98,7 @@ div.figure p {
                 <li>
                   Also known as a “workflow” in other systems
                 </li><li>
-                  A list of well-documented public pipelines can be found in the upper right corner by clicking the <span class="fa fa-lg fa-question-circle"></span> &gt; <a href="<%= Rails.configuration.arvados_public_data_doc_url %>">Public Pipelines and Datasets</a>
+                  A list of well-documented public pipelines can be found in the upper right corner by clicking the <span class="fa fa-lg fa-question-circle"></span> &gt; <a href="<%= Rails.configuration.Workbench.ArvadosPublicDataDocURL %>">Public Pipelines and Datasets</a>
                 </li><li>
                   Pro-tip: A Pipeline contains Jobs which contain Tasks
                 </li><li>
index e84641d431205cdf816822836071183a61009822..10b7fa1c4eec3090c47a7ce60bacaf87b22ec8b8 100644 (file)
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 <pre id="event_log_div"
      class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window"
      data-object-uuid="<%= @object.uuid %>"
-  ><%= @object.stderr_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %>
+  ><%= @object.stderr_log_lines(Rails.configuration.Workbench.RunningJobLogRecordsToFetch).join("\n") %>
 </pre>
 
 <%# Applying a long throttle suppresses the auto-refresh of this
@@ -68,7 +68,7 @@ var makeFilter = function() {
   <% logcollection = Collection.find @object.log %>
   <% if logcollection %>
     var log_size = <%= logcollection.files[0][2] %>
-    var log_maxbytes = <%= Rails.configuration.log_viewer_max_bytes %>;
+    var log_maxbytes = <%= Rails.configuration.Workbench.LogViewerMaxBytes %>;
     var logcollection_url = '<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>';
     $("#log-viewer-download-url").attr('href', logcollection_url);
     $("#log-viewer-download-pane").show();
index 638ee8970c35a5b5af83528d7b3e650e0e487cc3..df95b92f6f80479a6336ae9ca20fd7e49fa54ecd 100644 (file)
@@ -8,9 +8,9 @@ SPDX-License-Identifier: AGPL-3.0 %>
   <meta charset="utf-8">
   <title>
     <% if content_for? :page_title %>
-    <%= yield :page_title %> / <%= Rails.configuration.site_name %>
+    <%= yield :page_title %> / <%= Rails.configuration.Workbench.SiteName %>
     <% else %>
-    <%= Rails.configuration.site_name %>
+    <%= Rails.configuration.Workbench.SiteName %>
     <% end %>
   </title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
   <meta name="author" content="">
   <% if current_user %>
     <% content_for :js do %>
-      window.defaultSession = <%=raw({baseURL: Rails.configuration.arvados_v1_base.sub(/\/arvados\/v1$/, '/'), token: Thread.current[:arvados_api_token], user: current_user}.to_json)%>
+      window.defaultSession = <%=raw({baseURL: Rails.configuration.Services.Controller.ExternalURL, token: Thread.current[:arvados_api_token], user: current_user}.to_json)%>
     <% end %>
   <% end %>
   <% if current_user and $arvados_api_client.discovery[:websocketUrl] %>
@@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
       social graph that search engines can use. http://ogp.me/ %>
   <meta property="og:type" content="article" />
   <meta property="og:url" content="<%= request.url %>" />
-  <meta property="og:site_name" content="<%= Rails.configuration.site_name %>" />
+  <meta property="og:site_name" content="<%= Rails.configuration.Workbench.SiteName %>" />
   <% if defined?(@object) && @object %>
     <% if @object.respond_to?(:name) and @object.name.present? %>
       <meta property="og:title" content="<%= @object.name%>" />
@@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
   <%= yield :head %>
   <%= javascript_tag do %>
     angular.module('Arvados').value('arvadosApiToken', '<%=Thread.current[:arvados_api_token]%>');
-    angular.module('Arvados').value('arvadosDiscoveryUri', '<%= Rails.configuration.arvados_v1_base.sub '/arvados/v1', '/discovery/v1/apis/arvados/v1/rest' %>');
+    angular.module('Arvados').value('arvadosDiscoveryUri', '<%= Rails.configuration.Services.Controller.ExternalURL.to_s + '/discovery/v1/apis/arvados/v1/rest' %>');
   <%= yield :js %>
   <% end %>
   <style>
index b2cd097f3174c03fa49c7d1f280d7c809ecf280c..5df02c7ee30eb780d8a65e1556affab69f8c711a 100644 (file)
@@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
           <span class="icon-bar"></span>
           <span class="icon-bar"></span>
         </button>
-        <% site_name = Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %>
+        <% site_name = Rails.configuration.Workbench.SiteName.downcase rescue Rails.application.class.parent_name %>
         <% if current_user %>
           <a class="navbar-brand" href="/" data-push=true><%= site_name %></a>
         <% else %>
@@ -28,12 +28,12 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
           <% if current_user %>
             <% if current_user.is_active %>
-              <% if Rails.configuration.multi_site_search %>
+              <% if !Rails.configuration.Workbench.MultiSiteSearch.empty? %>
                 <li>
                   <form class="navbar-form">
                     <%=
-                       target = Rails.configuration.multi_site_search
-                       if target == true
+                       target = Rails.configuration.Workbench.MultiSiteSearch
+                       if target == "true"
                          target = {controller: 'search', action: 'index'}
                        end
                        link_to("Multi-site search", target, {class: 'btn btn-default'}) %>
@@ -72,9 +72,9 @@ SPDX-License-Identifier: AGPL-3.0 %>
                 </li>
                 <% if current_user.is_active %>
                 <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-lg fa-home fa-fw"></i> Home project </a></li>
-                  <% if Rails.configuration.composer_url %>
+                  <% if Rails.configuration.Services.Composer.ExternalURL %>
                     <li role="menuitem">
-                     <form action="<%= Rails.configuration.composer_url %>" method="GET">
+                     <form action="<%= Rails.configuration.Services.Composer.ExternalURL %>" method="GET">
                        <input type="hidden" name="api_token" value="<%= Thread.current[:arvados_api_token] %>" />
                        <button role="menuitem" type="submit">
                          <i class="fa fa-lg fa-share-alt fa-fw"></i> Workflow Composer
@@ -82,10 +82,10 @@ SPDX-License-Identifier: AGPL-3.0 %>
                      </form>
                     </li>
                   <% end %>
-                <% if Rails.configuration.workbench2_url %>
+                <% if Rails.configuration.Services.Workbench2.ExternalURL %>
                 <li role="menuitem">
                   <%
-                    wb2_url = Rails.configuration.workbench2_url
+                    wb2_url = Rails.configuration.Workbench2.ExternalURL
                     wb2_url += '/' if wb2_url[-1] != '/'
                     wb2_url += 'token'
                   %>
@@ -102,7 +102,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                     <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
                   <% end %>
                 </li>
-                <% if Rails.configuration.repositories %>
+                <% if Rails.configuration.Workbench.Repositories %>
                 <li role="menuitem"><a href="/repositories" role="menuitem"><i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories </a></li>
                 <% end -%>
                 <li role="menuitem"><a href="/current_token" role="menuitem"><i class="fa fa-lg fa-ticket fa-fw"></i> Current token</a></li>
@@ -112,7 +112,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                   <% end %>
 </li>
                 <li role="menuitem"><a href="/users/link_account" role="menuitem"><i class="fa fa-lg fa-link fa-fw"></i> Link account </a></li>
-                <% if Rails.configuration.user_profile_form_fields %>
+                <% if !Rails.configuration.Workbench.UserProfileFormFields.empty? %>
                   <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-lg fa-user fa-fw"></i> Manage profile</a></li>
                 <% end %>
                 <% end %>
@@ -138,7 +138,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                   <li role="presentation" class="dropdown-header">
                     Admin Settings
                   </li>
-                  <% if Rails.configuration.repositories %>
+                  <% if Rails.configuration.Workbench.Repositories %>
                   <li role="menuitem"><a href="/repositories">
                       <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
                   </a></li>
@@ -174,7 +174,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
               </li>
             <% end %>
           <% else %>
-            <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
+            <% if !Rails.configuration.Users.AnonymousUserToken.empty? and Rails.configuration.Workbench.EnablePublicProjectsPage %>
               <li><%= link_to 'Browse public projects', "/projects/public" %></li>
             <% end %>
             <li class="dropdown hover-dropdown login-menu">
@@ -199,18 +199,18 @@ SPDX-License-Identifier: AGPL-3.0 %>
               <li role="presentation" class="dropdown-header">
                 Help
               </li>
-              <% if Rails.configuration.enable_getting_started_popup %>
+              <% if Rails.configuration.EnableGettingStartedPopup %>
                 <li>
                 <%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
                      {'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'}  %>
                 </li>
               <% end %>
-              <% if Rails.configuration.arvados_public_data_doc_url %>
-                <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Public Pipelines and Data sets'), "#{Rails.configuration.arvados_public_data_doc_url}", target: "_blank" %></li>
+              <% if !Rails.configuration.Workbench.ArvadosPublicDataDocURL.empty? %>
+                <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Public Pipelines and Data sets'), "#{Rails.configuration.Workbench.ArvadosPublicDataDocURL}", target: "_blank" %></li>
               <% end %>
-              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Tutorials and User guide'), "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
-              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> API Reference'), "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
-              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> SDK Reference'), "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %></li>
+              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Tutorials and User guide'), "#{Rails.configuration.Workbench.ArvadosDocsite}/user", target: "_blank" %></li>
+              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> API Reference'), "#{Rails.configuration.Workbench.ArvadosDocsite}/api", target: "_blank" %></li>
+              <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> SDK Reference'), "#{Rails.configuration.Workbench.ArvadosDocsite}/sdk", target: "_blank" %></li>
               <li role="presentation" class="divider"></li>
               <li> <%= link_to report_issue_popup_path(popup_type: 'version', current_location: request.url, current_path: request.fullpath, action_method: 'post'),
                       {class: 'report-issue-modal-window', remote: true, return_to: request.url} do %>
@@ -264,7 +264,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 <div id="report-issue-modal-window"></div>
 <script src="/browser_unsupported.js"></script>
 
-<%  if Rails.configuration.enable_getting_started_popup and current_user and !current_user.prefs[:getting_started_shown] and
+<%  if Rails.configuration.EnableGettingStartedPopup and current_user and !current_user.prefs[:getting_started_shown] and
        !request.url.include?("/profile") and
        !request.url.include?("/user_agreements") and
        !request.url.include?("/inactive")%>
index 22643bf5a10dfe03bdc36db7724d733d5ac1944f..7769046cf950b7564fd6889a6209462a05080577 100644 (file)
@@ -4,8 +4,8 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
   <%= image_tag "dax.png", class: "dax" %>
   <p>
-    Hi, I noticed you haven't uploaded a new collection yet. 
-    <%= link_to "Click here to learn how to upload data to Arvados Keep.", 
-       "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-keep.html", 
+    Hi, I noticed you haven't uploaded a new collection yet.
+    <%= link_to "Click here to learn how to upload data to Arvados Keep.",
+       "#{Rails.configuration.Workbench.ArvadosDocsite}/user/tutorials/tutorial-keep.html",
        style: "font-weight: bold", target: "_blank" %>
   </p>
index d9cc7a667e3b9b260dbc3977dbd44feb767b9558..d793ea0b2b56ce005b211647b2b7d803975d841c 100644 (file)
@@ -3,10 +3,9 @@
 SPDX-License-Identifier: AGPL-3.0 %>
 
   <p><%= image_tag "dax.png", class: "dax" %>
-    Hi, I noticed you haven't run a job yet. 
-    <%= link_to "Click here to learn how to run an Arvados Crunch job.", 
-       "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-job1.html", 
+    Hi, I noticed you haven't run a job yet.
+    <%= link_to "Click here to learn how to run an Arvados Crunch job.",
+       "#{Rails.configuration.Workbench.ArvadosDocsite}/user/tutorials/tutorial-job1.html",
        style: "font-weight: bold",
        target: "_blank" %>
   </p>
-
index e70fc59d40bf2402a48e56d823ceb6298e8c008b..b275ed8eaa217cad8925d59f193ef6a08d5b1c79 100644 (file)
@@ -3,9 +3,9 @@
 SPDX-License-Identifier: AGPL-3.0 %>
 
   <p><%= image_tag "dax.png", class: "dax" %>
-    Hi, I noticed you haven't run a pipeline yet.  
-    <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.", 
-       "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-pipeline-workbench.html",
+    Hi, I noticed you haven't run a pipeline yet.
+    <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.",
+       "#{Rails.configuration.Workbench.ArvadosDocsite}/user/tutorials/tutorial-pipeline-workbench.html",
        style: "font-weight: bold",
        target: "_blank" %>
   </p>
index 22d89fff6d8e9133b310f9a6efcc2a4d22040c69..71ef2454190d7625cae12cf77d44f05a1ad7ed27 100644 (file)
@@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
   collection_pdhs = outputs.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact
   collection_uuids = outputs - collection_pdhs
 
-  if Rails.configuration.show_recent_collections_on_dashboard
+  if Rails.configuration.Workbench.ShowRecentCollectionsOnDashboard
     recent_cs = recent_collections(8)
     collection_uuids = collection_uuids + recent_cs[:collections].collect {|c| c.uuid}
     collection_uuids.flatten.uniq
@@ -42,7 +42,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
     show_node_status = false
     # Recent processes panel should take the entire width when is the only one
     # being rendered.
-    if !Rails.configuration.show_recent_collections_on_dashboard
+    if !Rails.configuration.Workbench.ShowRecentCollectionsOnDashboard
       recent_procs_panel_width = 12
     end
   else
@@ -197,7 +197,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
        </div>
       </div>
       <% end %>
-      <% if Rails.configuration.show_recent_collections_on_dashboard %>
+      <% if Rails.configuration.Workbench.ShowRecentCollectionsOnDashboard %>
       <div class="panel panel-default">
         <div class="panel-heading"><span class="panel-title">Recent collections</span>
           <span class="pull-right">
index 5904fb29db8a513d05f0d9532cf666b650c1bb49..4a7b45491183a9bec056ded0f3220594f63b5df4 100644 (file)
@@ -28,10 +28,10 @@ git push
 <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"%> and 
+  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/ssh-access-unix.html",
+      target: "_blank"%> and
   <%= link_to raw('Arvados Docs &rarr; User Guide &rarr; Writing a Crunch
   Script'),
-  "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-firstscript.html",
+  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/tutorials/tutorial-firstscript.html",
   target: "_blank"%>.
 </p>
index 5f70c4735b69c4ffd3fdf28c2e048ef1c45e9869..d52ad649c94853865aea6d606d66fbc8e3131d6b 100644 (file)
@@ -19,7 +19,7 @@ User agreements
   <div class="alert alert-info">
     <strong>Please check <%= n_files > 1 ? 'each' : 'the' %> box below</strong> to indicate that you have read and accepted the user agreement<%= 's' if n_files > 1 %>.
   </div>
-  <% if n_files == 1 and (Rails.configuration.show_user_agreement_inline rescue false) %>
+  <% if n_files == 1 and (Rails.configuration.Workbench.ShowUserAgreementInline rescue false) %>
   <% ua = unsigned_user_agreements.first; file = ua.files.first %>
   <object data="<%= url_for(controller: 'collections', action: 'show_file', uuid: ua.uuid, file: "#{file[0]}/#{file[1]}") %>" type="<%= Rack::Mime::MIME_TYPES[file[1].match(/\.\w+$/)[0]] rescue '' %>" width="100%" height="400px">
   </object>
index 5abaf155df6a0f90be733ad8c5599352fe450342..1d0814c2a01549f0e2fc840a45c990d36d0de0f3 100644 (file)
@@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
       <div class="modal-body">
         <div> <%= link_to "Click here to learn about SSH keys in Arvados.",
-                  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
+                  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/ssh-access-unix.html",
                   style: "font-weight: bold",
                   target: "_blank" %>
         </div>
index deab2d722448b2000776cf335609b4932e1e5882..6b1ec33a2666545e7b2b71a6e012788a6caee995 100644 (file)
@@ -12,14 +12,14 @@ SPDX-License-Identifier: AGPL-3.0 %>
   </div>
 
 <div id="#manage_current_token" class="panel-body">
-<p>The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados with the proper permissions. For more information see <%= link_to raw('Getting an API token'), "#{Rails.configuration.arvados_docsite}/user/reference/api-tokens.html", target: "_blank"%>.</p>
+<p>The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados with the proper permissions. For more information see <%= link_to raw('Getting an API token'), "#{Rails.configuration.Workbench.ArvadosDocsite}/user/reference/api-tokens.html", target: "_blank"%>.</p>
 <p>Paste the following lines at a shell prompt to set up the necessary environment for Arvados SDKs to authenticate to your <b><%= current_user.username %></b> account.</p>
 
 <pre>
 HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'
 export ARVADOS_API_TOKEN=<%= Thread.current[:arvados_api_token] %>
 export ARVADOS_API_HOST=<%= current_api_host %>
-<% if Rails.configuration.arvados_insecure_https %>
+<% if Rails.configuration.TLS.Insecure %>
 export ARVADOS_API_HOST_INSECURE=true
 <% else %>
 unset ARVADOS_API_HOST_INSECURE
index 3b3794bf50a8b791e23ef006d623c5ff121ca66a..d6f25136c438a39c6eb9659c198effec62afbd69 100644 (file)
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                value="<%=identity_url_prefix%>" disabled=true>
         <% else %>
         <input class="form-control" id="openid_prefix" maxlength="250" name="openid_prefix" type="text"
-               value="<%= Rails.configuration.default_openid_prefix %>">
+               value="<%= Rails.configuration.Workbench.DefaultOpenIdPrefix %>">
         <% end %>
       </div>
       <div class="form-group">
index 8d2f51364e4d0aab5b80a796aebc0289ce5d1098..fa26bc4aa1af8f379edb8d73c7026475a5d7c149 100644 (file)
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 <div id="manage_ssh_keys" class="panel-body">
   <% if !@my_ssh_keys.any? %>
      <p> You have not yet set up an SSH public key for use with Arvados. <%= link_to "Learn more.",
-                  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
+                  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/ssh-access-unix.html",
                   style: "font-weight: bold",
                   target: "_blank" %>
      </p>
index 5667951124378a8a34990138529935627e4b7946..01a77cdd6188fd35ea409e9c8e90c7f5babb29b4 100644 (file)
@@ -251,7 +251,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
           Your account must be activated by an Arvados administrator.  If this
           is your first time accessing Arvados and would like to request
           access, or you believe you are seeing the page in error, please
-          <%= link_to "contact us", Rails.configuration.activation_contact_link %>.
+          <%= link_to "contact us", Rails.configuration.Workbench.ActivationContactLink %>.
           You should receive an email at the address you used to log in when
           your account is activated.  In the mean time, you can
           <%= link_to "learn more about Arvados", "https://arvados.org/projects/arvados/wiki/Introduction_to_Arvados" %>,
@@ -259,7 +259,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
         </p>
         <p style="padding-bottom: 1em">
           <%= link_to raw('Contact us &#x2709;'),
-              Rails.configuration.activation_contact_link, class: "pull-right btn btn-primary" %></p>
+              Rails.configuration.Workbench.ActivationContactLink, class: "pull-right btn btn-primary" %></p>
       </div>
     </div>
   </div>
index c891b0c594af329b9f0a7790217596b11b0109fc..026f016f8cd7186ebcc6eb39e123ae0dcbb5e9dc 100644 (file)
@@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
 <div id="manage_virtual_machines" class="panel-body">
   <p>
     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",
+  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/vm-login-with-webshell.html",
   target: "_blank"%>.
   </p>
 
@@ -68,7 +68,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
           <th> Host name </th>
           <th> Login name </th>
           <th> Command line </th>
-          <% if Rails.configuration.shell_in_a_box_url %>
+          <% if Rails.configuration.Services.WebShell.ExternalURL != URI("") %>
             <th> Web shell <span class="label label-info">beta</span></th>
           <% end %>
         </tr>
@@ -89,7 +89,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                 <% end %>
               <% end %>
             </td>
-            <% if Rails.configuration.shell_in_a_box_url %>
+            <% if Rails.configuration.Services.WebShell.ExternalURL != URI("") %>
               <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 %>
index 26d1f57211b257a524461dd70f049a3e2afd9bf6..5f3a5aa61c1101850da3e3b62be591f4d872a7d0 100644 (file)
@@ -3,11 +3,11 @@
 SPDX-License-Identifier: AGPL-3.0 %>
 
 <%
-    profile_config = Rails.configuration.user_profile_form_fields
+    profile_config = Rails.configuration.Workbench.UserProfileFormFields
     current_user_profile = current_user.prefs[:profile]
     show_save_button = false
 
-    profile_message = Rails.configuration.user_profile_form_message
+    profile_message = Rails.configuration.Workbench.UserProfileFormMessage
 %>
 
 <div>
index b10ca8b15de8f8c6778dad98050bb978d0599de3..479e3e1d89dec50c5d6398ad3e7dc470be211d8c 100644 (file)
@@ -16,17 +16,17 @@ SPDX-License-Identifier: AGPL-3.0 %>
         The "Log in" button below will show you a Google sign-in page.
         After you assure Google that you want to log in here with your
         Google account, you will be redirected back here to
-        <%= Rails.configuration.site_name %>.
+        <%= Rails.configuration.Workbench.SiteName %>.
 
       </p><p>
 
-        If you have never used <%= Rails.configuration.site_name %>
+        If you have never used <%= Rails.configuration.Workbench.SiteName %>
         before, logging in for the first time will automatically
         create a new account.
 
       </p><p>
 
-        <i><%= Rails.configuration.site_name %> uses your name and
+        <i><%= Rails.configuration.Workbench.SiteName %> uses your name and
           email address only for identification, and does not retrieve
           any other personal information from Google.</i>
 
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
             now, don't provide 'auth_provider' to get the default one. %>
         <div class="pull-right">
           <%= link_to arvados_api_client.arvados_login_url(return_to: request.url), class: "btn btn-primary" do %>
-          Log in to <%= Rails.configuration.site_name %>
+          Log in to <%= Rails.configuration.Workbench.SiteName %>
           <i class="fa fa-fw fa-arrow-circle-right"></i>
           <% end %>
         </div>
index 13916572cef9d8bd381809e1f8928504a9310995..204e71a9147e6b9e5317e8882192800d6178af44 100644 (file)
@@ -25,6 +25,6 @@ ssh <%= @objects.first.andand.hostname.andand.sub('.'+current_api_host,'') or 'v
 <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",
+  "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/ssh-access-unix.html",
   target: "_blank"%>.
 </p>
index 202ae70fb0083a8fe722267a063c96efdf0ec5ba..4c63115a1669cb389cf9c97d77fa6fef75a056b3 100644 (file)
@@ -3,7 +3,7 @@
 SPDX-License-Identifier: AGPL-3.0 %>
 
 <html>
-    <title><%= @object.hostname %> / <%= Rails.configuration.site_name %></title>
+    <title><%= @object.hostname %> / <%= Rails.configuration.Workbench.SiteName %></title>
     <link rel="stylesheet" href="<%= asset_path 'webshell/styles.css' %>" type="text/css">
     <style type="text/css">
       body {
index 1f643acdc9ff6a1dc042a3de86f6ab9a78357481..d2c565750c9f76e86b47c390bd63cf3b15df4d79 100644 (file)
@@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
   </div>
 <% end %>
 
-<% live_log_lines = wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %>
+<% live_log_lines = wu.live_log_lines(Rails.configuration.Workbench.RunningJobLogRecordsToFetch).join("\n") %>
 <% if !render_log or (live_log_lines.size > 0) %>
 <%# Still running, or recently finished and logs are still available from logs table %>
 <%# Show recent logs in terminal window %>
index 5778afcee51497f39f455eada120674592061969..a3a01cabfa6b9be67a10283c3ff1d914accda053 100644 (file)
@@ -77,7 +77,7 @@ arvcfg.declare_config "Services.WebShell.ExternalURL", URI, :shell_in_a_box_url,
   ConfigLoader.set_cfg cfg, "Services.WebShell.ExternalURL", u
 }
 
-arvcfg.declare_config "Services.WebDAV.ExternalURL", URI, :keep_web_service_url, ->(cfg, k, v) {
+arvcfg.declare_config "Services.WebDAV.ExternalURL", URI, :keep_web_url, ->(cfg, k, v) {
   v ||= ""
   u = URI(v.sub("%{uuid_or_pdh}", "*"))
   u.path = ""
@@ -94,6 +94,8 @@ arvcfg.declare_config "Services.WebDAVDownload.ExternalURL", URI, :keep_web_down
 arvcfg.declare_config "Services.Composer.ExternalURL", URI, :composer_url
 arvcfg.declare_config "Services.Workbench2.ExternalURL", URI, :workbench2_url
 
+arvcfg.declare_config "Users.AnonymousUserToken", String, :anonymous_user_token
+
 arvcfg.declare_config "Workbench.ApplicationMimetypesWithViewIcon", Hash, :application_mimetypes_with_view_icon, ->(cfg, k, v) {
   mimetypes = {}
   v.each do |m|
@@ -102,8 +104,39 @@ arvcfg.declare_config "Workbench.ApplicationMimetypesWithViewIcon", Hash, :appli
   ConfigLoader.set_cfg cfg, "Workbench.ApplicationMimetypesWithViewIcon", mimetypes
 }
 
-arvcfg.declare_config "Users.AnonymousUserToken", String, :anonymous_user_token
-
+arvcfg.declare_config "Workbench.RunningJobLogRecordsToFetch", Integer, :running_job_log_records_to_fetch
+arvcfg.declare_config "Workbench.LogViewerMaxBytes", Integer, :log_viewer_max_bytes
+arvcfg.declare_config "Workbench.TrustAllContent", Boolean, :trust_all_content
+arvcfg.declare_config "Workbench.UserProfileFormFields", Hash, :user_profile_form_fields
+arvcfg.declare_config "Workbench.UserProfileFormMessage", String, :user_profile_form_message
+arvcfg.declare_config "Workbench.Theme", String, :arvados_theme
+arvcfg.declare_config "Workbench.ShowUserNotifications", Boolean, :show_user_notifications
+arvcfg.declare_config "Workbench.ShowUserAgreementInline", Boolean, :show_user_agreement_inline
+arvcfg.declare_config "Workbench.RepositoryCache", Boolean, :repository_cache
+arvcfg.declare_config "Workbench.Repositories", Boolean, :repositories
+arvcfg.declare_config "Workbench.APIClientConnectTimeout", ActiveSupport::Duration, :api_client_connect_timeout
+arvcfg.declare_config "Workbench.APIClientReceiveTimeout", ActiveSupport::Duration, :api_client_receive_timeout
+arvcfg.declare_config "Workbench.APIResponseCompression", Boolean, :api_response_compression
+arvcfg.declare_config "Workbench.SiteName", String, :site_name
+arvcfg.declare_config "Workbench.MultiSiteSearch", String, :multi_site_search, ->(cfg, k, v) {
+  if !v
+    v = ""
+  end
+  ConfigLoader.set_cfg cfg, "Workbench.MultiSiteSearch", v.to_s
+}
+arvcfg.declare_config "Workbench.EnablePublicProjectsPage", Boolean, :enable_public_projects_page
+arvcfg.declare_config "Workbench.EnableGettingStartedPopup", Boolean, :enable_getting_started_popup
+arvcfg.declare_config "Workbench.ArvadosPublicDataDocURL", String, :arvados_public_data_doc_url
+arvcfg.declare_config "Workbench.ArvadosDocsite", String, :arvados_docsite
+arvcfg.declare_config "Workbench.ShowRecentCollectionsOnDashboard", Boolean, :show_recent_collections_on_dashboard
+arvcfg.declare_config "Workbench.ActivationContactLink", String, :activation_contact_link
+arvcfg.declare_config "Workbench.DefaultOpenIdPrefix", String, :default_openid_prefix
+
+arvcfg.declare_config "Mail.SendUserSetupNotificationEmail", Boolean, :send_user_setup_notification_email
+arvcfg.declare_config "Mail.IssueReporterEmailFrom", String, :issue_reporter_email_from
+arvcfg.declare_config "Mail.IssueReporterEmailTo", String, :issue_reporter_email_to
+arvcfg.declare_config "Mail.SupportEmailAddress", String, :support_email_address
+arvcfg.declare_config "Mail.EmailFrom", String, :email_from
 
 application_config = {}
 %w(application.default application).each do |cfgfile|
index 9ab457252adf00cb58c89793d2ce33adb163c76a..31295c0c512b2eb437e3737d9c1ab89c661078ec 100644 (file)
@@ -704,9 +704,10 @@ Clusters:
       RunningJobLogRecordsToFetch: 2000
       ShowRecentCollectionsOnDashboard: true
       ShowUserNotifications: true
-      MultiSiteSearch: false
+      MultiSiteSearch: ""
       Repositories: true
       SiteName: Arvados Workbench
+      TrustAllContent: false
 
       # Workbench2 configs
       VocabularyURL: ""
index 6d563370834abab8fa686bbcf47fe2aeb61f0bc7..d5888d0abc62bb398aeec91202baa29e724ca3bc 100644 (file)
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    arvados-login-sync (1.4.0.20190610174652)
+    arvados-login-sync (1.4.0.20190627174113)
       arvados (~> 1.3.0, >= 1.3.0)
 
 GEM