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,5 @@
1
1
  import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
2
3
  import useDeepCompareEffect from 'use-deep-compare-effect';
3
4
  import { useDispatch, useSelector } from 'react-redux';
4
5
  import { useParams } from 'react-router-dom';
@@ -18,13 +19,15 @@ import {
18
19
  TextListItem,
19
20
  TextListItemVariants,
20
21
  TextListVariants,
22
+ Flex,
23
+ FlexItem,
21
24
  } from '@patternfly/react-core';
22
25
  import { PencilAltIcon } from '@patternfly/react-icons';
23
26
  import { STATUS } from 'foremanReact/constants';
24
27
  import { urlBuilder } from 'foremanReact/common/urlHelpers';
25
28
  import { translate as __ } from 'foremanReact/common/I18n';
26
29
  import { getACSDetails } from '../ACSActions';
27
- import { selectACSDetails, selectACSDetailsStatus } from '../ACSSelectors';
30
+ import { selectACSDetails, selectACSDetailsError, selectACSDetailsStatus } from '../ACSSelectors';
28
31
  import Loading from '../../../components/Loading';
29
32
  import InactiveText from '../../ContentViews/components/InactiveText';
30
33
  import ACSEditDetails from './EditModals/ACSEditDetails';
@@ -32,12 +35,17 @@ import ACSEditURLPaths from './EditModals/ACSEditURLPaths';
32
35
  import ACSEditSmartProxies from './EditModals/ACSEditSmartProxies';
33
36
  import ACSEditCredentials from './EditModals/ACSEditCredentials';
34
37
  import ACSEditProducts from './EditModals/ACSEditProducts';
38
+ import EmptyStateMessage from '../../../components/Table/EmptyStateMessage';
39
+ import '../Acs.scss';
40
+ import { hasPermission } from '../../ContentViews/helpers';
41
+ import { HelpToolTip } from '../../ContentViews/Create/ContentViewFormComponents';
35
42
 
36
- const ACSExpandableDetails = () => {
43
+ const ACSExpandableDetails = ({ expandedId }) => {
37
44
  const { id } = useParams();
38
- const acsId = Number(id);
45
+ const acsId = Number(expandedId) || Number(id);
39
46
  const details = useSelector(state => selectACSDetails(state, acsId));
40
47
  const status = useSelector(state => selectACSDetailsStatus(state, acsId));
48
+ const error = useSelector(state => selectACSDetailsError(state, acsId));
41
49
  const dispatch = useDispatch();
42
50
  const [showDetails, setShowDetails] = useState(true);
43
51
  const [showSmartProxies, setShowSmartProxies] = useState(false);
@@ -56,7 +64,7 @@ const ACSExpandableDetails = () => {
56
64
  }
57
65
  }, [acsId, details, dispatch]);
58
66
 
59
- if (status === STATUS.PENDING) return <Loading />;
67
+ if (status === STATUS.PENDING) return <Loading skeleton />;
60
68
 
