Skip to content

Fixes #37041 - Change link to docs.theforeman.org#818

Merged
adamruzicka merged 1 commit intotheforeman:masterfrom
ATIX-AG:change_link
Jan 11, 2024
Merged

Fixes #37041 - Change link to docs.theforeman.org#818
adamruzicka merged 1 commit intotheforeman:masterfrom
ATIX-AG:change_link

Conversation

@maximiliankolb
Copy link
Contributor

</p>
<p><%= link_to _('Learn more about this in the documentation.'),
documentation_url('1.ForemanRemoteExecution1.3Manual', :root_url => 'https://www.theforeman.org/plugins/foreman_remote_execution/1.3/index.html#'), :rel => 'external' %></p>
documentation_url('', :root_url => 'https://www.theforeman.org/plugins/foreman_remote_execution/10.0.3/index.html#'), :rel => 'external' %></p>
Copy link
Contributor

@adamruzicka adamruzicka Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.theforeman.org/plugins/foreman_remote_execution/10.0.3/index.html points to nowhere, that page does not exist.

Edit: Latest in there seems to be 1.7. Also why swap the first argument for an empty string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Adam, thanks for taking a look at it. My idea was to not point to any subheading if possible, but instead have a small page referring users to docs.theforeman.org. The URL will be live after the PR in theforeman.org has been merged.

This is IMHO just a temporary workaround until all content from Foreman Manual has been migrated to Foreman Documentation and we have a function to add Documentation buttons in Foreman Web UI and all Foreman plug-ins.

Do you think this is a reasonable approach?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have this helper:

def documentation_button_rex(section = '')
url = 'http://theforeman.org/plugins/foreman_remote_execution/' +
"#{ForemanRemoteExecution::VERSION.split('.').take(2).join('.')}/index.html#"
documentation_button section, :root_url => url
end

I think it would be preferable to consistently use the same logic. Perhaps we need a separate helper for root_url.

It also implies those help buttons are likely to be broken.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and looking further. A more correct usage of the documentation infrastructure is to use it like foreman_discovery:
https://github.com/theforeman/foreman_discovery/blob/417a7550a1b12da84c4787f8bf9ecf7eebc17ea3/app/views/discovered_hosts/welcome.html.erb#L13

So external_link_path(type: 'plugin_manual', name: 'foreman_discovery', version: discovery_doc_version, section: '#4.3Automaticprovisioning') (or external_link_url).

Or in this case:

Suggested change
documentation_url('', :root_url => 'https://www.theforeman.org/plugins/foreman_remote_execution/10.0.3/index.html#'), :rel => 'external' %></p>
external_link_path(type: 'plugin_manual', name: 'foreman_remote_execution', version: '1.3', section: '1.ForemanRemoteExecution1.3Manual'), :rel => 'external' %></p>

And from there update the rest as well.

I've also opened theforeman/foreman#9756 to be able to link to the new docs.

@maximiliankolb
Copy link
Contributor Author

Updated the PR to point to version "10" as applied in theforeman/theforeman.org#2089. I am also OK if we decide to close this PR because we wait until there's a generic way to link to docs.theforeman.org like theforeman/foreman#9756

@adamruzicka
Copy link
Contributor

theforeman/foreman#9756 was merged. @maximiliankolb could you please change this PR to use the new things and link to docs.tfm.org?

@maximiliankolb maximiliankolb force-pushed the change_link branch 2 times, most recently from 4fda4e3 to 4ce793c Compare January 11, 2024 08:01
@maximiliankolb
Copy link
Contributor Author

build error from yesterday: Foreman::PluginRequirementError: ERF72-4964 [Foreman::PluginRequirementError]: foreman_remote_execution plugin requires Foreman >= 3.10 but current is 3.9.0. I assume this is unrelated to my change. 🤞

cc @adamruzicka My change is ready for review.

@maximiliankolb maximiliankolb changed the title Update link to latest plugin documentation Fixes #37041 - Change link to docs.theforeman.org Jan 11, 2024
@adamruzicka
Copy link
Contributor

Could you please rebase now that #861 got it? Hopefully it will make packit turn green

mechanism in Foreman: see PR 9756 in foreman
@maximiliankolb
Copy link
Contributor Author

Thanks Adam; rebased to master.

@adamruzicka adamruzicka merged commit 26b5c4a into theforeman:master Jan 11, 2024
@adamruzicka
Copy link
Contributor

Thank you @maximiliankolb !

@maximiliankolb maximiliankolb deleted the change_link branch January 11, 2024 15:07
@ekohl
Copy link
Member

ekohl commented Jan 11, 2024

@adamruzicka will this break branding?

@adamruzicka
Copy link
Contributor

I must admit I don't know, but I have it written down in my notes to look into it and fix the possible fallout.

@ekohl
Copy link
Member

ekohl commented Jan 17, 2024

RedHatSatellite/foreman_theme_satellite#32 provides a mechanism to brand these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants