From ee341e9f3742edd598e33cee398946c3ef1cf404 Mon Sep 17 00:00:00 2001 From: Girija Soni Date: Fri, 12 Apr 2024 16:30:50 +0530 Subject: [PATCH] Fixes #37342 - Update foreman docs and fix specify matcher documentation --- app/helpers/foreman_ansible/ansible_plugin_helper.rb | 4 +--- app/views/ansible_roles/index.html.erb | 3 ++- app/views/ansible_roles/welcome.html.erb | 2 +- app/views/ansible_variables/_fields.erb | 2 +- app/views/ansible_variables/index.html.erb | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/helpers/foreman_ansible/ansible_plugin_helper.rb b/app/helpers/foreman_ansible/ansible_plugin_helper.rb index 628550c2e..88b674b39 100644 --- a/app/helpers/foreman_ansible/ansible_plugin_helper.rb +++ b/app/helpers/foreman_ansible/ansible_plugin_helper.rb @@ -6,9 +6,7 @@ module ForemanAnsible # General helper for foreman_ansible module AnsiblePluginHelper def ansible_doc_url - major_version = ::ForemanAnsible::VERSION.split('.')[0] - 'https://theforeman.org/plugins/foreman_ansible/'\ - "#{major_version}.x/index.html" + 'https://docs.theforeman.org/nightly/Managing_Configurations_Ansible/index-foreman-el.html' end end end diff --git a/app/views/ansible_roles/index.html.erb b/app/views/ansible_roles/index.html.erb index def0fd832..ac39940ad 100644 --- a/app/views/ansible_roles/index.html.erb +++ b/app/views/ansible_roles/index.html.erb @@ -1,7 +1,8 @@ <% title _("Ansible Roles") %> <% title_actions ansible_proxy_import(hash_for_import_ansible_roles_path), - documentation_button('#4.1ImportingRoles', :root_url => ansible_doc_url) %> + documentation_button('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url) %> + diff --git a/app/views/ansible_roles/welcome.html.erb b/app/views/ansible_roles/welcome.html.erb index fd2011862..9ef5f3628 100644 --- a/app/views/ansible_roles/welcome.html.erb +++ b/app/views/ansible_roles/welcome.html.erb @@ -7,7 +7,7 @@

<%= _('No Ansible Roles were found in Foreman. If you want to assign roles to your hosts, you have to import them first.').html_safe %>

-

<%= link_to(_('Learn more about this in the documentation.'), documentation_url('#4.1ImportingRoles', :root_url => ansible_doc_url), target: '_blank') %>

+

<%= link_to(_('Learn more about this in the documentation.'), documentation_url('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url), target: '_blank') %>

<%= ansible_proxy_import(hash_for_import_ansible_roles_path) %>
diff --git a/app/views/ansible_variables/_fields.erb b/app/views/ansible_variables/_fields.erb index 7498ba991..2451f8537 100644 --- a/app/views/ansible_variables/_fields.erb +++ b/app/views/ansible_variables/_fields.erb @@ -65,7 +65,7 @@
-

<%= _("Specify Matchers") %> <%= documentation_button('4.2.6SmartMatchers') %>

+

<%= _("Specify Matchers") %> <%= documentation_button('#Overriding_Ansible_Variables_in_foreman_ansible', :root_url => ansible_doc_url) %>

<%= render 'lookup_keys/values', :f => f, :is_param => false %>
diff --git a/app/views/ansible_variables/index.html.erb b/app/views/ansible_variables/index.html.erb index fb345fd85..229aaf84b 100644 --- a/app/views/ansible_variables/index.html.erb +++ b/app/views/ansible_variables/index.html.erb @@ -2,7 +2,7 @@ <%= stylesheet 'foreman_ansible/foreman-ansible' %> <%= title_actions display_link_if_authorized(_('New Ansible Variable'), hash_for_new_ansible_variable_path, :class => "btn btn-default no-float"), - documentation_button('#4.3Variables', :root_url => ansible_doc_url) + documentation_button('#Importing_Ansible_Roles_and_Variables_ansible', :root_url => ansible_doc_url) %>