-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
# Add a filter by group option and insert it after the first option. | ||
Filter.list.insert(1, Filter.new.tap { |f| | ||
group = OodSupport::User.new.group.name | ||
f.title = "Your Group's Jobs (#{group})" | ||
f.filter_id = "group" | ||
# N.B. Need to use :egroup here for now. My Oodsupport group name is 'appl' but job 'Account_Name' is 'PZS0002' | ||
f.filter_block = Proc.new { |job| job.native[:egroup] == group || job.native[:group_name] == group || job.accounting_id.to_s.downcase == group.downcase } | ||
}) | ||
Rails.application.config.after_initialize do | ||
# Add a filter by group option and insert it after the first option. | ||
Filter.list.insert(1, Filter.new.tap { |f| | ||
group = OodSupport::User.new.group.name | ||
f.title = "Your Group's Jobs (#{group})" | ||
f.filter_id = "group" | ||
# N.B. Need to use :egroup here for now. My Oodsupport group name is 'appl' but job 'Account_Name' is 'PZS0002' | ||
f.filter_block = Proc.new { |job| job.native[:egroup] == group || job.native[:group_name] == group || job.accounting_id.to_s.downcase == group.downcase } | ||
}) | ||
end |
14 changes: 8 additions & 6 deletions
14
apps.awesim.org/apps/activejobs/initializers/ood_clusters_fix.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
OodAppkit.clusters = OodCore::Clusters.new( | ||
OodAppkit.clusters.reject { |cluster| [:quick_pitzer].include?(cluster.id) } | ||
) | ||
Rails.application.config.after_initialize do | ||
OodAppkit.clusters = OodCore::Clusters.new( | ||
OodAppkit.clusters.reject { |cluster| [:quick_pitzer].include?(cluster.id) } | ||
) | ||
|
||
if defined?(OODClusters) | ||
OODClusters = OodCore::Clusters.new(OodAppkit.clusters.select(&:job_allow?)) | ||
end | ||
if defined?(OODClusters) | ||
OODClusters = OodCore::Clusters.new(OodAppkit.clusters.select(&:job_allow?)) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
# AweSim OOD config | ||
|
||
def add_paths | ||
OodFilesApp.candidate_favorite_paths.tap do |paths| | ||
# add project space directories | ||
projects = User.new.groups.map(&:name).grep(/^P./) | ||
paths.concat projects.map { |p| Pathname.new("/fs/project/#{p}") } | ||
Rails.application.config.after_initialize do | ||
def add_paths | ||
OodFilesApp.candidate_favorite_paths.tap do |paths| | ||
# add project space directories | ||
projects = User.new.groups.map(&:name).grep(/^P./) | ||
|
||
# add scratch space directories | ||
paths << Pathname.new("/fs/scratch/#{User.new.name}") | ||
paths.concat projects.map { |p| Pathname.new("/fs/scratch/#{p}") } | ||
|
||
# add scratch space directories | ||
paths << Pathname.new("/fs/scratch/#{User.new.name}") | ||
paths.concat projects.map { |p| Pathname.new("/fs/scratch/#{p}") } | ||
|
||
# add ess scratch and project directories | ||
paths.concat projects.map { |p| Pathname.new("/fs/ess/scratch/#{p}") } | ||
paths.concat projects.map { |p| Pathname.new("/fs/ess/#{p}") } | ||
paths.concat projects.map { |p| Pathname.new("/fs/ess/#{p}") } | ||
end | ||
end | ||
end | ||
|
||
fs_outage = `grep node_file_test_failure /var/lib/node_exporter/textfile_collector/autofs-file-test.prom | grep -q ' 1'; echo $?` | ||
add_paths if fs_outage.chomp == "1" && !File.exist?('/etc/ood/config/gpfs_outage') | ||
fs_outage = `grep node_file_test_failure /var/lib/node_exporter/textfile_collector/autofs-file-test.prom | grep -q ' 1'; echo $?` | ||
add_paths if fs_outage.chomp == "1" && !File.exist?('/etc/ood/config/gpfs_outage') | ||
|
||
# don't show develop dropdown unless you are setup for app sharing | ||
Configuration.app_development_enabled = UsrRouter.base_path.directory? | ||
Configuration.app_sharing_facls_enabled = true | ||
require 'socket' | ||
hostname = Socket.gethostname | ||
case hostname | ||
when /dev/ | ||
idp = 'https://idp-dev.osc.edu' | ||
when /test/ | ||
idp = 'https://idp-test.osc.edu' | ||
NavConfig.categories_whitelist=true # TODO: need to remove when upgrading to 4.0 | ||
else | ||
idp = 'https://idp.osc.edu' | ||
NavConfig.categories_whitelist=true # TODO: need to remove when upgrading to 4.0 | ||
end | ||
|
||
ENV['OOD_DASHBOARD_HELP_CUSTOM_URL'] = "#{idp}/realms/osc/account/#/security/linked-accounts" | ||
end | ||
|
||
NavConfig.categories_whitelist=true |