- 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?
end
@@notification_tests = []
@@notification_tests.push lambda { |controller, current_user|
end
@@notification_tests = []
@@notification_tests.push lambda { |controller, current_user|
- return nil if Rails.configuration.shell_in_a_box_url
- AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
+ return nil if Rails.configuration.Services.WebShell.ExternalURL != URI("")
+ AuthorizedKey.limit(1).with_count('none').where(authorized_user_uuid: current_user.uuid).each do
@@notification_tests.push lambda { |controller, current_user|
if PipelineInstance.api_exists?(:index)
@@notification_tests.push lambda { |controller, current_user|
if PipelineInstance.api_exists?(:index)
@notifications ||= @@notification_tests.map do |t|
t.call(self, current_user)
end.compact
@notifications ||= @@notification_tests.map do |t|
t.call(self, current_user)
end.compact
- pi = PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
+ pi = PipelineInstance.order(["started_at asc", "created_at asc"]).with_count("none").filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
procs = {}
if PipelineInstance.api_exists?(:index)
cols = %w(uuid owner_uuid created_at modified_at pipeline_template_uuid name state started_at finished_at)
procs = {}
if PipelineInstance.api_exists?(:index)
cols = %w(uuid owner_uuid created_at modified_at pipeline_template_uuid name state started_at finished_at)
- crs = ContainerRequest.limit(lim).order(["created_at desc"]).filter([["requesting_container_uuid", "=", nil]])
+ crs = ContainerRequest.limit(lim).with_count("none").order(["created_at desc"]).filter([["requesting_container_uuid", "=", nil]])
crs.results.each { |c| procs[c] = c.created_at }
Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
crs.results.each { |c| procs[c] = c.created_at }
Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
- return if @starred_projects
- links = Link.filter([['tail_uuid', '=', user.uuid],
+ return if defined?(@starred_projects) && @starred_projects
+ links = Link.filter([['owner_uuid', 'in', ["#{Rails.configuration.ClusterID}-j7d0g-fffffffffffffff", user.uuid]],
['link_class', '=', 'star'],
['link_class', '=', 'star'],
# That is: get toplevel projects under home, get subprojects of
# these projects, and so on until we hit the limit.
def my_wanted_projects(user, page_size=100)
# That is: get toplevel projects under home, get subprojects of
# these projects, and so on until we hit the limit.
def my_wanted_projects(user, page_size=100)
parent_of = {user.uuid => 'me'}
my_wanted_projects(user, page_size).each do |ob|
parent_of = {user.uuid => 'me'}
my_wanted_projects(user, page_size).each do |ob|
- children_of[root_uuid].andand.each do |ob|
- tree[ob] = buildtree.call(children_of, ob.uuid)
+ chldrn_of[root_uuid].andand.each do |ob|
+ tree[ob] = buildtree.call(chldrn_of, ob.uuid)
select([:uuid, :portable_data_hash]).each do |coll|
unless source_paths[coll.portable_data_hash].empty?
uuids << coll.uuid
select([:uuid, :portable_data_hash]).each do |coll|
unless source_paths[coll.portable_data_hash].empty?
uuids << coll.uuid