Skip to content

Commit

Permalink
put these in a block and only invoke NavConfig on test and prod
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Sep 18, 2024
1 parent fa908cd commit 92f53d6
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions ondemand.osc.edu/apps/dashboard/initializers/ood.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ def add_paths
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')

NavConfig.categories_whitelist=true
end
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

require 'socket'
hostname = Socket.gethostname
case hostname
when /dev/
idp = 'https://idp-dev.osc.edu'
when /test/
idp = 'https://idp-test.osc.edu'
else
idp = 'https://idp.osc.edu'
ENV['OOD_DASHBOARD_HELP_CUSTOM_URL'] = "#{idp}/realms/osc/account/#/security/linked-accounts"
end

ENV['OOD_DASHBOARD_HELP_CUSTOM_URL'] = "#{idp}/realms/osc/account/#/security/linked-accounts"

0 comments on commit 92f53d6

Please sign in to comment.