SAT-42791 - Pass docs links through LinksController#1159
Merged
adamruzicka merged 1 commit intotheforeman:developfrom Feb 26, 2026
Merged
SAT-42791 - Pass docs links through LinksController#1159adamruzicka merged 1 commit intotheforeman:developfrom
adamruzicka merged 1 commit intotheforeman:developfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRoutes the Subscriptions service documentation link through Foreman’s LinksController by introducing a helper-generated URL and updating the page header link to use it, enabling environment-specific redirection (e.g., to RHOKP) instead of a hardcoded docs.redhat.com URL. Sequence diagram for subscription docs link resolution via LinksControllersequenceDiagram
actor User
participant Browser
participant PageDescription
participant ForemanInventoryHelpers
participant LinksController
participant DocsDestination
User->>Browser: Click subscription_docs_link
Browser->>PageDescription: Render component
PageDescription->>ForemanInventoryHelpers: getSubscriptionServiceDocsUrl()
ForemanInventoryHelpers-->>PageDescription: /links/manual/?root_url=encoded_original_docs_url
PageDescription-->>Browser: Render anchor_href=/links/manual/?root_url=...
Browser->>LinksController: GET /links/manual/?root_url=encoded_original_docs_url
LinksController->>DocsDestination: Determine_target_from_settings
LinksController-->>Browser: HTTP 302 redirect to DocsDestination
Browser->>DocsDestination: GET subscription_service_docs
DocsDestination-->>Browser: Render documentation page
Updated class diagram for ForemanInventoryHelpers and PageDescriptionclassDiagram
class ForemanInventoryHelpers {
+getInventoryDocsUrl() string
+getSubscriptionServiceDocsUrl() string
+getActionsHistoryUrl() string
}
class PageDescription {
+PageDescription()
}
PageDescription --> ForemanInventoryHelpers : uses_getSubscriptionServiceDocsUrl
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
getSubscriptionServiceDocsUrlhelper encodes a different docs path (html-single/.../index) than the original link (html/.../index); if this change is not intentional, consider aligning the URL to preserve the original target and avoid unexpected redirects. - Since the subscription service docs URL is now abstracted into
getSubscriptionServiceDocsUrl, consider scanning for any remaining hard-coded links to the same documentation and routing them through this helper for consistency.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `getSubscriptionServiceDocsUrl` helper encodes a different docs path (`html-single/.../index`) than the original link (`html/.../index`); if this change is not intentional, consider aligning the URL to preserve the original target and avoid unexpected redirects.
- Since the subscription service docs URL is now abstracted into `getSubscriptionServiceDocsUrl`, consider scanning for any remaining hard-coded links to the same documentation and routing them through this helper for consistency.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
Author
This is intentional, we need all the links to point to html-single, this one was missed.
I didn't find any that applicable. |
adamruzicka
approved these changes
Feb 25, 2026
Contributor
adamruzicka
left a comment
There was a problem hiding this comment.
LGTM, but let's hold this open until the counterpart in f-theme-satellite is also approved.
Contributor
|
Thank you @ofedoren ! |
This file contains hidden or 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
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.
What are the changes introduced in this pull request?
Wrapping a static link to subscription service docs via foremanUrl, so it goes through LinksController.
Considerations taken when implementing this change?
This is needed so we can properly redirect this link to RHOKP.
What are the testing steps for this pull request?
Summary by Sourcery
Route the subscriptions service documentation link through Foreman’s LinksController instead of using a static URL.
New Features:
Enhancements: