katello 4.6.2.1 → 4.7.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 (333) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/common/vendor.js +0 -1
  3. data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
  4. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +4 -4
  5. data/app/controllers/katello/api/v2/capsule_content_controller.rb +5 -0
  6. data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
  7. data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
  8. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -1
  9. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -0
  11. data/app/controllers/katello/api/v2/repositories_controller.rb +78 -12
  12. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
  13. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +7 -1
  14. data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
  15. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -9
  16. data/app/helpers/katello/content_source_helper.rb +9 -0
  17. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +31 -0
  18. data/app/lib/actions/katello/activation_key/destroy.rb +1 -0
  19. data/app/lib/actions/katello/agent_action.rb +1 -0
  20. data/app/lib/actions/katello/alternate_content_source/create.rb +1 -1
  21. data/app/lib/actions/katello/alternate_content_source/update.rb +2 -2
  22. data/app/lib/actions/katello/capsule_content/sync.rb +10 -2
  23. data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
  24. data/app/lib/actions/katello/content_view/promote.rb +1 -0
  25. data/app/lib/actions/katello/content_view/publish.rb +5 -2
  26. data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +7 -3
  27. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +4 -2
  28. data/app/lib/actions/katello/content_view_version/import.rb +22 -10
  29. data/app/lib/actions/katello/product/destroy.rb +1 -1
  30. data/app/lib/actions/katello/repository/destroy.rb +3 -3
  31. data/app/lib/actions/katello/repository/errata_mail.rb +9 -6
  32. data/app/lib/actions/katello/repository/refresh_repository.rb +1 -1
  33. data/app/lib/actions/katello/repository/sync.rb +13 -6
  34. data/app/lib/actions/katello/repository_set/enable_repository.rb +6 -2
  35. data/app/lib/actions/pulp3/alternate_content_source/refresh_remote.rb +16 -0
  36. data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +1 -0
  37. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
  38. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +10 -2
  39. data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
  40. data/app/lib/katello/errors.rb +2 -2
  41. data/app/lib/katello/resources/candlepin.rb +7 -1
  42. data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -13
  43. data/app/lib/katello/resources/cdn.rb +14 -9
  44. data/app/lib/katello/util/candlepin_repository_checker.rb +73 -0
  45. data/app/models/katello/activation_key.rb +12 -1
  46. data/app/models/katello/alternate_content_source.rb +15 -4
  47. data/app/models/katello/alternate_content_source_product.rb +1 -1
  48. data/app/models/katello/authorization/repository.rb +2 -2
  49. data/app/models/katello/cdn_configuration.rb +12 -3
  50. data/app/models/katello/concerns/host_managed_extensions.rb +15 -2
  51. data/app/models/katello/concerns/http_proxy_extensions.rb +5 -10
  52. data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -15
  53. data/app/models/katello/content.rb +15 -0
  54. data/app/models/katello/content_credential.rb +8 -9
  55. data/app/models/katello/content_view.rb +7 -3
  56. data/app/models/katello/content_view_component.rb +4 -0
  57. data/app/models/katello/content_view_version.rb +1 -1
  58. data/app/models/katello/erratum.rb +6 -2
  59. data/app/models/katello/host/content_facet.rb +13 -3
  60. data/app/models/katello/repository.rb +15 -1
  61. data/app/models/katello/root_repository.rb +0 -2
  62. data/app/overrides/add_smart_proxy_form.rb +5 -0
  63. data/app/presenters/katello/content_view_version_compare_presenter.rb +5 -0
  64. data/app/presenters/katello/host_package_presenter.rb +4 -4
  65. data/app/services/katello/pulp3/alternate_content_source.rb +23 -15
  66. data/app/services/katello/pulp3/ansible_collection.rb +7 -10
  67. data/app/services/katello/pulp3/content_view_version/export.rb +19 -6
  68. data/app/services/katello/pulp3/content_view_version/import.rb +2 -0
  69. data/app/services/katello/pulp3/content_view_version/import_validator.rb +21 -5
  70. data/app/services/katello/pulp3/content_view_version/importable_products.rb +11 -1
  71. data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +38 -9
  72. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +12 -5
  73. data/app/services/katello/pulp3/content_view_version/metadata_map.rb +13 -2
  74. data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +5 -1
  75. data/app/services/katello/pulp3/pulp_content_unit.rb +3 -0
  76. data/app/services/katello/pulp3/repository.rb +18 -6
  77. data/app/services/katello/pulp3/repository_mirror.rb +0 -1
  78. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
  79. data/app/services/katello/pulp3/task_group.rb +18 -1
  80. data/app/services/katello/repository_type.rb +5 -2
  81. data/app/services/katello/repository_type_manager.rb +4 -3
  82. data/app/views/dashboard/_content_views_widget.html.erb +1 -1
  83. data/app/views/foreman/job_templates/change_content_source.erb +6 -0
  84. data/app/views/foreman/job_templates/update_packages_by_search_query.erb +7 -1
  85. data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +4 -4
  86. data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +1 -0
  87. data/app/views/katello/api/v2/alternate_content_sources/permissions.rabl +11 -0
  88. data/app/views/katello/api/v2/content_credentials/show.json.rabl +12 -0
  89. data/app/views/katello/api/v2/content_views/permissions.rabl +1 -0
  90. data/app/views/katello/api/v2/host_packages/base.json.rabl +1 -1
  91. data/app/views/katello/api/v2/module_streams/show.json.rabl +7 -0
  92. data/app/views/katello/api/v2/repositories/compare.json.rabl +10 -0
  93. data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
  94. data/app/views/katello/hosts/_errata_counts.html.erb +46 -0
  95. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
  96. data/app/views/overrides/smart_proxies/_acs_http_proxy.html.erb +6 -0
  97. data/config/initializers/monkeys.rb +1 -0
  98. data/config/routes/api/v2.rb +2 -0
  99. data/config/routes.rb +3 -0
  100. data/db/migrate/20220730033504_update_custom_cdn.rb +13 -0
  101. data/db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb +7 -0
  102. data/db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb +6 -0
  103. data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
  104. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
  105. data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +1 -1
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +17 -0
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +10 -0
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +36 -0
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +7 -1
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-acs.html +38 -0
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +3 -0
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +7 -2
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -3
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +14 -1392
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +1 -0
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -0
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
  120. data/lib/katello/permission_creator.rb +1 -0
  121. data/lib/katello/plugin.rb +34 -11
  122. data/lib/katello/repository_types/deb.rb +1 -1
  123. data/lib/katello/repository_types/docker.rb +1 -1
  124. data/lib/katello/repository_types/python.rb +3 -3
  125. data/lib/katello/tasks/check_candlepin_content.rake +16 -0
  126. data/lib/katello/tasks/reset.rake +1 -1
  127. data/lib/katello/version.rb +1 -1
  128. data/lib/monkeys/try_pulp_container_path.rb +35 -0
  129. data/locale/action_names.rb +7 -7
  130. data/locale/bn/katello.po +395 -63
  131. data/locale/cs/katello.po +396 -64
  132. data/locale/de/katello.po +399 -67
  133. data/locale/en/katello.po +395 -63
  134. data/locale/es/katello.po +399 -67
  135. data/locale/fr/katello.po +400 -68
  136. data/locale/gu/katello.po +395 -63
  137. data/locale/hi/katello.po +395 -63
  138. data/locale/it/katello.po +396 -64
  139. data/locale/ja/katello.po +400 -68
  140. data/locale/katello.pot +1916 -1213
  141. data/locale/kn/katello.po +395 -63
  142. data/locale/ko/katello.po +396 -64
  143. data/locale/mr/katello.po +395 -63
  144. data/locale/or/katello.po +395 -63
  145. data/locale/pa/katello.po +395 -63
  146. data/locale/pt/katello.po +395 -63
  147. data/locale/pt_BR/katello.po +399 -67
  148. data/locale/ru/katello.po +396 -64
  149. data/locale/ta/katello.po +395 -63
  150. data/locale/te/katello.po +395 -63
  151. data/locale/zh_CN/katello.po +400 -68
  152. data/locale/zh_TW/katello.po +396 -64
  153. data/webpack/components/Bookmark/index.js +5 -1
  154. data/webpack/components/Content/Details/ContentDetails.js +1 -1
  155. data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +6 -0
  156. data/webpack/components/EditableSwitch.js +1 -0
  157. data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
  158. data/webpack/components/Errata/errataHelpers.js +33 -0
  159. data/webpack/components/Errata/index.js +45 -12
  160. data/webpack/components/Loading.js +18 -8
  161. data/webpack/components/Packages/index.js +8 -24
  162. data/webpack/components/RoutedTabs/index.js +1 -0
  163. data/webpack/components/Search/Search.js +20 -2
  164. data/webpack/components/Search/__tests__/search.test.js +3 -3
  165. data/webpack/components/Table/EmptyStateMessage.js +1 -1
  166. data/webpack/components/Table/PageControls.js +1 -0
  167. data/webpack/components/Table/TableHooks.js +4 -0
  168. data/webpack/components/Table/TableWrapper.js +7 -7
  169. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
  170. data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +2 -0
  171. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +1 -1
  172. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +3 -1
  173. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +2 -1
  174. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +124 -68
  175. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +5 -0
  176. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +30 -4
  177. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.scss +23 -0
  178. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +5 -4
  179. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +25 -10
  180. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -3
  181. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +6 -0
  182. data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +145 -32
  183. data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +3 -1
  184. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +2 -1
  185. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +1 -0
  186. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +78 -26
  187. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -10
  188. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +1 -0
  189. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +9 -4
  190. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +141 -23
  191. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.scss +6 -1
  192. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +9 -8
  193. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +24 -3
  194. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +7 -2
  195. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +2 -1
  196. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +20 -4
  197. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +56 -38
  198. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +3 -3
  199. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +5 -4
  200. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +3 -3
  201. data/webpack/containers/Application/config.js +2 -2
  202. data/webpack/containers/Application/overrides.scss +12 -0
  203. data/webpack/global_test_setup.js +19 -1
  204. data/webpack/ouia_id_check.js +0 -2
  205. data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -8
  206. data/webpack/scenes/AlternateContentSources/ACSActions.js +37 -6
  207. data/webpack/scenes/AlternateContentSources/ACSConstants.js +2 -0
  208. data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +1 -1
  209. data/webpack/scenes/AlternateContentSources/ACSSelectors.js +6 -6
  210. data/webpack/scenes/AlternateContentSources/Acs.scss +3 -0
  211. data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +24 -3
  212. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +10 -8
  213. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +25 -4
  214. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +22 -11
  215. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +27 -2
  216. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +49 -17
  217. data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +76 -23
  218. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +159 -11
  219. data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +83 -29
  220. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -8
  221. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +2 -2
  222. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +2 -2
  223. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +39 -7
  224. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +27 -11
  225. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +58 -55
  226. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +35 -32
  227. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +323 -150
  228. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +5 -1
  229. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +10 -11
  230. data/webpack/scenes/AlternateContentSources/helpers.js +26 -0
  231. data/webpack/scenes/ContentViews/ContentViewsConstants.js +1 -0
  232. data/webpack/scenes/ContentViews/ContentViewsPage.js +1 -1
  233. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -0
  234. data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -0
  235. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -5
  236. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +30 -7
  237. data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +1 -0
  238. data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +21 -6
  239. data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +3 -3
  240. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +1 -0
  241. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +1 -0
  242. data/webpack/scenes/ContentViews/Delete/__tests__/CvData.fixtures.json +2 -0
  243. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -0
  244. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -1
  245. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +1 -1
  246. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  247. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +14 -0
  248. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +11 -1
  249. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -1
  250. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +2 -0
  251. data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +5 -0
  252. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositorySelection.js +1 -0
  253. data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +1 -0
  254. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +8 -2
  255. data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +5 -1
  256. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +22 -6
  257. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +19 -9
  258. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +9 -2
  259. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +9 -2
  260. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +8 -2
  261. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +1 -1
  262. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  263. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +3 -2
  264. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -1
  265. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +2 -2
  266. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
  267. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -1
  268. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +1 -1
  269. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -2
  270. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -0
  271. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
  272. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +3 -3
  273. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +9 -1
  274. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +83 -0
  275. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +32 -8
  276. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +56 -3
  277. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/cvCompareRepositories.fixtures.json +175 -0
  278. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +6 -2
  279. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +3 -3
  280. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +1 -0
  281. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +1 -0
  282. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +2 -2
  283. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
  284. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +2 -2
  285. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -0
  286. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +4 -1
  287. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +5 -4
  288. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +5 -1
  289. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -3
  290. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +10 -5
  291. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +2 -0
  292. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +1 -0
  293. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +81 -19
  294. data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +1 -1
  295. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
  296. data/webpack/scenes/ContentViews/components/InactiveText.js +9 -1
  297. data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +4 -2
  298. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +3 -2
  299. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +18 -11
  300. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +15 -8
  301. data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -4
  302. data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +55 -0
  303. data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +59 -0
  304. data/webpack/scenes/Hosts/ChangeContentSource/constants.js +1 -0
  305. data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -5
  306. data/webpack/scenes/Hosts/ChangeContentSource/index.js +46 -41
  307. data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +5 -5
  308. data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +10 -1
  309. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -1
  310. data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +97 -2
  311. data/webpack/scenes/Organizations/OrganizationSelectors.js +1 -0
  312. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +2 -1
  313. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +10 -25
  314. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +154 -0
  315. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/ExportSyncForm.js +4 -4
  316. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +59 -44
  317. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js +3 -28
  318. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js +97 -0
  319. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js +1 -1
  320. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js +4 -4
  321. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +23 -10
  322. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
  323. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +2 -1
  324. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +5 -5
  325. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -3
  326. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -2
  327. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
  328. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +3 -3
  329. data/webpack/scenes/Tasks/helpers.js +14 -7
  330. metadata +54 -35
  331. data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +0 -18
  332. data/db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb +0 -5
  333. data/vendor/assets/javascripts/katello/jquery.trunk8.js +0 -203
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useRef } from 'react';
1
+ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
4
  import { FormattedMessage } from 'react-intl';
@@ -16,12 +16,13 @@ import {
16
16
  } from '@patternfly/react-core';
17
17
 
18
18
  import { translate as __ } from 'foremanReact/common/I18n';
19
- import { noop } from 'foremanReact/common/helpers';
19
+ import { noop, propsToCamelCase } from 'foremanReact/common/helpers';
20
20
 
21
21
  import { NETWORK_SYNC, DEFAULT_CONTENT_VIEW_LABEL, DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL, DEFAULT_ORGANIZATION_LABEL } from './CdnConfigurationConstants';
22
22
  import EditableTextInput from '../../../../components/EditableTextInput';
23
23
 
24
24
  import {
25
+ selectOrgLoading,
25
26
  selectUpdatingCdnConfiguration,
26
27
  } from '../../../Organizations/OrganizationSelectors';
27
28
 
@@ -29,39 +30,30 @@ import { updateCdnConfiguration } from '../../../Organizations/OrganizationActio
29
30
  import './CdnConfigurationForm.scss';
30
31
 
31
32
  const NetworkSyncForm = ({
32
- showUpdate, contentCredentials, cdnConfiguration, onUpdate,
33
+ typeChangeInProgress, contentCredentials, cdnConfiguration, onUpdate,
33
34
  }) => {
34
35
  const dispatch = useDispatch();
35
- const urlValue = cdnConfiguration.type === NETWORK_SYNC ? cdnConfiguration.url : '';
36
+ const cdnConfigurationObject = propsToCamelCase(cdnConfiguration);
37
+ const urlValue = cdnConfigurationObject.type === NETWORK_SYNC ? cdnConfigurationObject.url : '';
36
38
  const [url, setUrl] = useState(urlValue);
37
- const [username, setUsername] = useState(cdnConfiguration.username);
39
+ const [username, setUsername] = useState(cdnConfigurationObject.username);
38
40
  const [password, setPassword] = useState(null);
39
- const [organizationLabel, setOrganizationLabel] =
40
- useState(cdnConfiguration.upstream_organization_label || DEFAULT_ORGANIZATION_LABEL);
41
- const [sslCaCredentialId, setSslCaCredentialId] = useState(cdnConfiguration.ssl_ca_credential_id);
42
- const updatingCdnConfiguration = useSelector(state => selectUpdatingCdnConfiguration(state));
41
+ const [upstreamOrganizationLabel, setUpstreamOrganizationLabel] =
42
+ useState(cdnConfigurationObject.upstreamOrganizationLabel || DEFAULT_ORGANIZATION_LABEL);
43
+ const [sslCaCredentialId, setSslCaCredentialId] =
44
+ useState(cdnConfigurationObject.sslCaCredentialId);
45
+ const updatingCdnConfiguration =
46
+ useSelector(state => selectUpdatingCdnConfiguration(state));
47
+ const orgIsLoading = useSelector(state => selectOrgLoading(state));
43
48
 
44
- const [contentViewLabel, setContentViewLabel] =
45
- useState(cdnConfiguration.upstream_content_view_label ||
49
+ const [upstreamContentViewLabel, setUpstreamContentViewLabel] =
50
+ useState(cdnConfigurationObject.upstreamContentViewLabel ||
46
51
  DEFAULT_CONTENT_VIEW_LABEL);
47
52
 
48
- const [lifecycleEnvironmentLabel, setLifecycleEnvironmentLabel] =
49
- useState(cdnConfiguration.upstream_lifecycle_environment_label ||
53
+ const [upstreamLifecycleEnvironmentLabel, setUpstreamLifecycleEnvironmentLabel] =
54
+ useState(cdnConfigurationObject.upstreamLifecycleEnvironmentLabel ||
50
55
  DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL);
51
56
 
52
- const [updateEnabled, setUpdateEnabled] = useState(false);
53
-
54
- const firstUpdate = useRef(true);
55
- useEffect(() => {
56
- if (firstUpdate.current) {
57
- firstUpdate.current = false;
58
- return;
59
- }
60
- setUpdateEnabled(true);
61
- }, [url, username, password, organizationLabel,
62
- contentViewLabel, lifecycleEnvironmentLabel,
63
- sslCaCredentialId, cdnConfiguration]);
64
-
65
57
  const editPassword = (value) => {
66
58
  if (value === null) {
67
59
  setPassword('');
@@ -69,31 +61,54 @@ const NetworkSyncForm = ({
69
61
  setPassword(value);
70
62
  }
71
63
  };
72
- const hasPassword = (cdnConfiguration.password_exists && !password)
64
+
65
+ const hasPassword = (cdnConfigurationObject.passwordExists && !password)
73
66
  || password?.length > 0;
74
67
 
75
- const requiredFields = [username, organizationLabel, sslCaCredentialId];
68
+ const requiredFields = [username, upstreamOrganizationLabel, sslCaCredentialId, url];
76
69
 
77
70
  if (!hasPassword) {
78
71
  requiredFields.push(password);
79
72
  }
80
73
 
81
74
  const validated = !requiredFields.some(field => !field);
82
- const onError = () => setUpdateEnabled(true);
75
+ const disableUpdate = () => {
76
+ if (updatingCdnConfiguration || orgIsLoading || !validated) {
77
+ return true;
78
+ }
79
+ const needsUpdate = Object.entries({
80
+ url,
81
+ username,
82
+ upstreamOrganizationLabel,
83
+ upstreamContentViewLabel,
84
+ upstreamLifecycleEnvironmentLabel,
85
+ }).some(([key, value]) => value?.toString() !== cdnConfigurationObject[key]?.toString());
86
+
87
+ if (needsUpdate || password?.length > 0) {
88
+ return false;
89
+ }
90
+
91
+ const sslCaCredentialIdOrNull = sslCaCredentialId === '' ? null : sslCaCredentialId;
92
+ return sslCaCredentialIdOrNull?.toString() ===
93
+ cdnConfigurationObject.sslCaCredentialId?.toString();
94
+ };
95
+
96
+ const sslCaCredentialValue =
97
+ cdnConfigurationObject.type === NETWORK_SYNC || typeChangeInProgress ?
98
+ sslCaCredentialId : null;
83
99
 
84
100
  const performUpdate = () => {
85
- setUpdateEnabled(false);
86
101
  dispatch(updateCdnConfiguration({
87
102
  url,
88
103
  username,
89
104
  password,
90
- upstream_organization_label: organizationLabel || DEFAULT_ORGANIZATION_LABEL,
105
+ upstream_organization_label: upstreamOrganizationLabel || DEFAULT_ORGANIZATION_LABEL,
91
106
  ssl_ca_credential_id: sslCaCredentialId,
92
- upstream_content_view_label: contentViewLabel || DEFAULT_CONTENT_VIEW_LABEL,
93
- upstream_lifecycle_environment_label: lifecycleEnvironmentLabel ||
107
+ upstream_content_view_label: upstreamContentViewLabel || DEFAULT_CONTENT_VIEW_LABEL,
108
+ upstream_lifecycle_environment_label: upstreamLifecycleEnvironmentLabel ||
94
109
  DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL,
95
110
  type: NETWORK_SYNC,
96
- }, onUpdate, onError));
111
+ }, onUpdate));
97
112
  };
98
113
 
99
114
  return (
@@ -120,7 +135,7 @@ const NetworkSyncForm = ({
120
135
  }}
121
136
  />
122
137
  <br />
123
- {showUpdate &&
138
+ {typeChangeInProgress &&
124
139
  <FormattedMessage
125
140
  id="cdn-configuration-type-upstream-server"
126
141
  defaultMessage={__('Provide the required information and click {update} below to save changes.')}
@@ -179,9 +194,9 @@ const NetworkSyncForm = ({
179
194
  ouiaId="network-sync-organization-input"
180
195
  aria-label="cdn-organization-label"
181
196
  type="text"
182
- value={organizationLabel || ''}
197
+ value={upstreamOrganizationLabel || ''}
183
198
  isDisabled={updatingCdnConfiguration}
184
- onChange={setOrganizationLabel}
199
+ onChange={setUpstreamOrganizationLabel}
185
200
  />
186
201
  </FormGroup>
187
202
  <FormGroup
@@ -191,9 +206,9 @@ const NetworkSyncForm = ({
191
206
  ouiaId="network-sync-lifecycle-environment-input"
192
207
  aria-label="cdn-lifecycle-environment-label"
193
208
  type="text"
194
- value={lifecycleEnvironmentLabel || ''}
209
+ value={upstreamLifecycleEnvironmentLabel || ''}
195
210
  isDisabled={updatingCdnConfiguration}
196
- onChange={setLifecycleEnvironmentLabel}
211
+ onChange={setUpstreamLifecycleEnvironmentLabel}
197
212
  />
198
213
  </FormGroup>
199
214
  <FormGroup
@@ -203,9 +218,9 @@ const NetworkSyncForm = ({
203
218
  ouiaId="network-sync-content-view-input"
204
219
  aria-label="cdn-content-view-label"
205
220
  type="text"
206
- value={contentViewLabel || ''}
221
+ value={upstreamContentViewLabel || ''}
207
222
  isDisabled={updatingCdnConfiguration}
208
- onChange={setContentViewLabel}
223
+ onChange={setUpstreamContentViewLabel}
209
224
  />
210
225
  </FormGroup>
211
226
  <FormGroup
@@ -215,7 +230,7 @@ const NetworkSyncForm = ({
215
230
  <FormSelect
216
231
  ouiaId="network-sync-ca-content-credential-input"
217
232
  aria-label="cdn-ssl-ca-content-credential"
218
- value={sslCaCredentialId || ''}
233
+ value={sslCaCredentialValue || ''}
219
234
  isDisabled={updatingCdnConfiguration}
220
235
  onChange={value => setSslCaCredentialId(value)}
221
236
  >
@@ -231,7 +246,7 @@ const NetworkSyncForm = ({
231
246
  aria-label="update-upstream-configuration"
232
247
  variant="secondary"
233
248
  onClick={performUpdate}
234
- isDisabled={updatingCdnConfiguration || !validated || !updateEnabled}
249
+ isDisabled={disableUpdate()}
235
250
  isLoading={updatingCdnConfiguration}
236
251
  >
237
252
  {__('Update')}
@@ -243,7 +258,7 @@ const NetworkSyncForm = ({
243
258
  };
244
259
 
245
260
  NetworkSyncForm.propTypes = {
246
- showUpdate: PropTypes.bool.isRequired,
261
+ typeChangeInProgress: PropTypes.bool.isRequired,
247
262
  contentCredentials: PropTypes.arrayOf(PropTypes.shape({
248
263
  id: PropTypes.number,
249
264
  name: PropTypes.string,
@@ -4,7 +4,7 @@ import { renderWithRedux, fireEvent } from 'react-testing-lib-wrapper';
4
4
  import CdnTypeForm from '../CdnTypeForm';
5
5
  import { nockInstance, assertNockRequest } from '../../../../../test-utils/nockWrapper';
6
6
  import { updateCdnConfigurationSuccessResponse } from '../../../../Organizations/__tests__/organizations.fixtures';
7
- import { CDN, CDN_URL } from '../CdnConfigurationConstants';
7
+ import { CDN } from '../CdnConfigurationConstants';
8
8
 
9
9
  import api from '../../../../../services/api';
10
10
 
@@ -24,44 +24,19 @@ const initialState = {
24
24
 
25
25
  test('Can update to cdn type', async (done) => {
26
26
  const { getByLabelText } = renderWithRedux(<CdnTypeForm
27
- showUpdate
28
- url={CDN_URL}
27
+ typeChangeInProgress
29
28
  />, { initialState });
30
29
 
31
30
  const updateCdnConfigurationRequest = nockInstance
32
31
  .put(updateCdnConfigurationPath, {
33
- url: CDN_URL,
34
32
  type: CDN,
35
33
  })
36
34
  .reply(200, updateCdnConfigurationSuccessResponse);
37
35
 
38
36
  expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'false');
37
+ expect(getByLabelText('redhat-cdn-url')).toHaveAttribute('disabled');
39
38
 
40
39
  const updateButton = getByLabelText(updateButtonName);
41
40
  fireEvent.click(updateButton);
42
41
  assertNockRequest(updateCdnConfigurationRequest, done);
43
42
  });
44
-
45
- test('Can update the cdn url', async (done) => {
46
- const { getByLabelText } = renderWithRedux(<CdnTypeForm
47
- showUpdate={false}
48
- url={CDN_URL}
49
- />, { initialState });
50
-
51
- const updateCdnConfigurationRequest = nockInstance
52
- .put(updateCdnConfigurationPath, {
53
- url: 'http://cdn.example.com',
54
- type: CDN,
55
- })
56
- .reply(200, updateCdnConfigurationSuccessResponse);
57
-
58
- expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'true');
59
-
60
- const url = getByLabelText('cdn-url');
61
- fireEvent.change(url, { target: { value: 'http://cdn.example.com' } });
62
-
63
- const updateButton = getByLabelText(updateButtonName);
64
- expect(updateButton).toHaveAttribute('aria-disabled', 'false');
65
- fireEvent.click(updateButton);
66
- assertNockRequest(updateCdnConfigurationRequest, done);
67
- });
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import { cleanup } from '@testing-library/react';
3
+ import { renderWithRedux, fireEvent } from 'react-testing-lib-wrapper';
4
+ import userEvent from '@testing-library/user-event';
5
+ import CustomCdnTypeForm from '../CustomCdnTypeForm';
6
+ import { nockInstance, assertNockRequest } from '../../../../../test-utils/nockWrapper';
7
+ import { updateCdnConfigurationSuccessResponse } from '../../../../Organizations/__tests__/organizations.fixtures';
8
+ import { CUSTOM_CDN } from '../CdnConfigurationConstants';
9
+
10
+ import api from '../../../../../services/api';
11
+
12
+ afterEach(cleanup);
13
+ const updateCdnConfigurationPath = api.getApiUrl('/organizations/1/cdn_configuration');
14
+
15
+ const updateButtonName = 'update-custom-cdn-configuration';
16
+ const organization = {
17
+ id: 1,
18
+ };
19
+
20
+ const initialState = {
21
+ katello: {
22
+ organization,
23
+ },
24
+ };
25
+
26
+ const cdnConfiguration = {
27
+ url: 'http://currentcdn.example.com',
28
+ ssl_ca_credential_id: 2,
29
+ type: CUSTOM_CDN,
30
+ };
31
+
32
+ const contentCredentials = [
33
+ {
34
+ name: 'Credential1',
35
+ id: 1,
36
+ },
37
+ {
38
+ name: 'Credential2',
39
+ id: 2,
40
+ },
41
+ ];
42
+
43
+ test('Can update the custom cdn server configuration', async (done) => {
44
+ const { getByLabelText } = renderWithRedux(<CustomCdnTypeForm
45
+ typeChangeInProgress
46
+ cdnConfiguration={cdnConfiguration}
47
+ contentCredentials={contentCredentials}
48
+ />, { initialState });
49
+
50
+ const updateCdnConfigurationRequest = nockInstance
51
+ .put(updateCdnConfigurationPath, {
52
+ url: 'http://cdn.example.com',
53
+ ssl_ca_credential_id: '1',
54
+ type: CUSTOM_CDN,
55
+ })
56
+ .reply(200, updateCdnConfigurationSuccessResponse);
57
+
58
+ const url = getByLabelText('cdn-url');
59
+ fireEvent.change(url, { target: { value: 'http://cdn.example.com' } });
60
+
61
+ userEvent.selectOptions(
62
+ getByLabelText('cdn-ssl-ca-content-credential'),
63
+ '1',
64
+ );
65
+
66
+ const updateButton = getByLabelText(updateButtonName);
67
+ fireEvent.click(updateButton);
68
+
69
+ assertNockRequest(updateCdnConfigurationRequest, done);
70
+ });
71
+
72
+ test('the form shall reflect the given cdnConfiguration', () => {
73
+ const { getAllByTestId } = renderWithRedux(<CustomCdnTypeForm
74
+ typeChangeInProgress
75
+ cdnConfiguration={cdnConfiguration}
76
+ contentCredentials={contentCredentials}
77
+ />, { initialState });
78
+
79
+ const options = getAllByTestId('ssl-ca-content-credential-option');
80
+
81
+ expect(options).toHaveLength(contentCredentials.length);
82
+ expect(options[0].selected).toBeFalsy();
83
+ expect(options[1].selected).toBeTruthy();
84
+ });
85
+
86
+ test('update button disabled on incomplete information', async (done) => {
87
+ const { getByLabelText } = renderWithRedux(<CustomCdnTypeForm
88
+ typeChangeInProgress
89
+ cdnConfiguration={{ ...cdnConfiguration, url: '' }}
90
+ contentCredentials={contentCredentials}
91
+ />, { initialState });
92
+
93
+ expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'true');
94
+ fireEvent.change(getByLabelText('cdn-url'), { target: { value: 'http://example.com' } });
95
+ expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'false');
96
+ done();
97
+ });
@@ -26,7 +26,7 @@ const initialState = {
26
26
 
27
27
  test('Can update to Airgapped type', async (done) => {
28
28
  const { getByLabelText } = renderWithRedux(<ExportSyncForm
29
- showUpdate
29
+ typeChangeInProgress
30
30
  />, { initialState });
31
31
 
32
32
  const updateCdnConfigurationRequest = nockInstance
@@ -48,7 +48,7 @@ const contentCredentials = [
48
48
 
49
49
  test('Can update the upstream server configuration', async (done) => {
50
50
  const { getByLabelText } = renderWithRedux(<NetworkSyncForm
51
- showUpdate
51
+ typeChangeInProgress
52
52
  cdnConfiguration={cdnConfiguration}
53
53
  contentCredentials={contentCredentials}
54
54
  />, { initialState });
@@ -93,7 +93,7 @@ test('Can update the upstream server configuration', async (done) => {
93
93
 
94
94
  test('the form shall reflect the given cdnConfiguration', () => {
95
95
  const { getAllByTestId, getByLabelText } = renderWithRedux(<NetworkSyncForm
96
- showUpdate
96
+ typeChangeInProgress
97
97
  cdnConfiguration={cdnConfiguration}
98
98
  contentCredentials={contentCredentials}
99
99
  />, { initialState });
@@ -110,7 +110,7 @@ test('the form shall reflect the given cdnConfiguration', () => {
110
110
 
111
111
  test('resetting the password enables/disables appropriately', async (done) => {
112
112
  const { getByLabelText } = renderWithRedux(<NetworkSyncForm
113
- showUpdate
113
+ typeChangeInProgress
114
114
  cdnConfiguration={{ ...cdnConfiguration, password_exists: true }}
115
115
  />, { initialState });
116
116
 
@@ -131,7 +131,7 @@ test('resetting the password enables/disables appropriately', async (done) => {
131
131
 
132
132
  test('update button disabled on incomplete information', async (done) => {
133
133
  const { getByLabelText } = renderWithRedux(<NetworkSyncForm
134
- showUpdate
134
+ typeChangeInProgress
135
135
  cdnConfiguration={{ ...cdnConfiguration, password_exists: true }}
136
136
  contentCredentials={contentCredentials}
137
137
  />, { initialState });
@@ -9,9 +9,9 @@ import { noop } from 'foremanReact/common/helpers';
9
9
  import CdnTypeForm from './CdnTypeForm';
10
10
  import ExportSyncForm from './ExportSyncForm';
11
11
  import NetworkSyncForm from './NetworkSyncForm';
12
-
12
+ import CustomCdnTypeForm from './CustomCdnTypeForm';
13
13
  import './CdnConfigurationForm.scss';
14
- import { CDN_URL, CDN, EXPORT_SYNC, NETWORK_SYNC, CDN_CONFIGURATION_TYPES } from './CdnConfigurationConstants';
14
+ import { CDN, EXPORT_SYNC, CUSTOM_CDN, NETWORK_SYNC, CDN_CONFIGURATION_TYPES } from './CdnConfigurationConstants';
15
15
 
16
16
  const CdnConfigurationForm = (props) => {
17
17
  const {
@@ -28,20 +28,25 @@ const CdnConfigurationForm = (props) => {
28
28
  }
29
29
  };
30
30
 
31
- const cdnUrl = type !== cdnConfiguration.type ? CDN_URL : cdnConfiguration.url;
32
-
33
31
  return (
34
32
  <div id="cdn-configuration">
35
33
  <ToggleGroup aria-label="Default with multiple selectable">
36
34
  <ToggleGroupItem text={CDN_CONFIGURATION_TYPES[CDN]} key={0} buttonId="cdn" isSelected={type === CDN} onChange={() => updateType(CDN)} />
37
35
  <ToggleGroupItem
38
- text={CDN_CONFIGURATION_TYPES[NETWORK_SYNC]}
36
+ text={CDN_CONFIGURATION_TYPES[CUSTOM_CDN]}
39
37
  key={1}
38
+ buttonId="customCdn"
39
+ isSelected={type === CUSTOM_CDN}
40
+ onChange={() => updateType(CUSTOM_CDN)}
41
+ />
42
+ <ToggleGroupItem
43
+ text={CDN_CONFIGURATION_TYPES[NETWORK_SYNC]}
44
+ key={2}
40
45
  buttonId="usptream_server"
41
46
  isSelected={type === NETWORK_SYNC}
42
47
  onChange={() => updateType(NETWORK_SYNC)}
43
48
  />
44
- <ToggleGroupItem text={CDN_CONFIGURATION_TYPES[EXPORT_SYNC]} key={2} buttonId="airgapped" isSelected={type === EXPORT_SYNC} onChange={() => updateType(EXPORT_SYNC)} />
49
+ <ToggleGroupItem text={CDN_CONFIGURATION_TYPES[EXPORT_SYNC]} key={3} buttonId="airgapped" isSelected={type === EXPORT_SYNC} onChange={() => updateType(EXPORT_SYNC)} />
45
50
  </ToggleGroup>
46
51
 
47
52
  { type === NETWORK_SYNC &&
@@ -49,20 +54,28 @@ const CdnConfigurationForm = (props) => {
49
54
  cdnConfiguration={cdnConfiguration}
50
55
  contentCredentials={contentCredentials}
51
56
  onUpdate={onUpdate}
52
- showUpdate={type !== cdnConfiguration.type}
57
+ typeChangeInProgress={type !== cdnConfiguration.type}
53
58
  />
54
59
  }
55
60
 
56
61
  { type === CDN &&
57
62
  <CdnTypeForm
58
- showUpdate={type !== cdnConfiguration.type}
63
+ typeChangeInProgress={type !== cdnConfiguration.type}
59
64
  onUpdate={onUpdate}
60
- url={cdnUrl}
61
65
  />
62
66
  }
67
+ { type === CUSTOM_CDN &&
68
+ <CustomCdnTypeForm
69
+ cdnConfiguration={cdnConfiguration}
70
+ contentCredentials={contentCredentials}
71
+ typeChangeInProgress={type !== cdnConfiguration.type}
72
+ onUpdate={onUpdate}
73
+ />
74
+ }
75
+
63
76
  { type === EXPORT_SYNC &&
64
77
  <ExportSyncForm
65
- showUpdate={type !== cdnConfiguration.type}
78
+ typeChangeInProgress={type !== cdnConfiguration.type}
66
79
  onUpdate={onUpdate}
67
80
  />
68
81
  }
@@ -138,7 +138,7 @@ class ManageManifestModal extends Component {
138
138
  <hr />
139
139
  <Row>
140
140
  <Col sm={5}>
141
- <strong>{__('Subscription Allocation')}</strong>
141
+ <strong>{__('Manifest')}</strong>
142
142
  </Col>
143
143
  <Col sm={7}>
144
144
  {getManifestName()}
@@ -37,7 +37,8 @@ export const SUBSCRIPTIONS_CLOSE_DELETE_MODAL = 'SUBSCRIPTIONS_CLOSE_DELETE_MODA
37
37
  export const SUBSCRIPTIONS_DISABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_DISABLE_DELETE_BUTTON';
38
38
  export const SUBSCRIPTIONS_ENABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_ENABLE_DELETE_BUTTON';
39
39
 
40
- export const SUBSCRIPTION_WATCH_URL = 'https://access.redhat.com/articles/subscription-watch';
40
+ export const SUBSCRIPTIONS_SERVICE_DOC_URL = 'https://access.redhat.com/documentation/en-us/subscription_central/2021/html-single/getting_started_with_the_subscriptions_service/index';
41
+ export const SUBSCRIPTIONS_SERVICE_URL = 'https://console.redhat.com/subscriptions';
41
42
  export const SCA_URL = 'https://access.redhat.com/articles/simple-content-access';
42
43
 
43
44
  export const MANIFEST_DELETE_TASK_LABEL = 'Actions::Katello::Organization::ManifestDelete';
@@ -16,7 +16,7 @@ import { filterRHSubscriptions } from './SubscriptionHelpers';
16
16
  import api, { orgId } from '../../services/api';
17
17
 
18
18
  import { createSubscriptionParams } from './SubscriptionActions.js';
19
- import { SUBSCRIPTION_TABLE_NAME, SUBSCRIPTION_WATCH_URL, SCA_URL } from './SubscriptionConstants';
19
+ import { SUBSCRIPTION_TABLE_NAME, SUBSCRIPTIONS_SERVICE_DOC_URL, SCA_URL } from './SubscriptionConstants';
20
20
  import './SubscriptionsPage.scss';
21
21
 
22
22
  class SubscriptionsPage extends Component {
@@ -102,9 +102,9 @@ class SubscriptionsPage extends Component {
102
102
  let disabledReason = null;
103
103
 
104
104
  if (!hasUpstreamConnection) {
105
- disabledReason = __('This is disabled because no connection could be made to the upstream Subscription Allocation.');
105
+ disabledReason = __('This is disabled because no connection could be made to the upstream Manifest.');
106
106
  } else if (task) {
107
- disabledReason = __('This is disabled because a manifest related task is in progress.');
107
+ disabledReason = __('This is disabled because a manifest-related task is in progress.');
108
108
  } else if (deleteButton && !disabledReason) {
109
109
  disabledReason = __('This is disabled because no subscriptions are selected.');
110
110
  } else if (!isManifestImported) {
@@ -223,14 +223,14 @@ class SubscriptionsPage extends Component {
223
223
  <FormattedMessage
224
224
  id="sca-alert"
225
225
  values={{
226
- subscriptionWatch: <a href={SUBSCRIPTION_WATCH_URL} target="_blank" rel="noreferrer">{__('Subscription Watch')}</a>,
226
+ subscriptionsService: <a href={SUBSCRIPTIONS_SERVICE_DOC_URL} target="_blank" rel="noreferrer">{__('Subscriptions service')}</a>,
227
227
  br: <br />,
228
228
  scaLink: <a href={SCA_URL} target="_blank" rel="noreferrer">{__('Simple Content Access')}</a>,
229
229
  }}
230
230
  defaultMessage={simpleContentAccess ? __(`This organization has Simple Content Access enabled.
231
231
  Hosts are not required to have subscriptions attached to access repositories.
232
232
  {br}
233
- Learn more about your overall subscription usage at {subscriptionWatch}.`) : __('This organization is not using {scaLink}. Legacy subscription management is deprecated and will be removed in a future version.')}
233
+ Learn more about your overall subscription usage with the {subscriptionsService}.`) : __('This organization is not using {scaLink}. Legacy subscription management is deprecated and will be removed in a future version.')}
234
234
  />
235
235
  </Alert>
236
236
  );
@@ -181,9 +181,9 @@ class UpstreamSubscriptionsPage extends Component {
181
181
  };
182
182
 
183
183
  const emptyStateData = () => ({
184
- header: __('There are no Subscription Allocations to display'),
185
- description: __('Subscription Allocations allow you to export subscriptions from the Red Hat Customer Portal to ' +
186
- 'an on-premise subscription management application such as Red Hat Satellite.'),
184
+ header: __('There are no Manifests to display'),
185
+ description: __('Manifests allow you to find, access, synchronize, and download content ' +
186
+ 'from upstream Red Hat repositories for use in Red Hat Satellite.'),
187
187
  action: {
188
188
  title: __('Import a Manifest to Begin'),
189
189
  url: '/subscriptions',
@@ -131,8 +131,8 @@ exports[`upstream subscriptions page should render 1`] = `
131
131
  "title": "Import a Manifest to Begin",
132
132
  "url": "/subscriptions",
133
133
  },
134
- "description": "Subscription Allocations allow you to export subscriptions from the Red Hat Customer Portal to an on-premise subscription management application such as Red Hat Satellite.",
135
- "header": "There are no Subscription Allocations to display",
134
+ "description": "Manifests allow you to find, access, synchronize, and download content from upstream Red Hat repositories for use in Red Hat Satellite.",
135
+ "header": "There are no Manifests to display",
136
136
  }
137
137
  }
138
138
  itemCount={2}
@@ -40,9 +40,9 @@ exports[`subscriptions page should render 1`] = `
40
40
  canManageSubscriptionAllocations={false}
41
41
  disableAddButton={true}
42
42
  disableDeleteButton={true}
43
- disableDeleteReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
43
+ disableDeleteReason="This is disabled because no connection could be made to the upstream Manifest."
44
44
  disableManifestActions={true}
45
- disableManifestReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
45
+ disableManifestReason="This is disabled because no connection could be made to the upstream Manifest."
46
46
  getAutoCompleteParams={[Function]}
47
47
  isManifestImported={false}
48
48
  onDeleteButtonClick={[Function]}
@@ -58,7 +58,7 @@ exports[`subscriptions page should render 1`] = `
58
58
  canImportManifest={false}
59
59
  delete={[Function]}
60
60
  disableManifestActions={true}
61
- disabledReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
61
+ disabledReason="This is disabled because no connection could be made to the upstream Manifest."
62
62
  refresh={[Function]}
63
63
  taskInProgress={false}
64
64
  upload={[Function]}
@@ -4,7 +4,7 @@ import { Row, Col, Form, FormGroup, Button } from 'patternfly-react';
4
4
  import { LinkContainer } from 'react-router-bootstrap';
5
5
  import { noop } from 'foremanReact/common/helpers';
6
6
  import { translate as __ } from 'foremanReact/common/I18n';
7
- import { SUBSCRIPTION_WATCH_URL } from '../../SubscriptionConstants';
7
+ import { SUBSCRIPTIONS_SERVICE_URL } from '../../SubscriptionConstants';
8
8
 
9
9
  import Search from '../../../../components/Search/index';
10
10
  import TooltipButton from '../../../../components/TooltipButton';
@@ -61,12 +61,12 @@ const SubscriptionsToolbar = ({
61
61
 
62
62
  {isManifestImported &&
63
63
  <a
64
- href={SUBSCRIPTION_WATCH_URL}
64
+ href={SUBSCRIPTIONS_SERVICE_URL}
65
65
  className="btn btn-default"
66
66
  target="_blank"
67
67
  rel="noreferrer"
68
68
  >
69
- {__('Subscription Watch')}
69
+ {__('View Subscription Usage')}
70
70
  </a>
71
71
  }
72
72
 
@@ -33,17 +33,24 @@ const rexJobLink = id => link({
33
33
  baseUrl: 'job_invocations',
34
34
  });
35
35
 
36
- export const renderTaskStartedToast = (task) => {
36
+ export const renderTaskStartedToast = (task, override = '') => {
37
37
  if (!task) return;
38
38
 
39
39
  const message = (__(`Task ${task.humanized.action} has started.`));
40
40
 
41
- window.tfm.toastNotifications.notify({
42
- message,
43
- type: 'info',
44
- link: foremanTasksLink(task.id),
45
-
46
- });
41
+ if (override) {
42
+ window.tfm.toastNotifications.notify({
43
+ message: override,
44
+ type: 'info',
45
+ link: foremanTasksLink(task.id),
46
+ });
47
+ } else {
48
+ window.tfm.toastNotifications.notify({
49
+ message,
50
+ type: 'info',
51
+ link: foremanTasksLink(task.id),
52
+ });
53
+ }
47
54
  };
48
55
 
49
56
  export const renderRexJobStartedToast = ({ id, description, key }) => {