katello 5.0.0.rc2 → 5.0.1

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 (297) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/locale/bn/katello.js +63 -15
  3. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +62 -14
  4. data/app/assets/javascripts/katello/locale/ca/katello.js +62 -14
  5. data/app/assets/javascripts/katello/locale/cs/katello.js +63 -15
  6. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +64 -16
  7. data/app/assets/javascripts/katello/locale/de/katello.js +66 -18
  8. data/app/assets/javascripts/katello/locale/de_AT/katello.js +62 -14
  9. data/app/assets/javascripts/katello/locale/de_DE/katello.js +63 -15
  10. data/app/assets/javascripts/katello/locale/el/katello.js +62 -14
  11. data/app/assets/javascripts/katello/locale/en/katello.js +63 -15
  12. data/app/assets/javascripts/katello/locale/en_GB/katello.js +62 -14
  13. data/app/assets/javascripts/katello/locale/en_US/katello.js +62 -14
  14. data/app/assets/javascripts/katello/locale/es/katello.js +66 -18
  15. data/app/assets/javascripts/katello/locale/et_EE/katello.js +62 -14
  16. data/app/assets/javascripts/katello/locale/fr/katello.js +300 -252
  17. data/app/assets/javascripts/katello/locale/gl/katello.js +62 -14
  18. data/app/assets/javascripts/katello/locale/gu/katello.js +62 -14
  19. data/app/assets/javascripts/katello/locale/he_IL/katello.js +62 -14
  20. data/app/assets/javascripts/katello/locale/hi/katello.js +62 -14
  21. data/app/assets/javascripts/katello/locale/id/katello.js +62 -14
  22. data/app/assets/javascripts/katello/locale/it/katello.js +64 -16
  23. data/app/assets/javascripts/katello/locale/ja/katello.js +378 -330
  24. data/app/assets/javascripts/katello/locale/ka/katello.js +67 -19
  25. data/app/assets/javascripts/katello/locale/kn/katello.js +62 -14
  26. data/app/assets/javascripts/katello/locale/ko/katello.js +297 -249
  27. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +62 -14
  28. data/app/assets/javascripts/katello/locale/mr/katello.js +62 -14
  29. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +62 -14
  30. data/app/assets/javascripts/katello/locale/or/katello.js +62 -14
  31. data/app/assets/javascripts/katello/locale/pa/katello.js +62 -14
  32. data/app/assets/javascripts/katello/locale/pl/katello.js +62 -14
  33. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +62 -14
  34. data/app/assets/javascripts/katello/locale/pt/katello.js +62 -14
  35. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +66 -18
  36. data/app/assets/javascripts/katello/locale/ro/katello.js +62 -14
  37. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +62 -14
  38. data/app/assets/javascripts/katello/locale/ru/katello.js +64 -16
  39. data/app/assets/javascripts/katello/locale/sl/katello.js +62 -14
  40. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +62 -14
  41. data/app/assets/javascripts/katello/locale/ta/katello.js +63 -15
  42. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +62 -14
  43. data/app/assets/javascripts/katello/locale/te/katello.js +62 -14
  44. data/app/assets/javascripts/katello/locale/tr/katello.js +62 -14
  45. data/app/assets/javascripts/katello/locale/vi/katello.js +62 -14
  46. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +62 -14
  47. data/app/assets/javascripts/katello/locale/zh/katello.js +62 -14
  48. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +285 -237
  49. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +64 -16
  50. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +29 -26
  51. data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
  52. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -10
  53. data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
  54. data/app/lib/katello/concerns/base_template_scope_extensions.rb +61 -2
  55. data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
  56. data/app/views/katello/api/v2/activation_keys/base.json.rabl +18 -18
  57. data/app/views/katello/api/v2/content_facet/base.json.rabl +19 -19
  58. data/app/views/katello/api/v2/content_view_environments/show.json.rabl +10 -10
  59. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
  60. data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +5 -5
  61. data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +5 -5
  62. data/db/migrate/20260402151630_add_content_view_environment_to_hostgroup_content_facet.rb +4 -4
  63. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +1 -1
  64. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
  65. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +0 -12
  66. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +0 -12
  67. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +0 -12
  68. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +0 -12
  69. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -12
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +0 -12
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +0 -12
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +0 -12
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +0 -12
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +0 -12
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -12
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +0 -12
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +23 -24
  78. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +0 -12
  79. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +0 -12
  80. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +0 -12
  81. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +0 -12
  82. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +0 -12
  83. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -12
  84. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +20 -30
  85. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +0 -12
  86. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +0 -12
  87. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +31 -39
  88. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +0 -12
  89. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +0 -12
  90. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +0 -12
  91. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +0 -12
  92. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +0 -12
  93. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +0 -12
  94. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +0 -12
  95. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +0 -12
  96. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -12
  97. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +0 -12
  98. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +0 -12
  99. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -12
  100. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +0 -12
  101. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +0 -12
  102. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +0 -12
  103. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +0 -12
  104. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +0 -12
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +0 -12
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +0 -12
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +0 -12
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +0 -12
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +8 -17
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -12
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +8 -8
  112. data/lib/katello/tasks/upgrades/4.20/clean_cve_with_no_cvv.rake +4 -4
  113. data/lib/katello/version.rb +1 -1
  114. data/lib/rubocop/cop/katello/cve_abbreviation.rb +82 -0
  115. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  116. data/locale/bn/katello.po +63 -15
  117. data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
  118. data/locale/bn_IN/katello.po +62 -14
  119. data/locale/ca/LC_MESSAGES/katello.mo +0 -0
  120. data/locale/ca/katello.po +62 -14
  121. data/locale/cs/LC_MESSAGES/katello.mo +0 -0
  122. data/locale/cs/katello.po +64 -15
  123. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  124. data/locale/cs_CZ/katello.po +65 -17
  125. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  126. data/locale/de/katello.po +67 -19
  127. data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
  128. data/locale/de_AT/katello.po +62 -14
  129. data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
  130. data/locale/de_DE/katello.po +64 -16
  131. data/locale/el/LC_MESSAGES/katello.mo +0 -0
  132. data/locale/el/katello.po +62 -14
  133. data/locale/en/LC_MESSAGES/katello.mo +0 -0
  134. data/locale/en/katello.po +64 -15
  135. data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
  136. data/locale/en_GB/katello.po +62 -14
  137. data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
  138. data/locale/en_US/katello.po +62 -14
  139. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  140. data/locale/es/katello.po +68 -21
  141. data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
  142. data/locale/et_EE/katello.po +62 -14
  143. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  144. data/locale/fr/katello.po +304 -256
  145. data/locale/gl/LC_MESSAGES/katello.mo +0 -0
  146. data/locale/gl/katello.po +62 -14
  147. data/locale/gu/LC_MESSAGES/katello.mo +0 -0
  148. data/locale/gu/katello.po +62 -14
  149. data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
  150. data/locale/he_IL/katello.po +62 -14
  151. data/locale/hi/LC_MESSAGES/katello.mo +0 -0
  152. data/locale/hi/katello.po +62 -14
  153. data/locale/id/LC_MESSAGES/katello.mo +0 -0
  154. data/locale/id/katello.po +62 -14
  155. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  156. data/locale/it/katello.po +64 -16
  157. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  158. data/locale/ja/katello.po +379 -331
  159. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  160. data/locale/ka/katello.po +67 -19
  161. data/locale/katello.pot +457 -393
  162. data/locale/kn/LC_MESSAGES/katello.mo +0 -0
  163. data/locale/kn/katello.po +62 -14
  164. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  165. data/locale/ko/katello.po +300 -251
  166. data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
  167. data/locale/ml_IN/katello.po +62 -14
  168. data/locale/mr/LC_MESSAGES/katello.mo +0 -0
  169. data/locale/mr/katello.po +62 -14
  170. data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
  171. data/locale/nl_NL/katello.po +62 -14
  172. data/locale/or/LC_MESSAGES/katello.mo +0 -0
  173. data/locale/or/katello.po +62 -14
  174. data/locale/pa/LC_MESSAGES/katello.mo +0 -0
  175. data/locale/pa/katello.po +62 -14
  176. data/locale/pl/LC_MESSAGES/katello.mo +0 -0
  177. data/locale/pl/katello.po +62 -14
  178. data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
  179. data/locale/pl_PL/katello.po +62 -14
  180. data/locale/pt/LC_MESSAGES/katello.mo +0 -0
  181. data/locale/pt/katello.po +62 -14
  182. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  183. data/locale/pt_BR/katello.po +68 -20
  184. data/locale/ro/LC_MESSAGES/katello.mo +0 -0
  185. data/locale/ro/katello.po +62 -14
  186. data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
  187. data/locale/ro_RO/katello.po +62 -14
  188. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  189. data/locale/ru/katello.po +64 -16
  190. data/locale/sl/LC_MESSAGES/katello.mo +0 -0
  191. data/locale/sl/katello.po +62 -14
  192. data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
  193. data/locale/sv_SE/katello.po +62 -14
  194. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  195. data/locale/ta/katello.po +63 -15
  196. data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
  197. data/locale/ta_IN/katello.po +62 -14
  198. data/locale/te/LC_MESSAGES/katello.mo +0 -0
  199. data/locale/te/katello.po +62 -14
  200. data/locale/tr/LC_MESSAGES/katello.mo +0 -0
  201. data/locale/tr/katello.po +62 -14
  202. data/locale/vi/LC_MESSAGES/katello.mo +0 -0
  203. data/locale/vi/katello.po +62 -14
  204. data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
  205. data/locale/vi_VN/katello.po +62 -14
  206. data/locale/zh/LC_MESSAGES/katello.mo +0 -0
  207. data/locale/zh/katello.po +62 -14
  208. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  209. data/locale/zh_CN/katello.po +286 -238
  210. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  211. data/locale/zh_TW/katello.po +64 -16
  212. data/package.json +2 -2
  213. data/webpack/ForemanColumnExtensions/index.js +1 -1
  214. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/AssignHostCVModal.js +3 -3
  215. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +5 -5
  216. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/OrderableAssignments.js +5 -5
  217. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/AssignHostCVModal.test.js +17 -17
  218. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/BulkAssignCVEnvsModal.js +4 -8
  219. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/__tests__/BulkAssignCVEnvsModal.test.js +1 -1
  220. data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/index.js +2 -1
  221. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/BulkChangeHostCollectionsModal.js +5 -10
  222. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +6 -24
  223. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/index.js +2 -1
  224. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +2 -0
  225. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +2 -1
  226. data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/BulkManageTracesModal.js +4 -0
  227. data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/index.js +2 -1
  228. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +2 -0
  229. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +2 -1
  230. data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/03_ReviewFooter.js +2 -0
  231. data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/BulkRepositorySetsWizard.js +2 -1
  232. data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/BulkSystemPurposeModal.js +5 -0
  233. data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/index.js +2 -1
  234. data/webpack/components/extensions/Hosts/BulkActions/__tests__/bulkSystemPurposeModal.test.js +6 -1
  235. data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +6 -6
  236. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
  237. data/webpack/containers/Application/config.js +1 -1
  238. data/webpack/eslint-rules/no-cve-abbreviation.js +121 -0
  239. data/webpack/global_index.js +6 -6
  240. data/webpack/redux/reducers/index.js +0 -2
  241. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +2 -2
  242. data/webpack/scenes/ActivationKeys/Details/components/AssignAKCVModal.js +3 -3
  243. data/webpack/scenes/ActivationKeys/Details/components/CreateAKCVModal.js +1 -1
  244. data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCard.js → CvEnvDetailsCard.js} +9 -9
  245. data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCreateCard.js → CvEnvDetailsCreateCard.js} +10 -10
  246. data/webpack/scenes/ActivationKeys/Details/components/__tests__/{CVEDetailsCreateCard.test.js → CvEnvDetailsCreateCard.test.js} +8 -8
  247. data/webpack/scenes/ContainerImages/Booted/BootedContainerImagesPage.js +2 -2
  248. data/webpack/scenes/ContainerImages/ContainerImagesPage.js +59 -52
  249. data/webpack/scenes/ContainerImages/ContainerImagesPage.scss +27 -4
  250. data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.js +1 -1
  251. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +1 -11
  252. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +9 -9
  253. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +0 -28
  254. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +46 -1
  255. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionContent.test.js +41 -0
  256. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +2 -2
  257. data/webpack/scenes/Subscriptions/Manifest/CdnTabContent.js +44 -0
  258. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +179 -307
  259. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModalConstants.js +5 -0
  260. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +64 -70
  261. data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +5 -0
  262. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js +61 -0
  263. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -1
  264. data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js +357 -0
  265. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +129 -0
  266. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +69 -110
  267. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +6 -2
  268. data/webpack/scenes/Subscriptions/Manifest/index.js +16 -1
  269. data/webpack/scenes/Subscriptions/SubscriptionActions.js +79 -145
  270. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -35
  271. data/webpack/scenes/Subscriptions/SubscriptionsColumns.js +90 -0
  272. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +297 -217
  273. data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +40 -30
  274. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +11 -8
  275. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsConstants.js +0 -1
  276. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +104 -205
  277. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +12 -8
  278. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +245 -241
  279. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +61 -27
  280. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +487 -73
  281. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +22 -4
  282. data/webpack/utils/contentViewEnvironmentLabel.js +3 -3
  283. data/webpack/utils/helpers.js +2 -2
  284. metadata +22 -20
  285. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +0 -39
  286. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +0 -47
  287. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +0 -223
  288. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -31
  289. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -297
  290. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -244
  291. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -47
  292. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionNameFormatter.js +0 -23
  293. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +0 -32
  294. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +0 -169
  295. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js +0 -41
  296. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/index.js +0 -2
  297. data/webpack/scenes/Subscriptions/index.js +0 -57
