katello 5.0.0 → 5.1.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (467) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/locale/bn/katello.js +73 -73
  3. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +72 -72
  4. data/app/assets/javascripts/katello/locale/ca/katello.js +73 -73
  5. data/app/assets/javascripts/katello/locale/cs/katello.js +73 -73
  6. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +76 -76
  7. data/app/assets/javascripts/katello/locale/de/katello.js +78 -78
  8. data/app/assets/javascripts/katello/locale/de_AT/katello.js +72 -72
  9. data/app/assets/javascripts/katello/locale/de_DE/katello.js +74 -74
  10. data/app/assets/javascripts/katello/locale/el/katello.js +74 -74
  11. data/app/assets/javascripts/katello/locale/en/katello.js +73 -73
  12. data/app/assets/javascripts/katello/locale/en_GB/katello.js +72 -72
  13. data/app/assets/javascripts/katello/locale/en_US/katello.js +72 -72
  14. data/app/assets/javascripts/katello/locale/es/katello.js +77 -77
  15. data/app/assets/javascripts/katello/locale/et_EE/katello.js +72 -72
  16. data/app/assets/javascripts/katello/locale/fr/katello.js +328 -328
  17. data/app/assets/javascripts/katello/locale/gl/katello.js +72 -72
  18. data/app/assets/javascripts/katello/locale/gu/katello.js +72 -72
  19. data/app/assets/javascripts/katello/locale/he_IL/katello.js +72 -72
  20. data/app/assets/javascripts/katello/locale/hi/katello.js +72 -72
  21. data/app/assets/javascripts/katello/locale/id/katello.js +72 -72
  22. data/app/assets/javascripts/katello/locale/it/katello.js +75 -75
  23. data/app/assets/javascripts/katello/locale/ja/katello.js +401 -401
  24. data/app/assets/javascripts/katello/locale/ka/katello.js +77 -77
  25. data/app/assets/javascripts/katello/locale/kn/katello.js +72 -72
  26. data/app/assets/javascripts/katello/locale/ko/katello.js +315 -315
  27. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +72 -72
  28. data/app/assets/javascripts/katello/locale/mr/katello.js +72 -72
  29. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +72 -72
  30. data/app/assets/javascripts/katello/locale/or/katello.js +72 -72
  31. data/app/assets/javascripts/katello/locale/pa/katello.js +72 -72
  32. data/app/assets/javascripts/katello/locale/pl/katello.js +72 -72
  33. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +72 -72
  34. data/app/assets/javascripts/katello/locale/pt/katello.js +72 -72
  35. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +78 -78
  36. data/app/assets/javascripts/katello/locale/ro/katello.js +72 -72
  37. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +72 -72
  38. data/app/assets/javascripts/katello/locale/ru/katello.js +75 -75
  39. data/app/assets/javascripts/katello/locale/sl/katello.js +72 -72
  40. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +72 -72
  41. data/app/assets/javascripts/katello/locale/ta/katello.js +73 -73
  42. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +72 -72
  43. data/app/assets/javascripts/katello/locale/te/katello.js +72 -72
  44. data/app/assets/javascripts/katello/locale/tr/katello.js +72 -72
  45. data/app/assets/javascripts/katello/locale/vi/katello.js +72 -72
  46. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +72 -72
  47. data/app/assets/javascripts/katello/locale/zh/katello.js +72 -72
  48. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +306 -306
  49. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +75 -75
  50. data/app/assets/javascripts/katello/organizations/download_certificate.js +65 -1
  51. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +123 -34
  52. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -12
  53. data/app/controllers/katello/api/v2/activation_keys_controller.rb +4 -8
  54. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +6 -0
  55. data/app/controllers/katello/api/v2/capsules_controller.rb +2 -1
  56. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +14 -4
  57. data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
  58. data/app/controllers/katello/api/v2/docker_tags_controller.rb +5 -2
  59. data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +1 -1
  60. data/app/controllers/katello/api/v2/host_contents_controller.rb +2 -3
  61. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +2 -4
  62. data/app/controllers/katello/api/v2/organizations_controller.rb +30 -5
  63. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -1
  64. data/app/controllers/katello/api/v2/products_controller.rb +1 -1
  65. data/app/controllers/katello/api/v2/repositories_controller.rb +2 -2
  66. data/app/controllers/katello/api/v2/sync_plans_controller.rb +3 -2
  67. data/app/controllers/katello/api/v2/sync_status_controller.rb +1 -1
  68. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +5 -0
  69. data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
  70. data/app/helpers/katello/katello_urls_helper.rb +1 -3
  71. data/app/helpers/katello/sync_management_helper.rb +1 -0
  72. data/app/lib/actions/katello/repository/sync.rb +2 -2
  73. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -1
  74. data/app/lib/actions/pulp3/orchestration/repository/delete.rb +2 -2
  75. data/app/lib/katello/concerns/base_template_scope_extensions.rb +61 -2
  76. data/app/lib/katello/errors.rb +1 -2
  77. data/app/lib/katello/http_resource.rb +2 -1
  78. data/app/lib/katello/resources/candlepin/owner.rb +11 -2
  79. data/app/lib/katello/resources/candlepin.rb +2 -0
  80. data/app/lib/katello/resources/registry.rb +11 -3
  81. data/app/models/katello/activation_key.rb +0 -4
  82. data/app/models/katello/concerns/hostgroup_extensions.rb +8 -1
  83. data/app/models/katello/concerns/redhat_extensions.rb +9 -2
  84. data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
  85. data/app/models/katello/content_view_environment_activation_key.rb +7 -5
  86. data/app/models/katello/glue/candlepin/owner.rb +8 -0
  87. data/app/models/katello/host/content_facet.rb +0 -4
  88. data/app/models/katello/ping.rb +1 -0
  89. data/app/models/katello/repository.rb +4 -1
  90. data/app/models/katello/rhel_lifecycle_status.rb +3 -3
  91. data/app/models/katello/root_repository.rb +7 -3
  92. data/app/models/katello/sync_plan.rb +24 -11
  93. data/app/overrides/add_organization_attributes.rb +6 -0
  94. data/app/overrides/add_smart_proxy_form.rb +5 -0
  95. data/app/presenters/katello/sync_status_presenter.rb +23 -8
  96. data/app/services/cert/certs.rb +44 -0
  97. data/app/services/katello/pulp3/api/apt.rb +1 -1
  98. data/app/services/katello/pulp3/api/core.rb +1 -1
  99. data/app/services/katello/pulp3/api/docker.rb +3 -2
  100. data/app/services/katello/pulp3/repository/apt.rb +2 -2
  101. data/app/services/katello/pulp3/repository/docker.rb +11 -2
  102. data/app/services/katello/pulp3/repository/file.rb +6 -0
  103. data/app/services/katello/pulp3/repository/generic.rb +13 -4
  104. data/app/services/katello/pulp3/repository.rb +5 -4
  105. data/app/services/katello/registration_manager.rb +22 -22
  106. data/app/services/katello/repository_type.rb +2 -1
  107. data/app/services/katello/smart_proxy_helper.rb +2 -1
  108. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
  109. data/app/views/katello/api/v2/content_facet/base.json.rabl +0 -4
  110. data/app/views/katello/api/v2/products/base.json.rabl +4 -0
  111. data/app/views/katello/api/v2/repositories/base.json.rabl +5 -2
  112. data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
  113. data/app/views/overrides/organizations/_edit_override.html.erb +15 -6
  114. data/app/views/overrides/smart_proxies/_container_registry_auth.html.erb +3 -0
  115. data/config/initializers/monkeys.rb +2 -1
  116. data/config/routes/api/v2.rb +1 -0
  117. data/config/routes/overrides.rb +4 -0
  118. data/db/migrate/20240924161240_katello_recreate_evr_constructs.rb +141 -141
  119. data/db/migrate/20260505000000_add_container_registry_auth_to_smart_proxy.katello.rb +5 -0
  120. data/db/migrate/20260824210645_set_default_download_policy_for_python_repos.rb +11 -0
  121. data/db/migrate/20260918090000_use_big_int_for_host_installed_packages_id.rb +11 -0
  122. data/db/migrate/20260918120000_remove_allow_multiple_content_views_setting.rb +9 -0
  123. data/db/migrate/20260918133000_use_big_int_for_content_facet_applicable_rpms.rb +9 -0
  124. data/db/migrate/20261021000000_change_manage_subscription_allocations_permission_resource_type.rb +11 -0
  125. data/db/seeds.d/111-upgrade_tasks.rb +0 -1
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +10 -6
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.routes.js +2 -16
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +11 -21
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +8 -16
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +8 -16
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +8 -16
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +10 -18
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +10 -18
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +8 -16
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +8 -16
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +9 -17
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +8 -16
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +8 -16
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +11 -19
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +8 -16
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +33 -35
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +8 -16
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +8 -16
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +8 -16
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +8 -16
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +8 -16
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +10 -18
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +31 -39
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +9 -17
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +8 -16
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +43 -49
  152. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +8 -16
  153. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +8 -16
  154. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +8 -16
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +8 -16
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +8 -16
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +8 -16
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +8 -16
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +8 -16
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +11 -19
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +8 -16
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +8 -16
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +10 -18
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +8 -16
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +8 -16
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +8 -16
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +8 -16
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +8 -16
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +8 -16
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +8 -16
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +8 -16
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +8 -16
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +21 -26
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +10 -18
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +13 -13
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +1 -1
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +1 -1
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html +1 -1
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +1 -1
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +1 -1
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +1 -0
  184. data/lib/katello/permission_creator.rb +1 -1
  185. data/lib/katello/permissions/organization_permissions.rb +1 -0
  186. data/lib/katello/plugin.rb +2 -20
  187. data/lib/katello/repository_types/deb.rb +1 -0
  188. data/lib/katello/repository_types/docker.rb +1 -0
  189. data/lib/katello/repository_types/file.rb +5 -2
  190. data/lib/katello/repository_types/python.rb +1 -0
  191. data/lib/katello/repository_types/yum.rb +1 -0
  192. data/lib/katello/tasks/refresh_repos.rake +2 -2
  193. data/lib/katello/tasks/upgrades/4.19/populate_repository_version_prns.rake +1 -1
  194. data/lib/katello/version.rb +1 -1
  195. data/lib/monkeys/pulp_file_sync_optimize.rb +29 -0
  196. data/lib/monkeys/remove_unsupported_binding_defaults.rb +67 -0
  197. data/locale/Makefile +21 -7
  198. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  199. data/locale/bn/katello.po +73 -73
  200. data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
  201. data/locale/bn_IN/katello.po +72 -72
  202. data/locale/ca/LC_MESSAGES/katello.mo +0 -0
  203. data/locale/ca/katello.po +73 -73
  204. data/locale/cs/LC_MESSAGES/katello.mo +0 -0
  205. data/locale/cs/katello.po +74 -73
  206. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  207. data/locale/cs_CZ/katello.po +77 -77
  208. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  209. data/locale/de/katello.po +79 -79
  210. data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
  211. data/locale/de_AT/katello.po +72 -72
  212. data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
  213. data/locale/de_DE/katello.po +75 -75
  214. data/locale/el/LC_MESSAGES/katello.mo +0 -0
  215. data/locale/el/katello.po +74 -74
  216. data/locale/en/LC_MESSAGES/katello.mo +0 -0
  217. data/locale/en/katello.po +74 -73
  218. data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
  219. data/locale/en_GB/katello.po +72 -72
  220. data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
  221. data/locale/en_US/katello.po +72 -72
  222. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  223. data/locale/es/katello.po +79 -80
  224. data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
  225. data/locale/et_EE/katello.po +72 -72
  226. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  227. data/locale/fr/katello.po +332 -332
  228. data/locale/gl/LC_MESSAGES/katello.mo +0 -0
  229. data/locale/gl/katello.po +72 -72
  230. data/locale/gu/LC_MESSAGES/katello.mo +0 -0
  231. data/locale/gu/katello.po +72 -72
  232. data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
  233. data/locale/he_IL/katello.po +72 -72
  234. data/locale/hi/LC_MESSAGES/katello.mo +0 -0
  235. data/locale/hi/katello.po +72 -72
  236. data/locale/id/LC_MESSAGES/katello.mo +0 -0
  237. data/locale/id/katello.po +72 -72
  238. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  239. data/locale/it/katello.po +75 -75
  240. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  241. data/locale/ja/katello.po +403 -404
  242. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  243. data/locale/ka/katello.po +77 -77
  244. data/locale/katello.pot +1019 -1051
  245. data/locale/kn/LC_MESSAGES/katello.mo +0 -0
  246. data/locale/kn/katello.po +72 -72
  247. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  248. data/locale/ko/katello.po +317 -317
  249. data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
  250. data/locale/ml_IN/katello.po +72 -72
  251. data/locale/mr/LC_MESSAGES/katello.mo +0 -0
  252. data/locale/mr/katello.po +72 -72
  253. data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
  254. data/locale/nl_NL/katello.po +72 -72
  255. data/locale/or/LC_MESSAGES/katello.mo +0 -0
  256. data/locale/or/katello.po +72 -72
  257. data/locale/pa/LC_MESSAGES/katello.mo +0 -0
  258. data/locale/pa/katello.po +72 -72
  259. data/locale/pl/LC_MESSAGES/katello.mo +0 -0
  260. data/locale/pl/katello.po +72 -72
  261. data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
  262. data/locale/pl_PL/katello.po +72 -72
  263. data/locale/pt/LC_MESSAGES/katello.mo +0 -0
  264. data/locale/pt/katello.po +72 -72
  265. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  266. data/locale/pt_BR/katello.po +80 -80
  267. data/locale/ro/LC_MESSAGES/katello.mo +0 -0
  268. data/locale/ro/katello.po +72 -72
  269. data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
  270. data/locale/ro_RO/katello.po +72 -72
  271. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  272. data/locale/ru/katello.po +75 -75
  273. data/locale/sl/LC_MESSAGES/katello.mo +0 -0
  274. data/locale/sl/katello.po +72 -72
  275. data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
  276. data/locale/sv_SE/katello.po +72 -72
  277. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  278. data/locale/ta/katello.po +73 -73
  279. data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
  280. data/locale/ta_IN/katello.po +72 -72
  281. data/locale/te/LC_MESSAGES/katello.mo +0 -0
  282. data/locale/te/katello.po +72 -72
  283. data/locale/tr/LC_MESSAGES/katello.mo +0 -0
  284. data/locale/tr/katello.po +72 -72
  285. data/locale/vi/LC_MESSAGES/katello.mo +0 -0
  286. data/locale/vi/katello.po +72 -72
  287. data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
  288. data/locale/vi_VN/katello.po +72 -72
  289. data/locale/zh/LC_MESSAGES/katello.mo +0 -0
  290. data/locale/zh/katello.po +72 -72
  291. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  292. data/locale/zh_CN/katello.po +306 -306
  293. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  294. data/locale/zh_TW/katello.po +75 -75
  295. data/package.json +4 -4
  296. data/webpack/ForemanColumnExtensions/index.js +0 -22
  297. data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +18 -0
  298. data/webpack/components/RoutedTabs/index.js +5 -1
  299. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/AssignHostCVModal.js +11 -20
  300. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +4 -19
  301. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/OrderableAssignments.js +2 -6
  302. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/AssignHostCVModal.test.js +3 -221
  303. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViewDetailsCard.test.js +5 -12
  304. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/orderable.js +149 -0
  305. data/webpack/components/extensions/Hosts/ActionsBar/index.js +2 -5
  306. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/BulkAssignCVEnvsModal.js +3 -11
  307. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/__tests__/BulkAssignCVEnvsModal.test.js +1 -60
  308. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/index.js +1 -6
  309. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +1 -0
  310. data/webpack/global_test_setup.js +21 -34
  311. data/webpack/redux/actions/RedHatRepositories/helpers.js +3 -3
  312. data/webpack/scenes/ActivationKeys/Details/components/AssignAKCVModal.js +2 -6
  313. data/webpack/scenes/ActivationKeys/Details/components/AssignmentModalComponents.js +2 -9
  314. data/webpack/scenes/ActivationKeys/Details/components/CreateAKCVModal.js +2 -6
  315. data/webpack/scenes/ActivationKeys/Details/components/CvEnvDetailsCard.js +1 -6
  316. data/webpack/scenes/ActivationKeys/Details/components/CvEnvDetailsCreateCard.js +1 -7
  317. data/webpack/scenes/ActivationKeys/Details/components/__tests__/AssignAKCVModal.test.js +3 -212
  318. data/webpack/scenes/ActivationKeys/Details/components/__tests__/CreateAKCVModal.test.js +0 -99
  319. data/webpack/scenes/ActivationKeys/Details/components/__tests__/CvEnvDetailsCreateCard.test.js +1 -43
  320. data/webpack/scenes/ActivationKeys/Details/hooks/__tests__/useAssignmentManagement.test.js +11 -45
  321. data/webpack/scenes/ActivationKeys/Details/hooks/useAssignmentManagement.js +2 -4
  322. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +2 -2
  323. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreateDeb.test.js +2 -2
  324. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +20 -0
  325. data/webpack/scenes/Content/ContentActions.js +13 -1
  326. data/webpack/scenes/Content/ContentConfig.js +71 -0
  327. data/webpack/scenes/Content/ContentConstants.js +2 -0
  328. data/webpack/scenes/Content/ContentSelectors.js +10 -1
  329. data/webpack/scenes/Content/Details/ContentDetails.js +47 -4
  330. data/webpack/scenes/Content/Details/ContentDetails.scss +4 -0
  331. data/webpack/scenes/Content/Details/ContentRepositories.js +21 -6
  332. data/webpack/scenes/Content/Details/FileContentViewVersions.js +87 -0
  333. data/webpack/scenes/Content/Details/__tests__/FileContentViewVersions.test.js +68 -0
  334. data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +102 -2
  335. data/webpack/scenes/Content/Details/__tests__/fileSearch.test.js +104 -0
  336. data/webpack/scenes/Content/__tests__/contentTable.test.js +85 -9
  337. data/webpack/scenes/Content/__tests__/files.fixtures.json +30 -0
  338. data/webpack/scenes/Content/__tests__/moduleStreams.fixtures.json +34 -0
  339. data/webpack/scenes/ContentCredentials/Create/CreateContentCredentialForm.js +1 -1
  340. data/webpack/scenes/ContentCredentials/Create/CreateContentCredentialForm.scss +4 -5
  341. data/webpack/scenes/ContentCredentials/Details/ContentCredentialsDetails.js +0 -15
  342. data/webpack/scenes/ContentCredentials/Details/__tests__/ContentCredentialsDetails.test.js +0 -23
  343. data/webpack/scenes/ContentViews/ContentViewsConstants.js +0 -3
  344. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +0 -23
  345. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +0 -17
  346. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +0 -2
  347. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteModal.test.js +1 -1
  348. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +0 -29
  349. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +2 -0
  350. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +0 -16
  351. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +6 -2
  352. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +0 -53
  353. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +0 -4
  354. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +46 -1
  355. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionContent.test.js +41 -0
  356. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +29 -0
  357. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +5 -4
  358. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
  359. data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +1 -1
  360. data/webpack/scenes/FlatpakRemotes/Details/Mirror/__tests__/mirrorRepositoryModal.test.js +0 -2
  361. data/webpack/scenes/FlatpakRemotes/Details/__tests__/flatpakRemoteDetails.test.js +0 -2
  362. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +0 -4
  363. data/webpack/scenes/Hosts/ChangeContentSource/components/MultiCVEnvForm.js +12 -18
  364. data/webpack/scenes/Hosts/ChangeContentSource/index.js +1 -5
  365. data/webpack/scenes/SmartProxy/AdditionalCapsuleContent.js +0 -7
  366. data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +2 -2
  367. data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js +2 -9
  368. data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.scss +9 -0
  369. data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +18 -0
  370. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -4
  371. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +3 -2
  372. data/webpack/scenes/SyncStatus/components/SyncProgressCell.js +19 -7
  373. data/webpack/scenes/SyncStatus/components/SyncStatusTable.js +6 -2
  374. data/webpack/scenes/SyncStatus/components/__tests__/SyncProgressCell.test.js +40 -0
  375. data/webpack/scenes/SyncStatus/components/__tests__/SyncStatusTable.test.js +13 -0
  376. data/webpack/services/api/testHelpers.js +1 -1
  377. data/webpack/test-utils/react-testing-lib-wrapper.js +11 -8
  378. data/webpack/test_setup.js +35 -18
  379. metadata +57 -127
  380. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +0 -42
  381. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/views/files.html +0 -39
  382. data/lib/monkeys/remove_overwrite_parameter.rb +0 -19
  383. data/locale/action_names.rb +0 -180
  384. data/locale/bn/katello.po.time_stamp +0 -0
  385. data/locale/bn_IN/katello.po.time_stamp +0 -0
  386. data/locale/ca/katello.po.time_stamp +0 -0
  387. data/locale/cs/katello.po.time_stamp +0 -0
  388. data/locale/cs_CZ/katello.po.time_stamp +0 -0
  389. data/locale/de/katello.po.time_stamp +0 -0
  390. data/locale/de_AT/katello.po.time_stamp +0 -0
  391. data/locale/de_DE/katello.po.time_stamp +0 -0
  392. data/locale/el/katello.po.time_stamp +0 -0
  393. data/locale/en/katello.po.time_stamp +0 -0
  394. data/locale/en_GB/katello.po.time_stamp +0 -0
  395. data/locale/en_US/katello.po.time_stamp +0 -0
  396. data/locale/es/katello.po.time_stamp +0 -0
  397. data/locale/et_EE/katello.po.time_stamp +0 -0
  398. data/locale/fr/katello.po.time_stamp +0 -0
  399. data/locale/gl/katello.po.time_stamp +0 -0
  400. data/locale/gu/katello.po.time_stamp +0 -0
  401. data/locale/he_IL/katello.po.time_stamp +0 -0
  402. data/locale/hi/katello.po.time_stamp +0 -0
  403. data/locale/id/katello.po.time_stamp +0 -0
  404. data/locale/it/katello.po.time_stamp +0 -0
  405. data/locale/ja/katello.po.time_stamp +0 -0
  406. data/locale/ka/katello.po.time_stamp +0 -0
  407. data/locale/kn/katello.po.time_stamp +0 -0
  408. data/locale/ko/katello.po.time_stamp +0 -0
  409. data/locale/ml_IN/katello.po.time_stamp +0 -0
  410. data/locale/mr/katello.po.time_stamp +0 -0
  411. data/locale/nl_NL/katello.po.time_stamp +0 -0
  412. data/locale/or/katello.po.time_stamp +0 -0
  413. data/locale/pa/katello.po.time_stamp +0 -0
  414. data/locale/pl/katello.po.time_stamp +0 -0
  415. data/locale/pl_PL/katello.po.time_stamp +0 -0
  416. data/locale/pt/katello.po.time_stamp +0 -0
  417. data/locale/pt_BR/katello.po.time_stamp +0 -0
  418. data/locale/ro/katello.po.time_stamp +0 -0
  419. data/locale/ro_RO/katello.po.time_stamp +0 -0
  420. data/locale/ru/katello.po.time_stamp +0 -0
  421. data/locale/sl/katello.po.time_stamp +0 -0
  422. data/locale/sv_SE/katello.po.time_stamp +0 -0
  423. data/locale/ta/katello.po.time_stamp +0 -0
  424. data/locale/ta_IN/katello.po.time_stamp +0 -0
  425. data/locale/te/katello.po.time_stamp +0 -0
  426. data/locale/tr/katello.po.time_stamp +0 -0
  427. data/locale/vi/katello.po.time_stamp +0 -0
  428. data/locale/vi_VN/katello.po.time_stamp +0 -0
  429. data/locale/zh/katello.po.time_stamp +0 -0
  430. data/locale/zh_CN/katello.po.time_stamp +0 -0
  431. data/locale/zh_TW/katello.po.time_stamp +0 -0
  432. data/webpack/__mocks__/foremanJS/foreman_toast_notifications.js +0 -3
  433. data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +0 -11
  434. data/webpack/__mocks__/foremanReact/common/urlHelpers.js +0 -7
  435. data/webpack/__mocks__/foremanReact/components/BreadcrumbBar/index.js +0 -2
  436. data/webpack/__mocks__/foremanReact/components/ToastsList/index.js +0 -9
  437. data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +0 -8
  438. data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +0 -5
  439. data/webpack/__mocks__/foremanReact/redux.js +0 -3
  440. data/webpack/__mocks__/react-intl/index.js +0 -7
  441. data/webpack/__mocks__/react-intl/locale-data/en.js +0 -1
  442. data/webpack/components/pf3Table/components/CollapseSubscriptionGroupButton.js +0 -31
  443. data/webpack/components/pf3Table/components/CollapseSubscriptionGroupButton.test.js +0 -36
  444. data/webpack/components/pf3Table/components/Table.js +0 -76
  445. data/webpack/components/pf3Table/components/Table.test.js +0 -107
  446. data/webpack/components/pf3Table/components/TableBody.js +0 -27
  447. data/webpack/components/pf3Table/components/TableBody.test.js +0 -56
  448. data/webpack/components/pf3Table/components/TableBodyMessage.js +0 -18
  449. data/webpack/components/pf3Table/components/TableBodyMessage.test.js +0 -17
  450. data/webpack/components/pf3Table/components/TableFixtures.js +0 -14
  451. data/webpack/components/pf3Table/components/TableSelectionCell.js +0 -43
  452. data/webpack/components/pf3Table/components/TableSelectionCell.test.js +0 -70
  453. data/webpack/components/pf3Table/components/TableSelectionHeaderCell.js +0 -34
  454. data/webpack/components/pf3Table/components/TableSelectionHeaderCell.test.js +0 -70
  455. data/webpack/components/pf3Table/components/index.js +0 -6
  456. data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +0 -110
  457. data/webpack/components/pf3Table/formatters/__tests__/EntitlementsInlineEditFormatter.test.js +0 -124
  458. data/webpack/components/pf3Table/formatters/cellFormatter.js +0 -4
  459. data/webpack/components/pf3Table/formatters/collapseableAndSelectionCellFormatter.js +0 -20
  460. data/webpack/components/pf3Table/formatters/ellipsisCellFormatter.js +0 -6
  461. data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +0 -16
  462. data/webpack/components/pf3Table/formatters/headerFormatter.js +0 -4
  463. data/webpack/components/pf3Table/formatters/index.js +0 -6
  464. data/webpack/components/pf3Table/formatters/selectionCellFormatter.js +0 -21
  465. data/webpack/components/pf3Table/formatters/selectionHeaderCellFormatter.js +0 -11
  466. data/webpack/components/pf3Table/index.js +0 -2
  467. data/webpack/scenes/Content/__tests__/contentTypes.fixtures.json +0 -66
