katello 4.9.2 → 4.10.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -7
  3. data/app/assets/javascripts/katello/locale/bn/katello.js +8967 -1
  4. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +8967 -0
  5. data/app/assets/javascripts/katello/locale/ca/katello.js +8967 -0
  6. data/app/assets/javascripts/katello/locale/cs/katello.js +8967 -1
  7. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +8969 -0
  8. data/app/assets/javascripts/katello/locale/de/katello.js +8991 -1
  9. data/app/assets/javascripts/katello/locale/de_AT/katello.js +8966 -0
  10. data/app/assets/javascripts/katello/locale/de_DE/katello.js +8967 -0
  11. data/app/assets/javascripts/katello/locale/el/katello.js +8967 -0
  12. data/app/assets/javascripts/katello/locale/en/katello.js +8967 -1
  13. data/app/assets/javascripts/katello/locale/en_GB/katello.js +8967 -0
  14. data/app/assets/javascripts/katello/locale/en_US/katello.js +8966 -0
  15. data/app/assets/javascripts/katello/locale/es/katello.js +8984 -1
  16. data/app/assets/javascripts/katello/locale/et_EE/katello.js +8966 -0
  17. data/app/assets/javascripts/katello/locale/fr/katello.js +9008 -1
  18. data/app/assets/javascripts/katello/locale/gl/katello.js +8967 -0
  19. data/app/assets/javascripts/katello/locale/gu/katello.js +8967 -1
  20. data/app/assets/javascripts/katello/locale/he_IL/katello.js +8967 -0
  21. data/app/assets/javascripts/katello/locale/hi/katello.js +8967 -1
  22. data/app/assets/javascripts/katello/locale/id/katello.js +8966 -0
  23. data/app/assets/javascripts/katello/locale/it/katello.js +8974 -1
  24. data/app/assets/javascripts/katello/locale/ja/katello.js +9004 -1
  25. data/app/assets/javascripts/katello/locale/ka/katello.js +8976 -1
  26. data/app/assets/javascripts/katello/locale/kn/katello.js +8967 -1
  27. data/app/assets/javascripts/katello/locale/ko/katello.js +8972 -1
  28. data/app/assets/javascripts/katello/locale/locale/katello.js +3070 -1
  29. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +8966 -0
  30. data/app/assets/javascripts/katello/locale/mr/katello.js +8967 -1
  31. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +8967 -0
  32. data/app/assets/javascripts/katello/locale/or/katello.js +8967 -1
  33. data/app/assets/javascripts/katello/locale/pa/katello.js +8967 -1
  34. data/app/assets/javascripts/katello/locale/pl/katello.js +8967 -0
  35. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +8966 -0
  36. data/app/assets/javascripts/katello/locale/pt/katello.js +8967 -1
  37. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +8984 -1
  38. data/app/assets/javascripts/katello/locale/ro/katello.js +8966 -0
  39. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +8966 -0
  40. data/app/assets/javascripts/katello/locale/ru/katello.js +8973 -1
  41. data/app/assets/javascripts/katello/locale/sl/katello.js +8967 -0
  42. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +8967 -0
  43. data/app/assets/javascripts/katello/locale/ta/katello.js +8967 -1
  44. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +8967 -0
  45. data/app/assets/javascripts/katello/locale/te/katello.js +8967 -1
  46. data/app/assets/javascripts/katello/locale/tr/katello.js +8967 -0
  47. data/app/assets/javascripts/katello/locale/vi/katello.js +8966 -0
  48. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +8966 -0
  49. data/app/assets/javascripts/katello/locale/zh/katello.js +8966 -0
  50. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +9004 -1
  51. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +8972 -1
  52. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  53. data/app/controllers/katello/api/v2/alternate_content_sources_bulk_actions_controller.rb +22 -1
  54. data/app/controllers/katello/api/v2/api_controller.rb +0 -15
  55. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +13 -4
  56. data/app/controllers/katello/api/v2/host_errata_controller.rb +0 -12
  57. data/app/controllers/katello/api/v2/host_packages_controller.rb +0 -55
  58. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +0 -77
  59. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
  60. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -10
  61. data/app/controllers/katello/api/v2/sync_controller.rb +0 -1
  62. data/app/controllers/katello/concerns/api/api_controller.rb +0 -10
  63. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
  64. data/app/lib/actions/katello/alternate_content_source/update.rb +1 -1
  65. data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
  66. data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -9
  67. data/app/lib/actions/katello/content_view_version/republish_repositories.rb +8 -2
  68. data/app/lib/actions/katello/repository/capsule_sync.rb +1 -1
  69. data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
  70. data/app/lib/katello/concerns/base_template_scope_extensions.rb +4 -9
  71. data/app/lib/katello/resources/cdn.rb +4 -0
  72. data/app/lib/katello/validators/alternate_content_source_products_validator.rb +1 -1
  73. data/app/models/katello/cdn_configuration.rb +4 -0
  74. data/app/models/katello/concerns/host_managed_extensions.rb +2 -1
  75. data/app/models/katello/content_view.rb +5 -1
  76. data/app/models/katello/content_view_component.rb +1 -1
  77. data/app/models/katello/content_view_version.rb +4 -0
  78. data/app/models/katello/host/content_facet.rb +4 -5
  79. data/app/models/katello/ping.rb +0 -19
  80. data/app/models/katello/repository.rb +5 -1
  81. data/app/models/katello/root_repository.rb +2 -8
  82. data/app/services/katello/applicability/applicable_content_helper.rb +2 -2
  83. data/app/services/katello/registration_manager.rb +2 -12
  84. data/app/views/foreman/job_templates/configure_host_for_new_content_source.erb +25 -0
  85. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
  86. data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -12
  87. data/app/views/katello/api/v2/content_view_components/show.json.rabl +4 -1
  88. data/app/views/katello/api/v2/content_views/base.json.rabl +6 -2
  89. data/app/views/katello/api/v2/repositories/show.json.rabl +0 -1
  90. data/config/initializers/monkeys.rb +1 -0
  91. data/config/katello.yaml.example +0 -4
  92. data/config/routes/api/v2.rb +3 -0
  93. data/config/routes/overrides.rb +0 -11
  94. data/db/migrate/20230609155411_add_custom_cdn_auth_enabled_to_katello_cdn_configurations.rb +5 -0
  95. data/db/migrate/20230710190626_remove_relative_path_limit.rb +5 -0
  96. data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +20 -0
  97. data/db/migrate/20230828143236_remove_katello_agent_dispatch_history.rb +15 -0
  98. data/db/seeds.d/111-upgrade_tasks.rb +1 -2
  99. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
  100. data/engines/bastion_katello/README.md +2 -1
  101. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +4 -2
  102. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
  103. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +8 -3
  104. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +3 -44
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +0 -1
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -65
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -3
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -6
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-applicable.controller.js +1 -1
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -16
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +0 -1
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +0 -1
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +2 -11
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +0 -2
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -39
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-applicable.html +2 -2
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -2
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -3
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +4 -5
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -1
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +2 -4
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +0 -1
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +0 -14
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -4
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -2
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +2 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/views/file-content-views.html +1 -1
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +235 -521
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +13 -2
  131. data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -3
  132. data/lib/katello/engine.rb +0 -18
  133. data/lib/katello/permission_creator.rb +1 -1
  134. data/lib/katello/plugin.rb +0 -25
  135. data/lib/katello/version.rb +1 -1
  136. data/lib/monkeys/remove_hidden_distribution.rb +383 -0
  137. data/locale/action_names.rb +3 -1
  138. data/locale/bn/katello.po +130 -39
  139. data/locale/bn_IN/katello.po +130 -39
  140. data/locale/ca/katello.po +130 -39
  141. data/locale/cs/katello.po +130 -39
  142. data/locale/cs_CZ/katello.po +130 -39
  143. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  144. data/locale/de/katello.po +134 -43
  145. data/locale/de_AT/katello.po +130 -39
  146. data/locale/de_DE/katello.po +130 -39
  147. data/locale/el/katello.po +130 -39
  148. data/locale/en/katello.po +130 -39
  149. data/locale/en_GB/katello.po +130 -39
  150. data/locale/en_US/katello.po +130 -39
  151. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  152. data/locale/es/katello.po +133 -42
  153. data/locale/et_EE/katello.po +130 -39
  154. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  155. data/locale/fr/katello.po +138 -47
  156. data/locale/gl/katello.po +130 -39
  157. data/locale/gu/katello.po +130 -39
  158. data/locale/he_IL/katello.po +130 -39
  159. data/locale/hi/katello.po +130 -39
  160. data/locale/id/katello.po +130 -39
  161. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  162. data/locale/it/katello.po +131 -40
  163. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  164. data/locale/ja/katello.po +138 -47
  165. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  166. data/locale/ka/katello.po +131 -40
  167. data/locale/katello.pot +805 -642
  168. data/locale/kn/katello.po +130 -39
  169. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  170. data/locale/ko/katello.po +131 -40
  171. data/locale/ml_IN/katello.po +130 -39
  172. data/locale/mr/katello.po +130 -39
  173. data/locale/nl_NL/katello.po +130 -39
  174. data/locale/or/katello.po +130 -39
  175. data/locale/pa/katello.po +130 -39
  176. data/locale/pl/katello.po +130 -39
  177. data/locale/pl_PL/katello.po +130 -39
  178. data/locale/pt/katello.po +130 -39
  179. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  180. data/locale/pt_BR/katello.po +133 -42
  181. data/locale/ro/katello.po +130 -39
  182. data/locale/ro_RO/katello.po +130 -39
  183. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  184. data/locale/ru/katello.po +131 -40
  185. data/locale/sl/katello.po +130 -39
  186. data/locale/sv_SE/katello.po +130 -39
  187. data/locale/ta/katello.po +130 -39
  188. data/locale/ta_IN/katello.po +130 -39
  189. data/locale/te/katello.po +130 -39
  190. data/locale/tr/katello.po +130 -39
  191. data/locale/vi/katello.po +130 -39
  192. data/locale/vi_VN/katello.po +130 -39
  193. data/locale/zh/katello.po +130 -39
  194. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  195. data/locale/zh_CN/katello.po +138 -47
  196. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  197. data/locale/zh_TW/katello.po +131 -40
  198. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +0 -5
  199. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +9 -3
  200. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +7 -58
  201. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +2 -11
  202. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesActions.js +1 -40
  203. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +0 -3
  204. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +5 -40
  205. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +6 -65
  206. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +5 -4
  207. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +0 -212
  208. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +2 -157
  209. data/webpack/components/extensions/HostDetails/hostDetailsHelpers.js +0 -20
  210. data/webpack/containers/Application/config.js +5 -0
  211. data/webpack/scenes/ActivationKeys/Details/ActivationKeyActions.js +31 -0
  212. data/webpack/scenes/ActivationKeys/Details/ActivationKeyConstants.js +3 -0
  213. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +127 -0
  214. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.scss +37 -0
  215. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetailsSelectors.js +16 -0
  216. data/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js +117 -0
  217. data/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js +77 -0
  218. data/webpack/scenes/ActivationKeys/Details/components/DeleteModal.js +63 -0
  219. data/webpack/scenes/ActivationKeys/Details/components/EditModal.js +199 -0
  220. data/webpack/scenes/ActivationKeys/Details/index.js +3 -0
  221. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +10 -5
  222. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +8 -3
  223. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +8 -3
  224. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +2 -2
  225. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +1 -1
  226. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +37 -29
  227. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +53 -37
  228. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +7 -0
  229. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +15 -6
  230. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +6 -5
  231. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +43 -197
  232. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
  233. data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +1 -1
  234. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -2
  235. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +0 -98
  236. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +103 -1
  237. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsLatestEnvironment.fixtures.json +634 -0
  238. data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +1 -1
  239. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +14 -12
  240. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +45 -6
  241. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +42 -7
  242. data/webpack/scenes/Hosts/ChangeContentSource/index.js +37 -10
  243. data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +5 -0
  244. data/webpack/scenes/RedHatRepositories/index.scss +1 -1
  245. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -2
  246. metadata +85 -81
  247. data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +0 -64
  248. data/app/lib/actions/katello/agent_action.rb +0 -120
  249. data/app/lib/actions/katello/bulk_agent_action.rb +0 -37
  250. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +0 -44
  251. data/app/lib/actions/katello/host/erratum/install.rb +0 -38
  252. data/app/lib/actions/katello/host/package/install.rb +0 -34
  253. data/app/lib/actions/katello/host/package/remove.rb +0 -48
  254. data/app/lib/actions/katello/host/package/update.rb +0 -42
  255. data/app/lib/actions/katello/host/package_group/install.rb +0 -30
  256. data/app/lib/actions/katello/host/package_group/remove.rb +0 -30
  257. data/app/lib/katello/agent/base_message.rb +0 -41
  258. data/app/lib/katello/agent/client_message_handler.rb +0 -69
  259. data/app/lib/katello/agent/connection.rb +0 -38
  260. data/app/lib/katello/agent/install_errata_message.rb +0 -25
  261. data/app/lib/katello/agent/install_package_group_message.rb +0 -25
  262. data/app/lib/katello/agent/install_package_message.rb +0 -28
  263. data/app/lib/katello/agent/remove_package_group_message.rb +0 -25
  264. data/app/lib/katello/agent/remove_package_message.rb +0 -28
  265. data/app/lib/katello/agent/update_package_message.rb +0 -33
  266. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +0 -59
  267. data/app/lib/katello/qpid/connection.rb +0 -149
  268. data/app/lib/katello/util/default_enablement_migrator.rb +0 -183
  269. data/app/models/katello/agent/dispatch_history.rb +0 -19
  270. data/app/models/katello/events/delete_host_agent_queue.rb +0 -19
  271. data/app/services/katello/agent/dispatcher.rb +0 -60
  272. data/app/views/foreman/job_templates/change_content_source.erb +0 -18
  273. data/app/views/katello/api/v2/sync/index.json.rabl +0 -1
  274. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +0 -8
  275. data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +0 -13
  276. data/webpack/components/extensions/HostDetails/common/KatelloAgentDeprecationAlert.js +0 -23
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react';
2
+ import { FormattedMessage } from 'react-intl';
2
3
  import { useSelector } from 'react-redux';
