katello 4.7.3 → 4.8.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/controllers/katello/api/registry/registry_proxies_controller.rb +6 -4
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -12
  4. data/app/controllers/katello/api/v2/capsule_content_controller.rb +0 -4
  5. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +22 -81
  6. data/app/controllers/katello/api/v2/content_exports_controller.rb +11 -80
  7. data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
  8. data/app/controllers/katello/api/v2/exports_controller.rb +130 -0
  9. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +7 -8
  10. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +8 -4
  11. data/app/controllers/katello/api/v2/organizations_controller.rb +3 -0
  12. data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -52
  13. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -6
  14. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -2
  15. data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +4 -1
  16. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +24 -0
  17. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +3 -3
  18. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +55 -24
  19. data/app/helpers/katello/katello_urls_helper.rb +0 -15
  20. data/app/helpers/katello/sync_management_helper.rb +0 -4
  21. data/app/lib/actions/candlepin/owner/destroy_imports.rb +1 -1
  22. data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
  23. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
  24. data/app/lib/actions/katello/content_view/publish.rb +6 -2
  25. data/app/lib/actions/katello/content_view/remove.rb +8 -2
  26. data/app/lib/actions/katello/content_view_version/destroy.rb +1 -1
  27. data/app/lib/actions/katello/environment/destroy.rb +8 -2
  28. data/app/lib/actions/katello/host/reassign.rb +4 -2
  29. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +0 -1
  30. data/app/lib/actions/katello/product/destroy.rb +2 -1
  31. data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -10
  32. data/app/lib/actions/katello/repository/import_upload.rb +0 -1
  33. data/app/lib/actions/katello/repository/sync.rb +0 -1
  34. data/app/lib/actions/katello/repository/update.rb +5 -3
  35. data/app/lib/actions/katello/repository/upload_files.rb +0 -1
  36. data/app/lib/actions/pulp3/abstract.rb +0 -6
  37. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -2
  38. data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +4 -0
  39. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +1 -0
  40. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -2
  41. data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +7 -2
  42. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -2
  43. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
  44. data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
  45. data/app/lib/katello/event_daemon/runner.rb +12 -9
  46. data/app/lib/katello/resources/candlepin/consumer.rb +6 -6
  47. data/app/lib/katello/resources/candlepin/owner.rb +1 -1
  48. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +3 -4
  49. data/app/lib/katello/resources/candlepin.rb +4 -4
  50. data/app/lib/katello/util/errata.rb +12 -10
  51. data/app/lib/katello/util/search.rb +0 -1
  52. data/app/lib/katello/validators/content_view_environment_org_validator.rb +5 -2
  53. data/app/lib/katello/validators/content_view_environment_validator.rb +1 -2
  54. data/app/lib/katello/validators/generated_content_view_validator.rb +16 -0
  55. data/app/mailers/katello/errata_mailer.rb +4 -2
  56. data/app/models/katello/alternate_content_source.rb +5 -1
  57. data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -14
  58. data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
  59. data/app/models/katello/concerns/redhat_extensions.rb +16 -6
  60. data/app/models/katello/concerns/smart_proxy_extensions.rb +0 -12
  61. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -0
  62. data/app/models/katello/content_view.rb +22 -5
  63. data/app/models/katello/content_view_environment.rb +11 -2
  64. data/app/models/katello/content_view_environment_content_facet.rb +9 -0
  65. data/app/models/katello/content_view_version.rb +10 -5
  66. data/app/models/katello/erratum.rb +6 -1
  67. data/app/models/katello/glue/candlepin/pool.rb +6 -0
  68. data/app/models/katello/glue/candlepin/product.rb +7 -1
  69. data/app/models/katello/glue/candlepin/subscription.rb +5 -0
  70. data/app/models/katello/glue/provider.rb +26 -26
  71. data/app/models/katello/host/content_facet.rb +106 -18
  72. data/app/models/katello/host/info_provider.rb +25 -21
  73. data/app/models/katello/host/subscription_facet.rb +18 -14
  74. data/app/models/katello/kt_environment.rb +12 -7
  75. data/app/models/katello/package_group.rb +0 -12
  76. data/app/models/katello/pool.rb +4 -1
  77. data/app/models/katello/product.rb +11 -1
  78. data/app/models/katello/repository.rb +11 -11
  79. data/app/models/katello/root_repository.rb +5 -4
  80. data/app/models/katello/task_status.rb +0 -18
  81. data/app/services/katello/candlepin/consumer.rb +2 -2
  82. data/app/services/katello/host/package_profile_uploader.rb +1 -1
  83. data/app/services/katello/product_content_finder.rb +11 -8
  84. data/app/services/katello/pulp3/content_view_version/export.rb +8 -65
  85. data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +7 -0
  86. data/app/services/katello/pulp3/content_view_version/export_validator.rb +105 -0
  87. data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -1
  88. data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +7 -1
  89. data/app/services/katello/pulp3/erratum.rb +1 -0
  90. data/app/services/katello/pulp3/module_stream.rb +26 -11
  91. data/app/services/katello/pulp3/repository/yum.rb +2 -1
  92. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -1
  93. data/app/services/katello/registration_manager.rb +46 -26
  94. data/app/services/katello/repository_type.rb +3 -9
  95. data/app/services/katello/simple_package.rb +22 -0
  96. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -0
  97. data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +1 -0
  98. data/app/views/katello/api/v2/content_facet/base.json.rabl +23 -2
  99. data/app/views/katello/api/v2/content_facet/show.json.rabl +11 -8
  100. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  101. data/app/views/katello/api/v2/hosts/base.json.rabl +22 -2
  102. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +2 -2
  103. data/config/initializers/monkeys.rb +0 -2
  104. data/config/routes/api/registry.rb +8 -7
  105. data/config/routes/api/v2.rb +0 -2
  106. data/config/routes.rb +3 -0
  107. data/db/migrate/20200429153103_installed_package_bad_nvrea.rb +1 -1
  108. data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +7 -3
  109. data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +1 -1
  110. data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +52 -0
  111. data/db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb +5 -0
  112. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  113. data/engines/bastion/app/assets/stylesheets/bastion/bastion.scss +4 -0
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +2 -4
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -1
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -1
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +11 -3
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +1 -1
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -4
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +5485 -0
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +5397 -0
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +5658 -0
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5284 -0
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +5231 -0
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5275 -0
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +5389 -0
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5212 -0
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +5145 -0
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -0
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
  132. data/lib/katello/engine.rb +2 -1
  133. data/lib/katello/permission_creator.rb +2 -4
  134. data/lib/katello/permissions/registry_permissions.rb +5 -5
  135. data/lib/katello/plugin.rb +22 -14
  136. data/lib/katello/repository_types/README.md +136 -19
  137. data/lib/katello/repository_types/deb.rb +0 -1
  138. data/lib/katello/repository_types/docker.rb +0 -1
  139. data/lib/katello/repository_types/file.rb +0 -1
  140. data/lib/katello/repository_types/yum.rb +0 -4
  141. data/lib/katello/tasks/clean_candlepin_orphaned_products.rake +38 -0
  142. data/lib/katello/tasks/clean_orphaned_facets.rb +20 -0
  143. data/lib/katello/tasks/reimport.rake +1 -2
  144. data/lib/katello/tasks/repository.rake +1 -22
  145. data/lib/katello/tasks/reset.rake +1 -0
  146. data/lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake +29 -0
  147. data/lib/katello/version.rb +1 -1
  148. data/lib/katello.rb +0 -5
  149. data/locale/bn/katello.po +69 -27
  150. data/locale/cs/katello.po +69 -27
  151. data/locale/de/katello.po +78 -36
  152. data/locale/en/katello.po +69 -27
  153. data/locale/es/katello.po +70 -28
  154. data/locale/fr/katello.po +73 -31
  155. data/locale/gu/katello.po +69 -27
  156. data/locale/hi/katello.po +69 -27
  157. data/locale/it/katello.po +69 -27
  158. data/locale/ja/katello.po +73 -31
  159. data/locale/ka/katello.po +73 -31
  160. data/locale/katello.pot +335 -262
  161. data/locale/kn/katello.po +69 -27
  162. data/locale/ko/katello.po +69 -27
  163. data/locale/mr/katello.po +69 -27
  164. data/locale/or/katello.po +69 -27
  165. data/locale/pa/katello.po +69 -27
  166. data/locale/pt/katello.po +69 -27
  167. data/locale/pt_BR/katello.po +70 -28
  168. data/locale/ru/katello.po +70 -28
  169. data/locale/ta/katello.po +69 -27
  170. data/locale/te/katello.po +69 -27
  171. data/locale/zh_CN/katello.po +73 -31
  172. data/locale/zh_TW/katello.po +70 -28
  173. data/webpack/components/Content/ContentPage.js +51 -35
  174. data/webpack/components/Content/__tests__/ContentPage.test.js +2 -4
  175. data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +22 -3
  176. data/webpack/components/Table/EmptyStateMessage.js +14 -11
  177. data/webpack/components/Table/MainTable.js +36 -15
  178. data/webpack/components/Table/TableWrapper.js +25 -25
  179. data/webpack/components/Table/__test__/emptyStateMessage.test.js +51 -0
  180. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +5 -4
  181. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
  182. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +1 -17
  183. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +18 -9
  184. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -2
  185. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -2
  186. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -2
  187. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +47 -27
  188. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +1 -2
  189. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +2 -21
  190. data/webpack/components/extensions/HostDetails/Tabs/__tests__/moduleStreamsTab.test.js +1 -28
  191. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +1 -10
  192. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +1 -18
  193. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +1 -17
  194. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -15
  195. data/webpack/global_test_setup.js +1 -1
  196. data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -10
  197. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +6 -0
  198. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +1 -0
  199. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +3 -10
  200. data/webpack/scenes/AlternateContentSources/Create/Steps/NameACS.js +1 -0
  201. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +3 -3
  202. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +1 -0
  203. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +12 -4
  204. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +7 -4
  205. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +4 -8
  206. data/webpack/scenes/AlternateContentSources/helpers.js +1 -1
  207. data/webpack/scenes/Content/Details/ContentRepositories.js +5 -4
  208. data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +1 -12
  209. data/webpack/scenes/Content/Table/ContentTable.js +2 -1
  210. data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -14
  211. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -25
  212. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  213. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +44 -31
  214. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -0
  215. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +6 -1
  216. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +2 -1
  217. data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +2 -1
  218. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +3 -1
  219. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -1
  220. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
  221. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -1
  222. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +2 -0
  223. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  224. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +1 -1
  225. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -1
  226. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +35 -33
  227. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +48 -45
  228. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +58 -24
  229. data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +64 -0
  230. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +36 -20
  231. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +40 -23
  232. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +0 -13
  233. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +0 -13
  234. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -1
  235. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -10
  236. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
  237. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -10
  238. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +21 -9
  239. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +4 -0
  240. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +1 -32
  241. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +3 -1
  242. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -15
  243. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
  244. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -2
  245. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -9
  246. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +4 -0
  247. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +30 -14
  248. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
  249. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +55 -120
  250. data/webpack/scenes/ContentViews/components/WizardHeader.js +1 -1
  251. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
  252. data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +8 -1
  253. data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +3 -9
  254. data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +7 -1
  255. data/webpack/scenes/RedHatRepositories/components/Search.js +22 -16
  256. data/webpack/scenes/RedHatRepositories/index.scss +20 -1
  257. data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +12 -1
  258. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +1 -1
  259. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +1 -1
  260. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +21 -19
  261. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +34 -1
  262. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +20 -7
  263. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +0 -1
  264. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +65 -15
  265. metadata +47 -113
  266. data/app/lib/actions/katello/pulp_selector.rb +0 -24
  267. data/app/lib/actions/katello/repository/correct_checksum.rb +0 -24
  268. data/app/lib/actions/katello/repository/destroy_package_group.rb +0 -26
  269. data/app/lib/actions/katello/repository/upload_package_group.rb +0 -24
  270. data/app/lib/actions/pulp/abstract.rb +0 -37
  271. data/app/lib/actions/pulp/abstract_async_task.rb +0 -154
  272. data/app/lib/actions/pulp/abstract_async_task_group.rb +0 -94
  273. data/app/lib/actions/pulp/consumer/sync_capsule.rb +0 -45
  274. data/app/lib/actions/pulp/consumer/unassociate_units.rb +0 -20
  275. data/app/lib/actions/pulp/expect_one_task.rb +0 -11
  276. data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +0 -16
  277. data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +0 -19
  278. data/app/lib/actions/pulp/orchestration/repository/delete.rb +0 -15
  279. data/app/lib/actions/pulp/orchestration/repository/refresh.rb +0 -14
  280. data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +0 -13
  281. data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -19
  282. data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +0 -14
  283. data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +0 -34
  284. data/app/lib/actions/pulp/orchestration/repository/sync.rb +0 -18
  285. data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +0 -37
  286. data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +0 -15
  287. data/app/lib/actions/pulp/orphan_cleanup/remove_unneeded_repos.rb +0 -16
  288. data/app/lib/actions/pulp/repository/abstract_copy_content.rb +0 -45
  289. data/app/lib/actions/pulp/repository/abstract_remove_content.rb +0 -32
  290. data/app/lib/actions/pulp/repository/clear.rb +0 -18
  291. data/app/lib/actions/pulp/repository/copy_all_units.rb +0 -30
  292. data/app/lib/actions/pulp/repository/copy_units.rb +0 -25
  293. data/app/lib/actions/pulp/repository/create.rb +0 -28
  294. data/app/lib/actions/pulp/repository/create_in_plan.rb +0 -15
  295. data/app/lib/actions/pulp/repository/create_upload_request.rb +0 -20
  296. data/app/lib/actions/pulp/repository/delete_upload_request.rb +0 -19
  297. data/app/lib/actions/pulp/repository/destroy.rb +0 -28
  298. data/app/lib/actions/pulp/repository/distributor_publish.rb +0 -25
  299. data/app/lib/actions/pulp/repository/download.rb +0 -16
  300. data/app/lib/actions/pulp/repository/import_upload.rb +0 -19
  301. data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -47
  302. data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +0 -95
  303. data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +0 -103
  304. data/app/lib/actions/pulp/repository/presenters/file_unit_presenter.rb +0 -42
  305. data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +0 -131
  306. data/app/lib/actions/pulp/repository/refresh.rb +0 -21
  307. data/app/lib/actions/pulp/repository/regenerate_applicability.rb +0 -21
  308. data/app/lib/actions/pulp/repository/remove_distribution.rb +0 -11
  309. data/app/lib/actions/pulp/repository/remove_units.rb +0 -44
  310. data/app/lib/actions/pulp/repository/sync.rb +0 -99
  311. data/app/lib/actions/pulp/repository/upload_file.rb +0 -28
  312. data/app/lib/actions/pulp/repository_group/create.rb +0 -31
  313. data/app/lib/actions/pulp/repository_group/delete.rb +0 -17
  314. data/app/lib/actions/pulp/repository_group/export.rb +0 -51
  315. data/app/lib/katello/util/package_clause_generator.rb +0 -77
  316. data/app/models/katello/glue/pulp/pulp_errors.rb +0 -9
  317. data/app/models/katello/glue/pulp/repo.rb +0 -353
  318. data/app/models/katello/pulp_sync_status.rb +0 -165
  319. data/app/models/katello/pulp_task_status.rb +0 -63
  320. data/app/services/katello/pulp/content.rb +0 -24
  321. data/app/services/katello/pulp/importer_comparison.rb +0 -28
  322. data/app/services/katello/pulp/repository/deb.rb +0 -61
  323. data/app/services/katello/pulp/repository/docker.rb +0 -82
  324. data/app/services/katello/pulp/repository/file.rb +0 -52
  325. data/app/services/katello/pulp/repository/yum.rb +0 -205
  326. data/app/services/katello/pulp/repository.rb +0 -327
  327. data/app/services/katello/pulp/server.rb +0 -35
  328. data/app/services/katello/pulp/simple_package.rb +0 -24
  329. data/app/services/katello/pulp/smart_proxy_repository.rb +0 -52
  330. data/lib/monkeys/fix_deb_optimized_sync.rb +0 -35
  331. data/lib/monkeys/fix_pulp_container_path.rb +0 -35
  332. data/locale/zanata.xml +0 -30
  333. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentSearch.fixtures.json +0 -33
