katello 4.7.4 → 4.8.0.rc2

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 (356) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +8 -22
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -12
  4. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +7 -5
  5. data/app/controllers/katello/api/v2/capsule_content_controller.rb +0 -4
  6. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +22 -81
  7. data/app/controllers/katello/api/v2/content_exports_controller.rb +11 -80
  8. data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
  9. data/app/controllers/katello/api/v2/exports_controller.rb +130 -0
  10. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +7 -8
  11. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +8 -4
  12. data/app/controllers/katello/api/v2/organizations_controller.rb +3 -0
  13. data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -52
  14. data/app/controllers/katello/api/v2/repositories_controller.rb +3 -18
  15. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -6
  16. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -2
  17. data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +4 -1
  18. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +24 -0
  19. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +3 -3
  20. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +59 -23
  21. data/app/helpers/katello/katello_urls_helper.rb +0 -15
  22. data/app/helpers/katello/sync_management_helper.rb +0 -4
  23. data/app/lib/actions/candlepin/owner/destroy_imports.rb +1 -1
  24. data/app/lib/actions/katello/alternate_content_source/create.rb +3 -1
  25. data/app/lib/actions/katello/alternate_content_source/update.rb +3 -1
  26. data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
  27. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
  28. data/app/lib/actions/katello/content_view/publish.rb +6 -2
  29. data/app/lib/actions/katello/content_view/remove.rb +8 -2
  30. data/app/lib/actions/katello/content_view_version/destroy.rb +1 -1
  31. data/app/lib/actions/katello/environment/destroy.rb +8 -2
  32. data/app/lib/actions/katello/host/reassign.rb +4 -2
  33. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +0 -1
  34. data/app/lib/actions/katello/product/destroy.rb +2 -1
  35. data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -10
  36. data/app/lib/actions/katello/repository/import_upload.rb +0 -1
  37. data/app/lib/actions/katello/repository/sync.rb +0 -1
  38. data/app/lib/actions/katello/repository/update.rb +5 -3
  39. data/app/lib/actions/katello/repository/upload_files.rb +0 -1
  40. data/app/lib/actions/pulp3/abstract.rb +0 -6
  41. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -2
  42. data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +4 -0
  43. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +1 -1
  44. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +12 -11
  45. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -2
  46. data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +7 -4
  47. data/app/lib/actions/pulp3/repository/reclaim_space.rb +1 -1
  48. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -2
  49. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
  50. data/app/lib/katello/api/v2/error_handling.rb +12 -2
  51. data/app/lib/katello/concerns/base_template_scope_extensions.rb +7 -3
  52. data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
  53. data/app/lib/katello/event_daemon/runner.rb +12 -9
  54. data/app/lib/katello/resources/candlepin/consumer.rb +6 -6
  55. data/app/lib/katello/resources/candlepin/owner.rb +1 -1
  56. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +3 -4
  57. data/app/lib/katello/resources/candlepin.rb +4 -4
  58. data/app/lib/katello/util/errata.rb +12 -10
  59. data/app/lib/katello/util/search.rb +0 -1
  60. data/app/lib/katello/validators/content_view_environment_org_validator.rb +5 -2
  61. data/app/lib/katello/validators/content_view_environment_validator.rb +1 -2
  62. data/app/lib/katello/validators/generated_content_view_validator.rb +16 -0
  63. data/app/mailers/katello/errata_mailer.rb +4 -2
  64. data/app/models/katello/alternate_content_source.rb +59 -5
  65. data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -14
  66. data/app/models/katello/concerns/host_managed_extensions.rb +31 -8
  67. data/app/models/katello/concerns/redhat_extensions.rb +16 -6
  68. data/app/models/katello/concerns/smart_proxy_extensions.rb +0 -12
  69. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -0
  70. data/app/models/katello/content_view.rb +22 -5
  71. data/app/models/katello/content_view_environment.rb +11 -2
  72. data/app/models/katello/content_view_environment_content_facet.rb +9 -0
  73. data/app/models/katello/content_view_version.rb +10 -5
  74. data/app/models/katello/erratum.rb +6 -1
  75. data/app/models/katello/glue/candlepin/pool.rb +6 -0
  76. data/app/models/katello/glue/candlepin/product.rb +7 -1
  77. data/app/models/katello/glue/candlepin/subscription.rb +5 -0
  78. data/app/models/katello/glue/provider.rb +26 -26
  79. data/app/models/katello/host/content_facet.rb +108 -18
  80. data/app/models/katello/host/info_provider.rb +25 -21
  81. data/app/models/katello/host/subscription_facet.rb +18 -14
  82. data/app/models/katello/kt_environment.rb +12 -7
  83. data/app/models/katello/package_group.rb +0 -12
  84. data/app/models/katello/pool.rb +4 -1
  85. data/app/models/katello/product.rb +11 -1
  86. data/app/models/katello/repository.rb +11 -11
  87. data/app/models/katello/root_repository.rb +5 -4
  88. data/app/models/katello/task_status.rb +0 -18
  89. data/app/services/katello/candlepin/consumer.rb +2 -2
  90. data/app/services/katello/host/package_profile_uploader.rb +1 -1
  91. data/app/services/katello/product_content_finder.rb +11 -8
  92. data/app/services/katello/pulp3/content_view_version/export.rb +8 -65
  93. data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +7 -0
  94. data/app/services/katello/pulp3/content_view_version/export_validator.rb +121 -0
  95. data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -1
  96. data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +7 -1
  97. data/app/services/katello/pulp3/erratum.rb +1 -0
  98. data/app/services/katello/pulp3/module_stream.rb +26 -11
  99. data/app/services/katello/pulp3/repository/yum.rb +2 -1
  100. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -1
  101. data/app/services/katello/registration_manager.rb +46 -26
  102. data/app/services/katello/repository_type.rb +3 -9
  103. data/app/services/katello/simple_package.rb +22 -0
  104. data/app/views/foreman/smart_proxies/_content_sync.html.erb +2 -1
  105. data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +1 -0
  106. data/app/views/katello/api/v2/content_facet/base.json.rabl +23 -2
  107. data/app/views/katello/api/v2/content_facet/show.json.rabl +11 -8
  108. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  109. data/app/views/katello/api/v2/hosts/base.json.rabl +22 -2
  110. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +2 -2
  111. data/config/initializers/monkeys.rb +0 -2
  112. data/config/routes/api/registry.rb +8 -7
  113. data/config/routes/api/v2.rb +0 -2
  114. data/config/routes.rb +3 -0
  115. data/db/migrate/20200429153103_installed_package_bad_nvrea.rb +1 -1
  116. data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +7 -3
  117. data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +1 -1
  118. data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +52 -0
  119. data/db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb +5 -0
  120. data/db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +1 -1
  121. data/db/migrate/20230203141353_set_new_acs_verify_ssl_default.rb +5 -0
  122. data/db/seeds.d/111-upgrade_tasks.rb +3 -1
  123. data/engines/bastion/app/assets/stylesheets/bastion/bastion.scss +4 -0
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +2 -4
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -1
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +11 -3
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +1 -1
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -4
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +5485 -0
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +5397 -0
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +5658 -0
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5284 -0
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +5231 -0
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5275 -0
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +5389 -0
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5212 -0
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +5145 -0
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -0
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
  142. data/lib/katello/engine.rb +2 -1
  143. data/lib/katello/permission_creator.rb +2 -4
  144. data/lib/katello/permissions/registry_permissions.rb +5 -5
  145. data/lib/katello/plugin.rb +22 -14
  146. data/lib/katello/repository_types/README.md +136 -19
  147. data/lib/katello/repository_types/deb.rb +0 -1
  148. data/lib/katello/repository_types/docker.rb +0 -1
  149. data/lib/katello/repository_types/file.rb +0 -1
  150. data/lib/katello/repository_types/yum.rb +0 -4
  151. data/lib/katello/tasks/clean_candlepin_orphaned_products.rake +38 -0
  152. data/lib/katello/tasks/clean_orphaned_facets.rb +20 -0
  153. data/lib/katello/tasks/reimport.rake +1 -2
  154. data/lib/katello/tasks/repository.rake +1 -22
  155. data/lib/katello/tasks/reset.rake +1 -0
  156. data/lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake +29 -0
  157. data/lib/katello/tasks/upgrades/4.8/regenerate_imported_repository_metadata.rake +33 -0
  158. data/lib/katello/version.rb +1 -1
  159. data/lib/katello.rb +0 -5
  160. data/locale/bn/katello.po +69 -27
  161. data/locale/cs/katello.po +69 -27
  162. data/locale/de/katello.po +78 -36
  163. data/locale/en/katello.po +69 -27
  164. data/locale/es/katello.po +70 -28
  165. data/locale/fr/katello.po +73 -31
  166. data/locale/gu/katello.po +69 -27
  167. data/locale/hi/katello.po +69 -27
  168. data/locale/it/katello.po +69 -27
  169. data/locale/ja/katello.po +73 -31
  170. data/locale/ka/katello.po +73 -31
  171. data/locale/katello.pot +335 -262
  172. data/locale/kn/katello.po +69 -27
  173. data/locale/ko/katello.po +69 -27
  174. data/locale/mr/katello.po +69 -27
  175. data/locale/or/katello.po +69 -27
  176. data/locale/pa/katello.po +69 -27
  177. data/locale/pt/katello.po +69 -27
  178. data/locale/pt_BR/katello.po +70 -28
  179. data/locale/ru/katello.po +70 -28
  180. data/locale/ta/katello.po +69 -27
  181. data/locale/te/katello.po +69 -27
  182. data/locale/zh_CN/katello.po +73 -31
  183. data/locale/zh_TW/katello.po +70 -28
  184. data/webpack/components/Content/ContentPage.js +51 -35
  185. data/webpack/components/Content/__tests__/ContentPage.test.js +2 -4
  186. data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +22 -3
  187. data/webpack/components/Table/EmptyStateMessage.js +14 -11
  188. data/webpack/components/Table/MainTable.js +36 -15
  189. data/webpack/components/Table/TableWrapper.js +25 -25
  190. data/webpack/components/Table/__test__/emptyStateMessage.test.js +51 -0
  191. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +10 -72
  192. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +5 -4
  193. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
  194. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +1 -17
  195. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +18 -9
  196. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -2
  197. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -2
  198. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -2
  199. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +47 -27
  200. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +1 -2
  201. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +2 -21
  202. data/webpack/components/extensions/HostDetails/Tabs/__tests__/moduleStreamsTab.test.js +1 -28
  203. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +1 -10
  204. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +1 -18
  205. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +1 -17
  206. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -15
  207. data/webpack/global_test_setup.js +1 -1
  208. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -3
  209. data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -10
  210. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +6 -0
  211. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +1 -0
  212. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +3 -10
  213. data/webpack/scenes/AlternateContentSources/Create/Steps/NameACS.js +1 -0
  214. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +3 -3
  215. data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +6 -5
  216. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +1 -0
  217. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +3 -1
  218. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +1 -0
  219. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +2 -0
  220. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +13 -4
  221. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +7 -4
  222. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +4 -8
  223. data/webpack/scenes/AlternateContentSources/helpers.js +1 -1
  224. data/webpack/scenes/Content/Details/ContentRepositories.js +5 -4
  225. data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +1 -12
  226. data/webpack/scenes/Content/Table/ContentTable.js +2 -1
  227. data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -14
  228. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -25
  229. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  230. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +44 -31
  231. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +3 -0
  232. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +6 -1
  233. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +2 -1
  234. data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +2 -1
  235. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +3 -1
  236. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -1
  237. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
  238. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -1
  239. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +2 -0
  240. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  241. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +1 -1
  242. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -1
  243. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +35 -33
  244. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +48 -45
  245. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +58 -24
  246. data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +64 -0
  247. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +36 -20
  248. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +40 -23
  249. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +0 -13
  250. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +0 -13
  251. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -1
  252. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -10
  253. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
  254. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -10
  255. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +21 -9
  256. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +4 -0
  257. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +1 -32
  258. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +3 -1
  259. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -15
  260. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
  261. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -2
  262. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -9
  263. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +4 -0
  264. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +30 -14
  265. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
  266. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +55 -120
  267. data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +87 -0
  268. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -1
  269. data/webpack/scenes/ContentViews/components/WizardHeader.js +1 -1
  270. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
  271. data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +8 -1
  272. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +153 -28
  273. data/webpack/scenes/Hosts/ChangeContentSource/index.js +14 -15
  274. data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +4 -0
  275. data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +4 -0
  276. data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +3 -9
  277. data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +7 -1
  278. data/webpack/scenes/RedHatRepositories/components/Search.js +22 -16
  279. data/webpack/scenes/RedHatRepositories/index.scss +20 -1
  280. data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +12 -1
  281. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +1 -1
  282. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +1 -1
  283. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +21 -19
  284. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +34 -1
  285. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +20 -7
  286. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +0 -1
  287. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +65 -15
  288. metadata +52 -115
  289. data/app/lib/actions/katello/pulp_selector.rb +0 -24
  290. data/app/lib/actions/katello/repository/correct_checksum.rb +0 -24
  291. data/app/lib/actions/katello/repository/destroy_package_group.rb +0 -26
  292. data/app/lib/actions/katello/repository/upload_package_group.rb +0 -24
  293. data/app/lib/actions/pulp/abstract.rb +0 -37
  294. data/app/lib/actions/pulp/abstract_async_task.rb +0 -154
  295. data/app/lib/actions/pulp/abstract_async_task_group.rb +0 -94
  296. data/app/lib/actions/pulp/consumer/sync_capsule.rb +0 -45
  297. data/app/lib/actions/pulp/consumer/unassociate_units.rb +0 -20
  298. data/app/lib/actions/pulp/expect_one_task.rb +0 -11
  299. data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +0 -16
  300. data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +0 -19
  301. data/app/lib/actions/pulp/orchestration/repository/delete.rb +0 -15
  302. data/app/lib/actions/pulp/orchestration/repository/refresh.rb +0 -14
  303. data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +0 -13
  304. data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -19
  305. data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +0 -14
  306. data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +0 -34
  307. data/app/lib/actions/pulp/orchestration/repository/sync.rb +0 -18
  308. data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +0 -37
  309. data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +0 -15
  310. data/app/lib/actions/pulp/orphan_cleanup/remove_unneeded_repos.rb +0 -16
  311. data/app/lib/actions/pulp/repository/abstract_copy_content.rb +0 -45
  312. data/app/lib/actions/pulp/repository/abstract_remove_content.rb +0 -32
  313. data/app/lib/actions/pulp/repository/clear.rb +0 -18
  314. data/app/lib/actions/pulp/repository/copy_all_units.rb +0 -30
  315. data/app/lib/actions/pulp/repository/copy_units.rb +0 -25
  316. data/app/lib/actions/pulp/repository/create.rb +0 -28
  317. data/app/lib/actions/pulp/repository/create_in_plan.rb +0 -15
  318. data/app/lib/actions/pulp/repository/create_upload_request.rb +0 -20
  319. data/app/lib/actions/pulp/repository/delete_upload_request.rb +0 -19
  320. data/app/lib/actions/pulp/repository/destroy.rb +0 -28
  321. data/app/lib/actions/pulp/repository/distributor_publish.rb +0 -25
  322. data/app/lib/actions/pulp/repository/download.rb +0 -16
  323. data/app/lib/actions/pulp/repository/import_upload.rb +0 -19
  324. data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -47
  325. data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +0 -95
  326. data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +0 -103
  327. data/app/lib/actions/pulp/repository/presenters/file_unit_presenter.rb +0 -42
  328. data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +0 -131
  329. data/app/lib/actions/pulp/repository/refresh.rb +0 -21
  330. data/app/lib/actions/pulp/repository/regenerate_applicability.rb +0 -21
  331. data/app/lib/actions/pulp/repository/remove_distribution.rb +0 -11
  332. data/app/lib/actions/pulp/repository/remove_units.rb +0 -44
  333. data/app/lib/actions/pulp/repository/sync.rb +0 -99
  334. data/app/lib/actions/pulp/repository/upload_file.rb +0 -28
  335. data/app/lib/actions/pulp/repository_group/create.rb +0 -31
  336. data/app/lib/actions/pulp/repository_group/delete.rb +0 -17
  337. data/app/lib/actions/pulp/repository_group/export.rb +0 -51
  338. data/app/lib/katello/util/package_clause_generator.rb +0 -77
  339. data/app/models/katello/glue/pulp/pulp_errors.rb +0 -9
  340. data/app/models/katello/glue/pulp/repo.rb +0 -353
  341. data/app/models/katello/pulp_sync_status.rb +0 -165
  342. data/app/models/katello/pulp_task_status.rb +0 -63
  343. data/app/services/katello/pulp/content.rb +0 -24
  344. data/app/services/katello/pulp/importer_comparison.rb +0 -28
  345. data/app/services/katello/pulp/repository/deb.rb +0 -61
  346. data/app/services/katello/pulp/repository/docker.rb +0 -82
  347. data/app/services/katello/pulp/repository/file.rb +0 -52
  348. data/app/services/katello/pulp/repository/yum.rb +0 -205
  349. data/app/services/katello/pulp/repository.rb +0 -327
  350. data/app/services/katello/pulp/server.rb +0 -35
  351. data/app/services/katello/pulp/simple_package.rb +0 -24
  352. data/app/services/katello/pulp/smart_proxy_repository.rb +0 -52
  353. data/lib/monkeys/fix_deb_optimized_sync.rb +0 -35
  354. data/lib/monkeys/fix_pulp_container_path.rb +0 -35
  355. data/locale/zanata.xml +0 -30
  356. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentSearch.fixtures.json +0 -33