61
69
  const {
62
70
  name,
@@ -66,17 +74,23 @@ const ACSExpandableDetails = () => {
66
74
  description,
67
75
  base_url: url,
68
76
  smart_proxies: smartProxies,
77
+ use_http_proxies: useHttpProxies,
69
78
  verify_ssl: verifySsl,
70
79
  ssl_ca_cert: sslCaCert,
71
80
  ssl_client_cert: sslClientCert,
72
81
  ssl_client_key: sslClientKey,
73
82
  upstream_username: username,
74
83
  products,
84
+ permissions,
75
85
  } = details;
86
+ if (error) {
87
+ return <EmptyStateMessage error={error} />;
88
+ }
89
+ const canEdit = hasPermission(permissions, 'edit_alternate_content_sources');
76
90
  return (
77
91
  <>
78
92
  <Stack>
79
- <StackItem>
93
+ <StackItem className="primary-detail-stack-items-border">
80
94
  <Split>
81
95
  <SplitItem isFilled>
82
96
  <ExpandableSectionToggle
@@ -90,9 +104,10 @@ const ACSExpandableDetails = () => {
90
104
  }}
91
105
  contentId="showDetails"
92
106
  >
93
- {showDetails ? __('Hide details') : __('Show details')}
107
+ {__('Details')}
94
108
  </ExpandableSectionToggle>
95
109
  </SplitItem>
110
+ {canEdit &&
96
111
  <SplitItem>
97
112
  <Button
98
113
  ouiaId="edit-details-pencil-edit"
@@ -101,18 +116,19 @@ const ACSExpandableDetails = () => {
101
116
  isSmall
102
117
  icon={<PencilAltIcon />}
103
118
  onClick={() => setEditDetailsModalOpen(true)}
104
- >{__('Edit Details')}
119
+ >{__('Edit')}
105
120
  </Button>
106
121
  </SplitItem>
122
+ }
107
123
  </Split>
108
124
  </StackItem>
109
- <StackItem>
125
+ <StackItem className="primary-detail-stack-items-border">
110
126
  <ExpandableSection
111
127
  isExpanded={showDetails}
112
128
  isDetached
113
129
  contentId="showDetails"
114
130
  >
115
- <TextContent className="margin-0-24">
131
+ <TextContent className="margin-0-24 expandable-section-text">
116
132
  <TextList component={TextListVariants.dl}>
117
133
  <TextListItem component={TextListItemVariants.dt}>
118
134
  {__('Name')}
@@ -130,7 +146,7 @@ const ACSExpandableDetails = () => {
130
146
  aria-label="name_text_value"
131
147
  component={TextListItemVariants.dd}
132
148
  >
133
- {description}
149
+ {description || <InactiveText text="N/A" />}
134
150
  </TextListItem>
135
151
  <TextListItem component={TextListItemVariants.dt}>
136
152
  {__('Type')}
@@ -154,7 +170,7 @@ const ACSExpandableDetails = () => {
154
170
  </TextContent>
155
171
  </ExpandableSection>
156
172
  </StackItem>
157
- <StackItem>
173
+ <StackItem className="primary-detail-stack-items-border">
158
174
  <Split>
159
175
  <SplitItem isFilled>
160
176
  <ExpandableSectionToggle
@@ -164,12 +180,14 @@ const ACSExpandableDetails = () => {
164
180
  setShowSmartProxies(expanded);
165
181
  setShowUrlPaths(false);
166
182
  setShowCredentials(false);
183
+ setShowProducts(false);
167
184
  }}
168
185
  contentId="showSmartProxies"
169
186
  >
170
- {showSmartProxies ? 'Hide smart proxies' : 'Show smart proxies'}
187
+ {__('Smart proxies')}
171
188
  </ExpandableSectionToggle>
172
189
  </SplitItem>
190
+ {canEdit &&
173
191
  <SplitItem>
174
192
  <Button
175
193
  ouiaId="edit-smart-proxies-pencil-edit"
@@ -178,18 +196,19 @@ const ACSExpandableDetails = () => {
178
196
  isSmall
179
197
  icon={<PencilAltIcon />}
180
198
  onClick={() => setEditSmartProxiesModalOpen(true)}
181
- >{__('Edit smart proxies')}
199
+ >{__('Edit')}
182
200
  </Button>
183
201
  </SplitItem>
202
+ }
184
203
  </Split>
185
204
  </StackItem>
186
- <StackItem>
205
+ <StackItem className="primary-detail-stack-items-border">
187
206
  <ExpandableSection
188
207
  isDetached
189
208
  contentId="showSmartProxies"
190
209
  isExpanded={showSmartProxies}
191
210
  >
192
- <List className="margin-0-24" isPlain isBordered>
211
+ <List className="margin-0-24 expandable-section-text" isPlain isBordered>
193
212
  {smartProxies?.length > 0 && smartProxies.map(sp =>
194
213
  (
195
214
  <ListItem key={sp?.id} aria-label="smartproxy_value">
@@ -200,6 +219,24 @@ const ACSExpandableDetails = () => {
200
219
  <InactiveText text="N/A" />
201
220
  }
202
221
  </List>
222
+ <TextContent className="margin-0-24 expandable-section-text" style={{ marginTop: '24px' }}>
223
+ <TextList component={TextListVariants.dl}>
224
+ <TextListItem component={TextListItemVariants.dt}>
225
+ <Flex spaceItems={{ default: 'spaceItemsNone' }}>
226
+ <FlexItem aria-label="httpProxyTitle">{__('Use HTTP proxies')}</FlexItem>
227
+ <FlexItem>
228
+ <HelpToolTip tooltip={__('Alternate content sources use the HTTP proxy of their assigned smart proxy for communication.')} />
229
+ </FlexItem>
230
+ </Flex>
231
+ </TextListItem>
232
+ <TextListItem
233
+ aria-label="useHttpProxies_value"
234
+ component={TextListItemVariants.dd}
235
+ >
236
+ {useHttpProxies ? 'true' : 'false'}
237
+ </TextListItem>
238
+ </TextList>
239
+ </TextContent>
203
240
  </ExpandableSection>
204
241
  </StackItem>
205
242
  {acsType === 'simplified' &&
@@ -218,9 +255,10 @@ const ACSExpandableDetails = () => {
218
255
  isExpanded={showProducts}
219
256
  contentId="showProducts"
220
257
  >
221
- {showProducts ? 'Hide products' : 'Show products'}
258
+ {__('Products')}
222
259
  </ExpandableSectionToggle>
223
260
  </SplitItem>
261
+ {canEdit &&
224
262
  <SplitItem>
225
263
  <Button
226
264
  ouiaId="edit-products-pencil-edit"
@@ -229,9 +267,10 @@ const ACSExpandableDetails = () => {
229
267
  isSmall
230
268
  icon={<PencilAltIcon />}
231
269
  onClick={() => setEditProductsModalOpen(true)}
232
- >{__('Edit products')}
270
+ >{__('Edit')}
233
271
  </Button>
234
272
  </SplitItem>
273
+ }
235
274
  </Split>
236
275
  </StackItem>
237
276
  <StackItem>
@@ -240,7 +279,7 @@ const ACSExpandableDetails = () => {
240
279
  contentId="showProducts"
241
280
  isExpanded={showProducts}
242
281
  >
243
- <List className="margin-0-24" isPlain isBordered>
282
+ <List className="margin-0-24 expandable-section-text" isPlain isBordered>
244
283
  {products.map(product =>
245
284
  (
246
285
  <ListItem key={product?.id} aria-label="product_value">
@@ -252,9 +291,9 @@ const ACSExpandableDetails = () => {
252
291
  </StackItem>
253
292
  </>
254
293
  }
255
- {acsType === 'custom' &&
294
+ {(acsType === 'custom' || acsType === 'rhui') &&
256
295
  <>
257
- <StackItem>
296
+ <StackItem className="primary-detail-stack-items-border">
258
297
  <Split>
259
298
  <SplitItem isFilled>
260
299
  <ExpandableSectionToggle
@@ -267,9 +306,10 @@ const ACSExpandableDetails = () => {
267
306
  isExpanded={showUrlPaths}
268
307
  contentId="showUrlPaths"
269
308
  >
270
- {showUrlPaths ? 'Hide URL and subpaths' : 'Show URL and subpaths'}
309
+ {__('URL and subpaths')}
271
310
  </ExpandableSectionToggle>
272
311
  </SplitItem>
312
+ {canEdit &&
273
313
  <SplitItem>
274
314
  <Button
275
315
  ouiaId="edit-urls-pencil-edit"
@@ -278,18 +318,19 @@ const ACSExpandableDetails = () => {
278
318
  isSmall
279
319
  icon={<PencilAltIcon />}
280
320
  onClick={() => setEditUrlModalOpen(true)}
281
- >{__('Edit URL and subpaths')}
321
+ >{__('Edit')}
282
322
  </Button>
283
323
  </SplitItem>
324
+ }
284
325
  </Split>
285
326
  </StackItem>
286
- <StackItem>
327
+ <StackItem className="primary-detail-stack-items-border">
287
328
  <ExpandableSection
288
329
  contentId="showUrlPaths"
289
330
  isDetached
290
331
  isExpanded={showUrlPaths}
291
332
  >
292
- <TextContent className="margin-0-24">
333
+ <TextContent className="margin-0-24 expandable-section-text">
293
334
  <TextList component={TextListVariants.dl}>
294
335
  <TextListItem component={TextListItemVariants.dt}>
295
336
  {__('URL')}
@@ -313,7 +354,7 @@ const ACSExpandableDetails = () => {
313
354
  </TextContent>
314
355
  </ExpandableSection>
315
356
  </StackItem>
316
- <StackItem>
357
+ <StackItem className="primary-detail-stack-items-border">
317
358
  <Split>
318
359
  <SplitItem isFilled>
319
360
  <ExpandableSectionToggle
@@ -326,9 +367,10 @@ const ACSExpandableDetails = () => {
326
367
  isExpanded={showCredentials}
327
368
  contentId="showCredentials"
328
369
  >
329
- {showCredentials ? 'Hide credentials' : 'Show credentials'}
370
+ {__('Credentials')}
330
371
  </ExpandableSectionToggle>
331
372
  </SplitItem>
373
+ {canEdit &&
332
374
  <SplitItem>
333
375
  <Button
334
376
  ouiaId="edit-credentials-pencil-edit"
@@ -337,18 +379,19 @@ const ACSExpandableDetails = () => {
337
379
  isSmall
338
380
  icon={<PencilAltIcon />}
339
381
  onClick={() => setEditCredentialsModalOpen(true)}
340
- >{__('Edit credentials')}
382
+ >{__('Edit')}
341
383
  </Button>
342
384
  </SplitItem>
385
+ }
343
386
  </Split>
344
387
  </StackItem>
345
- <StackItem>
388
+ <StackItem className="primary-detail-stack-items-border">
346
389
  <ExpandableSection
347
390
  isExpanded={showCredentials}
348
391
  contentId="showCredentials"
349
392
  isDetached
350
393
  >
351
- <TextContent className="margin-0-24">
394
+ <TextContent className="margin-0-24 expandable-section-text">
352
395
  <TextList component={TextListVariants.dl}>
353
396
  <TextListItem component={TextListItemVariants.dt}>
354
397
  {__('Verify SSL')}
@@ -456,4 +499,15 @@ const ACSExpandableDetails = () => {
456
499
  );
457
500
  };
458
501
 
502
+ ACSExpandableDetails.propTypes = {
503
+ expandedId: PropTypes.oneOfType([
504
+ PropTypes.number,
505
+ PropTypes.string,
506
+ ]),
507
+ };
508
+
509
+ ACSExpandableDetails.defaultProps = {
510
+ expandedId: null,
511
+ };
512
+
459
513
  export default ACSExpandableDetails;
@@ -13,8 +13,8 @@ import {
13
13
  Modal,
14
14
  ModalVariant,
15
15
  Radio,
16
- Switch,
17
16
  TextInput,
17
+ Switch,
18
18
  } from '@patternfly/react-core';
19
19
  import { editACS, getACSDetails } from '../../ACSActions';
20
20
  import {
@@ -27,22 +27,22 @@ import { CONTENT_CREDENTIAL_CERT_TYPE } from '../../../ContentCredentials/Conten
27
27
 
28
28
  const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
29
29
  const {
30
- verify_ssl: verifySsl,
31
30
  ssl_ca_cert: sslCACert,
32
31
  ssl_client_cert: sslClientCert,
33
32
  ssl_client_key: sslClientKey,
34
33
  upstream_username: username,
35
34
  upstream_password_exists: passwordExists,
35
+ verify_ssl: verifySsl,
36
36
  } = acsDetails;
37
37
  const dispatch = useDispatch();
38
38
  const contentCredentials = useSelector(selectContentCredentials);
39
39
  const contentCredentialsStatus = useSelector(selectContentCredentialsStatus);
40
- const [acsVerifySSL, setAcsVerifySSL] = useState(verifySsl);
41
40
  const [acsUsername, setAcsUsername] = useState(username);
42
41
  const [acsPassword, setAcsPassword] = useState(passwordExists ? '*****' : '');
43
42
  const [acsCAcert, setAcsCAcert] = useState(sslCACert?.id);
44
43
  const [acsSslClientCert, setAcsSslClientCert] = useState(sslClientCert?.id);
45
44
  const [acsSslClientKey, setAcsSslClientKey] = useState(sslClientKey?.id);
45
+ const [acsVerifySSL, setAcsVerifySSL] = useState(verifySsl);
46
46
  const getAuthenticationState = () => {
47
47
  if (username) {
48
48
  return 'manual';
@@ -64,8 +64,8 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
64
64
  const onSubmit = () => {
65
65
  setSaving(true);
66
66
  let params = {
67
- verify_ssl: acsVerifySSL,
68
67
  ssl_ca_cert_id: acsCAcert,
68
+ verify_ssl: acsVerifySSL,
69
69
  };
70
70
 
71
71
  if (authentication === 'credentials') {
@@ -117,7 +117,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
117
117
 
118
118
  return (
119
119
  <Modal
120
- title={__('Edit Alternate content source credentials')}
120
+ title={__('Edit credentials')}
121
121
  variant={ModalVariant.large}
122
122
  isOpen
123
123
  onClose={onClose}
@@ -143,6 +143,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
143
143
  >
144
144
  <FormSelect
145
145
  isRequired
146
+ isDisabled={!acsVerifySSL}
146
147
  value={acsCAcert}
147
148
  onChange={value => setAcsCAcert(value)}
148
149
  aria-label="sslCAcert_select"
@@ -310,7 +311,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
310
311
  isLoading={saving}
311
312
  type="submit"
312
313
  >
313
- {__('Save')}
314
+ {__('Edit')}
314
315
  </Button>
315
316
  <Button ouiaId="edit-acs-details-cancel" variant="link" onClick={onClose}>
316
317
  {__('Cancel')}
@@ -328,12 +329,12 @@ ACSEditCredentials.propTypes = {
328
329
  name: PropTypes.string,
329
330
  description: PropTypes.string,
330
331
  id: PropTypes.number,
331
- verify_ssl: PropTypes.bool,
332
332
  ssl_ca_cert: PropTypes.shape({ id: PropTypes.number }),
333
333
  ssl_client_cert: PropTypes.shape({ id: PropTypes.number }),
334
334
  ssl_client_key: PropTypes.shape({ id: PropTypes.number }),
335
335
  upstream_username: PropTypes.string,
336
336
  upstream_password_exists: PropTypes.bool,
337
+ verify_ssl: PropTypes.bool,
337
338
  }),
338
339
  };
339
340
 
@@ -342,12 +343,12 @@ ACSEditCredentials.defaultProps = {
342
343
  name: '',
343
344
  description: '',
344
345
  id: undefined,
345
- verify_ssl: false,
346
346
  ssl_ca_cert: { id: undefined },
347
347
  ssl_client_cert: { id: undefined },
348
348
  ssl_client_key: { id: undefined },
349
349
  upstream_username: undefined,
350
350
  upstream_password_exists: false,
351
+ verify_ssl: false,
351
352
  },
352
353
  };
353
354
 
@@ -29,7 +29,7 @@ const ACSEditDetails = ({ onClose, acsId, acsDetails }) => {
29
29
 
30
30
  return (
31
31
  <Modal
32
- title={__('Edit Alternate content source details')}
32
+ title={__('Edit details')}
33
33
  variant={ModalVariant.small}
34
34
  isOpen
35
35
  onClose={onClose}
@@ -76,7 +76,7 @@ const ACSEditDetails = ({ onClose, acsId, acsDetails }) => {
76
76
  isLoading={saving}
77
77
  type="submit"
78
78
  >
79
- {__('Edit ACS details')}
79
+ {__('Edit')}
80
80
  </Button>
81
81
  <Button ouiaId="edit-acs-details-cancel" variant="link" onClick={onClose}>
82
82
  {__('Cancel')}
@@ -64,7 +64,7 @@ const ACSEditProducts = ({ onClose, acsId, acsDetails }) => {
64
64
 
65
65
  return (
66
66
  <Modal
67
- title={__('Edit Alternate content source products')}
67
+ title={__('Edit products')}
68
68
  variant={ModalVariant.small}
69
69
  isOpen
70
70
  onClose={onClose}
@@ -94,7 +94,7 @@ const ACSEditProducts = ({ onClose, acsId, acsDetails }) => {
94
94
  isLoading={saving}
95
95
  type="submit"
96
96
  >
97
- {__('Edit ACS products')}
97
+ {__('Edit')}
98
98
  </Button>
99
99
  <Button ouiaId="edit-acs-smart-proxies-cancel" variant="link" onClick={onClose}>
100
100
  {__('Cancel')}
@@ -4,15 +4,28 @@ import PropTypes from 'prop-types';
4
4
  import useDeepCompareEffect from 'use-deep-compare-effect';
5
5
  import { translate as __ } from 'foremanReact/common/I18n';
6
6
  import { STATUS } from 'foremanReact/constants';
7
- import { ActionGroup, Button, DualListSelector, Form, Modal, ModalVariant } from '@patternfly/react-core';
7
+ import {
8
+ ActionGroup,
9
+ Button,
10
+ DualListSelector,
11
+ Form,
12
+ FormGroup,
13
+ Modal,
14
+ ModalVariant,
15
+ Switch,
16
+ Flex,
17
+ FlexItem,
18
+ } from '@patternfly/react-core';
8
19
  import { editACS, getACSDetails } from '../../ACSActions';
9
20
  import { selectSmartProxy, selectSmartProxyStatus } from '../../../SmartProxy/SmartProxyContentSelectors';
10
21
  import { getSmartProxies } from '../../../SmartProxy/SmartProxyContentActions';
11
22
  import Loading from '../../../../components/Loading';
23
+ import { HelpToolTip } from '../../../ContentViews/Create/ContentViewFormComponents';
12
24
 
13
25
  const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
14
- const { smart_proxies: smartProxies } = acsDetails;
26
+ const { smart_proxies: smartProxies, use_http_proxies: useHttpProxies } = acsDetails;
15
27
  const dispatch = useDispatch();
28
+ const [acsUseHttpProxies, setAcsUseHttpProxies] = useState(useHttpProxies);
16
29
  const [saving, setSaving] = useState(false);
17
30
  const [
18
31
  acsSmartProxies, setAcsSmartProxies,
@@ -45,7 +58,7 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
45
58
  setSaving(true);
46
59
  dispatch(editACS(
47
60
  acsId,
48
- { acsId, smart_proxy_names: acsSmartProxies },
61
+ { acsId, smart_proxy_names: acsSmartProxies, use_http_proxies: acsUseHttpProxies },
49
62
  () => {
50
63
  dispatch(getACSDetails(acsId));
51
64
  onClose();
@@ -62,8 +75,8 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
62
75
 
63
76
  return (
64
77
  <Modal
65
- title={__('Edit Alternate content source details')}
66
- variant={ModalVariant.small}
78
+ title={__('Edit smart proxies')}
79
+ variant={ModalVariant.medium}
67
80
  isOpen
68
81
  onClose={onClose}
69
82
  appendTo={document.body}
@@ -83,6 +96,24 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
83
96
  removeSelected={onListChange}
84
97
  id="selector"
85
98
  />
99
+ <FormGroup
100
+ label={
101
+ <Flex spaceItems={{ default: 'spaceItemsNone' }}>
102
+ <FlexItem>{__('Use HTTP proxies')}</FlexItem>
103
+ <FlexItem>
104
+ <HelpToolTip tooltip={__('Alternate content sources use the HTTP proxy of their assigned smart proxy for communication.')} />
105
+ </FlexItem>
106
+ </Flex>
107
+ }
108
+ fieldId="use_http_proxies"
109
+ >
110
+ <Switch
111
+ id="use-http-proxies-switch"
112
+ aria-label="use-http-proxies-switch"
113
+ isChecked={acsUseHttpProxies}
114
+ onChange={checked => setAcsUseHttpProxies(checked)}
115
+ />
116
+ </FormGroup>
86
117
  <ActionGroup>
87
118
  <Button
88
119
  ouiaId="edit-acs-details-submit"
@@ -92,7 +123,7 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
92
123
  isLoading={saving}
93
124
  type="submit"
94
125
  >
95
- {__('Edit ACS smart proxies')}
126
+ {__('Edit')}
96
127
  </Button>
97
128
  <Button ouiaId="edit-acs-smart-proxies-cancel" variant="link" onClick={onClose}>
98
129
  {__('Cancel')}
@@ -108,11 +139,12 @@ ACSEditSmartProxies.propTypes = {
108
139
  onClose: PropTypes.func.isRequired,
109
140
  acsDetails: PropTypes.shape({
110
141
  smart_proxies: PropTypes.arrayOf(PropTypes.shape({})),
142
+ use_http_proxies: PropTypes.bool,
111
143
  }),
112
144
  };
113
145
 
114
146
  ACSEditSmartProxies.defaultProps = {
115
- acsDetails: { smart_proxies: [], id: undefined },
147
+ acsDetails: { smart_proxies: [], id: undefined, use_http_proxies: false },
116
148
  };
117
149
 
118
150
  export default ACSEditSmartProxies;
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import { translate as __ } from 'foremanReact/common/I18n';
5
5
  import { ActionGroup, Button, Form, FormGroup, Modal, ModalVariant, TextArea, TextInput } from '@patternfly/react-core';
6
6
  import { editACS, getACSDetails } from '../../ACSActions';
7
+ import { areSubPathsValid, isValidUrl } from '../../helpers';
7
8
 
8
9
  const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
9
10
  const { subpaths, base_url: url } = acsDetails;
@@ -11,10 +12,15 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
11
12
  const [acsUrl, setAcsUrl] = useState(url);
12
13
  const [acsSubpath, setAcsSubpath] = useState(subpaths.join() || '');
13
14
  const [saving, setSaving] = useState(false);
15
+ const subPathValidated = areSubPathsValid(acsSubpath) ? 'default' : 'error';
16
+ const urlValidated = (acsUrl === '' || isValidUrl(acsUrl)) ? 'default' : 'error';
14
17
 
15
18
  const onSubmit = () => {
16
19
  setSaving(true);
17
- let params = { id: acsId, base_url: acsUrl };
20
+ let params = {
21
+ id: acsId,
22
+ base_url: acsUrl,
23
+ };
18
24
  if (acsSubpath !== '') {
19
25
  params = { subpaths: acsSubpath.split(','), ...params };
20
26
  } else {
@@ -35,7 +41,7 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
35
41
 
36
42
  return (
37
43
  <Modal
38
- title={__('Edit Alternate content source URL and subpaths')}
44
+ title={__('Edit URL and subpaths')}
39
45
  variant={ModalVariant.small}
40
46
  isOpen
41
47
  onClose={onClose}
@@ -50,6 +56,8 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
50
56
  label={__('Base URL')}
51
57
  type="string"
52
58
  fieldId="acs_base_url"
59
+ helperTextInvalid="http://, https:// or file://"
60
+ validated={urlValidated}
53
61
  isRequired
54
62
  >
55
63
  <TextInput
@@ -60,22 +68,22 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
60
68
  aria-label="acs_base_url_field"
61
69
  placeholder="https:// or file://"
62
70
  value={acsUrl}
63
- onChange={(value) => {
64
- setAcsUrl(value);
65
- }}
71
+ validated={urlValidated}
72
+ onChange={value => setAcsUrl(value)}
66
73
  />
67
74
  </FormGroup>
68
75
  <FormGroup
69
76
  label={__('Subpaths')}
70
77
  type="string"
71
78
  fieldId="acs_subpaths"
79
+ helperTextInvalid={__('Comma-separated list of subpaths. All subpaths must have a slash at the end and none at the front.')}
80
+ validated={subPathValidated}
72
81
  >
73
82
  <TextArea
74
83
  placeholder="test/repo1/, test/repo2/,"
75
84
  value={acsSubpath}
76
- onChange={(value) => {
77
- setAcsSubpath(value);
78
- }}
85
+ validated={subPathValidated}
86
+ onChange={value => setAcsSubpath(value)}
79
87
  name="acs_subpath_field"
80
88
  id="acs_subpath_field"
81
89
  aria-label="acs_subpath_field"
@@ -86,11 +94,15 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
86
94
  ouiaId="edit-acs-url-submit"
87
95
  aria-label="edit_acs_url"
88
96
  variant="primary"
89
- isDisabled={saving || acsUrl.length === 0}
97
+ isDisabled={saving ||
98
+ acsUrl.length === 0 ||
99
+ subPathValidated === 'error' ||
100
+ urlValidated === 'error'
101
+ }
90
102
  isLoading={saving}
91
103
  type="submit"
92
104
  >
93
- {__('Edit ACS')}
105
+ {__('Edit')}
94
106
  </Button>
95
107
  <Button ouiaId="edit-acs-url-cancel" variant="link" onClick={onClose}>
96
108
  {__('Cancel')}
@@ -112,7 +124,11 @@ ACSEditURLPaths.propTypes = {
112
124
  };
113
125
 
114
126
  ACSEditURLPaths.defaultProps = {
115
- acsDetails: { base_url: '', subpaths: '', id: undefined },
127
+ acsDetails: {
128
+ base_url: '',
129
+ subpaths: '',
130
+ id: undefined,
131
+ },
116
132
  };
117
133
 
118
134
  export default ACSEditURLPaths;