@@ -0,0 +1,104 @@
1
+ import React from 'react';
2
+ import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
3
+ import { nockInstance } from '../../../../test-utils/nockWrapper';
4
+ import api from '../../../../services/api';
5
+ import ContentRepositories from '../ContentRepositories';
6
+ import FileContentViewVersions from '../FileContentViewVersions';
7
+
8
+ const metadata = {
9
+ total: 1, subtotal: 1, page: 1, per_page: 20,
10
+ };
11
+ const cases = [
12
+ ['repositories', '/repositories', <ContentRepositories contentType="files" id={248} tabKey="repositories" />,
13
+ {
14
+ id: 1, name: 'Search test repository', content_type: 'file', product: { id: 2, name: 'Product' },
15
+ }],
16
+ ['content views', '/content_view_versions', <FileContentViewVersions id={248} />,
17
+ { id: 1, version: '1.0', content_view: { id: 2, name: 'Search test view' } }],
18
+ ];
19
+
20
+ test.each(cases)(
21
+ '%s search submits with the button and Enter, and clears results',
22
+ async (_label, path, component, row) => {
23
+ const endpoint = api.getApiUrl(path);
24
+ const autocomplete = nockInstance.get(`${endpoint}/auto_complete_search`)
25
+ .query(true).optionally().times(20)
26
+ .reply(200, []);
27
+ const initial = nockInstance.get(endpoint).query(query => !query.search)
28
+ .reply(200, { ...metadata, results: [row] });
29
+ const {
30
+ getByLabelText, getByRole, getByText, queryByRole,
31
+ } = renderWithRedux(component);
32
+ await patientlyWaitFor(() => expect(getByRole('button', { name: 'Search' })).toBeEnabled());
33
+ expect(queryByRole('button', { name: /bookmark/i })).toBeNull();
34
+ const input = getByLabelText('Search input');
35
+ const query = 'name = "does-not-exist"';
36
+ const searched = nockInstance.get(endpoint)
37
+ .query(params => params.search === query && params.page === '1' &&
38
+ params.file_id === '248' && params.organization_id !== undefined &&
39
+ (path === '/repositories' || params.nondefault === 'true'))
40
+ .reply(200, { ...metadata, subtotal: 0, results: [] });
41
+ input.focus();
42
+ fireEvent.change(input, { target: { value: query } });
43
+ expect(searched.isDone()).toBe(false);
44
+ fireEvent.click(getByRole('button', { name: 'Search' }));
45
+ await patientlyWaitFor(() => expect(searched.isDone()).toBe(true));
46
+ await patientlyWaitFor(() => expect(getByText(/No matching/)).toBeInTheDocument());
47
+
48
+ const entered = nockInstance.get(endpoint).query(params => params.search === 'another-query')
49
+ .reply(200, { ...metadata, subtotal: 0, results: [] });
50
+ input.focus();
51
+ fireEvent.change(input, { target: { value: 'another-query' } });
52
+ fireEvent.keyDown(input, { key: 'Enter', code: 'Enter', charCode: 13 });
53
+ await patientlyWaitFor(() => expect(entered.isDone()).toBe(true));
54
+
55
+ const cleared = nockInstance.get(endpoint).query(params => !params.search)
56
+ .reply(200, { ...metadata, results: [row] });
57
+ fireEvent.click(getByRole('button', { name: 'Reset search' }));
58
+ await patientlyWaitFor(() => expect(cleared.isDone()).toBe(true));
59
+ await patientlyWaitFor(() => expect(getByLabelText('Search input')).toHaveValue(''));
60
+ initial.done();
61
+ searched.done();
62
+ entered.done();
63
+ cleared.done();
64
+ autocomplete.done();
65
+ },
66
+ );
67
+
68
+
69
+ test.each(cases)(
70
+ '%s shows pagination for single-page and multi-page results',
71
+ async (_label, path, component, row) => {
72
+ const endpoint = api.getApiUrl(path);
73
+ nockInstance.get(`${endpoint}/auto_complete_search`)
74
+ .query(true).optionally().times(20)
75
+ .reply(200, []);
76
+ const initial = nockInstance.get(endpoint).query(true)
77
+ .reply(200, { ...metadata, results: [row] });
78
+ const { getByRole, getByLabelText, container } = renderWithRedux(component);
79
+ await patientlyWaitFor(() => expect(getByRole('button', { name: 'Search' })).toBeEnabled());
80
+ await patientlyWaitFor(() => {
81
+ expect(container.querySelector('[data-ouia-component-id="pagination-top"]'))
82
+ .toBeInTheDocument();
83
+ expect(container.querySelector('[data-ouia-component-id="pagination-bottom"]'))
84
+ .toBeInTheDocument();
85
+ });
86
+
87
+ const multiplePages = nockInstance.get(endpoint).query(params => params.search === 'many')
88
+ .reply(200, {
89
+ ...metadata, total: 21, subtotal: 21, results: [row],
90
+ });
91
+ const input = getByLabelText('Search input');
92
+ input.focus();
93
+ fireEvent.change(input, { target: { value: 'many' } });
94
+ fireEvent.click(getByRole('button', { name: 'Search' }));
95
+ await patientlyWaitFor(() => {
96
+ expect(container.querySelector('[data-ouia-component-id="pagination-top"]'))
97
+ .toBeInTheDocument();
98
+ expect(container.querySelector('[data-ouia-component-id="pagination-bottom"]'))
99
+ .toBeInTheDocument();
100
+ });
101
+ initial.done();
102
+ multiplePages.done();
103
+ },
104
+ );
@@ -2,17 +2,19 @@ import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
3
3
  import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../test-utils/nockWrapper';