@@ -3,7 +3,7 @@ import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-
3
3
  import mockAvailableHostCollections from './availableHostCollections.fixtures.json';
4
4
  import mockRemovableHostCollections from './removableHostCollections.fixtures.json';
5
5
  import { REMOVABLE_HOST_COLLECTIONS_KEY } from '../HostCollectionsConstants';
6
- import { assertNockRequest, mockAutocomplete, mockSetting, nockInstance } from '../../../../../../test-utils/nockWrapper';
6
+ import { assertNockRequest, mockAutocomplete, nockInstance } from '../../../../../../test-utils/nockWrapper';
7
7
  import katelloApi, { foremanApi } from '../../../../../../services/api';
8
8
  import { HostCollectionsAddModal, HostCollectionsRemoveModal } from '../HostCollectionsModal';
9
9
 
@@ -38,20 +38,11 @@ const defaultQueryWithAvailable = {
38
38
  };
39
39
 
40
40
  let firstHostCollection;
41
- let searchDelayScope;
42
- let autoSearchScope;
43
41
 
44
42
  describe('HostCollectionsAddModal', () => {
45
43
  beforeEach(() => {
46
44
  const { results } = mockAvailableHostCollections;
47
45
  [firstHostCollection] = results;
48
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 500);
49
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing', true);
50
- });
51
-
52
- afterEach(() => {
53
- assertNockRequest(searchDelayScope);
54
- assertNockRequest(autoSearchScope);
55
46
  });
56
47
 
57
48
  test('Calls API with available_for=host on page load', async (done) => {
@@ -153,13 +144,6 @@ describe('HostCollectionsRemoveModal', () => {
153
144
  beforeEach(() => {
154
145
  const { results } = mockAvailableHostCollections;
155
146
  [firstHostCollection] = results;
156
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 500);
157
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing', true);
158
- });
159
-
160
- afterEach(() => {
161
- assertNockRequest(searchDelayScope);
162
- assertNockRequest(autoSearchScope);
163
147
  });
164
148
 
165
149
  test('Calls API without available_for=host on page load', async (done) => {
@@ -99,7 +99,18 @@ export const ErrataTab = () => {
99
99
  const { allUpToDate, neededErrata } = errataStatusContemplation(errataStatus);
100
100
  const emptySearchTitle = __('No matching errata found');
101
101
  const emptySearchBody = __('Try changing your search settings.');
102
+ const resetFiltersOnly = () => {
103
+ setErrataTypeSelected(ERRATA_TYPE);
104
+ setErrataSeveritySelected(ERRATA_SEVERITY);
105
+ };
106
+
107
+ const resetFiltersAndToggle = () => {
108
+ resetFiltersOnly();
109
+ setToggleGroupState(APPLICABLE);
110
+ };
102
111
 
112
+ let resetFilters = resetFiltersOnly;
113
+ let secondaryActionTextOverride;
103
114
  let emptyContentTitle;
104
115
  let emptyContentBody;
105
116
  switch (friendlyErrataStatus(errataStatus)) {
@@ -108,8 +119,10 @@ export const ErrataTab = () => {
108
119
  emptyContentBody = __('No action is needed because there are no applicable errata for this host.');
109
120
  break;
110
121
  case 'Needed':
111
- emptyContentTitle = __('This host has errata that are applicable, but not installable.');
112
- emptyContentBody = __("You may want to check the host's content view and lifecycle environment.");
122
+ emptyContentTitle = __('No matching errata found');
123
+ emptyContentBody = __('This host has errata that are applicable, but not installable. Adjust your filters and try again.');
124
+ resetFilters = resetFiltersAndToggle;
125
+ secondaryActionTextOverride = __('View applicable errata');
113
126
  break;
114
127
  case 'Unknown':
115
128
  emptyContentTitle = __('Unknown errata status');
@@ -286,11 +299,6 @@ export const ErrataTab = () => {
286
299
  }
287
300
  };
288
301
 
289
- const resetFilters = () => {
290
- setErrataTypeSelected(ERRATA_TYPE);
291
- setErrataSeveritySelected(ERRATA_SEVERITY);
292
- };
293
-
294
302
  const readOnlyBookmarks =
295
303
  cannot(createBookmarks, userPermissionsFromHostDetails({ hostDetails }));
296
304
 
@@ -476,8 +484,10 @@ export const ErrataTab = () => {
476
484
  selectNone,
477
485
  toggleGroup,
478
486
  resetFilters,
487
+ secondaryActionTextOverride,
479
488
  }
480
489
  }
490
+ showSecondaryActionButton={neededErrata}
481
491
  happyEmptyContent={allUpToDate}
482
492
  ouiaId="host-errata-table"
483
493
  additionalListeners={[
@@ -487,8 +497,7 @@ export const ErrataTab = () => {
487
497
  fetchItems={fetchItems}
488
498
  bookmarkController="katello_errata"
489
499
  readOnlyBookmarks={readOnlyBookmarks}
490
- autocompleteEndpoint={`/hosts/${hostId}/errata/auto_complete_search`}
491
- foremanApiAutoComplete
500
+ autocompleteEndpoint={`/api/v2/hosts/${hostId}/errata`}
492
501
  rowsCount={results?.length}
493
502
  variant={TableVariant.compact}
494
503
  {...selectAll}
@@ -379,8 +379,7 @@ export const ModuleStreamsTab = () => {
379
379
  fetchItems={fetchItems}
380
380
  bookmarkController="katello_host_available_module_streams"
381
381
  readOnlyBookmarks={hideBookmarkActions}
382
- autocompleteEndpoint={`/hosts/${hostId}/module_streams/auto_complete_search`}
383
- foremanApiAutoComplete
382
+ autocompleteEndpoint={`/api/v2/hosts/${hostId}/module_streams`}
384
383
  rowsCount={results?.length}
385
384
  variant={TableVariant.compact}
386
385
  requestKey={MODULE_STREAMS_KEY}
@@ -219,8 +219,7 @@ const PackageInstallModal = ({
219
219
  additionalListeners={[hostId]}
220
220
  fetchItems={fetchItems}
221
221
  searchPlaceholderText={__('Search available packages')}
222
- autocompleteEndpoint={`/hosts/${hostId}/packages/auto_complete_search`}
223
- foremanApiAutoComplete
222
+ autocompleteEndpoint={`/api/v2/hosts/${hostId}/packages`}
224
223
  variant={TableVariant.compact}
225
224
  {...selectAll}
226
225
  displaySelectAllCheckbox
@@ -521,8 +521,7 @@ export const PackagesTab = () => {
521
521
  fetchItems={fetchItems}
522
522
  bookmarkController="katello_host_installed_packages"
523
523
  readOnlyBookmarks={readOnlyBookmarks}
524
- autocompleteEndpoint={`/hosts/${hostId}/packages/auto_complete_search`}
525
- foremanApiAutoComplete
524
+ autocompleteEndpoint={`/api/v2/hosts/${hostId}/packages`}
526
525
  rowsCount={results?.length}
527
526
  variant={TableVariant.compact}
528
527
  {...selectAll}
@@ -15,6 +15,7 @@ import {
15
15
  useDispatch,
16
16
  useSelector,
17
17
  } from 'react-redux';
18
+ import { isEqual } from 'lodash';
18
19
 
19
20
  import {
20
21
  ActionList,
@@ -169,12 +170,12 @@ const RepositorySetsTab = () => {
169
170
  organization_id: orgId,
170
171
  } = hostDetails;
171
172
 
172
- const organizationDetails = useSelector(state => selectOrganization(state, orgId));
173
- const orgStatus = useSelector(state => selectOrganizationStatus(state, orgId));
174
-
175
173
  const {
176
174
  simple_content_access: simpleContentAccess,
177
- } = organizationDetails;
175
+ } = useSelector(state => selectOrganization(state, orgId));
176
+ const orgStatus = useSelector(state => selectOrganizationStatus(state, orgId));
177
+ const orgNotLoaded = orgStatus !== STATUS.RESOLVED;
178
+
178
179
  const canDoContentOverrides = can(
179
180
  editHosts,
180
181
  userPermissionsFromHostDetails({ hostDetails }),
@@ -185,9 +186,11 @@ const RepositorySetsTab = () => {
185
186
  const {
186
187
  contentViewDefault,
187
188
  lifecycleEnvironmentLibrary,
188
- contentViewName,
189
- lifecycleEnvironmentName,
189
+ contentView,
190
+ lifecycleEnvironment,
190
191
  } = contentFacet;
192
+ const { name: contentViewName } = contentView ?? {};
193
+ const { name: lifecycleEnvironmentName } = lifecycleEnvironment ?? {};
191
194
  const nonLibraryHost = contentViewDefault === false ||
192
195
  lifecycleEnvironmentLibrary === false;
193
196
  const [isBulkActionOpen, setIsBulkActionOpen] = useState(false);
@@ -196,22 +199,24 @@ const RepositorySetsTab = () => {
196
199
  const { searchParam, show, status: initialStatus } = useUrlParams();
197
200
 
198
201
  const toggleGroupStates = ['noLimit', 'limitToEnvironment'];
199
- const [noLimit, limitToEnvironment] = toggleGroupStates;
200
- const defaultToggleGroupState = nonLibraryHost ? limitToEnvironment : noLimit;
202
+ const [SHOW_ALL, LIMIT_TO_ENVIRONMENT] = toggleGroupStates;
203
+ const defaultToggleGroupState = nonLibraryHost ? LIMIT_TO_ENVIRONMENT : SHOW_ALL;
204
+ const unfilteredToggleGroupState = SHOW_ALL;
201
205
  const [toggleGroupState, setToggleGroupState] =
202
206
  useState(show ?? defaultToggleGroupState);
203
207
  const [statusSelected, setStatusSelected]
204
208
  = useState(PARAM_TO_FRIENDLY_NAME[initialStatus] ?? STATUS_LABEL);
205
- const activeFilters = [statusSelected, toggleGroupState];
206
- const defaultFilters = [STATUS_LABEL, defaultToggleGroupState];
209
+ const activeFilters = [statusSelected];
210
+ const defaultFilters = [STATUS_LABEL];
207
211
 
208
212
  const [alertShowing, setAlertShowing] = useState(false);
213
+
209
214
  const emptyContentTitle = __('No repository sets to show.');
210
- const emptyContentBody = __('Repository sets will appear here after enabling Red Hat repositories or creating custom products.');
215
+ const emptyContentBody = toggleGroupState === SHOW_ALL ?
216
+ __('Repository sets will appear here after enabling Red Hat repositories or creating custom products.') :
217
+ __('Repository sets will appear here when the host\'s content view and environment has available content.');
211
218
  const emptySearchTitle = __('No matching repository sets found');
212
219
  const emptySearchBody = __('Try changing your search query.');
213
- const showPrimaryAction = true;
214
- const showSecondaryAction = true;
215
220
  const primaryActionTitle = __('Enable Red Hat repositories');
216
221
  const secondaryActionTitle = __('Create a custom product');
217
222
  const primaryActionLink = '/redhat_repositories';
@@ -246,26 +251,27 @@ const RepositorySetsTab = () => {
246
251
  modifiedParams.status = STATUS_TO_PARAM[statusSelected];
247
252
  }
248
253
  return getHostRepositorySets({
249
- content_access_mode_env: toggleGroupState === limitToEnvironment,
254
+ content_access_mode_env: toggleGroupState === LIMIT_TO_ENVIRONMENT,
250
255
  content_access_mode_all: simpleContentAccess,
251
256
  host_id: hostId,
252
257
  ...apiSortParams,
253
258
  ...modifiedParams,
254
259
  });
255
260
  },
256
- [hostId, toggleGroupState, limitToEnvironment,
261
+ [hostId, toggleGroupState, LIMIT_TO_ENVIRONMENT,
257
262
  simpleContentAccess, apiSortParams, statusSelected, STATUS_LABEL],
258
263
  );
259
264
 
260
265
  useEffect(() => {
261
- if (orgId && orgStatus !== STATUS.RESOLVED) {
266
+ if (orgId && orgNotLoaded) {
262
267
  dispatch(getOrganization({ orgId }));
263
268
  }
264
- }, [orgId, orgStatus, dispatch]);
269
+ }, [orgId, orgNotLoaded, dispatch]);
265
270
 
271
+ const status = useSelector(state => selectRepositorySetsStatus(state));
266
272
  const response = useSelector(state => selectAPIResponse(state, REPOSITORY_SETS_KEY));
267
273
  const { results, error: errorSearchBody, ...metadata } = response;
268
- const status = useSelector(state => selectRepositorySetsStatus(state));
274
+
269
275
  const repoSetSearchQuery = label => `cp_content_id = ${label}`;
270
276
  const {
271
277
  selectOne, isSelected, searchQuery, selectedCount, isSelectable,
@@ -278,9 +284,17 @@ const RepositorySetsTab = () => {
278
284
 
279
285
  const hostDetailsStatus = useSelector(state => selectHostDetailsStatus(state));
280
286
 
287
+ // Ignore the toggle group when deciding if there is emptyContent. This will
288
+ // ensure the correct EmptyStateMessage
289
+ const isFiltering = activeFilters?.length &&
290
+ !isEqual(new Set(activeFilters), new Set(defaultFilters));
291
+ const emptyContent = (results && results.length === 0) && !searchQuery && !isFiltering;
292
+ const showPrimaryAction = (toggleGroupState === SHOW_ALL) && emptyContent;
293
+ const showSecondaryAction = showPrimaryAction;
294
+
281
295
  const resetFilters = () => {
282
296
  setStatusSelected(STATUS_LABEL);
283
- setToggleGroupState(defaultToggleGroupState);
297
+ if (emptyContent) setToggleGroupState(SHOW_ALL);
284
298
  };
285
299
  useEffect(() => {
286
300
  // wait until host details are loaded to set alertShowing
@@ -289,7 +303,7 @@ const RepositorySetsTab = () => {
289
303
  }
290
304
  }, [hostDetailsStatus, nonLibraryHost]);
291
305
 
292
- if (!hostId) return <Skeleton />;
306
+ if (!hostId || orgNotLoaded) return <Skeleton />;
293
307
  const updateResults = newResponse => dispatch({
294
308
  type: `${REPOSITORY_SETS_KEY}_SUCCESS`,
295
309
  key: REPOSITORY_SETS_KEY,
@@ -396,15 +410,15 @@ const RepositorySetsTab = () => {
396
410
  text={__('Show all')}
397
411
  buttonId="no-limit-toggle"
398
412
  aria-label="No limit"
399
- isSelected={toggleGroupState === noLimit}
400
- onChange={() => setToggleGroupState(noLimit)}
413
+ isSelected={toggleGroupState === SHOW_ALL}
414
+ onChange={() => setToggleGroupState(SHOW_ALL)}
401
415
  />
402
416
  <ToggleGroupItem
403
417
  text={__('Limit to environment')}
404
418
  buttonId="limit-to-env-toggle"
405
419
  aria-label="Limit to environment"
406
- isSelected={toggleGroupState === limitToEnvironment}
407
- onChange={() => setToggleGroupState(limitToEnvironment)}
420
+ isSelected={toggleGroupState === LIMIT_TO_ENVIRONMENT}
421
+ onChange={() => setToggleGroupState(LIMIT_TO_ENVIRONMENT)}
408
422
  />
409
423
  </ToggleGroup>
410
424
  </SplitItem>
@@ -443,11 +457,11 @@ const RepositorySetsTab = () => {
443
457
 
444
458
  const hostEnvText = 'the "{contentViewName}" content view and "{lifecycleEnvironmentName}" environment';
445
459
 
446
- const scaAlert = (toggleGroupState === limitToEnvironment ?
460
+ const scaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
447
461
  `Showing only repositories in ${hostEnvText}.` :
448
462
  'Showing all available repositories.');
449
463
 
450
- const nonScaAlert = (toggleGroupState === limitToEnvironment ?
464
+ const nonScaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
451
465
  `Showing repositories in ${hostEnvText} that are available through subscriptions.` :
452
466
  'Showing all repositories available through subscriptions.');
453
467
 
@@ -518,13 +532,19 @@ const RepositorySetsTab = () => {
518
532
  resetFilters,
519
533
  }
520
534
  }
535
+ alwaysHideToolbar={showPrimaryAction}
536
+ activeToggleState={toggleGroupState}
537
+ unfilteredToggleState={unfilteredToggleGroupState}
538
+ showSecondaryActionButton={toggleGroupState === LIMIT_TO_ENVIRONMENT}
539
+ secondaryActionTextOverride={__('Show all repository sets')}
540
+ emptyContentOverride={emptyContent}
521
541
  ouiaId="host-repository-sets-table"
522
542
  errorSearchTitle={errorSearchTitle}
523
543
  errorSearchBody={errorSearchBody}
524
544
  additionalListeners={[hostId, toggleGroupState, statusSelected,
525
545
  activeSortColumn, activeSortDirection]}
526
546
  fetchItems={fetchItems}
527
- autocompleteEndpoint="/repository_sets/auto_complete_search"
547
+ autocompleteEndpoint="/katello/api/v2/repository_sets"
528
548
  bookmarkController="katello_product_contents" // Katello::ProductContent.table_name
529
549
  readOnlyBookmarks={readOnlyBookmarks}
530
550
  rowsCount={results?.length}
@@ -210,8 +210,7 @@ const TracesTab = () => {
210
210
  metadata={meta}
211
211
  bookmarkController="katello_host_tracers"
212
212
  readOnlyBookmarks={readOnlyBookmarks}
213
- autocompleteEndpoint={`/hosts/${hostId}/traces/auto_complete_search`}
214
- foremanApiAutoComplete
213
+ autocompleteEndpoint={`/api/v2/hosts/${hostId}/traces`}
215
214
  rowsCount={results?.length}
216
215
  variant={TableVariant.compact}
217
216
  additionalListeners={[activeSortColumn, activeSortDirection,
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
  import { isEqual } from 'lodash';
3
3
  import { renderWithRedux, patientlyWaitFor, within, fireEvent } from 'react-testing-lib-wrapper';
4
- import { nockInstance, assertNockRequest, mockForemanAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
4
+ import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
5
5
  import { foremanApi } from '../../../../../services/api';
6
6
  import { HOST_ERRATA_KEY, ERRATA_SEARCH_QUERY } from '../ErrataTab/HostErrataConstants';
7
7
  import { REX_FEATURES } from '../RemoteExecutionConstants';
8
8
  import { ErrataTab } from '../ErrataTab/ErrataTab.js';
9
9
  import mockErrataData from './errata.fixtures.json';
10
10
  import mockResolveErrataTask from './resolveErrata.fixtures.json';
11
- import mockBookmarkData from './bookmarks.fixtures.json';
12
11
 
13
12
  jest.mock('../../hostDetailsHelpers', () => ({
14
13
  ...jest.requireActual('../../hostDetailsHelpers'),
@@ -39,8 +38,6 @@ const cfNoErrata = cfWithErrataTotal(0);
39
38
 
40
39
  const hostName = 'foo.example.com';
41
40
 
42
- const errataBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_errata');
43
-
44
41
  const renderOptions = (facetAttributes = contentFacetAttributes) => ({
45
42
  apiNamespace: HOST_ERRATA_KEY,
46
43
  initialState: {
@@ -108,22 +105,10 @@ const applyByKatelloAgentUrl = foremanApi.getApiUrl('/hosts/1/errata/apply');
108
105
 
109
106
  let firstErrata;
110
107
  let thirdErrata;
111
- let searchDelayScope;
112
- let autoSearchScope;
113
- let bookmarkScope;
114
108
 
115
109
  beforeEach(() => {
116
110
  const { results } = mockErrataData;
117
111
  [firstErrata, , thirdErrata] = results;
118
- bookmarkScope = nockInstance.get(errataBookmarks).reply(200, mockBookmarkData);
119
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
120
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
121
- });
122
-
123
- afterEach(() => {
124
- assertNockRequest(searchDelayScope);
125
- assertNockRequest(autoSearchScope);
126
- assertNockRequest(bookmarkScope);
127
112
  });
128
113
 
129
114
  test('Can call API for errata and show on screen on page load', async (done) => {
@@ -163,7 +148,7 @@ test('Can handle no errata being present', async (done) => {
163
148
  const { queryByText } = renderWithRedux(<ErrataTab />, renderOptions(cfNoErrata));
164
149
 
165
150
  // Assert that there are not any errata showing on the screen.
166
- await patientlyWaitFor(() => expect(queryByText('This host has errata that are applicable, but not installable.')).toBeInTheDocument());
151
+ await patientlyWaitFor(() => expect(queryByText('This host has errata that are applicable, but not installable. Adjust your filters and try again.')).toBeInTheDocument());
167
152
  // Assert request was made and completed, see helper function
168
153
  assertNockRequest(autocompleteScope);
169
154
  assertNockRequest(scope, done); // Pass jest callback to confirm test is done
@@ -805,8 +790,6 @@ test('Can filter by errata type', async (done) => {
805
790
 
806
791
  assertNockRequest(autocompleteScope);
807
792
  assertNockRequest(scope);
808
- assertNockRequest(searchDelayScope);
809
- assertNockRequest(autoSearchScope);
810
793
  assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
811
794
  });
812
795
 
@@ -853,8 +836,6 @@ test('Can filter by severity', async (done) => {
853
836
 
854
837
  assertNockRequest(autocompleteScope);
855
838
  assertNockRequest(scope);
856
- assertNockRequest(searchDelayScope);
857
- assertNockRequest(autoSearchScope);
858
839
  assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
859
840
  });
860
841
 
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
  import { act } from 'react-test-renderer';
3
3
  import { renderWithRedux, patientlyWaitFor, within, fireEvent } from 'react-testing-lib-wrapper';
4
- import { nockInstance, assertNockRequest, mockForemanAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
4
+ import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
5
5
  import { ModuleStreamsTab } from '../ModuleStreamsTab/ModuleStreamsTab.js';
6
6
  import mockModuleStreams from './moduleStreams.fixtures.json';
7
- import mockBookmarkData from './bookmarks.fixtures.json';
8
7
  import { MODULE_STREAMS_KEY } from '../../../../../scenes/ModuleStreams/ModuleStreamsConstants';
9
8
  import { foremanApi } from '../../../../../services/api';
10
9
 
@@ -15,8 +14,6 @@ jest.mock('../../hostDetailsHelpers', () => ({
15
14
  }),
16
15
  }));
17
16
 
18
- const moduleBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_available_module_streams');
19
-
20
17
  const contentFacetAttributes = {
21
18
  id: 11,
22
19
  uuid: 'e5761ea3-4117-4ecf-83d0-b694f99b389e',
@@ -44,34 +41,10 @@ const hostModuleStreams = foremanApi.getApiUrl('/hosts/1/module_streams');
44
41
  const autocompleteUrl = '/hosts/1/module_streams/auto_complete_search';
45
42
 
46
43
  let firstModuleStreams;
47
- let searchDelayScope;
48
- let autoSearchScope;
49
- let bookmarkScope;
50
-
51
- beforeEach(() => {
52
- const { results } = mockModuleStreams;
53
- [firstModuleStreams] = results;
54
- bookmarkScope = nockInstance.get(moduleBookmarks).reply(200, mockBookmarkData);
55
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
56
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
57
- });
58
-
59
- afterEach(() => {
60
- assertNockRequest(searchDelayScope);
61
- assertNockRequest(autoSearchScope);
62
- assertNockRequest(bookmarkScope);
63
- });
64
44
 
65
45
  beforeEach(() => {
66
46
  const { results } = mockModuleStreams;
67
47
  [firstModuleStreams] = results;
68
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
69
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
70
- });
71
-
72
- afterEach(() => {
73
- assertNockRequest(searchDelayScope);
74
- assertNockRequest(autoSearchScope);
75
48
  });
76
49
 
77
50
  test('Can call API for Module streams and show on screen on page load', async (done) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor, fireEvent, within } from 'react-testing-lib-wrapper';
3
- import { nockInstance, assertNockRequest, mockForemanAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
3
+ import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
4
4
  import katelloApi, { foremanApi } from '../../../../../services/api';
5
5
  import mockPackagesData from './yumInstallablePackages.fixtures.json';
6
6
  import PackageInstallModal from '../PackagesTab/PackageInstallModal';
@@ -54,19 +54,10 @@ const defaultQuery = {
54
54
 
55
55
  let firstPackages;
56
56
  let secondPackages;
57
- let searchDelayScope;
58
- let autoSearchScope;
59
57
 
60
58
  beforeEach(() => {
61
59
  const { results } = mockPackagesData;
62
60
  [firstPackages, secondPackages] = results;
63
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 500);
64
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing', true);
65
- });
66
-
67
- afterEach(() => {
68
- assertNockRequest(searchDelayScope);
69
- assertNockRequest(autoSearchScope);
70
61
  });
71
62
 
72
63
  test('Can call API for installable packages and show on screen on page load', async (done) => {
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
3
- import { nockInstance, assertNockRequest, mockForemanAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
3
+ import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
4
4
  import { foremanApi } from '../../../../../services/api';
5
5
  import { HOST_PACKAGES_KEY, PACKAGES_SEARCH_QUERY, SELECTED_UPDATE_VERSIONS } from '../PackagesTab/HostPackagesConstants';
6
6
  import { PackagesTab } from '../PackagesTab/PackagesTab.js';
7
7
  import mockPackagesData from './packages.fixtures.json';
8
8
  import { REX_FEATURES } from '../RemoteExecutionConstants';
9
9
  import * as hooks from '../../../../Table/TableHooks';
10
- import mockBookmarkData from './bookmarks.fixtures.json';
11
10
 
12
11
  jest.mock('../../hostDetailsHelpers', () => ({
13
12
  ...jest.requireActual('../../hostDetailsHelpers'),
@@ -25,8 +24,6 @@ const contentFacetAttributes = {
25
24
  };
26
25
 
27
26
  const hostname = 'test-host.example.com';
28
- const packageBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_installed_packages');
29
-
30
27
  const renderOptions = (facetAttributes = contentFacetAttributes) => ({
31
28
  apiNamespace: HOST_PACKAGES_KEY,
32
29
  initialState: {
@@ -61,22 +58,10 @@ const defaultQuery = { ...defaultQueryWithoutSearch, search: '' };
61
58
 
62
59
  let firstPackage;
63
60
  let secondPackage;
64
- let searchDelayScope;
65
- let autoSearchScope;
66
- let bookmarkScope;
67
61
 
68
62
  beforeEach(() => {
69
63
  const { results } = mockPackagesData;
70
64
  [firstPackage, secondPackage] = results;
71
- bookmarkScope = nockInstance.get(packageBookmarks).reply(200, mockBookmarkData);
72
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
73
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
74
- });
75
-
76
- afterEach(() => {
77
- assertNockRequest(searchDelayScope);
78
- assertNockRequest(autoSearchScope);
79
- assertNockRequest(bookmarkScope);
80
65
  });
81
66
 
82
67
  test('Can call API for packages and show on screen on page load', async (done) => {
@@ -159,8 +144,6 @@ test('Can filter by package status', async (done) => {
159
144
 
160
145
  assertNockRequest(autocompleteScope);
161
146
  assertNockRequest(scope);
162
- assertNockRequest(searchDelayScope);
163
- assertNockRequest(autoSearchScope);
164
147
  assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
165
148
  });
166
149
 
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor, within, 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 katelloApi, { foremanApi } from '../../../../../services/api';
5
5
  import { REPOSITORY_SETS_KEY } from '../RepositorySetsTab/RepositorySetsConstants';
6
6
  import RepositorySetsTab from '../RepositorySetsTab/RepositorySetsTab';
7
7
  import mockRepoSetData from './repositorySets.fixtures.json';
8
- import mockBookmarkData from './bookmarks.fixtures.json';
9
8
  import mockContentOverride from './contentOverrides.fixtures.json';
10
9
 
11
10
  jest.mock('../../hostDetailsHelpers', () => ({
@@ -50,7 +49,6 @@ const renderOptions = (facetAttributes = contentFacetAttributes) => ({
50
49
 
51
50
  const hostRepositorySets = katelloApi.getApiUrl('/repository_sets');
52
51
  const autocompleteUrl = '/repository_sets/auto_complete_search';
53
- const repositorySetBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_product_contents');
54
52
  const contentOverride = foremanApi.getApiUrl('/hosts/1/subscriptions/content_override');
55
53
 
56
54
  const limitToEnvQuery = {
@@ -70,23 +68,11 @@ const showAllQuery = {
70
68
 
71
69
  let firstRepoSet;
72
70
  let secondRepoSet;
73
- let searchDelayScope;
74
- let autoSearchScope;
75
- let bookmarkScope;
76
71
 
77
72
  beforeEach(() => {
78
73
  // jest.resetModules();
79
74
  const { results } = mockRepoSetData;
80
75
  [firstRepoSet, secondRepoSet] = results;
81
- bookmarkScope = nockInstance.get(repositorySetBookmarks).reply(200, mockBookmarkData);
82
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
83
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
84
- });
85
-
86
- afterEach(() => {
87
- assertNockRequest(searchDelayScope);
88
- assertNockRequest(autoSearchScope);
89
- assertNockRequest(bookmarkScope);
90
76
  });
91
77
 
92
78
  test('Can call API for repository sets and show basic table', async (done) => {
@@ -415,8 +401,6 @@ test('Can filter by status', async (done) => {
415
401
  });
416
402
  assertNockRequest(autocompleteScope);
417
403
  assertNockRequest(scope);
418
- assertNockRequest(searchDelayScope);
419
- assertNockRequest(autoSearchScope);
420
404
  assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
421
405
  });
422
406
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, waitFor, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
3
- import { nockInstance, assertNockRequest, mockForemanAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
3
+ import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
4
4
  import { foremanApi } from '../../../../../services/api';
5
5
  import { REX_FEATURES } from '../RemoteExecutionConstants';
6
6
  import { HOST_TRACES_KEY, TRACES_SEARCH_QUERY } from '../TracesTab/HostTracesConstants';
@@ -9,10 +9,8 @@ import mockTraceData from './traces.fixtures.json';
9
9
  import mockResolveTraceTask from './resolveTraces.fixtures.json';
10
10
  import emptyTraceResults from './tracerEmptyTraceResults.fixtures.json';
11
11
  import mockJobInvocationStatus from './tracerEnableJobInvocation.fixtures.json';
12
- import mockBookmarkData from './bookmarks.fixtures.json';
13
12
 
14
13
  const hostName = 'client.example.com';
15
- const tracesBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_tracers');
16
14
 
17
15
  jest.mock('../../hostDetailsHelpers', () => ({
18
16
  ...jest.requireActual('../../hostDetailsHelpers'),
@@ -57,23 +55,11 @@ const autocompleteUrl = '/hosts/1/traces/auto_complete_search';
57
55
  const jobInvocations = foremanApi.getApiUrl('/job_invocations');
58
56
 
59
57
  let firstTrace;
60
- let searchDelayScope;
61
- let autoSearchScope;
62
- let bookmarkScope;
63
58
 
64
59
  describe('With tracer installed', () => {
65
60
  beforeEach(() => {
66
61
  const { results } = mockTraceData;
67
62
  [firstTrace] = results;
68
- bookmarkScope = nockInstance.get(tracesBookmarks).reply(200, mockBookmarkData);
69
- searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
70
- autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
71
- });
72
-
73
- afterEach(() => {
74
- assertNockRequest(searchDelayScope);
75
- assertNockRequest(autoSearchScope);
76
- assertNockRequest(bookmarkScope);
77
63
  });
78
64
 
79
65
  test('Can call API for traces and show on screen on page load', async (done) => {
@@ -16,7 +16,7 @@ global.console.error = (error, stack) => {
16
16
  // 'The prop `ouiaId` is marked as required in `Modal`, but its value is `undefined`',
17
17
  // 'created by WizardHeader', 'created by Navigation',
18
18
  // 'created by ActionsColumn', 'created by InactiveText', 'created by Select',
19
- // 'created by Context.Consumer'];
19
+ // 'created by Context.Consumer', 'created by DualListSelector'];
20
20
 
21
21
  /* eslint-disable-next-line no-console */
22
22
  if (stack) console.log(stack); // Prints out original stack trace