@@ -16,16 +16,8 @@ const AcsUrlPaths = () => {
16
16
  acsType, url, setUrl, subpaths, setSubpaths,
17
17
  } = useContext(ACSCreateContext);
18
18
 
19
+ const urlValidated = (url === '' || isValidUrl(url, acsType)) ? 'default' : 'error';
19
20
  const subPathValidated = areSubPathsValid(subpaths) ? 'default' : 'error';
20
- const [urlValidated, setUrlValidated] = React.useState('default');
21
- const handleUrlChange = (newUrl, _event) => {
22
- setUrl(newUrl);
23
- if (isValidUrl(newUrl, acsType)) {
24
- setUrlValidated('success');
25
- } else {
26
- setUrlValidated('error');
27
- }
28
- };
29
21
 
30
22
  const baseURLplaceholder = acsType === 'rhui' ?
31
23
  'https://rhui-server.example.com/pulp/content' :
@@ -57,12 +49,13 @@ const AcsUrlPaths = () => {
57
49
  isRequired
58
50
  type="url"
59
51
  id="acs_base_url_field"
52
+ ouiaId="acs_base_url_field"
60
53
  name="acs_base_url_field"
61
54
  aria-label="acs_base_url_field"
62
55
  placeholder={baseURLplaceholder}
63
56
  value={url}
64
57
  validated={urlValidated}
65
- onChange={handleUrlChange}
58
+ onChange={value => setUrl(value)}
66
59
  />
67
60
  </FormGroup>
68
61
  {acsType === 'rhui' &&
@@ -31,6 +31,7 @@ const NameACS = () => {
31
31
  isRequired
32
32
  type="text"
33
33
  id="acs_name_field"
34
+ ouiaId="acs_name_field"
34
35
  name="acs_name_field"
35
36
  aria-label="acs_name_field"
36
37
  value={name}
@@ -45,7 +45,7 @@ const createSimplifiedACSDetails = {
45
45
  const createRHUIACSDetails = {
46
46
  name: 'acs_rhui_test',
47
47
  description: '',
48
- base_url: 'https://test_url.com/',
48
+ base_url: 'https://test_url.com/pulp/content',
49
49
  subpaths: ['test/repo1/', 'test/repo2/'],
50
50
  smart_proxy_names: ['centos7-katello-devel-stable.example.com'],
51
51
  content_type: 'yum',
@@ -297,8 +297,8 @@ test('Can display create wizard and create RHUI ACS', async (done) => {
297
297
  // Go to URL and subpath step
298
298
  fireEvent.click(getByText('Next'));
299
299
 
300
- fireEvent.change(getByLabelText('acs_base_url_field'), { target: { value: 'https://test_url.com/' } });
301
- expect(getByLabelText('acs_base_url_field')).toHaveAttribute('value', 'https://test_url.com/');
300
+ fireEvent.change(getByLabelText('acs_base_url_field'), { target: { value: 'https://test_url.com/pulp/content' } });
301
+ expect(getByLabelText('acs_base_url_field')).toHaveAttribute('value', 'https://test_url.com/pulp/content');
302
302
  fireEvent.change(getByLabelText('acs_subpath_field'), { target: { value: 'test/repo1/,test/repo2/' } });
303
303
 
304
304
  // Mock content credential data
@@ -45,6 +45,7 @@ const ACSEditDetails = ({ onClose, acsId, acsDetails }) => {
45
45
  isRequired
46
46
  type="text"
47
47
  id="acs_name_field"
48
+ ouiaId="acs_name_field"
48
49
  name="acs_name_field"
49
50
  aria-label="acs_name_field"
50
51
  value={acsName}
@@ -7,13 +7,19 @@ import { editACS, getACSDetails } from '../../ACSActions';
7
7
  import { areSubPathsValid, isValidUrl } from '../../helpers';
8
8
 
9
9
  const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
10
- const { subpaths, base_url: url } = acsDetails;
10
+ const { subpaths, base_url: url, alternate_content_source_type: acsType } = acsDetails;
11
11
  const dispatch = useDispatch();
12
12
  const [acsUrl, setAcsUrl] = useState(url);
13
13
  const [acsSubpath, setAcsSubpath] = useState(subpaths.join() || '');
14
14
  const [saving, setSaving] = useState(false);
15
15
  const subPathValidated = areSubPathsValid(acsSubpath) ? 'default' : 'error';
16
- const urlValidated = (acsUrl === '' || isValidUrl(acsUrl)) ? 'default' : 'error';
16
+ const urlValidated = (acsUrl === '' || isValidUrl(acsUrl, acsType)) ? 'default' : 'error';
17
+ const baseURLplaceholder = acsType === 'rhui' ?
18
+ 'https://rhui-server.example.com/pulp/content' :
19
+ 'http:// or https://';
20
+ const helperTextInvalid = acsType === 'rhui' ?
21
+ 'http://rhui-server.example.com/pulp/content or https://rhui-server.example.com/pulp/content' :
22
+ 'http://, https:// or file://';
17
23
 
18
24
  const onSubmit = () => {
19
25
  setSaving(true);
@@ -56,7 +62,7 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
56
62
  label={__('Base URL')}
57
63
  type="string"
58
64
  fieldId="acs_base_url"
59
- helperTextInvalid="http://, https:// or file://"
65
+ helperTextInvalid={helperTextInvalid}
60
66
  validated={urlValidated}
61
67
  isRequired
62
68
  >
@@ -66,7 +72,7 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
66
72
  id="acs_base_url_field"
67
73
  name="acs_base_url_field"
68
74
  aria-label="acs_base_url_field"
69
- placeholder="https:// or file://"
75
+ placeholder={baseURLplaceholder}
70
76
  value={acsUrl}
71
77
  validated={urlValidated}
72
78
  onChange={value => setAcsUrl(value)}
@@ -119,12 +125,14 @@ ACSEditURLPaths.propTypes = {
119
125
  acsDetails: PropTypes.shape({
120
126
  base_url: PropTypes.string,
121
127
  subpaths: PropTypes.arrayOf(PropTypes.string),
128
+ alternate_content_source_type: PropTypes.string,
122
129
  id: PropTypes.number,
123
130
  }),
124
131
  };
125
132
 
126
133
  ACSEditURLPaths.defaultProps = {
127
134
  acsDetails: {
135
+ alternate_content_source_type: '',
128
136
  base_url: '',
129
137
  subpaths: '',
130
138
  id: undefined,
@@ -162,7 +162,7 @@ const ACSTable = () => {
162
162
  <DrawerHead>
163
163
  {results && isExpanded &&
164
164
  <div ref={drawerRef}>
165
- <Text component={TextVariants.h1} style={{ marginTop: '0px', fontWeight: 'bold' }}>
165
+ <Text ouiaId="acs-name-text" component={TextVariants.h1} style={{ marginTop: '0px', fontWeight: 'bold' }}>
166
166
  {acs?.name}
167
167
  </Text>
168
168
  <TextContent>
@@ -320,11 +320,13 @@ const ACSTable = () => {
320
320
  fetchItems,
321
321
  showPrimaryAction,
322
322
  primaryActionButton,
323
+ selectedCount,
323
324
  }}
324
325
  ouiaId="alternate-content-sources-table"
325
326
  variant={TableVariant.compact}
326
327
  additionalListeners={[activeSortColumn, activeSortDirection]}
327
- autocompleteEndpoint="/alternate_content_sources/auto_complete_search"
328
+ autocompleteEndpoint="/katello/api/v2/alternate_content_sources"
329
+ bookmarkController="katello_alternate_content_sources"
328
330
  {...selectionSetVars}
329
331
  actionButtons={
330
332
  <>
@@ -384,7 +386,7 @@ const ACSTable = () => {
384
386
  hideSearch={!canView}
385
387
  >
386
388
  <Thead>
387
- <Tr>
389
+ <Tr ouiaId="acs-table-column-headers-row">
388
390
  <Th
389
391
  key="acs-checkbox"
390
392
  style={{ width: 0 }}
@@ -415,6 +417,7 @@ const ACSTable = () => {
415
417
  return (
416
418
  <Tr
417
419
  key={index}
420
+ ouiaId={`acs-row-${id}`}
418
421
  style={isSingleSelected(id) && isExpanded ? customStyle : {}}
419
422
  isStriped={isSingleSelected(id) && isExpanded}
420
423
  >
@@ -428,7 +431,7 @@ const ACSTable = () => {
428
431
  />
429
432
  </Td>
430
433
  <Td>
431
- <Text onClick={() => onClick(id)} component="a">{name}</Text>
434
+ <Text onClick={() => onClick(id)} component="a" ouiaId={`acs-link-text-${index}`}>{name}</Text>
432
435
  </Td>
433
436
  <Td>{acsType === 'rhui' ? upperCase(acsType) : capitalize(acsType)}</Td>
434
437
  <Td><LastSync
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
2
+ import { renderWithRedux, patientlyWaitFor, act } from 'react-testing-lib-wrapper';
3
3
 
4
- import { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../../test-utils/nockWrapper';
4
+ import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../test-utils/nockWrapper';
5
5
  import api from '../../../../services/api';
6
6
  import ACSTable from '../ACSTable';
7
7
  import acsData from './acsIndex.fixtures.json';
@@ -10,8 +10,6 @@ const acsURL = api.getApiUrl('/alternate_content_sources');
10
10
  const autocompleteUrl = '/alternate_content_sources/auto_complete_search';
11
11
 
12
12
  let firstAcs;
13
- let searchDelayScope;
14
- let autoSearchScope;
15
13
 
16
14
  beforeEach(() => {
17
15
  const { results } = acsData;
@@ -24,8 +22,6 @@ test('Can call API and show ACS on page load', async (done) => {
24
22
  .get(acsURL)
25
23
  .query(true)
26
24
  .reply(200, acsData);
27
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
28
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
29
25
 
30
26
  const { getByText, queryByText } = renderWithRedux(<ACSTable />);
31
27
 
@@ -34,9 +30,8 @@ test('Can call API and show ACS on page load', async (done) => {
34
30
  // Assert that the ACS name is now showing on the screen, but wait for it to appear.
35
31
  await patientlyWaitFor(() => expect(getByText(firstAcs.name)).toBeInTheDocument());
36
32
  assertNockRequest(autocompleteScope);
37
- assertNockRequest(searchDelayScope);
38
- assertNockRequest(autoSearchScope);
39
33
  assertNockRequest(scope, done);
34
+ act(done);
40
35
  });
41
36
 
42
37
  test('Can handle no ACS being present', async (done) => {
@@ -62,4 +57,5 @@ test('Can handle no ACS being present', async (done) => {
62
57
  expect(queryByLabelText('Select all')).not.toBeInTheDocument();
63
58
  await patientlyWaitFor(() => expect(queryByText("You currently don't have any alternate content sources.")).toBeInTheDocument());
64
59
  assertNockRequest(scope, done);
60
+ act(done);
65
61
  });
@@ -3,7 +3,7 @@ export const isValidUrl = (urlString, acsType = '') => {
3
3
  const urlFromString = new URL(urlString);
4
4
  let valid = urlFromString.protocol === 'https:' || urlFromString.protocol === 'http:' || urlFromString.protocol === 'file:';
5
5
  if (acsType === 'rhui') {
6
- valid = valid && urlFromString.pathname === '/pulp/content';
6
+ valid = urlFromString.pathname.endsWith('/pulp/content');
7
7
  }
8
8
  return valid;
9
9
  } catch (e) {
@@ -44,21 +44,22 @@ const ContentRepositories = ({ contentType, id, tabKey }) => {
44
44
  }}
45
45
  ouiaId="content-repositories-table"
46
46
  variant={TableVariant.compact}
47
- autocompleteEndpoint="/repositories/auto_complete_search"
47
+ autocompleteEndpoint="/katello/api/v2/repositories"
48
+ bookmarkController="katello_repositories"
48
49
  fetchItems={useCallback(
49
50
  params => getRepositoryContentDetails(typeSingularLabel, id, params),
50
51
  [typeSingularLabel, id],
51
52
  )}
52
53
  >
53
54
  <Thead>
54
- <Tr>
55
+ <Tr ouiaId="content-repositories-column-headers-row">
55
56
  {columnHeaders.map(col =>
56
57
  <Th key={col.title}>{col.title}</Th>)}
57
58
  </Tr>
58
59
  </Thead>
59
60
  <Tbody>
60
- {results?.map(details => (
61
- <Tr key={`${details.id}`}>
61
+ {results?.map((details, idx) => (
62
+ <Tr key={`${details.id}`} ouiaId={`content-repositories-row-${idx}`}>
62
63
  {columnHeaders.map((col, index) =>
63
64
  <Td key={index}>{col.getProperty(details, typeSingularLabel)}</Td>)
64
65
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Route } from 'react-router-dom';
3
3
  import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
4
- import { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../../test-utils/nockWrapper';
4
+ import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../test-utils/nockWrapper';
5
5
  import api from '../../../../services/api';
6
6
  import { CONTENT_ID_KEY } from '../../ContentConstants';
7
7
  import ContentDetails from '../ContentDetails';
@@ -17,9 +17,6 @@ const contentRepositoryDetailsPath = api.getApiUrl('/repositories');
17
17
 
18
18
  const withContentRoute = component => <Route path="/content/:content_type([a-z_]+)/:id([0-9]+)">{component}</Route>;
19
19
 
20
- let searchDelayScope;
21
- let autoSearchScope;
22
-
23
20
  jest.mock('react-intl', () => ({ addLocaleData: () => { }, FormattedDate: () => 'mocked' }));
24
21
 
25
22
  test('Can call API for Python package details and show details tab on page load', async (done) => {
@@ -59,8 +56,6 @@ test('Can call API for Python package details and show details tab on page load'
59
56
  test('Can call API for Python package repository details and show repositories tab', async (done) => {
60
57
  const autocompleteUrl = '/repositories/auto_complete_search';
61
58
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
62
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
63
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
64
59
 
65
60
  const results = pythonPackageRepositoryDetailsResponse.results[0];
66
61
  const repoName = results.name;
@@ -84,8 +79,6 @@ test('Can call API for Python package repository details and show repositories t
84
79
  expect(getAllByText(contentCountWords)[0]).toBeInTheDocument();
85
80
  });
86
81
 
87
- assertNockRequest(autoSearchScope);
88
- assertNockRequest(searchDelayScope);
89
82
  assertNockRequest(autocompleteScope);
90
83
  assertNockRequest(pythonPackageRepositoryDetailsScope, done);
91
84
  });
@@ -122,8 +115,6 @@ test('Can call API for Ansible collection details and show details tab on page l
122
115
  test('Can call API for Ansible collection repository details and show repositories tab', async (done) => {
123
116
  const autocompleteUrl = '/repositories/auto_complete_search';
124
117
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
125
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
126
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
127
118
 
128
119
  const results = ansibleCollectionRepositoryDetailsResponse.results[0];
129
120
  const repoName = results.name;
@@ -147,8 +138,6 @@ test('Can call API for Ansible collection repository details and show repositori
147
138
  expect(getAllByText(contentCountWords)[0]).toBeInTheDocument();
148
139
  });
149
140
 
150
- assertNockRequest(autoSearchScope);
151
- assertNockRequest(searchDelayScope);
152
141
  assertNockRequest(autocompleteScope);
153
142
  assertNockRequest(ansibleCollectionRepositoryDetailsScope, done);
154
143
  });
@@ -33,7 +33,8 @@ const ContentTable = ({
33
33
  ouiaId="content-table"
34
34
  key={selectedContentType}
35
35
  variant={TableVariant.compact}
36
- autocompleteEndpoint={`/${contentTypes[selectedContentType][1]}/auto_complete_search`}
36
+ autocompleteEndpoint={`/katello/api/v2/${contentTypes[selectedContentType][1]}`}
37
+ bookmarkController="katello_generic_content_units"
37
38
  emptyContentTitle={__(`You currently don't have any ${selectedContentType}.`)}
38
39
  emptySearchTitle={__(`No matching ${selectedContentType} found`)}
39
40
  emptyContentBody={__(`${selectedContentType} will appear here when created.`)}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
3
- import { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../test-utils/nockWrapper';
3
+ import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../test-utils/nockWrapper';
4
4
  import api from '../../../services/api';
5
5
  import ContentPage from '../ContentPage';
6
6
  import ansibleCollectionsResponse from './ansibleCollections.fixtures';
@@ -12,19 +12,6 @@ const contentTypesPath = api.getApiUrl('/repositories/content_types');
12
12
  const pythonPackagesPath = api.getApiUrl('/python_packages');
13
13
  const ansibleCollectionsPath = api.getApiUrl('/ansible_collections');
14
14
 
15
- let searchDelayScope;
16
- let autoSearchScope;
17
-
18
- beforeEach(() => {
19
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
20
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
21
- });
22
-
23
- afterEach(() => {
24
- assertNockRequest(autoSearchScope);
25
- assertNockRequest(searchDelayScope);
26
- });
27
-
28
15
  test('Can call API for Python Packages and show table on page load', async (done) => {
29
16
  const autocompleteUrl = '/python_packages/auto_complete_search';
30
17
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { renderWithRedux, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
4
4
  import api, { foremanApi } from '../../../../services/api';
5
5
  import {
6
- nockInstance, assertNockRequest, mockAutocomplete, mockSetting, mockForemanAutocomplete,
6
+ nockInstance, assertNockRequest, mockAutocomplete, mockForemanAutocomplete,
7
7
  } from '../../../../test-utils/nockWrapper';
8
8
  import CONTENT_VIEWS_KEY from '../../ContentViewsConstants';
9
9
  import ContentViewsPage from '../../ContentViewsPage.js';
@@ -37,24 +37,10 @@ const baseQuery = {
37
37
  sort_order: 'asc',
38
38
  };
39
39
 
40
- let scopeBookmark;
41
40
  let firstCV;
42
- let searchDelayScope;
43
- let autoSearchScope;
44
41
  beforeEach(() => {
45
42
  const { results } = cvIndexData;
46
43
  [firstCV] = results;
47
- scopeBookmark = nockInstance
48
- .get('/api/v2/bookmarks')
49
- .query(true)
50
- .reply(200, {});
51
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
52
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
53
- });
54
-
55
- afterEach(() => {
56
- assertNockRequest(searchDelayScope);
57
- assertNockRequest(autoSearchScope);
58
44
  });
59
45
 
60
46
  test('Can call API for CVs and show Delete Wizard for the row', async (done) => {
@@ -93,7 +79,6 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
93
79
  await patientlyWaitFor(() => expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument());
94
80
 
95
81
  assertNockRequest(scope);
96
- assertNockRequest(scopeBookmark);
97
82
  assertNockRequest(autocompleteScope);
98
83
  assertNockRequest(envPathDeleteScope);
99
84
  assertNockRequest(cvDetailsScope);
@@ -103,12 +88,8 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
103
88
  test('Can open Delete wizard and delete CV with all steps', async (done) => {
104
89
  const hostAutocompleteUrl = '/hosts/auto_complete_search';
105
90
  const hostAutocompleteScope = mockForemanAutocomplete(nockInstance, hostAutocompleteUrl);
106
- const hostSearchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
107
- const hostAutoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
108
91
  const akAutocompleteUrl = '/activation_keys/auto_complete_search';
109
92
  const akAutocompleteScope = mockAutocomplete(nockInstance, akAutocompleteUrl);
110
- const akSearchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
111
- const akAutoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
112
93
 
113
94
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
114
95
 
@@ -231,19 +212,14 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
231
212
  fireEvent.click(getAllByText('Delete')[0]);
232
213
 
233
214
  assertNockRequest(scope);
234
- assertNockRequest(scopeBookmark);
235
215
  assertNockRequest(autocompleteScope);
236
216
  assertNockRequest(envPathDeleteScope);
237
217
  assertNockRequest(cvDetailsScope);
238
218
  assertNockRequest(cvVersionsScope);
239
219
  assertNockRequest(hostAutocompleteScope);
240
- assertNockRequest(hostSearchDelayScope);
241
- assertNockRequest(hostAutoSearchScope);
242
220
  assertNockRequest(hostScope);
243
221
  assertNockRequest(cVDropDownOptionsScope);
244
222
  assertNockRequest(akAutocompleteScope);
245
- assertNockRequest(akSearchDelayScope);
246
- assertNockRequest(akAutoSearchScope);
247
223
  assertNockRequest(activationKeysScope);
248
224
  assertNockRequest(cVDropDownOptionsScope);
249
225
  assertNockRequest(cvDeleteScope);
@@ -252,7 +252,8 @@ const ContentViewComponents = ({ cvId, details }) => {
252
252
  onSelect={onSelect(rows, setRows)}
253
253
  cells={columnHeaders}
254
254
  variant={TableVariant.compact}
255
- autocompleteEndpoint="/content_views/auto_complete_search"
255
+ autocompleteEndpoint="/katello/api/v2/content_views"
256
+ bookmarkController="katello_content_views"
256
257
  fetchItems={useCallback(params =>
257
258
  getContentViewComponents(cvId, params, statusSelected), [cvId, statusSelected])}
258
259
  additionalListeners={[statusSelected, addComponentsResolved, removeComponentsResolved]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
3
- import { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
3
+ import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../test-utils/nockWrapper';
4
4
  import api from '../../../../../services/api';
5
5
  import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
6
6
  import ContentViewComponents from '../ContentViewComponents';
@@ -15,27 +15,21 @@ const cvComponents = api.getApiUrl('/content_views/4/content_view_components/sho
15
15
  const addComponentURL = api.getApiUrl('/content_views/4/content_view_components/add');
16
16
  const publishedComponentDetailsURL = api.getApiUrl('/content_views/13');
17
17
  const removeComponentURL = api.getApiUrl('/content_views/4/content_view_components/remove');
18
- const cvComponentsSearchURL = api.getApiUrl('/content_views/4/content_view_components/show_all?per_page=20&page=1&search=name+%3D+%227%22&status=All');
19
18
  const autocompleteUrl = '/content_views/auto_complete_search';
19
+ const autocompleteQuery = {
20
+ organization_id: 1,
21
+ search: '',
22
+ };
20
23
 
21
24
  let firstComponent;
22
- let searchDelayScope;
23
- let autoSearchScope;
24
25
 
25
26
  beforeEach(() => {
26
27
  const { results } = cvComponentData;
27
28
  [firstComponent] = results;
28
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
29
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
30
- });
31
-
32
- afterEach(() => {
33
- assertNockRequest(searchDelayScope);
34
- assertNockRequest(autoSearchScope);
35
29
  });
36
30
 
37
31
  test('Can call API and show components on page load', async (done) => {
38
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
32
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
39
33
  const scope = nockInstance
40
34
  .get(cvComponents)
41
35
  .reply(200, cvComponentData);
@@ -55,7 +49,7 @@ test('Can call API and show components on page load', async (done) => {
55
49
  });
56
50
 
57
51
  test('Can call API and show unpublished components', async (done) => {
58
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
52
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
59
53
  const scope = nockInstance
60
54
  .get(cvComponents)
61
55
  .reply(200, cvUnpublishedComponentData);
@@ -79,7 +73,7 @@ test('Can call API and show unpublished components', async (done) => {
79
73
  });
80
74
 
81
75
  test('Can link to view environment', async () => {
82
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
76
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
83
77
  const scope = nockInstance
84
78
  .get(cvComponents)
85
79
  .reply(200, cvComponentData);
@@ -102,17 +96,36 @@ test('Can search for component content views in composite view', async (done) =>
102
96
  const lastComponent = cvComponentData.results[1];
103
97
  const { name: firstComponentName } = firstComponent.content_view;
104
98
  const { name: lastComponentName } = lastComponent.content_view;
105
- const searchQueryMatcher = actualParams => actualParams?.search?.includes(lastComponentName);
99
+ const searchQueryMatcher = {
100
+ organization_id: 1,
101
+ search: `name = ${lastComponentName}`,
102
+ };
103
+ const searchResults = [
104
+ {
105
+ completed: `name = ${lastComponentName}`,
106
+ part: 'and',
107
+ label: `name = ${lastComponentName} and`,
108
+ category: 'Operators',
109
+ },
110
+ {
111
+ completed: `name = ${lastComponentName}`,
112
+ part: 'or',
113
+ label: `name = ${lastComponentName} or`,
114
+ category: 'Operators',
115
+ },
116
+ ];
106
117
 
107
118
  const cvComponentsScope = nockInstance
108
119
  .get(cvComponents)
109
120
  .reply(200, cvComponentData);
110
- const cvComponentsSearchScope = nockInstance
111
- .get(cvComponentsSearchURL)
112
- .reply(200, { results: [lastComponent] });
113
121
 
114
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
115
- const withSearchScope = mockAutocomplete(nockInstance, autocompleteUrl, searchQueryMatcher);
122
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
123
+ const withSearchScope = mockAutocomplete(
124
+ nockInstance,
125
+ autocompleteUrl,
126
+ searchQueryMatcher,
127
+ searchResults,
128
+ );
116
129
  const { getByText, queryByText, getByLabelText } =
117
130
  renderWithRedux(<ContentViewComponents cvId={4} details={cvDetails} />, renderOptions);
118
131
 
@@ -123,23 +136,23 @@ test('Can search for component content views in composite view', async (done) =>
123
136
  });
124
137
 
125
138
  // Search and only searched result shows
126
- const searchInput = getByLabelText(/text input for search/i);
139
+ const searchInput = getByLabelText('Search input');
127
140
  expect(searchInput).toBeInTheDocument();
128
- fireEvent.change(searchInput, { target: { value: `name = "${lastComponentName}"` } });
141
+ searchInput.focus();
142
+ fireEvent.change(searchInput, { target: { value: `name = ${lastComponentName}` } });
129
143
 
130
144
  await patientlyWaitFor(() => {
131
- expect(getByText(lastComponentName)).toBeInTheDocument();
132
- expect(queryByText(firstComponentName)).not.toBeInTheDocument();
145
+ expect(getByText(`name = ${lastComponentName} and`)).toBeInTheDocument();
146
+ expect(queryByText(`name = ${firstComponentName} and`)).not.toBeInTheDocument();
133
147
  });
134
148
 
135
149
  assertNockRequest(autocompleteScope);
136
150
  assertNockRequest(cvComponentsScope);
137
- assertNockRequest(withSearchScope);
138
- assertNockRequest(cvComponentsSearchScope, done);
151
+ assertNockRequest(withSearchScope, done);
139
152
  });
140
153
 
141
154
  test('Can handle no components being present', async (done) => {
142
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
155
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
143
156
 
144
157
  const noResults = {
145
158
  total: 0,
@@ -172,7 +185,7 @@ test('Can handle no components being present', async (done) => {
172
185
  });
173
186
 
174
187
  test('Can add published component views to content view with modal', async (done) => {
175
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
188
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
176
189
  const scope = nockInstance
177
190
  .get(cvComponentsWithoutSearch)
178
191
  .reply(200, cvComponentData);
@@ -225,7 +238,7 @@ test('Can add published component views to content view with modal', async (done
225
238
  });
226
239
 
227
240
  test('Can add unpublished component views to content view', async (done) => {
228
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
241
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
229
242
  const scope = nockInstance
230
243
  .get(cvComponentsWithoutSearch)
231
244
  .reply(200, cvComponentData);
@@ -261,7 +274,7 @@ test('Can add unpublished component views to content view', async (done) => {
261
274
  });
262
275
 
263
276
  test('Can remove component views from content view', async (done) => {
264
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
277
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
265
278
  const scope = nockInstance
266
279
  .get(cvComponentsWithoutSearch)
267
280
  .reply(200, cvComponentData);
@@ -297,7 +310,7 @@ test('Can remove component views from content view', async (done) => {
297
310
  });
298
311
 
299
312
  test('Can bulk add component views to content view with modal', async (done) => {
300
- const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
313
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
301
314
  const scope = nockInstance
302
315
  .get(cvComponentsWithoutSearch)
303
316
  .reply(200, cvComponentData);
@@ -82,6 +82,7 @@ export default () => {
82
82
  const dropDownItems = [
83
83
  <DropdownItem
84
84
  key="copy"
85
+ ouiaId="cv-copy"
85
86
  onClick={() => {
86
87
  setCopying(true);
87
88
  }}
@@ -90,6 +91,7 @@ export default () => {
90
91
  </DropdownItem>,
91
92
  <DropdownItem
92
93
  key="delete"
94
+ ouiaId="cv-delete"
93
95
  onClick={() => {
94
96
  setDeleting(true);
95
97
  }}
@@ -178,6 +178,9 @@ const AffectedRepositoryTable = ({
178
178
  const emptySearchBody = __('Try changing your search settings.');
179
179
  const activeFilters = [productSelected];
180
180
  const defaultFilters = [allProducts];
181
+ const resetFilters = () => {
182
+ setProductSelected(allProducts);
183
+ };
181
184
  const dropdownItems = [
182
185
  <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={removeBulk}>
183
186
  {__('Remove')}
@@ -197,6 +200,7 @@ const AffectedRepositoryTable = ({
197
200
  updateSearchQuery,
198
201
  activeFilters,
199
202
  defaultFilters,
203
+ resetFilters,
200
204
  error,
201
205
  status,
202
206
  }}
@@ -204,7 +208,8 @@ const AffectedRepositoryTable = ({
204
208
  onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
205
209
  cells={columnHeaders}
206
210
  variant={TableVariant.compact}
207
- autocompleteEndpoint="/repositories/auto_complete_search"
211
+ autocompleteEndpoint="/katello/api/v2/repositories"
212
+ bookmarkController="katello_content_view_filters"
208
213
  fetchItems={useCallback(params => getCVReposWithOptions(params), [getCVReposWithOptions])}
209
214
  additionalListeners={[productSelected]}
210
215
  actionButtons={