4
4
  import api from '../../../services/api';
5
- import GenericContentPage from '../GenericContentPage';
6
5
  import ansibleCollectionsResponse from './ansibleCollections.fixtures';
7
- import contentTypesResponse from './contentTypes.fixtures.json';
8
6
  import pythonPackagesResponse from './pythonPackages.fixtures.json';
7
+ import filesResponse from './files.fixtures.json';
8
+ import moduleStreamsResponse from './moduleStreams.fixtures.json';
9
9
  import ContentTable from '../Table/ContentTable';
10
10
 
11
- const contentTypesPath = api.getApiUrl('/repositories/content_types');
12
11
  const pythonPackagesPath = api.getApiUrl('/python_packages');
13
12
  const ansibleCollectionsPath = api.getApiUrl('/ansible_collections');
13
+ const filesPath = api.getApiUrl('/files');
14
+ const moduleStreamsPath = api.getApiUrl('/module_streams');
14
15
 
15
16
  test('Can call API for Python Packages and show table on page load', async (done) => {
17
+ const mockContentTypes = { 'Python Packages': ['python_package', 'python_packages'] };
16
18
  const autocompleteUrl = '/python_packages/auto_complete_search';
17
19
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
18
20
 
@@ -23,13 +25,14 @@ test('Can call API for Python Packages and show table on page load', async (done
23
25
  .get(pythonPackagesPath)
24
26
  .query(true)
25
27
  .reply(200, pythonPackagesResponse);
26
- const contentTypesScope = nockInstance
27
- .get(contentTypesPath)
28
- .query(true)
29
- .reply(200, contentTypesResponse);
30
28
 
31
29
  const { queryByText, getAllByText } =
32
- renderWithRedux(<GenericContentPage />);
30
+ renderWithRedux(<ContentTable
31
+ contentTypes={mockContentTypes}
32
+ selectedContentType="Python Packages"
33
+ setSelectedContentType={() => { }}
34
+ showContentTypeSelector={false}
35
+ />);
33
36
 
34
37
  expect(queryByText(firstPackage.name)).toBeNull();
35
38
  await patientlyWaitFor(() => {
@@ -39,7 +42,6 @@ test('Can call API for Python Packages and show table on page load', async (done
39
42
  });
40
43
 
41
44
  assertNockRequest(autocompleteScope);
42
- assertNockRequest(contentTypesScope);
43
45
  assertNockRequest(pythonPackagesScope);
44
46
  done();
45
47
  });
@@ -75,3 +77,77 @@ test('Can call API for Ansible collections and show table on page load', async (
75
77
  assertNockRequest(ansibleCollections);
76
78
  done();
77
79
  });
80
+
81
+ test('Can call API for Files and show table on page load', async (done) => {
82
+ const mockContentTypes = { Files: ['file', 'files'] };
83
+ const autocompleteUrl = '/files/auto_complete_search';
84
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
85
+
86
+ const { results } = filesResponse;
87
+ const [firstFile] = results;
88
+
89
+ const filesScope = nockInstance
90
+ .get(filesPath)
91
+ .query(true)
92
+ .reply(200, filesResponse);
93
+
94
+ const { queryByText, getAllByText } =
95
+ renderWithRedux(<ContentTable
96
+ contentTypes={mockContentTypes}
97
+ selectedContentType="Files"
98
+ setSelectedContentType={() => { }}
99
+ showContentTypeSelector={false}
100
+ />);
101
+
102
+ expect(queryByText(firstFile.name)).toBeNull();
103
+ await patientlyWaitFor(() => {
104
+ expect(getAllByText(firstFile.name)[0]).toBeInTheDocument();
105
+ expect(getAllByText(firstFile.path)[0]).toBeInTheDocument();
106
+ expect(getAllByText(firstFile.checksum)[0]).toBeInTheDocument();
107
+ });
108
+ await patientlyWaitFor(() => {
109
+ expect(autocompleteScope.isDone()).toBe(true);
110
+ expect(filesScope.isDone()).toBe(true);
111
+ });
112
+ autocompleteScope.done();
113
+ filesScope.done();
114
+ done();
115
+ });
116
+
117
+ test('Can call API for Module Streams and show table on page load', async (done) => {
118
+ const mockContentTypes = { 'Module Streams': ['modulemd', 'module_streams'] };
119
+ const autocompleteUrl = '/module_streams/auto_complete_search';
120
+ const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
121
+
122
+ const { results } = moduleStreamsResponse;
123
+ const [firstModuleStream] = results;
124
+
125
+ const moduleStreamsScope = nockInstance
126
+ .get(moduleStreamsPath)
127
+ .query(true)
128
+ .reply(200, moduleStreamsResponse);
129
+
130
+ const { queryByText, getAllByText } =
131
+ renderWithRedux(<ContentTable
132
+ contentTypes={mockContentTypes}
133
+ selectedContentType="Module Streams"
134
+ setSelectedContentType={() => { }}
135
+ showContentTypeSelector={false}
136
+ />);
137
+
138
+ expect(queryByText(firstModuleStream.name)).toBeNull();
139
+ await patientlyWaitFor(() => {
140
+ expect(getAllByText(firstModuleStream.name)[0]).toBeInTheDocument();
141
+ expect(getAllByText(firstModuleStream.stream)[0]).toBeInTheDocument();
142
+ expect(getAllByText(firstModuleStream.version)[0]).toBeInTheDocument();
143
+ expect(getAllByText(firstModuleStream.arch)[0]).toBeInTheDocument();
144
+ expect(getAllByText(firstModuleStream.context)[0]).toBeInTheDocument();
145
+ });
146
+ await patientlyWaitFor(() => {
147
+ expect(autocompleteScope.isDone()).toBe(true);
148
+ expect(moduleStreamsScope.isDone()).toBe(true);
149
+ });
150
+ autocompleteScope.done();
151
+ moduleStreamsScope.done();
152
+ done();
153
+ });
@@ -0,0 +1,30 @@
1
+ {
2
+ "total": 2,
3
+ "subtotal": 2,
4
+ "page": "1",
5
+ "per_page": "20",
6
+ "error": null,
7
+ "search": null,
8
+ "sort": {
9
+ "by": "name",
10
+ "order": "asc"
11
+ },
12
+ "results": [
13
+ {
14
+ "id": 1,
15
+ "name": "test.txt",
16
+ "path": "test.txt",
17
+ "checksum": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
18
+ "pulp_id": "/pulp/api/v3/content/file/files/a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6/",
19
+ "content_type": "file"
20
+ },
21
+ {
22
+ "id": 2,
23
+ "name": "setup.sh",
24
+ "path": "scripts/setup.sh",
25
+ "checksum": "sha256:d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
26
+ "pulp_id": "/pulp/api/v3/content/file/files/b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7/",
27
+ "content_type": "file"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "total": 2,
3
+ "subtotal": 2,
4
+ "page": "1",
5
+ "per_page": "20",
6
+ "error": null,
7
+ "search": null,
8
+ "sort": {
9
+ "by": "name",
10
+ "order": "asc"
11
+ },
12
+ "results": [
13
+ {
14
+ "id": 1,
15
+ "name": "postgresql",
16
+ "stream": "10",
17
+ "version": "8030020200831101924",
18
+ "arch": "x86_64",
19
+ "context": "9edba152",
20
+ "pulp_id": "/pulp/api/v3/content/rpm/modulemds/a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6/",
21
+ "content_type": "modulemd"
22
+ },
23
+ {
24
+ "id": 2,
25
+ "name": "nginx",
26
+ "stream": "1.18",
27
+ "version": "8030020200731234567",
28
+ "arch": "x86_64",
29
+ "context": "7c29f958",
30
+ "pulp_id": "/pulp/api/v3/content/rpm/modulemds/b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7/",
31
+ "content_type": "modulemd"
32
+ }
33
+ ]
34
+ }
@@ -144,7 +144,7 @@ const CreateContentCredentialForm = ({ setModalOpen, setFormState, refreshTable
144
144
  </FormSelect>
145
145
  </FormGroup>
146
146
 
147
- <FormGroup label={__('Content')} fieldId="content">
147
+ <FormGroup label={__('Content')} fieldId="content" className="cc-create-content-group">
148
148
  <TextArea
149
149
  id="content"
150
150
  name="content"
@@ -1,5 +1,4 @@
1
- .pf-v5-c-form-control {
2
- textarea#content {
3
- max-height: 200px;
4
- }
5
- }
1
+ .cc-create-content-group .pf-v5-c-form-control.pf-m-resize-both {
2
+ max-height: 200px;
3
+ overflow-y: auto;
4
+ }
@@ -22,7 +22,6 @@ import {
22
22
  DropdownPosition,
23
23
  } from '@patternfly/react-core/deprecated';
24
24
  import { STATUS } from 'foremanReact/constants';
25
- import { ExternalLinkAltIcon } from '@patternfly/react-icons';
26
25
  import { translate as __ } from 'foremanReact/common/I18n';
27
26
 
28
27
  import { getContentCredentialDetails } from './ContentCredentialsDetailsActions';
@@ -147,20 +146,6 @@ const ContentCredentialsDetails = () => {
147
146
  </GridItem>
148
147
  <GridItem md={4} sm={12}>
149
148
  <Flex justifyContent={{ lg: 'justifyContentFlexEnd', sm: 'justifyContentFlexStart' }}>
150
- <FlexItem>
151
- <Button
152
- ouiaId="credential-details-view-tasks-button"
153
- component="a"
154
- aria-label={__('view tasks button')}
155
- href={'/foreman_tasks/tasks?search=resource_type%3D+Katello%3A%3A' +
156
- `ContentCredential+resource_id%3D${credentialId}`}
157
- target="_blank"
158
- variant="secondary"
159
- >
160
- {__('View tasks ')}
161
- <ExternalLinkAltIcon />
162
- </Button>
163
- </FlexItem>
164
149
  <FlexItem>
165
150
  <Dropdown
166
151
  position={DropdownPosition.right}
@@ -435,26 +435,3 @@ test('enables edit controls when user has edit_content_credentials permission',
435
435
  assertNockRequest(scope);
436
436
  });
437
437
 
438
- test('view tasks button links to foreman tasks filtered by credential', async () => {
439
- const scope = nockInstance
440
- .get(credentialDetailsPath)
441
- .query(true)
442
- .reply(200, mockCredentialData);
443
-
444
- renderWithRedux(
445
- withCredentialRoute(<ContentCredentialsDetails />),
446
- renderOptions,
447
- );
448
-
449
- await patientlyWaitFor(() => {
450
- const viewTasksButton = screen.getByRole('link', { name: /view tasks/i });
451
- expect(viewTasksButton).toHaveAttribute(
452
- 'href',
453
- expect.stringContaining(`resource_id%3D${credentialId}`),
454
- );
455
- expect(viewTasksButton).toHaveAttribute('target', '_blank');
456
- });
457
-
458
- assertNockRequest(scope);
459
- });
460
-
@@ -8,7 +8,6 @@ const ERRATA_KEY = 'ERRATA';
8
8
  const MODULE_STREAMS_KEY = 'MODULE_STREAMS';
9
9
  const DEB_PACKAGES_KEY = 'DEB_PACKAGES';
10
10
  const DOCKER_TAGS_KEY = 'DOCKER_TAGS';
11
- const FILES_KEY = 'FILES';
12
11
  const CONTAINER_MANIFEST_LISTS_KEY = 'CONTAINER_MANIFEST_LISTS';
13
12
  export const CREATE_CONTENT_VIEW_KEY = 'CONTENT_VIEW_CREATE';
14
13
  export const COPY_CONTENT_VIEW_KEY = 'CONTENT_VIEW_COPY';
@@ -36,7 +35,6 @@ export const CONTAINER_MANIFEST_LIST_CONTENT = 'CONTAINER_MANIFEST_LIST_CONTENT'
36
35
  export const MODULE_STREAMS_CONTENT = 'MODULE_STREAMS_CONTENT';
37
36
  export const DEB_PACKAGES_CONTENT = 'DEB_PACKAGES_CONTENT';
38
37
  export const RPM_PACKAGES_CONTENT = 'RPM_PACKAGES_CONTENT';
39
- export const FILE_CONTENT = 'FILE_CONTENT';
40
38
  export const CONTENT_VIEW_NEEDS_PUBLISH = 'CV_NEEDS_PUBLISH';
41
39
  export const CONTENT_VIEW_NEEDS_PUBLISH_RESET = 'CV_NEEDS_PUBLISH_RESET';
42
40
  export const generatedContentKey = pluralLabel => `${toUpper(pluralLabel)}_CONTENT`;
@@ -75,7 +73,6 @@ export const cvModuleStreamsCompareKey = (versionOne, versionTwo, viewBy) => `${
75
73
  export const cvDebPackagesCompareKey = (versionOne, versionTwo, viewBy) => `${DEB_PACKAGES_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
76
74
  export const cvDockerTagsCompareKey = (versionOne, versionTwo, viewBy) => `${DOCKER_TAGS_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
77
75
  export const cvContainerManifestListsCompareKey = (versionOne, versionTwo, viewBy) => `${CONTAINER_MANIFEST_LISTS_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
78
- export const filesCompareKey = (versionOne, versionTwo, viewBy) => `${FILES_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
79
76
 
80
77
  // Repo added to content view status display and key
81
78
  export const ADDED = 'Added';
@@ -42,7 +42,6 @@ import {
42
42
  cvVersionDetailsKey,
43
43
  cvRemoveVersionKey,
44
44
  REPOSITORY_CONTENT,
45
- FILE_CONTENT,
46
45
  ERRATA_CONTENT,
47
46
  MODULE_STREAMS_CONTENT,
48
47
  DEB_PACKAGES_CONTENT,
@@ -56,7 +55,6 @@ import {
56
55
  cvModuleStreamsCompareKey,
57
56
  cvDockerTagsCompareKey,
58
57
  cvDebPackagesCompareKey,
59
- filesCompareKey,
60
58
  genericContentCompareKey,
61
59
  cvRepositoriesCompareKey, cvContainerManifestListsCompareKey,
62
60
  } from '../ContentViewsConstants';
@@ -192,19 +190,6 @@ export const getContainerManifestListsComparison = (versionOne, versionTwo, view
192
190
  });
193
191
  };
194
192
 
195
- export const getFilesComparison = (versionOne, versionTwo, viewBy, params) => {
196
- const versions = { content_view_version_ids: [versionOne, versionTwo] };
197
- const restrictComparison = { restrict_comparison: viewBy };
198
- const apiParams = { ...versions, ...restrictComparison, ...params };
199
- const apiUrl = '/files/compare';
200
- return get({
201
- key: filesCompareKey(versionOne, versionTwo, viewBy),
202
- params: apiParams,
203
- errorToast: error => __(`Something went wrong while retrieving the files! ${getResponseErrorMsgs(error.response)}`),
204
- url: api.getApiUrl(apiUrl),
205
- });
206
- };
207
-
208
193
  export const getGenericContentComparison =
209
194
  (pluralLabel, versionOne, versionTwo, viewBy, params) => {
210
195
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
@@ -219,14 +204,6 @@ export const getGenericContentComparison =
219
204
  });
220
205
  };
221
206
 
222
- export const getFiles = params => get({
223
- type: API_OPERATIONS.GET,
224
- key: FILE_CONTENT,
225
- url: api.getApiUrl('/files'),
226
- params,
227
- errorToast: error => __(`Something went wrong while fetching files! ${getResponseErrorMsgs(error.response)}`),
228
- });
229
-
230
207
  export const updateContentView = (cvId, params, handleSuccess) => put({
231
208
  type: API_OPERATIONS.PUT,
232
209
  key: cvDetailsKey(cvId),
@@ -29,7 +29,6 @@ import {
29
29
  DEB_PACKAGES_CONTENT,
30
30
  DOCKER_TAGS_CONTENT,
31
31
  ERRATA_CONTENT,
32
- FILE_CONTENT,
33
32
  generatedContentKey,
34
33
  HOSTS_KEY,
35
34
  MODULE_STREAMS_CONTENT,
@@ -43,7 +42,6 @@ import {
43
42
  cvModuleStreamsCompareKey,
44
43
  cvDockerTagsCompareKey,
45
44
  cvDebPackagesCompareKey,
46
- filesCompareKey,
47
45
  genericContentCompareKey,
48
46
  cvRepositoriesCompareKey,
49
47
  CONTAINER_MANIFEST_LIST_CONTENT,
@@ -212,15 +210,6 @@ export const selectDebPackagesComparisonStatus = (state, versionOne, versionTwo,
212
210
  export const selectDebPackagesComparisonError = (state, versionOne, versionTwo, viewBy) =>
213
211
  selectAPIError(state, cvDebPackagesCompareKey(versionOne, versionTwo, viewBy));
214
212
 
215
- export const selectFilesComparison = (state, versionOne, versionTwo, viewBy) =>
216
- selectAPIResponse(state, filesCompareKey(versionOne, versionTwo, viewBy)) || {};
217
-
218
- export const selectFilesComparisonStatus = (state, versionOne, versionTwo, viewBy) =>
219
- selectAPIStatus(state, filesCompareKey(versionOne, versionTwo, viewBy)) || STATUS.PENDING;
220
-
221
- export const selectFilesComparisonError = (state, versionOne, versionTwo, viewBy) =>
222
- selectAPIError(state, filesCompareKey(versionOne, versionTwo, viewBy));
223
-
224
213
  export const selectGenericContentComparison =
225
214
  (state, versionOne, versionTwo, pluralLabel, viewBy) =>
226
215
  selectAPIResponse(
@@ -291,12 +280,6 @@ export const selectRPMPackages = state =>
291
280
  export const selectRPMPackagesStatus = state =>
292
281
  selectAPIStatus(state, RPM_PACKAGES_CONTENT) || STATUS.PENDING;
293
282
 
294
- export const selectFiles = state =>
295
- selectAPIResponse(state, FILE_CONTENT);
296
-
297
- export const selectFilesStatus = state =>
298
- selectAPIStatus(state, FILE_CONTENT) || STATUS.PENDING;
299
-
300
283
  export const selectErrata = state =>
301
284
  selectAPIResponse(state, ERRATA_CONTENT);
302
285
 
@@ -30,8 +30,6 @@ beforeEach(() => {
30
30
  .reply(200, repoTypesResponse);
31
31
  });
32
32
 
33
- jest.mock('react-intl', () => ({ addLocaleData: () => { }, FormattedDate: () => 'mocked' }));
34
-
35
33
  test('Can enable and disable add repositories button', async (done) => {
36
34
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
37
35
 
@@ -104,7 +104,7 @@ test('Open bulk delete modal and step through all steps', () => {
104
104
  expect(queryAllByText('Review affected environments')).toHaveLength(3);
105
105
  expect(getByText('Reassign affected host')).toBeInTheDocument();
106
106
  expect(getByText('Reassign affected activation key')).toBeInTheDocument();
107
- expect(getByText('{versionOrVersions} {versionList} will be removed from the listed environments and will no longer be available for promotion.')).toBeInTheDocument();
107
+ expect(getByText(/will be removed from the listed environments and will no longer be available for promotion\./)).toBeInTheDocument();
108
108
 
109
109
  fireEvent.click(queryByText('Next'));
110
110
 
@@ -11,8 +11,6 @@ import {
11
11
  selectPackageGroupsComparisonStatus,
12
12
  selectRPMPackagesComparison,
13
13
  selectRPMPackagesComparisonStatus,
14
- selectFilesComparison,
15
- selectFilesComparisonStatus,
16
14
  selectErrataComparison,
17
15
  selectErrataComparisonStatus,
18
16
  selectDebPackagesComparison,
@@ -29,7 +27,6 @@ import {
29
27
  import {
30
28
  getPackageGroupsComparison,
31
29
  getRPMPackagesComparison,
32
- getFilesComparison,
33
30
  getErrataComparison,
34
31
  getDebPackagesComparison,
35
32
  getDockerTagsComparison,
@@ -188,32 +185,6 @@ export default ({
188
185
  [__('Name')]: 'name',
189
186
  },
190
187
  },
191
- {
192
- name: __('Files'),
193
- getCountKey: (itemVersionOne, itemVersionTwo) =>
194
- itemVersionOne?.file_count || itemVersionTwo?.file_count,
195
- responseSelector: state => selectFilesComparison(state, versionOneId, versionTwoId, viewBy),
196
- statusSelector: state =>
197
- selectFilesComparisonStatus(state, versionOneId, versionTwoId, viewBy),
198
- autocompleteEndpoint: '/katello/api/v2/files',
199
- bookmarkController: 'katello_content_view_components',
200
- fetchItems: params => getFilesComparison(versionOneId, versionTwoId, viewBy, params),
201
- columnHeaders: [
202
- {
203
- title: __('Name'),
204
- getProperty: item => (
205
- <a href={urlBuilder(`files/${item?.id}`, '')}>
206
- {item?.name}
207
- </a>),
208
- },
209
- { title: __('Path'), getProperty: item => item?.path },
210
- { title: __(`Version ${versionOne}`), getProperty: item => compareContent(item, versionOneId) },
211
- { title: __(`Version ${versionTwo}`), getProperty: item => compareContent(item, versionTwoId) },
212
- ],
213
- sortConfig: {
214
- [__('Name')]: 'name',
215
- },
216
- },
217
188
  {
218
189
  name: __('Errata'),
219
190
  getCountKey: (itemVersionOne, itemVersionTwo) =>
@@ -660,6 +660,8 @@ test('Can select viewing by "Same" in the dropdown and see the content in common
660
660
  testConfigViewBySame.forEach(({ name }) => {
661
661
  expect(queryByText(name)).toBeTruthy();
662
662
  });
663
+ });
664
+ await patientlyWaitFor(() => {
663
665
  (testConfigViewBySame.filter(({ name }) => !(name === 'Files'))).forEach(({ textQuery }) => {
664
666
  textQuery.forEach(query => expect(queryAllByText(query)).toBeTruthy());
665
667
  });
@@ -13,9 +13,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
13
13
  docker_manifest_count: dockerManifestCount = 0,
14
14
  docker_manifest_list_count: dockerManifestListCount = 0,
15
15
  docker_tag_count: dockerTagCount = 0,
16
- file_count: fileCount = 0,
17
- module_stream_count: moduleStreamCount = 0,
18
- ansible_collection_count: ansibleCollectionCount = 0,
19
16
  } = cvVersion;
20
17
 
21
18
  const contentConfigTypes = ContentConfig.filter(({ names: { singularLabel } }) =>
@@ -36,7 +33,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
36
33
 
37
34
  const noCounts =
38
35
  !Number(debCount) && !Number(dockerManifestCount) && !Number(dockerTagCount) &&
39
- !Number(fileCount) && !Number(moduleStreamCount) && !Number(ansibleCollectionCount) &&
40
36
  !Number(dockerManifestListCount) && !contentConfigTypes?.length;
41
37
 
42
38
  if (noCounts) {
@@ -45,13 +41,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
45
41
 
46
42
  return (
47
43
  <>
48
- {moduleStreamCount > 0 &&
49
- <>
50
- <Link to={`/versions/${versionId}/moduleStreams`}>
51
- {`${moduleStreamCount} Module streams`}
52
- </Link><br />
53
- </>
54
- }
55
44
  {debCount > 0 &&
56
45
  <>
57
46
  <Link to={`/versions/${versionId}/debPackages`}>
@@ -74,11 +63,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
74
63
  </Link><br />
75
64
  </>
76
65
  }
77
- {fileCount > 0 &&
78
- <>
79
- <a href={urlBuilder(`content_views/${cvId}#/versions/${versionId}/files`, '')}>{`${fileCount} Files`}</a><br />
80
- </>
81
- }
82
66
  {contentConfigTypes?.length > 0 &&
83
67
  contentConfigTypes.map(({ label, count, pluralLabel }) => (
84
68
  <React.Fragment key={label}>
@@ -186,7 +186,9 @@ test('Can open Remove wizard and remove version from environment with hosts', as
186
186
  expect(getByText('Select lifecycle environment')).toBeInTheDocument();
187
187
  expect(getByText('Show hosts')).toBeInTheDocument();
188
188
  });
189
- expect(getByText('affectedHost.example.com')).toBeInTheDocument();
189
+ await patientlyWaitFor(() => {
190
+ expect(getByText('affectedHost.example.com')).toBeInTheDocument();
191
+ });
190
192
  fireEvent.click(getByLabelText('test1'));
191
193
  await patientlyWaitFor(() => {
192
194
  expect(getByText('Select content view')).toBeInTheDocument();
@@ -279,7 +281,9 @@ test('Can open Remove wizard and remove version from environment with activation
279
281
  expect(getByText('Select lifecycle environment')).toBeInTheDocument();
280
282
  expect(getByText('Show activation keys')).toBeInTheDocument();
281
283
  });
282
- expect(getByText('test activation key')).toBeInTheDocument();
284
+ await patientlyWaitFor(() => {
285
+ expect(getByText('test activation key')).toBeInTheDocument();
286
+ });
283
287
  fireEvent.click(getByLabelText('test1'));
284
288
  await patientlyWaitFor(() => {
285
289
  expect(getByText('Select content view')).toBeInTheDocument();