3
4
  import {
4
5
  ActionGroup,
@@ -11,6 +12,7 @@ import {
11
12
  SelectOption,
12
13
  SelectVariant,
13
14
  TextContent,
15
+ Text,
14
16
  } from '@patternfly/react-core';
15
17
  import { translate as __ } from 'foremanReact/common/I18n';
16
18
  import PropTypes from 'prop-types';
@@ -96,6 +98,7 @@ const ContentSourceForm = ({
96
98
  contentHosts,
97
99
  isLoading,
98
100
  hostsUpdated,
101
+ showTemplate,
99
102
  }) => {
100
103
  const pathsUrl = `/organizations/${orgId()}/environments/paths?permission_type=promotable${contentSourceId ? `&content_source_id=${contentSourceId}` : ''}`;
101
104
  useAPI( // No TableWrapper here, so we can useAPI from Foreman
@@ -108,6 +111,7 @@ const ContentSourceForm = ({
108
111
  const envList = environmentPathResponse?.results?.map(path => path.environments).flat();
109
112
  const [csSelectOpen, setCSSelectOpen] = useState(false);
110
113
  const [cvSelectOpen, setCVSelectOpen] = useState(false);
114
+ const hostCount = contentHosts.length;
111
115
 
112
116
  const handleCSSelect = (_event, selection) => {
113
117
  handleContentSource(selection);
@@ -122,10 +126,10 @@ const ContentSourceForm = ({
122
126
  const formIsValid = () => (!!environments &&
123
127
  !!contentViewName &&
124
128
  !!contentSourceId &&
125
- contentHosts.length !== 0);
129
+ hostCount !== 0);
126
130
 
127
131
  const contentSourcesIsDisabled = (isLoading || contentSources.length === 0 ||
128
- contentHosts.length === 0);
132
+ hostCount === 0);
129
133
  const environmentIsDisabled = (isLoading || environments === [] ||
130
134
  contentSourceId === '');
131
135
  const viewIsDisabled = (isLoading || contentViews.length === 0 ||
@@ -152,7 +156,7 @@ const ContentSourceForm = ({
152
156
  isHorizontal
153
157
  >
154
158
  <Grid hasGutter className="margin-top-16">
155
- {(contentHosts.length === 0 && !isLoading) && (
159
+ {(hostCount === 0 && !isLoading) && (
156
160
 
157
161
  <GridItem span={7}>
158
162
  <Alert
@@ -203,7 +207,7 @@ const ContentSourceForm = ({
203
207
  setUserCheckedItems={handleEnvironment}
204
208
  publishing={false}
205
209
  multiSelect={false}
206
- headerText={__('Environment')}
210
+ headerText={__('Lifecycle environment')}
207
211
  isDisabled={environmentIsDisabled || hostsUpdated}
208
212
  />
209
213
  <ContentViewSelect
@@ -225,17 +229,51 @@ const ContentSourceForm = ({
225
229
  env={environments[0]}
226
230
  />))}
227
231
  </ContentViewSelect>
232
+ <TextContent>
233
+ <Text
234
+ ouiaId="ccs-options-description"
235
+ >
236
+ <FormattedMessage
237
+ defaultMessage={__('After configuring Foreman, configuration must also be updated on {hosts}. Choose one of the following options to update {hosts}:')}
238
+ values={{
239
+ hosts: (
240
+ <FormattedMessage
241
+ defaultMessage="{count, plural, one {{singular}} other {# {plural}}}"
242
+ values={{
243
+ count: hostCount,
244
+ singular: __('the host'),
245
+ plural: __('hosts'),
246
+ }}
247
+ id="ccs-options-i18n"
248
+ />
249
+ ),
250
+ }}
251
+ id="ccs-options-description-i18n"
252
+ />
253
+ </Text>
254
+ </TextContent>
228
255
  <ActionGroup style={{ display: 'block' }}>
229
256
  <Button
230
257
  variant="primary"
231
258
  id="generate_btn"
232
259
  ouiaId="update-source-button"
233
- onClick={e => handleSubmit(e)}
260
+ onClick={e => handleSubmit(e, { shouldRedirect: true })}
261
+ isDisabled={isLoading || !formIsValid() || hostsUpdated}
262
+ isLoading={isLoading}
263
+ >
264
+ {__('Run job invocation')}
265
+ </Button>
266
+ <Button
267
+ variant="secondary"
268
+ id="generate_btn"
269
+ ouiaId="update-source-button"
270
+ onClick={showTemplate}
234
271
  isDisabled={isLoading || !formIsValid() || hostsUpdated}
235
272
  isLoading={isLoading}
236
273
  >
237
- {__('Update')}
274
+ {__('Update hosts manually')}
238
275
  </Button>
276
+
239
277
  </ActionGroup>
240
278
  </Form>);
241
279
  };
@@ -253,6 +291,7 @@ ContentSourceForm.propTypes = {
253
291
  contentHosts: PropTypes.arrayOf(PropTypes.shape({})),
254
292
  isLoading: PropTypes.bool,
255
293
  hostsUpdated: PropTypes.bool,
294
+ showTemplate: PropTypes.func.isRequired,
256
295
  };
257
296
 
258
297
  ContentSourceForm.defaultProps = {
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
16
16
 
17
17
  import { copyToClipboard } from '../helpers';
18
18
 
19
- const ContentSourceTemplate = ({ template, jobInvocationPath }) => {
19
+ const ContentSourceTemplate = ({ template, hostCount }) => {
20
20
  const [isExpanded, setIsExpanded] = useState(false);
21
21
  const [isCopied, setCopied] = useState(false);
22
22
 
@@ -41,19 +41,54 @@ const ContentSourceTemplate = ({ template, jobInvocationPath }) => {
41
41
  return (
42
42
  <Grid>
43
43
  <GridItem span={7}>
44
+ <Alert
45
+ ouiaId="host-server-content-source-complete"
46
+ variant="info"
47
+ title={__('Configuration updated on Foreman')}
48
+ className="margin-top-20"
49
+ isInline
50
+ />
44
51
  <Alert
45
52
  ouiaId="host-configuration-alert"
46
53
  variant="warning"
47
- title={__('Host configurations are not updated yet')}
54
+ title={
55
+ <FormattedMessage
56
+ defaultMessage={__('Configuration still must be updated on {hosts}')}
57
+ values={{
58
+ hosts: (
59
+ <FormattedMessage
60
+ defaultMessage="{count, plural, one {{singular}} other {# {plural}}}"
61
+ values={{
62
+ count: hostCount,
63
+ singular: __('the host'),
64
+ plural: __('hosts'),
65
+ }}
66
+ id="ccs-status-i18n"
67
+ />
68
+ ),
69
+ }}
70
+ id="ccs-status-description-i18n"
71
+ />
72
+ }
48
73
  className="margin-top-20"
49
74
  isInline
50
75
  >
51
76
  <FormattedMessage
52
- id="ccs_alert"
77
+ defaultMessage={__('To finish the process of changing the content source, run the following script manually on {hosts}.')}
53
78
  values={{
54
- link: <a href={jobInvocationPath}>{__('run job invocation')}</a>,
79
+ hosts: (
80
+ <FormattedMessage
81
+ defaultMessage="{count, plural, one {{singular}} other {{plural}}}"
82
+ values={{
83
+ count: hostCount,
84
+ singular: __('the host'),
85
+ plural: __('the hosts'),
86
+ }}
87
+ id="ccs-status2-i18n"
88
+ />
89
+ ),
55
90
  }}
56
- defaultMessage={jobInvocationPath ? __('To update the selected host configuration, {link}, or update hosts manually in the next section.') : __('To update the selected host configuration, update hosts manually in the next section.')}
91
+ id="ccs-status2-description-i18n"
57
92
  />
58
93
  </Alert>
59
94
 
@@ -81,12 +116,12 @@ const ContentSourceTemplate = ({ template, jobInvocationPath }) => {
81
116
 
82
117
  ContentSourceTemplate.propTypes = {
83
118
  template: PropTypes.string,
84
- jobInvocationPath: PropTypes.string,
119
+ hostCount: PropTypes.number,
85
120
  };
86
121
 
87
122
  ContentSourceTemplate.defaultProps = {
88
123
  template: '',
89
- jobInvocationPath: '',
124
+ hostCount: 1,
90
125
  };
91
126
 
92
127
  export default ContentSourceTemplate;
@@ -1,7 +1,7 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React, { useState, useEffect, useMemo } from 'react';
2
2
  import { useSelector, useDispatch } from 'react-redux';
3
3
 
4
- import { Alert, Grid, GridItem, PageSection, Title } from '@patternfly/react-core';
4
+ import { Alert, Grid, GridItem, PageSection, Title, Text, TextContent } from '@patternfly/react-core';
5
5
 
6
6
  import { translate as __ } from 'foremanReact/common/I18n';
7
7
  import { foremanUrl } from 'foremanReact/common/helpers';
@@ -53,12 +53,23 @@ const ChangeContentSourcePage = () => {
53
53
  const [contentSourceId, setCapsuleId] = useState('');
54
54
  const [selectedEnvironment, setSelectedEnvironment] = useState([]);
55
55
  const [contentViewName, setContentViewName] = useState('');
56
+ const [shouldShowTemplate, setShouldShowTemplate] = useState(false);
57
+ const [redirect, setRedirect] = useState(false);
56
58
 
57
59
  const contentViewId = contentViews?.find(cv => cv.name === contentViewName)?.id;
58
- const noHostSpecified = getHostIds(urlParams.host_id).length === 0 && urlParams.searchParam === '';
60
+ const hostIds = useMemo(() => getHostIds(urlParams.host_id), [urlParams.host_id]);
61
+ const noHostSpecified = (hostIds.length === 0 && urlParams.searchParam === '');
59
62
  const environmentId = selectedEnvironment[0]?.id;
60
63
 
61
- const handleSubmit = (e) => {
64
+ const redirectToJobInvocationForm = () => setRedirect(true);
65
+
66
+ const handleSuccess = ({ shouldRedirect }) => {
67
+ if (shouldRedirect) {
68
+ redirectToJobInvocationForm();
69
+ }
70
+ };
71
+
72
+ const handleSubmit = (e, { shouldRedirect = false }) => {
62
73
  e.preventDefault();
63
74
 
64
75
  dispatch(changeContentSource(
@@ -66,7 +77,7 @@ const ChangeContentSourcePage = () => {
66
77
  contentViewId,
67
78
  contentSourceId,
68
79
  contentHosts.map(h => h.id),
69
- jobInvocationPath,
80
+ () => handleSuccess({ shouldRedirect }),
70
81
  ));
71
82
  };
72
83
 
@@ -80,6 +91,11 @@ const ChangeContentSourcePage = () => {
80
91
  }
81
92
  };
82
93
 
94
+ const showTemplate = (e) => {
95
+ handleSubmit(e, { shouldRedirect: false });
96
+ setShouldShowTemplate(true);
97
+ };
98
+
83
99
  const breadcrumbItems = () => {
84
100
  const linkHosts = { caption: __('Hosts'), url: foremanUrl('/hosts') };
85
101
  const linkContent = { caption: __('Change host content source') };
@@ -102,8 +118,12 @@ const ChangeContentSourcePage = () => {
102
118
  }
103
119
  };
104
120
  useEffect(() => {
105
- dispatch(getFormData(getHostIds(urlParams.host_id), urlParams.searchParam));
106
- }, [dispatch, urlParams.host_id, urlParams.searchParam]);
121
+ dispatch(getFormData(hostIds, urlParams.searchParam));
122
+ }, [dispatch, hostIds, urlParams.searchParam]);
123
+
124
+ if (redirect && jobInvocationPath) {
125
+ window.location.assign(jobInvocationPath); // redirect to job invocation wizard
126
+ }
107
127
 
108
128
  return (
109
129
  <>
@@ -125,9 +145,15 @@ const ChangeContentSourcePage = () => {
125
145
  ouiaId="change-cs-title"
126
146
  headingLevel="h5"
127
147
  size="2xl"
148
+ className="margin-top-20"
128
149
  >
129
150
  {__('Change host content source')}
130
151
  </Title>
152
+ <TextContent>
153
+ <Text ouiaId="change-content-source-description" id="ccs-description">
154
+ {__('Changing a host\'s content source will change the Smart Proxy from which the host gets its content.')}
155
+ </Text>
156
+ </TextContent>
131
157
  </GridItem>
132
158
  {noHostSpecified &&
133
159
  <GridItem span={7}>
@@ -158,11 +184,12 @@ const ChangeContentSourcePage = () => {
158
184
  handleContentSource={handleContentSource}
159
185
  contentHosts={contentHosts}
160
186
  isLoading={isLoading}
161
- hostsUpdated={apiChangeStatus === STATUS.RESOLVED}
187
+ hostsUpdated={apiChangeStatus === STATUS.RESOLVED || shouldShowTemplate}
188
+ showTemplate={showTemplate}
162
189
  />
163
190
  </> }
164
- { apiChangeStatus === STATUS.RESOLVED &&
165
- <ContentSourceTemplate template={template} jobInvocationPath={jobInvocationPath} /> }
191
+ { (apiChangeStatus === STATUS.RESOLVED && shouldShowTemplate) &&
192
+ <ContentSourceTemplate template={template} hostCount={contentHosts.length} /> }
166
193
  </Grid>
167
194
  </PageSection>
168
195
  </>
@@ -17,3 +17,8 @@
17
17
  .set-select-width {
18
18
  width: 60%
19
19
  }
20
+
21
+ #ccs-description {
22
+ margin-top: 1rem;
23
+ margin-bottom: 1rem;
24
+ }
@@ -126,7 +126,7 @@
126
126
 
127
127
  .sticky-pagination {
128
128
  position: sticky;
129
- top: 60px;
129
+ top: 0;
130
130
  z-index: 2;
131
131
  background-color: white;
132
132
  padding-top: 10px;
@@ -101,8 +101,8 @@ class ManageManifestModal extends Component {
101
101
  header: __('There is no Manifest History to display.'),
102
102
  description: __('Import a Manifest using the manifest tab above.'),
103
103
  documentation: {
104
- label: __('Learn more about adding Subscription Manifests'),
105
- url: 'http://redhat.com',
104
+ label: __('Learn more about adding Subscription Manifests '),
105
+ url: 'https://access.redhat.com/solutions/3410771',
106
106
  },
107
107
  });
108
108