-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update main nav and UI for Insights on Premise #932
Open
jeremylenz
wants to merge
5
commits into
theforeman:develop
Choose a base branch
from
jeremylenz:iop-nav-updates
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
jeremylenz
force-pushed
the
iop-nav-updates
branch
from
December 16, 2024 19:45
5dcaff6
to
5df20ca
Compare
jeremylenz
force-pushed
the
iop-nav-updates
branch
from
December 17, 2024 14:18
1bb5cf7
to
1c101d6
Compare
Also recommended patch. This redirects the remediations + certs to use localhost . May make sense in a separate PR though diff --git a/lib/foreman_rh_cloud.rb b/lib/foreman_rh_cloud.rb
index f9e6430..406703f 100644
--- a/lib/foreman_rh_cloud.rb
+++ b/lib/foreman_rh_cloud.rb
@@ -3,17 +3,23 @@ require 'cgi'
require 'uri'
module ForemanRhCloud
+ def self.on_premise_url
+ return unless ForemanRhCloud.with_insights_on_premise?
+ port = ENV['INSIGHTS_ADVISOR_PORT'] || "8000"
+ "http://#{ForemanRhCloud.foreman_host.fqdn || 'localhost'}:#{port}"
+ end
+
def self.base_url
# for testing set ENV to 'https://ci.cloud.redhat.com'
- @base_url ||= ENV['SATELLITE_RH_CLOUD_URL'] || 'https://cloud.redhat.com'
+ @base_url ||= on_premise_url || ENV['SATELLITE_RH_CLOUD_URL'] || 'https://cloud.redhat.com'
end
def self.cert_base_url
- @cert_base_url ||= ENV['SATELLITE_CERT_RH_CLOUD_URL'] || 'https://cert.cloud.redhat.com'
+ @cert_base_url ||= on_premise_url || ENV['SATELLITE_CERT_RH_CLOUD_URL'] || 'https://cert.cloud.redhat.com'
end
def self.legacy_insights_url
- @legacy_insights_url ||= ENV['SATELLITE_LEGACY_INSIGHTS_URL'] || 'https://cert-api.access.redhat.com'
+ @legacy_insights_url ||= on_premise_url || ENV['SATELLITE_LEGACY_INSIGHTS_URL'] || 'https://cert-api.access.redhat.com'
end
def self.verify_ssl_method |
jeremylenz
force-pushed
the
iop-nav-updates
branch
from
December 23, 2024 18:11
defda64
to
1385802
Compare
I agree, I think this makes more sense as a separate PR. Opened #936 |
jeremylenz
force-pushed
the
iop-nav-updates
branch
from
December 23, 2024 20:00
812e1a2
to
620af29
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
After
Testing
In your Foreman
settings.yaml
, include a new section