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']
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
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
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 " \
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] + '/'
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
}
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
}
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 }
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
}
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
}
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
}
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
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
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
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
}
# 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
# 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
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
# 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] ||
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|
end
def arvados_v1_base
- Rails.configuration.arvados_v1_base
+ Rails.configuration.Services.Controller.ExternalURL.to_s + "/arvados/v1"
end
def discovery
# 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
'!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
<%= 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
<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 %>
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}") %>
<%
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]
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
<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="">
<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> > <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> > <a href="<%= Rails.configuration.Workbench.ArvadosPublicDataDocURL %>">Public Pipelines and Datasets</a>
</li><li>
Pro-tip: A Pipeline contains Jobs which contain Tasks
</li><li>
<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
<% 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();
<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">
<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] %>
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%>" />
<%= 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>
<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 %>
<% 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'}) %>
</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
</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'
%>
<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>
<% 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 %>
<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>
</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">
<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 %>
<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")%>
<%= 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>
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>
-
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>
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
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
</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">
<p>
See also:
<%= link_to raw('Arvados Docs → User Guide → 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 → User Guide → 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>
<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>
<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>
</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
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">
<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>
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" %>,
</p>
<p style="padding-bottom: 1em">
<%= link_to raw('Contact us ✉'),
- 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>
<div id="manage_virtual_machines" class="panel-body">
<p>
For more information see <%= link_to raw('Arvados Docs → User Guide → 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>
<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>
<% 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 %>
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>
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>
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>
<p>
See also:
<%= link_to raw('Arvados Docs → User Guide → 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>
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 {
</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 %>
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 = ""
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|
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|
RunningJobLogRecordsToFetch: 2000
ShowRecentCollectionsOnDashboard: true
ShowUserNotifications: true
- MultiSiteSearch: false
+ MultiSiteSearch: ""
Repositories: true
SiteName: Arvados Workbench
+ TrustAllContent: false
# Workbench2 configs
VocabularyURL: ""
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