@@ -3,7 +3,7 @@ import { DropdownItem } from '@patternfly/react-core/deprecated';
3
3
  import { translate as __ } from 'foremanReact/common/I18n';
4
4
  import { isEqual } from 'lodash';
5
5
  import { useForemanContext, useForemanPermissions } from 'foremanReact/Root/Context/ForemanContext';
6
- import { CVEDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
6
+ import { CvEnvDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
7
7
  import AssignAKCVModal from './AssignAKCVModal';
8
8
 
9
9
  const getAKDetailsFromDOM = (node) => {
@@ -13,7 +13,7 @@ const getAKDetailsFromDOM = (node) => {
13
13
  return null;
14
14
  }
15
15
  };
16
- export const CVEDetailsCard = () => { // used as foreman-react-component, takes no props
16
+ export const CvEnvDetailsCard = () => { // used as foreman-react-component, takes no props
17
17
  const akDetailsNode = useRef(document.getElementById('ak-cve-details')).current;
18
18
  const [akDetails, setAkDetails] = useState(getAKDetailsFromDOM(akDetailsNode));
19
19
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
@@ -61,7 +61,7 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
61
61
  // Check for edit_activation_keys permission from ForemanContext
62
62
  const hasEditPermission = userPermissions.has('edit_activation_keys');
63
63
 
64
- // Build permissions object for CVEDetailsBareCard
64
+ // Build permissions object for CvEnvDetailsBareCard
65
65
  // Convert Set to object format expected by the card
66
66
  const permissions = {
67
67
  view_lifecycle_environments: userPermissions.has('view_lifecycle_environments'),
@@ -86,15 +86,15 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
86
86
  // Transform existing assignments to the format expected by AssignAKCVModal
87
87
  // Map from snake_case (API data) to the format the modal expects
88
88
  // Include the label from the parent content_view_environment object
89
- const existingAssignments = akDetails.content_view_environments?.map(cve => ({
90
- contentView: cve.content_view,
91
- environment: cve.lifecycle_environment,
92
- label: cve.label, // Pre-computed label from backend
89
+ const existingAssignments = akDetails.content_view_environments?.map(cvEnv => ({
90
+ contentView: cvEnv.content_view,
91
+ environment: cvEnv.lifecycle_environment,
92
+ cvEnvLabel: cvEnv.label, // Pre-computed label from backend
93
93
  })) || [];
94
94
 
95
95
  return (
96
96
  <>
97
- <CVEDetailsBareCard
97
+ <CvEnvDetailsBareCard
98
98
  contentViewEnvironments={akDetails.content_view_environments}
99
99
  permissions={permissions}
100
100
  dropdownItems={dropdownItems}
@@ -118,4 +118,4 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
118
118
  );
119
119
  };
120
120
 
121
- export default CVEDetailsCard;
121
+ export default CvEnvDetailsCard;
@@ -2,10 +2,10 @@ import React, { useRef, useState } from 'react';
2
2
  import { DropdownItem } from '@patternfly/react-core/deprecated';
3
3
  import { translate as __ } from 'foremanReact/common/I18n';
4
4
  import { useForemanContext, useForemanPermissions } from 'foremanReact/Root/Context/ForemanContext';
5
- import { CVEDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
5
+ import { CvEnvDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
6
6
  import CreateAKCVModal from './CreateAKCVModal';
7
7
 
8
- export const CVEDetailsCreateCard = () => {
8
+ export const CvEnvDetailsCreateCard = () => {
9
9
  const dataNode = useRef(document.getElementById('ak-create-cve-data')).current;
10
10
  const [assignments, setAssignments] = useState([]);
11
11
  const [isModalOpen, setIsModalOpen] = useState(false);
@@ -42,7 +42,7 @@ export const CVEDetailsCreateCard = () => {
42
42
  }
43
43
  };
44
44
 
45
- // Transform assignments to format for display in CVEDetailsBareCard
45
+ // Transform assignments to format for display in CvEnvDetailsBareCard
46
46
  const displayAssignments = assignments
47
47
  .filter(a => a.contentView && a.environment)
48
48
  .map(a => ({
@@ -50,7 +50,7 @@ export const CVEDetailsCreateCard = () => {
50
50
  lifecycle_environment: a.environment,
51
51
  }));
52
52
 
53
- // Build permissions object for CVEDetailsBareCard
53
+ // Build permissions object for CvEnvDetailsBareCard
54
54
  const permissions = {
55
55
  view_lifecycle_environments: userPermissions.has('view_lifecycle_environments'),
56
56
  view_content_views: userPermissions.has('view_content_views'),
@@ -59,10 +59,10 @@ export const CVEDetailsCreateCard = () => {
59
59
  };
60
60
 
61
61
  // Check if user has permission to assign content view environments
62
- const canAssignCVEs = userPermissions.has('create_activation_keys');
62
+ const canAssignCvEnvs = userPermissions.has('create_activation_keys');
63
63
 
64
64
  // Create dropdown items for kebab menu if user has permission
65
- const dropdownItems = canAssignCVEs ? [
65
+ const dropdownItems = canAssignCvEnvs ? [
66
66
  <DropdownItem
67
67
  aria-label="assign-content-view-environments"
68
68
  ouiaId="assign-content-view-environments"
@@ -79,16 +79,16 @@ export const CVEDetailsCreateCard = () => {
79
79
 
80
80
  return (
81
81
  <>
82
- <CVEDetailsBareCard
82
+ <CvEnvDetailsBareCard
83
83
  contentViewEnvironments={displayAssignments}
84
84
  permissions={permissions}
85
85
  dropdownItems={dropdownItems}
86
86
  isDropdownOpen={isDropdownOpen}
87
87
  toggleKebab={toggleKebab}
88
- openModal={canAssignCVEs ? openModal : null}
88
+ openModal={canAssignCvEnvs ? openModal : null}
89
89
  allowMultipleContentViews={allowMultipleContentViews}
90
90
  />
91
- {canAssignCVEs && (
91
+ {canAssignCvEnvs && (
92
92
  <CreateAKCVModal
93
93
  isOpen={isModalOpen}
94
94
  closeModal={closeModal}
@@ -102,4 +102,4 @@ export const CVEDetailsCreateCard = () => {
102
102
  );
103
103
  };
104
104
 
105
- export default CVEDetailsCreateCard;
105
+ export default CvEnvDetailsCreateCard;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
3
- import { CVEDetailsCreateCard } from '../CVEDetailsCreateCard';
3
+ import { CvEnvDetailsCreateCard } from '../CvEnvDetailsCreateCard';
4
4
 
5
5
  // Mock the ForemanContext
6
6
  jest.mock('foremanReact/Root/Context/ForemanContext', () => ({
@@ -10,7 +10,7 @@ jest.mock('foremanReact/Root/Context/ForemanContext', () => ({
10
10
 
11
11
  const { useForemanContext, useForemanPermissions } = require('foremanReact/Root/Context/ForemanContext');
12
12
 
13
- describe('CVEDetailsCreateCard', () => {
13
+ describe('CvEnvDetailsCreateCard', () => {
14
14
  beforeEach(() => {
15
15
  // Reset mocks before each test
16
16
  jest.clearAllMocks();
@@ -45,7 +45,7 @@ describe('CVEDetailsCreateCard', () => {
45
45
  });
46
46
 
47
47
  test('Renders empty state when no assignments', async () => {
48
- const { getByText } = renderWithRedux(<CVEDetailsCreateCard />);
48
+ const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
49
49
 
50
50
  await patientlyWaitFor(() => {
51
51
  expect(getByText('No content view environments yet')).toBeInTheDocument();
@@ -54,7 +54,7 @@ describe('CVEDetailsCreateCard', () => {
54
54
  });
55
55
 
56
56
  test('Shows "Assign content view environments" button', async () => {
57
- const { getByRole } = renderWithRedux(<CVEDetailsCreateCard />);
57
+ const { getByRole } = renderWithRedux(<CvEnvDetailsCreateCard />);
58
58
 
59
59
  await patientlyWaitFor(() => {
60
60
  expect(getByRole('button', { name: 'assign_content_view_environments' })).toBeInTheDocument();
@@ -66,7 +66,7 @@ describe('CVEDetailsCreateCard', () => {
66
66
  const dataNode = document.getElementById('ak-create-cve-data');
67
67
  delete dataNode.dataset.orgId;
68
68
 
69
- const { container } = renderWithRedux(<CVEDetailsCreateCard />);
69
+ const { container } = renderWithRedux(<CvEnvDetailsCreateCard />);
70
70
 
71
71
  // Component should return null and not render anything
72
72
  expect(container.firstChild).toBeNull();
@@ -82,7 +82,7 @@ describe('CVEDetailsCreateCard', () => {
82
82
  },
83
83
  });
84
84
 
85
- const { getByText } = renderWithRedux(<CVEDetailsCreateCard />);
85
+ const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
86
86
 
87
87
  await patientlyWaitFor(() => {
88
88
  // With 0 assignments, shows plural "Content view environments"
@@ -96,7 +96,7 @@ describe('CVEDetailsCreateCard', () => {
96
96
  metadata: {},
97
97
  });
98
98
 
99
- const { getByText } = renderWithRedux(<CVEDetailsCreateCard />);
99
+ const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
100
100
 
101
101
  await patientlyWaitFor(() => {
102
102
  // With 0 assignments, shows plural "Content view environments"
@@ -119,7 +119,7 @@ describe('CVEDetailsCreateCard', () => {
119
119
  element: jest.fn(() => mockElement),
120
120
  };
121
121
 
122
- const { getByRole } = renderWithRedux(<CVEDetailsCreateCard />);
122
+ const { getByRole } = renderWithRedux(<CvEnvDetailsCreateCard />);
123
123
 
124
124
  await patientlyWaitFor(() => {
125
125
  expect(getByRole('button', { name: 'assign_content_view_environments' })).toBeInTheDocument();
@@ -109,7 +109,7 @@ const BootedContainerImagesPage = () => {
109
109
  controller="/katello/api/v2/host_bootc_images"
110
110
  >
111
111
  <>
112
- <Table variant="compact" ouiaId="booted-containers-table" isStriped>
112
+ <Table variant="compact" ouiaId="booted-containers-table" isStriped className="katello-pf4-table">
113
113
  <Thead>
114
114
  <Tr ouiaId="table-header">
115
115
  <>
@@ -165,7 +165,7 @@ const BootedContainerImagesPage = () => {
165
165
  <Td />
166
166
  <Td colSpan={3}>
167
167
  <ExpandableRowContent>
168
- <Table variant="compact" isStriped ouiaId={`table-composable-expanded-${rowIndex}`}>
168
+ <Table variant="compact" isStriped ouiaId={`table-composable-expanded-${rowIndex}`} className="katello-pf4-table">
169
169
  <Thead>
170
170
  <Tr ouiaId={`table-row-inner-expandable-${rowIndex}`}>
171
171
  <Th width={55}>{__('Image digest')}</Th>
@@ -3,8 +3,7 @@ import { useHistory, useLocation } from 'react-router-dom';
3
3
  import {
4
4
  Title,
5
5
  PageSection,
6
- Stack,
7
- StackItem,
6
+ PageSectionVariants,
8
7
  Tabs,
9
8
  Tab,
10
9
  TabTitleText,
@@ -30,57 +29,65 @@ const ContainerImagesPage = () => {
30
29
  };
31
30
 
32
31
  return (
33
- <PageSection variant="light" className="container-images-page">
34
- <Stack hasGutter>
35
- <StackItem>
36
- <Title headingLevel="h1" size="2xl" ouiaId="container-images-title">
37
- {__('Container images')}
38
- <Popover
39
- headerContent={<div>{__('Container images')}</div>}
40
- bodyContent={
41
- <div>
42
- {__('View container images in the local registry using the Synced tab. View container images booted by image mode hosts using the Booted tab. The Booted tab also shows images outside of the local container registry.')}
43
- </div>
44
- }
45
- >
46
- <Button variant="plain" aria-label="Help" isInline icon={<OutlinedQuestionCircleIcon size="sm" />} ouiaId="container-images-help-button" />
47
- </Popover>
48
- </Title>
49
- </StackItem>
50
- <StackItem>
51
- <Tabs
52
- activeKey={activeTabKey}
53
- onSelect={handleTabClick}
54
- ouiaId="container-images-tabs"
32
+ <>
33
+ <PageSection
34
+ id="container-images-title-section"
35
+ variant={PageSectionVariants.light}
36
+ >
37
+ <Title headingLevel="h1" size="2xl" ouiaId="container-images-title">
38
+ {__('Container Images')}
39
+ <Popover
40
+ headerContent={<div>{__('Container Images')}</div>}
41
+ bodyContent={
42
+ <div>
43
+ {__('View container images in the local registry using the Synced tab. View container images booted by image mode hosts using the Booted tab. The Booted tab also shows images outside of the local container registry.')}
44
+ </div>
45
+ }
55
46
  >
56
- <Tab
57
- eventKey={0}
58
- title={
59
- <>
60
- <TabTitleIcon><SyncAltIcon /></TabTitleIcon>
61
- <TabTitleText>{__('Synced')}</TabTitleText>
62
- </>
63
- }
64
- ouiaId="container-images-synced-tab"
65
- />
66
- <Tab
67
- eventKey={1}
68
- title={
69
- <>
70
- <TabTitleIcon><FontAwesomeImageModeIcon /></TabTitleIcon>
71
- <TabTitleText>{__('Booted')}</TabTitleText>
72
- </>
73
- }
74
- ouiaId="container-images-booted-tab"
75
- />
76
- </Tabs>
77
- </StackItem>
78
- <StackItem>
79
- {activeTabKey === 0 && <SyncedContainerImagesPage />}
80
- {activeTabKey === 1 && <BootedContainerImagesPage />}
81
- </StackItem>
82
- </Stack>
83
- </PageSection>
47
+ <Button variant="plain" aria-label="Help" isInline icon={<OutlinedQuestionCircleIcon size="sm" />} ouiaId="container-images-help-button" />
48
+ </Popover>
49
+ </Title>
50
+ </PageSection>
51
+ <PageSection
52
+ id="container-images-tabs-section"
53
+ variant={PageSectionVariants.light}
54
+ >
55
+ <Tabs
56
+ activeKey={activeTabKey}
57
+ onSelect={handleTabClick}
58
+ ouiaId="container-images-tabs"
59
+ >
60
+ <Tab
61
+ eventKey={0}
62
+ title={
63
+ <>
64
+ <TabTitleIcon><SyncAltIcon /></TabTitleIcon>
65
+ <TabTitleText>{__('Synced')}</TabTitleText>
66
+ </>
67
+ }
68
+ ouiaId="container-images-synced-tab"
69
+ />
70
+ <Tab
71
+ eventKey={1}
72
+ title={
73
+ <>
74
+ <TabTitleIcon><FontAwesomeImageModeIcon /></TabTitleIcon>
75
+ <TabTitleText>{__('Booted')}</TabTitleText>
76
+ </>
77
+ }
78
+ ouiaId="container-images-booted-tab"
79
+ />
80
+ </Tabs>
81
+ </PageSection>
82
+ <PageSection
83
+ id="container-images-content-section"
84
+ variant={PageSectionVariants.light}
85
+ className="container-images-page"
86
+ >
87
+ {activeTabKey === 0 && <SyncedContainerImagesPage />}
88
+ {activeTabKey === 1 && <BootedContainerImagesPage />}
89
+ </PageSection>
90
+ </>
84
91
  );
85
92
  };
86
93
 
@@ -1,6 +1,29 @@
1
- .container-images-page {
2
- // Remove gap below tabs
3
- .pf-v5-c-tabs__list {
4
- margin-bottom: 0;
1
+ #container-images-title-section {
2
+ padding-block: 24px 16px;
3
+
4
+ .pf-v5-c-title {
5
+ margin: 0;
6
+ }
7
+ }
8
+
9
+ #container-images-tabs-section {
10
+ padding-block: 0;
11
+
12
+ .pf-v5-c-tabs__list {
13
+ margin-bottom: 0;
14
+ }
15
+ }
16
+
17
+ #container-images-content-section {
18
+ padding-top: 0;
19
+
20
+ .table-index-page #page-layout-title-section {
21
+ display: none;
22
+ }
23
+
24
+ .table-index-page #page-layout-toolbar-section,
25
+ .table-index-page #page-layout-content-section {
26
+ padding-left: 0;
27
+ padding-right: 0;
5
28
  }
6
29
  }
@@ -249,7 +249,7 @@ const SyncedContainerImagesPage = () => {
249
249
  ouiaId="synced-container-images-table-index"
250
250
  >
251
251
  <>
252
- <Table variant="compact" ouiaId="synced-container-images-table">
252
+ <Table variant="compact" ouiaId="synced-container-images-table" isStriped className="katello-pf4-table">
253
253
  <Thead>
254
254
  <Tr ouiaId="table-header">
255
255
  <Th />
@@ -14,7 +14,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
14
14
  docker_manifest_list_count: dockerManifestListCount = 0,
15
15
  docker_tag_count: dockerTagCount = 0,
16
16
  file_count: fileCount = 0,
17
- module_stream_count: moduleStreamCount = 0,
18
17
  ansible_collection_count: ansibleCollectionCount = 0,
19
18
  } = cvVersion;
20
19
 
@@ -36,7 +35,7 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
36
35
 
37
36
  const noCounts =
38
37
  !Number(debCount) && !Number(dockerManifestCount) && !Number(dockerTagCount) &&
39
- !Number(fileCount) && !Number(moduleStreamCount) && !Number(ansibleCollectionCount) &&
38
+ !Number(fileCount) && !Number(ansibleCollectionCount) &&
40
39
  !Number(dockerManifestListCount) && !contentConfigTypes?.length;
41
40
 
42
41
  if (noCounts) {
@@ -45,13 +44,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
45
44
 
46
45
  return (
47
46
  <>
48
- {moduleStreamCount > 0 &&
49
- <>
50
- <Link to={`/versions/${versionId}/moduleStreams`}>
51
- {`${moduleStreamCount} Module streams`}
52
- </Link><br />
53
- </>
54
- }
55
47
  {debCount > 0 &&
56
48
  <>
57
49
  <Link to={`/versions/${versionId}/debPackages`}>
@@ -100,7 +92,6 @@ ContentViewVersionContent.propTypes = {
100
92
  docker_manifest_list_count: PropTypes.number,
101
93
  docker_tag_count: PropTypes.number,
102
94
  file_count: PropTypes.number,
103
- module_stream_count: PropTypes.number,
104
95
  ansible_collection_count: PropTypes.number,
105
96
  }),
106
97
  };
@@ -113,7 +104,6 @@ ContentViewVersionContent.defaultProps = {
113
104
  docker_manifest_count: 0,
114
105
  docker_tag_count: 0,
115
106
  file_count: 0,
116
- module_stream_count: 0,
117
107
  ansible_collection_count: 0,
118
108
  },
119
109
  };
@@ -28,7 +28,7 @@ const CVVersionRemoveReview = () => {
28
28
  'Changes listed below will be effective after clicking Remove.');
29
29
 
30
30
  const matchedCVResults = cvVersions?.results?.filter(cv => cv.id === versionIdToRemove) || [];
31
- const selectedCVE = matchedCVResults
31
+ const selectedCvEnv = matchedCVResults
32
32
  .flatMap(cv => cv.content_view_environments || [])
33
33
  .filter(env => selectedEnvSet.has(env.environment_id));
34
34
 
@@ -63,7 +63,7 @@ const CVVersionRemoveReview = () => {
63
63
  <p style={{ marginBottom: '0.5em' }}>{versionDeleteInfo}</p>
64
64
  </Alert>}
65
65
  {!(deleteFlow || removeDeletionFlow) && <WizardHeader description={removalNotice} />}
66
- {(selectedCVE?.length !== 0) &&
66
+ {(selectedCvEnv?.length !== 0) &&
67
67
  <>
68
68
  <h3>{__('Environments')}</h3>
69
69
  <Flex>
@@ -71,7 +71,7 @@ const CVVersionRemoveReview = () => {
71
71
  <FlexItem style={{ marginBottom: '0.5em' }}>{__('This version will be removed from:')}</FlexItem>
72
72
  </Flex>
73
73
  <Flex>
74
- {selectedCVE?.map(({ environment_name: name, environment_id: id }) =>
74
+ {selectedCvEnv?.map(({ environment_name: name, environment_id: id }) =>
75
75
  <FlexItem key={name}><Label color="purple" href={`/lifecycle_environments/${id}`}>{name}</Label></FlexItem>)}
76
76
  </Flex>
77
77
  </>}
@@ -113,14 +113,14 @@ const CVVersionRemoveReview = () => {
113
113
  id="environment.plural"
114
114
  defaultMessage="{count, plural, one {{envSingular}} other {{envPlural}}}"
115
115
  values={{
116
- count: selectedCVE?.length,
116
+ count: selectedCvEnv?.length,
117
117
  envSingular: __('Content view environment'),
118
118
  envPlural: __('Content view environments'),
119
119
  }}
120
120
  />
121
121
  ),
122
- envCV: selectedCVE
123
- ?.map(cve => cve.label)
122
+ envCV: selectedCvEnv
123
+ ?.map(cvEnv => cvEnv.label)
124
124
  .join(', '),
125
125
  hostCount: multiCVHostsCount,
126
126
  hostSingular: __('multi-environment host'),
@@ -183,14 +183,14 @@ const CVVersionRemoveReview = () => {
183
183
  id="environment.plural"
184
184
  defaultMessage="{count, plural, one {{envSingular}} other {{envPlural}}}"
185
185
  values={{
186
- count: selectedCVE?.length,
186
+ count: selectedCvEnv?.length,
187
187
  envSingular: __('Content view environment'),
188
188
  envPlural: __('Content view environments'),
189
189
  }}
190
190
  />
191
191
  ),
192
- envCV: selectedCVE
193
- ?.map(cve => cve.label)
192
+ envCV: selectedCvEnv
193
+ ?.map(cvEnv => cvEnv.label)
194
194
  .join(', '),
195
195
  akCount: multiCVActivationKeysCount,
196
196
  keySingular: __('multi-environment activation key'),
@@ -16,7 +16,6 @@ import {
16
16
  getDockerTags,
17
17
  getErrata,
18
18
  getFiles,
19
- getModuleStreams,
20
19
  getPackageGroups,
21
20
  getRepositories,
22
21
  getRPMPackages,
@@ -33,8 +32,6 @@ import {
33
32
  selectFilesStatus,
34
33
  selectErrata,
35
34
  selectErrataStatus,
36
- selectModuleStreams,
37
- selectModuleStreamsStatus,
38
35
  selectRepositories,
39
36
  selectRepositoriesStatus,
40
37
  selectRPMPackageGroups,
@@ -255,31 +252,6 @@ export default ({ cvId, versionId }) => [
255
252
  },
256
253
  ],
257
254
  },
258
- {
259
- name: __('Module Streams'),
260
- route: 'moduleStreams',
261
- repoType: 'yum',
262
- getCountKey: item => item?.module_stream_count,
263
- responseSelector: state => selectModuleStreams(state),
264
- statusSelector: state => selectModuleStreamsStatus(state),
265
- autocompleteEndpoint: '/katello/api/v2/module_streams',
266
- autocompleteQueryParams: { content_view_version_id: versionId },
267
- bookmarkController: 'katello_content_view_components',
268
- fetchItems: params => getModuleStreams({ content_view_version_id: versionId, ...params }),
269
- columnHeaders: [
270
- {
271
- title: __('Name'),
272
- getProperty: item => (
273
- <a href={urlBuilder(`content/module_streams/${item?.id}`, '')}>
274
- {item?.name}
275
- </a>),
276
- },
277
- { title: __('Stream'), getProperty: item => item?.stream },
278
- { title: __('Version'), getProperty: item => item?.version },
279
- { title: __('Context'), getProperty: item => item?.context },
280
- { title: __('Arch'), getProperty: item => item?.arch },
281
- ],
282
- },
283
255
  {
284
256
  name: __('Deb Packages'),
285
257
  route: 'debPackages',
@@ -165,7 +165,7 @@ const testConfig = [
165
165
  },
166
166
  {
167
167
  name: 'Module Streams',
168
- countKey: 'module_stream_count',
168
+ countKey: 'modulemd_count',
169
169
  autoCompleteUrl: '/module_streams/auto_complete_search',
170
170
  dataUrl: api.getApiUrl('/module_streams'),
171
171
  data: ContentViewVersionModuleStreamsData,
@@ -260,6 +260,51 @@ testConfig.forEach(({
260
260
  done();
261
261
  }));
262
262
 
263
+ test('Does not duplicate Module Streams tab when both count keys are present', async () => {
264
+ const { version } = ContentViewVersionDetailsData;
265
+ const autocompleteScope = mockAutocomplete(
266
+ nockInstance,
267
+ '/module_streams/auto_complete_search',
268
+ autocompleteQuery('Module Streams'),
269
+ );
270
+
271
+ const scope = nockInstance
272
+ .get(cvVersions)
273
+ .query(true)
274
+ .reply(200, {
275
+ ...getTabSpecificData('modulemd_count'),
276
+ module_stream_count: ContentViewVersionDetailsCounts.module_stream_count,
277
+ });
278
+
279
+ const tabScope = nockInstance
280
+ .get(api.getApiUrl('/module_streams'))
281
+ .query(queryParams('Module Streams'))
282
+ .reply(200, ContentViewVersionModuleStreamsData);
283
+
284
+ const { getByText, queryByText, getAllByRole } = renderWithRedux(
285
+ withCVRoute(<ContentViewVersionDetails cvId={3} details={cvDetailData} />),
286
+ renderOptions,
287
+ );
288
+
289
+ expect(queryByText(`Version ${version}`)).toBeNull();
290
+ await patientlyWaitFor(() => {
291
+ expect(getByText(`Version ${version}`)).toBeTruthy();
292
+ });
293
+
294
+ await patientlyWaitFor(() => {
295
+ const moduleStreamTabs = getAllByRole('tab', { name: /Module Streams/ });
296
+ expect(moduleStreamTabs).toHaveLength(1);
297
+ });
298
+
299
+ await new Promise((resolve) => {
300
+ assertNockRequest(autocompleteScope, () => {
301
+ assertNockRequest(scope, () => {
302
+ assertNockRequest(tabScope, resolve);
303
+ });
304
+ });
305
+ });
306
+ });
307
+
263
308
  test('Can change repository selector', async (done) => {
264
309
  const {
265
310
  countKey,
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { renderWithRedux } from 'react-testing-lib-wrapper';
3
+ import ContentViewVersionContent from '../ContentViewVersionContent';
4
+
5
+ const renderContent = cvVersion =>
6
+ renderWithRedux(<ContentViewVersionContent
7
+ cvId={3}
8
+ versionId={73}
9
+ cvVersion={cvVersion}
10
+ />);
11
+
12
+ test('Shows no content when version has no counts', () => {
13
+ const { getByText } = renderContent({});
14
+
15
+ expect(getByText('No content')).toBeInTheDocument();
16
+ });
17
+
18
+ test('Shows module streams once from the generic content config', () => {
19
+ const { getByText, getAllByText } = renderContent({ modulemd_count: 14 });
20
+
21
+ expect(getAllByText('14 Module streams')).toHaveLength(1);
22
+ expect(getByText('14 Module streams').closest('a'))
23
+ .toHaveAttribute('href', expect.stringContaining('moduleStreams'));
24
+ });
25
+
26
+ test('Does not duplicate module streams when both count keys are present', () => {
27
+ const { getAllByText, queryByText } = renderContent({
28
+ modulemd_count: 14,
29
+ module_stream_count: 14,
30
+ });
31
+
32
+ expect(getAllByText('14 Module streams')).toHaveLength(1);
33
+ expect(queryByText('No content')).not.toBeInTheDocument();
34
+ });
35
+
36
+ test('Does not show module streams from the legacy count key alone', () => {
37
+ const { getByText, queryByText } = renderContent({ module_stream_count: 14 });
38
+
39
+ expect(queryByText(/Module streams/i)).not.toBeInTheDocument();
40
+ expect(getByText('No content')).toBeInTheDocument();
41
+ });
@@ -21,13 +21,13 @@ export const getFormData = (hostIds, search) => (post({
21
21
  export const changeContentSource =
22
22
  (assignments, contentSourceId, hostIds, handleSuccess, successToast) => {
23
23
  // Build CVEnv labels from assignments
24
- const cveLabels = assignments.map(buildContentViewEnvironmentLabel).filter(Boolean);
24
+ const cvEnvLabels = assignments.map(buildContentViewEnvironmentLabel).filter(Boolean);
25
25
 
26
26
  return put({
27
27
  key: CHANGE_CONTENT_SOURCE,
28
28
  url: foremanUrl('/api/v2/hosts/bulk/change_content_source'),
29
29
  params: {
30
- content_view_environments: cveLabels,
30
+ content_view_environments: cvEnvLabels,
31
31
  content_source_id: contentSourceId,
32
32
  host_ids: hostIds,
33
33
  },