katello 4.3.0.rc1 → 4.3.0.rc4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (299) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/api_controller.rb +4 -0
  3. data/app/controllers/katello/api/v2/capsule_content_controller.rb +11 -3
  4. data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
  5. data/app/controllers/katello/api/v2/generic_content_units_controller.rb +10 -4
  6. data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -0
  7. data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -0
  8. data/app/controllers/katello/api/v2/host_tracer_controller.rb +4 -0
  9. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +8 -0
  10. data/app/controllers/katello/api/v2/repositories_controller.rb +35 -3
  11. data/app/controllers/katello/api/v2/repository_sets_controller.rb +2 -2
  12. data/app/controllers/katello/api/v2/root_controller.rb +10 -19
  13. data/app/controllers/katello/concerns/api/v2/bulk_extensions.rb +3 -13
  14. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -9
  15. data/app/controllers/katello/remote_execution_controller.rb +1 -1
  16. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
  17. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -5
  18. data/app/lib/actions/katello/repository/destroy.rb +3 -3
  19. data/app/lib/actions/katello/repository/import_upload.rb +12 -2
  20. data/app/lib/actions/pulp/repository/sync.rb +0 -2
  21. data/app/lib/actions/pulp3/abstract_async_task.rb +16 -4
  22. data/app/lib/actions/pulp3/capsule_content/generate_metadata.rb +5 -4
  23. data/app/lib/actions/pulp3/capsule_content/reclaim_space.rb +25 -0
  24. data/app/lib/actions/pulp3/orchestration/repository/import_repository_upload.rb +36 -0
  25. data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
  26. data/app/lib/actions/pulp3/repository/commit_upload.rb +3 -1
  27. data/app/lib/actions/pulp3/repository/import_upload.rb +4 -2
  28. data/app/lib/actions/pulp3/repository/reclaim_space.rb +25 -0
  29. data/app/lib/actions/pulp3/repository/save_artifact.rb +12 -8
  30. data/app/lib/katello/resources/cdn.rb +10 -1
  31. data/app/lib/katello/resources/registry.rb +1 -1
  32. data/app/models/katello/concerns/host_managed_extensions.rb +7 -4
  33. data/app/models/katello/concerns/smart_proxy_extensions.rb +21 -9
  34. data/app/models/katello/content_view_version.rb +1 -6
  35. data/app/models/katello/glue/pulp/repo.rb +1 -2
  36. data/app/models/katello/host_tracer.rb +2 -0
  37. data/app/models/katello/pulp3/repository_reference.rb +7 -0
  38. data/app/models/katello/repository.rb +2 -30
  39. data/app/models/katello/root_repository.rb +3 -44
  40. data/app/models/setting/content.rb +2 -8
  41. data/app/presenters/katello/host_package_presenter.rb +21 -0
  42. data/app/services/katello/bulk_items_helper.rb +35 -0
  43. data/app/services/katello/pulp3/api/core.rb +16 -2
  44. data/app/services/katello/pulp3/content.rb +4 -2
  45. data/app/services/katello/pulp3/pulp_content_unit.rb +9 -3
  46. data/app/services/katello/pulp3/repository.rb +9 -4
  47. data/app/services/katello/pulp3/repository_mirror.rb +1 -1
  48. data/app/services/katello/repository_type.rb +2 -1
  49. data/app/services/katello/smart_proxy_helper.rb +10 -1
  50. data/app/views/foreman/job_templates/change_content_source.erb +42 -0
  51. data/app/views/foreman/job_templates/install_errata.erb +8 -6
  52. data/app/views/foreman/job_templates/resolve_traces.erb +4 -5
  53. data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +3 -5
  54. data/app/views/foreman/smart_proxies/_content_sync.html.erb +17 -4
  55. data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +12 -0
  56. data/app/views/foreman/smart_proxies/show.html.erb +4 -2
  57. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +6 -0
  58. data/app/views/katello/api/v2/{organizations/cdn_configuration.rabl → cdn_configurations/show.json.rabl} +4 -0
  59. data/app/views/katello/api/v2/content_facet/show.json.rabl +8 -0
  60. data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
  61. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  62. data/app/views/katello/api/v2/host_packages/base.json.rabl +2 -0
  63. data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
  64. data/app/views/katello/api/v2/repositories/show.json.rabl +0 -3
  65. data/config/routes/api/v2.rb +5 -10
  66. data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +2 -0
  67. data/db/migrate/20211115215210_drop_ostree_branches.rb +13 -0
  68. data/db/migrate/20211129200124_remove_dependency_solving_algorithm_setting.rb +5 -0
  69. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -2
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -3
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +21 -1
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.factory.js +2 -1
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/sync-state.service.js +2 -0
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -10
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +0 -10
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
  78. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
  79. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
  80. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
  81. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
  82. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +1 -2
  83. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +14 -2
  84. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -4
  85. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +0 -10
  86. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-reclaim-space-modal.controller.js +36 -0
  87. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +16 -2
  88. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details-reclaim-space-modal.html +18 -0
  89. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +13 -0
  90. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
  91. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -6
  92. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +4 -1
  93. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
  94. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/product-repositories-reclaim-space-modal.controller.js +35 -0
  95. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
  96. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +3 -1
  97. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories-reclaim-space-modal.html +18 -0
  98. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +7 -8
  99. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.controller.js +35 -0
  100. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.factory.js +18 -0
  101. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.module.js +14 -0
  102. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.routes.js +16 -0
  103. data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -1
  104. data/lib/katello/permission_creator.rb +3 -4
  105. data/lib/katello/plugin.rb +4 -10
  106. data/lib/katello/repository_types/ostree.rb +3 -1
  107. data/lib/katello/tasks/reset.rake +2 -2
  108. data/lib/katello/tasks/upgrades/4.3/fix_url_auth.rake +25 -0
  109. data/lib/katello/version.rb +1 -1
  110. data/package.json +1 -0
  111. data/webpack/components/AddedStatusLabel.js +2 -1
  112. data/webpack/components/EditableTextInput/EditableTextInput.js +76 -17
  113. data/webpack/components/EditableTextInput/__tests__/editableTextInput.test.js +82 -0
  114. data/webpack/components/EditableTextInput/editableTextInput.scss +4 -0
  115. data/webpack/components/Packages/index.js +63 -0
  116. data/webpack/components/RoutedTabs/index.js +3 -1
  117. data/webpack/components/Search/Search.js +7 -1
  118. data/webpack/components/SelectAllCheckbox/index.js +2 -2
  119. data/webpack/components/Table/EmptyStateMessage.js +4 -2
  120. data/webpack/components/Table/MainTable.scss +7 -1
  121. data/webpack/components/Table/TableHooks.js +10 -19
  122. data/webpack/components/Table/TableWrapper.js +3 -3
  123. data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +3 -3
  124. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard.js +24 -30
  125. data/webpack/components/extensions/HostDetails/HostDetailsConstants.js +1 -0
  126. data/webpack/components/extensions/HostDetails/HostDetailsSelectors.js +16 -0
  127. data/webpack/components/extensions/HostDetails/HostErrata/HostErrataConstants.js +2 -0
  128. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +11 -0
  129. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +2 -0
  130. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesSelectors.js +16 -0
  131. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
  132. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
  133. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab.js +119 -25
  134. data/webpack/components/extensions/HostDetails/Tabs/HostTracesConstants.js +1 -0
  135. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +127 -0
  136. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.scss +11 -0
  137. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +30 -4
  138. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
  139. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +73 -0
  140. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +2 -0
  141. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsSelectors.js +16 -0
  142. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +347 -0
  143. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.scss +7 -0
  144. data/webpack/components/extensions/HostDetails/Tabs/TracesTab.js +38 -31
  145. data/webpack/components/extensions/HostDetails/Tabs/__tests__/bookmarks.fixtures.json +12 -0
  146. data/webpack/components/extensions/HostDetails/Tabs/__tests__/contentOverrides.fixtures.json +227 -0
  147. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +423 -2
  148. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +28 -0
  149. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +91 -0
  150. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySets.fixtures.json +120 -0
  151. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +307 -0
  152. data/webpack/components/extensions/HostDetails/Tabs/__tests__/resolveErrata.fixtures.json +35 -0
  153. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +55 -9
  154. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +28 -14
  155. data/webpack/containers/Application/overrides.scss +31 -9
  156. data/webpack/global_index.js +11 -4
  157. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
  158. data/webpack/scenes/Content/ContentConfig.js +23 -7
  159. data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +2 -0
  160. data/webpack/scenes/ContentCredentials/ContentCredentialActions.js +18 -0
  161. data/webpack/scenes/ContentCredentials/ContentCredentialConstants.js +2 -0
  162. data/webpack/scenes/ContentCredentials/ContentCredentialSelectors.js +12 -0
  163. data/webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js +73 -0
  164. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +8 -12
  165. data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -1
  166. data/webpack/scenes/ContentViews/Copy/__tests__/copyContentView.test.js +1 -1
  167. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +3 -3
  168. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +7 -2
  169. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.scss +7 -0
  170. data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +9 -9
  171. data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +6 -6
  172. data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +39 -37
  173. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionFinish.js +10 -4
  174. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReview.js +35 -33
  175. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +12 -7
  176. data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +2 -6
  177. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +13 -14
  178. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +36 -31
  179. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +8 -8
  180. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +108 -41
  181. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +3 -2
  182. data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +2 -2
  183. data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +1 -2
  184. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +1 -4
  185. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +6 -6
  186. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +11 -5
  187. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +6 -9
  188. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +5 -8
  189. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +40 -43
  190. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -2
  191. data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +4 -4
  192. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +6 -8
  193. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +6 -1
  194. data/webpack/scenes/ContentViews/Details/Filters/Rules/ContainerTag/AddEditContainerTagRuleModal.js +1 -1
  195. data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +16 -22
  196. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +8 -8
  197. data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +3 -5
  198. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewErrataByDateDetails.fixtures.json +1 -8
  199. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +1 -2
  200. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +5 -9
  201. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvAllRepos.fixtures.json +0 -2
  202. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataDateFilterContent.test.js +1 -9
  203. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +2 -4
  204. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErratumFilterDetails.fixtures.json +1 -2
  205. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailModuleAffectedRepos.fixtures.json +1 -8
  206. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailWithAffectedRepos.fixtures.json +1 -8
  207. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +2 -4
  208. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilterDetails.fixtures.json +1 -2
  209. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +1 -3
  210. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +61 -32
  211. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +6 -1
  212. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +5 -8
  213. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +55 -9
  214. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +2 -0
  215. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
  216. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +48 -29
  217. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +2 -2
  218. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +9 -7
  219. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +5 -2
  220. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +38 -9
  221. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveCVVersionWizard.js +4 -1
  222. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +59 -53
  223. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionDeleteFinish.js +14 -3
  224. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +24 -17
  225. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +3 -3
  226. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +1 -4
  227. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +4 -2
  228. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +134 -32
  229. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +8 -3
  230. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +1 -4
  231. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +1 -2
  232. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +21 -1
  233. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsCounts.fixtures.json +1 -2
  234. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js +22 -1
  235. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionRepositories.fixtures.json +1 -18
  236. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +5 -5
  237. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +2 -0
  238. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +1 -3
  239. data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +0 -4
  240. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +66 -53
  241. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +40 -28
  242. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +3 -3
  243. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +14 -14
  244. data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +6 -0
  245. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +53 -12
  246. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +12 -6
  247. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -6
  248. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +12 -7
  249. data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +2 -2
  250. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +26 -27
  251. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +18 -6
  252. data/webpack/scenes/ContentViews/components/WizardHeader.js +44 -0
  253. data/webpack/scenes/ContentViews/components/contentViewIcon.scss +13 -2
  254. data/webpack/scenes/Organizations/OrganizationActions.js +22 -24
  255. data/webpack/scenes/Organizations/OrganizationConstants.js +1 -3
  256. data/webpack/scenes/Organizations/OrganizationReducer.js +0 -7
  257. data/webpack/scenes/Organizations/OrganizationSelectors.js +16 -0
  258. data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +1 -21
  259. data/webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js +0 -20
  260. data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +34 -23
  261. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationForm.js +185 -0
  262. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationForm.scss +3 -0
  263. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +112 -146
  264. data/webpack/scenes/Subscriptions/Manifest/__tests__/CdnConfigurationForm.test.js +114 -0
  265. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +121 -31
  266. data/webpack/scenes/Subscriptions/Manifest/index.js +14 -3
  267. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +1 -0
  268. data/webpack/scenes/Tasks/TaskActions.js +4 -3
  269. data/webpack/scenes/Tasks/__tests__/__snapshots__/TaskActions.test.js.snap +1 -0
  270. data/webpack/utils/helpers.js +2 -2
  271. metadata +62 -43
  272. data/app/controllers/katello/api/v2/ostree_branches_controller.rb +0 -16
  273. data/app/lib/actions/pulp/repository/presenters/ostree_presenter.rb +0 -91
  274. data/app/models/katello/ostree_branch.rb +0 -12
  275. data/app/models/katello/repository_ostree_branch.rb +0 -7
  276. data/app/services/katello/pulp/ostree_branch.rb +0 -14
  277. data/app/services/katello/pulp/repository/ostree.rb +0 -48
  278. data/app/views/katello/api/v2/ostree_branches/compare.json.rabl +0 -10
  279. data/app/views/katello/api/v2/ostree_branches/index.json.rabl +0 -7
  280. data/app/views/katello/api/v2/ostree_branches/show.json.rabl +0 -5
  281. data/app/views/katello/api/v2/root/resource_list.json.rabl +0 -3
  282. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +0 -26
  283. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +0 -27
  284. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +0 -77
  285. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch.controller.js +0 -31
  286. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +0 -15
  287. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-repositories.html +0 -72
  288. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch.html +0 -30
  289. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +0 -27
  290. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +0 -67
  291. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +0 -15
  292. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +0 -50
  293. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +0 -40
  294. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -40
  295. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/ostree-upstream-sync-policy.service.js +0 -26
  296. data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +0 -12
  297. data/webpack/scenes/Content/Details/ContentCounts.js +0 -42
  298. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -108
  299. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +0 -158
@@ -211,7 +211,7 @@ export const editCVFilter = (filterId, params, handleSuccess) => put({
211
211
  url: api.getApiUrl(`/content_view_filters/${filterId}`),
212
212
  params,
213
213
  handleSuccess,
214
- successToast: () => __('Filter edited successfully'),
214
+ successToast: () => __('Filter edited'),
215
215
  errorToast: error => __(`Something went wrong while editing the filter! ${getResponseErrorMsgs(error.response)}`),
216
216
  });
217
217
 
@@ -249,7 +249,7 @@ export const deleteContentViewFilters = (cvId, ids, handleSuccess) => put({
249
249
  url: api.getApiUrl(`/content_views/${cvId}/remove_filters`),
250
250
  params: { filter_ids: ids },
251
251
  handleSuccess,
252
- successToast: () => __('Filters successfully deleted'),
252
+ successToast: () => __('Filters deleted'),
253
253
  errorToast: error => __(`Something went wrong while deleting filters! ${getResponseErrorMsgs(error.response)}`),
254
254
  });
255
255
 
@@ -259,7 +259,7 @@ export const deleteContentViewFilterRules = (filterId, ids, handleSuccess) => pu
259
259
  url: api.getApiUrl(`/content_view_filters/${filterId}/remove_filter_rules`),
260
260
  params: { rule_ids: ids },
261
261
  handleSuccess,
262
- successToast: () => __('Filter rules successfully deleted'),
262
+ successToast: () => __('Filter rules deleted'),
263
263
  errorToast: error => __(`Something went wrong while deleting filter rules! ${getResponseErrorMsgs(error.response)}`),
264
264
  });
265
265
 
@@ -269,7 +269,7 @@ export const addContentViewFilterRules = (filterId, rulesParams, handleSuccess)
269
269
  url: api.getApiUrl(`/content_view_filters/${filterId}/add_filter_rules`),
270
270
  params: { rules_params: rulesParams },
271
271
  handleSuccess,
272
- successToast: () => __('Filter rules successfully added'),
272
+ successToast: () => __('Filter rules added'),
273
273
  errorToast: error => __(`Something went wrong while adding filter rules! ${getResponseErrorMsgs(error.response)}`),
274
274
  });
275
275
 
@@ -278,7 +278,7 @@ export const deleteContentViewFilter = (filterId, handleSuccess) => APIActions.d
278
278
  key: DELETE_CONTENT_VIEW_FILTER_KEY,
279
279
  url: api.getApiUrl(`/content_view_filters/${filterId}`),
280
280
  handleSuccess,
281
- successToast: () => __('Filter successfully deleted'),
281
+ successToast: () => __('Filter deleted'),
282
282
  errorToast: error => __(`Something went wrong while deleting this filter! ${getResponseErrorMsgs(error.response)}`),
283
283
  });
284
284
 
@@ -336,7 +336,7 @@ export const editCVFilterRule = (filterId, params, handleSuccess) => put({
336
336
  url: api.getApiUrl(`/content_view_filters/${filterId}/rules/${params.id}`),
337
337
  params,
338
338
  handleSuccess,
339
- successToast: () => __('Filter rule edited successfully'),
339
+ successToast: () => __('Filter rule edited'),
340
340
  errorToast: error => __(`Something went wrong while editing a filter rule! ${getResponseErrorMsgs(error.response)}`),
341
341
  });
342
342
 
@@ -346,7 +346,7 @@ export const addCVFilterRule = (filterId, params, handleSuccess) => post({
346
346
  url: api.getApiUrl(`/content_view_filters/${filterId}/rules`),
347
347
  params,
348
348
  handleSuccess,
349
- successToast: () => __('Filter rule added successfully'),
349
+ successToast: () => __('Filter rule added'),
350
350
  errorToast: error => __(`Something went wrong while adding a filter rule! ${getResponseErrorMsgs(error.response)}`),
351
351
  });
352
352
 
@@ -356,7 +356,7 @@ export const removeCVFilterRule = (filterId, packageGroupFilterId, handleSuccess
356
356
  key: REMOVE_CONTENT_VIEW_FILTER_RULE,
357
357
  url: api.getApiUrl(`/content_view_filters/${filterId}/rules/${packageGroupFilterId}`),
358
358
  handleSuccess,
359
- successToast: () => __('Filter rule removed successfully'),
359
+ successToast: () => __('Filter rule removed'),
360
360
  errorToast: error => __(`Something went wrong while removing a filter rule! ${getResponseErrorMsgs(error.response)}`),
361
361
  });
362
362
 
@@ -1,7 +1,18 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useSelector, shallowEqual } from 'react-redux';
3
3
  import { useParams } from 'react-router-dom';
4
- import { Grid, GridItem, TextContent, Text, TextVariants, Button, Flex, FlexItem } from '@patternfly/react-core';
4
+ import { Grid,
5
+ GridItem,
6
+ TextContent,
7
+ Text,
8
+ TextVariants,
9
+ Button,
10
+ Flex,
11
+ FlexItem,
12
+ Dropdown,
13
+ DropdownItem,
14
+ KebabToggle,
15
+ DropdownPosition } from '@patternfly/react-core';
5
16
  import { ExternalLinkAltIcon } from '@patternfly/react-icons';
6
17
  import { translate as __ } from 'foremanReact/common/I18n';
7
18
 
@@ -18,6 +29,8 @@ import ContentViewIcon from '../components/ContentViewIcon';
18
29
  import CVBreadCrumb from '../components/CVBreadCrumb';
19
30
  import PublishContentViewWizard from '../Publish/PublishContentViewWizard';
20
31
  import { hasPermission } from '../helpers';
32
+ import CopyContentViewModal from '../Copy/CopyContentViewModal';
33
+ import ContentViewDeleteWizard from '../Delete/ContentViewDeleteWizard';
21
34
 
22
35
  export default () => {
23
36
  const { id } = useParams();
@@ -25,8 +38,31 @@ export default () => {
25
38
  const details = useSelector(state => selectCVDetails(state, cvId), shallowEqual);
26
39
  const [isPublishModalOpen, setIsPublishModalOpen] = useState(false);
27
40
  const [currentStep, setCurrentStep] = useState(1);
41
+ const [dropDownOpen, setDropdownOpen] = useState(false);
42
+ const [copying, setCopying] = useState(false);
43
+ const [deleting, setDeleting] = useState(false);
44
+ const dropDownItems = [
45
+ <DropdownItem
46
+ key="copy"
47
+ onClick={() => {
48
+ setCopying(true);
49
+ }}
50
+ >
51
+ {__('Copy')}
52
+ </DropdownItem>,
53
+ <DropdownItem
54
+ key="delete"
55
+ onClick={() => {
56
+ setDeleting(true);
57
+ }}
58
+ >
59
+ {__('Delete')}
60
+ </DropdownItem>,
61
+ ];
28
62
 
29
- const { name, composite, permissions } = details;
63
+ const {
64
+ name, composite, permissions, environments, versions,
65
+ } = details;
30
66
  const tabs = [
31
67
  {
32
68
  key: 'details',
@@ -60,25 +96,28 @@ export default () => {
60
96
  ];
61
97
 
62
98
  return (
63
- <Grid className="grid-with-margin">
64
- <DetailsContainer cvId={cvId}>
65
- <React.Fragment>
66
- <CVBreadCrumb />
67
- <GridItem xl={8} lg={7} sm={12} >
68
- <Flex>
69
- <FlexItem>
70
- <TextContent>
71
- <Text component={TextVariants.h1}>{`${name} content view`}</Text>
72
- </TextContent>
73
- </FlexItem>
74
- <FlexItem spacer={{ default: 'spacerXl' }}>
75
- <Text component={TextVariants.h1}><ContentViewIcon composite={composite} /></Text>
76
- </FlexItem>
77
- </Flex>
78
- </GridItem>
79
- <GridItem xl={4} lg={5} sm={12} >
80
- <Flex justifyContent={{ lg: 'justifyContentFlexEnd', sm: 'justifyContentFlexStart' }}>
81
- {hasPermission(permissions, 'publish_content_views') &&
99
+ <>
100
+ <Grid className="grid-with-margin">
101
+ <DetailsContainer cvId={cvId}>
102
+ <>
103
+ <CVBreadCrumb />
104
+ <GridItem xl={8} lg={7} sm={12} style={{ margin: '10px 0' }}>
105
+ <Flex alignItems={{
106
+ default: 'alignItemsCenter',
107
+ }}
108
+ >
109
+ <FlexItem>
110
+ <TextContent>
111
+ <Text component={TextVariants.h1}>
112
+ <ContentViewIcon count={name} composite={composite} />
113
+ </Text>
114
+ </TextContent>
115
+ </FlexItem>
116
+ </Flex>
117
+ </GridItem>
118
+ <GridItem xl={4} lg={5} sm={12} >
119
+ <Flex justifyContent={{ lg: 'justifyContentFlexEnd', sm: 'justifyContentFlexStart' }}>
120
+ {hasPermission(permissions, 'publish_content_views') &&
82
121
  <FlexItem>
83
122
  <Button onClick={() => { setIsPublishModalOpen(true); }} variant="primary" aria-label="publish_content_view">
84
123
  {__('Publish new version')}
@@ -93,25 +132,53 @@ export default () => {
93
132
  />}
94
133
  </FlexItem>
95
134
  }
96
- <FlexItem>
97
- <Button
98
- component="a"
99
- aria-label="view tasks button"
100
- href={`/foreman_tasks/tasks?search=resource_type%3D+Katello%3A%3AContentView+resource_id%3D${cvId}`}
101
- target="_blank"
102
- variant="secondary"
103
- >
104
- {'View tasks '}
105
- <ExternalLinkAltIcon />
106
- </Button>
107
- </FlexItem>
108
- </Flex>
109
- </GridItem>
110
- <GridItem span={12}>
111
- <RoutedTabs tabs={tabs} defaultTabIndex={1} />
112
- </GridItem>
113
- </React.Fragment>
114
- </DetailsContainer>
115
- </Grid>
135
+ <FlexItem>
136
+ <Button
137
+ component="a"
138
+ aria-label="view tasks button"
139
+ href={`/foreman_tasks/tasks?search=resource_type%3D+Katello%3A%3AContentView+resource_id%3D${cvId}`}
140
+ target="_blank"
141
+ variant="secondary"
142
+ >
143
+ {'View tasks '}
144
+ <ExternalLinkAltIcon />
145
+ </Button>
146
+ </FlexItem>
147
+ <FlexItem>
148
+ <Dropdown
149
+ position={DropdownPosition.right}
150
+ style={{ marginLeft: 'auto' }}
151
+ toggle={<KebabToggle onToggle={setDropdownOpen} id="toggle-dropdown" />}
152
+ isOpen={dropDownOpen}
153
+ isPlain
154
+ dropdownItems={dropDownItems}
155
+ />
156
+ </FlexItem>
157
+ </Flex>
158
+ </GridItem>
159
+ <GridItem span={12}>
160
+ <RoutedTabs tabs={tabs} defaultTabIndex={1} />
161
+ </GridItem>
162
+ </ >
163
+ </DetailsContainer >
164
+ </Grid >
165
+ {copying && <CopyContentViewModal
166
+ cvId={cvId}
167
+ cvName={name}
168
+ show={copying}
169
+ setIsOpen={setCopying}
170
+ aria-label="copy_content_view_modal"
171
+ />}
172
+ {deleting && <ContentViewDeleteWizard
173
+ cvId={cvId && Number(cvId)}
174
+ cvEnvironments={environments}
175
+ cvVersions={versions}
176
+ show={deleting}
177
+ setIsOpen={setDeleting}
178
+ currentStep={currentStep}
179
+ setCurrentStep={setCurrentStep}
180
+ aria-label="delete_content_view_modal"
181
+ />}
182
+ </>
116
183
  );
117
184
  };
@@ -70,8 +70,9 @@ const ContentViewInfo = ({ cvId, details }) => {
70
70
  </TextListItem>
71
71
  <TextListItem component={TextListItemVariants.dd} className="foreman-spaced-list">
72
72
  <Flex>
73
- <FlexItem spacer={{ default: 'spacerXs' }}><ContentViewIcon composite={composite} /></FlexItem>
74
- <FlexItem>{composite ? 'Composite' : 'Component'}</FlexItem>
73
+ <FlexItem spacer={{ default: 'spacerXs' }}>
74
+ <ContentViewIcon composite={composite} description={composite ? __('Composite') : __('Component')} />
75
+ </FlexItem>
75
76
  </Flex>
76
77
  </TextListItem>
77
78
  <ActionableDetail
@@ -127,7 +127,7 @@ const CVFilterAddModal = ({ cvId, onClose }) => {
127
127
  isChecked={inclusion}
128
128
  name="radio-1"
129
129
  onChange={checked => setInclusion(checked)}
130
- label="Include Filter"
130
+ label={__('Include filter')}
131
131
  id="include_filter"
132
132
  value="includeFilter"
133
133
  style={{ margin: '1px' }}
@@ -138,7 +138,7 @@ const CVFilterAddModal = ({ cvId, onClose }) => {
138
138
  isChecked={!inclusion}
139
139
  name="radio-1"
140
140
  onChange={checked => setInclusion(!checked)}
141
- label="Exclude Filter"
141
+ label={__('Exclude filter')}
142
142
  id="exclude_filter"
143
143
  value="excludeFilter"
144
144
  style={{ margin: '1px' }}
@@ -76,7 +76,6 @@
76
76
  "name": "test1"
77
77
  },
78
78
  "content_counts": {
79
- "ostree_branch": 0,
80
79
  "docker_manifest": 0,
81
80
  "docker_tag": 0,
82
81
  "rpm": 8,
@@ -121,4 +120,4 @@
121
120
  "repositories": [],
122
121
  "type": "package_group",
123
122
  "rules": []
124
- }
123
+ }
@@ -179,9 +179,6 @@ const AffectedRepositoryTable = ({
179
179
  const activeFilters = [productSelected];
180
180
  const defaultFilters = [allProducts];
181
181
  const dropdownItems = [
182
- <DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!hasNotAddedSelected} component="button" onClick={addBulk}>
183
- {__('Add')}
184
- </DropdownItem>,
185
182
  <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={removeBulk}>
186
183
  {__('Remove')}
187
184
  </DropdownItem>,
@@ -226,7 +223,7 @@ const AffectedRepositoryTable = ({
226
223
  <ActionList>
227
224
  <ActionListItem>
228
225
  <Button onClick={addBulk} isDisabled={!hasNotAddedSelected} variant="secondary" aria-label="add_repositories">
229
- Add repositories
226
+ {__('Add repositories')}
230
227
  </Button>
231
228
  </ActionListItem>
232
229
  <ActionListItem>
@@ -173,11 +173,11 @@ const CVContainerImageFilterContent = ({
173
173
  </div>
174
174
  </Tab>
175
175
  {(repositories.length || showAffectedRepos) &&
176
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
177
- <div className="tab-body-with-spacing">
178
- <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="docker" setShowAffectedRepos={setShowAffectedRepos} details={details} />
179
- </div>
180
- </Tab>
176
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
177
+ <div className="tab-body-with-spacing">
178
+ <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="docker" setShowAffectedRepos={setShowAffectedRepos} details={details} />
179
+ </div>
180
+ </Tab>
181
181
  }
182
182
  </Tabs>
183
183
  );
@@ -197,6 +197,6 @@ CVContainerImageFilterContent.defaultProps = {
197
197
  cvId: '',
198
198
  filterId: '',
199
199
  showAffectedRepos: false,
200
- setShowAffectedRepos: () => {},
200
+ setShowAffectedRepos: () => { },
201
201
  };
202
202
  export default CVContainerImageFilterContent;
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { isEqual, sortBy, capitalize } from 'lodash';
4
4
  import { shallowEqual, useSelector, useDispatch } from 'react-redux';
5
- import { Link } from 'react-router-dom';
5
+ import { Link, useHistory } from 'react-router-dom';
6
6
  import {
7
7
  Tooltip, Form, ActionGroup, Flex, FlexItem, Select,
8
8
  SelectOption, SelectVariant, ChipGroup, Chip,
@@ -12,7 +12,7 @@ import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
12
12
  import { translate as __ } from 'foremanReact/common/I18n';
13
13
  import { selectCVFilterDetails } from '../ContentViewDetailSelectors';
14
14
  import AffectedRepositoryTable from './AffectedRepositories/AffectedRepositoryTable';
15
- import { editCVFilterRule, getCVFilterDetails } from '../ContentViewDetailActions';
15
+ import { editCVFilterRule } from '../ContentViewDetailActions';
16
16
  import { hasPermission } from '../../helpers';
17
17
 
18
18
  export const dateFormat = date => `${(date.getMonth() + 1).toString().padStart(2, '0')}/${date.getDate().toString().padStart(2, '0')}/${date.getFullYear()}`;
@@ -37,6 +37,7 @@ export const isValidDate = date => date instanceof Date && !Number.isNaN(date.ge
37
37
  const CVErrataDateFilterContent = ({
38
38
  cvId, filterId, inclusion, showAffectedRepos, setShowAffectedRepos, details,
39
39
  }) => {
40
+ const { push } = useHistory();
40
41
  const filterDetails = useSelector(state =>
41
42
  selectCVFilterDetails(state, cvId, filterId), shallowEqual);
42
43
  const { repositories = [], rules } = filterDetails;
@@ -64,7 +65,7 @@ const CVErrataDateFilterContent = ({
64
65
  types: selectedTypes,
65
66
  date_type: dateType,
66
67
  },
67
- () => dispatch(getCVFilterDetails(cvId, filterId)),
68
+ () => push('/filters'),
68
69
  ));
69
70
  };
70
71
 
@@ -236,7 +237,12 @@ const CVErrataDateFilterContent = ({
236
237
  </FlexItem>
237
238
  {hasPermission(permissions, 'edit_content_views') &&
238
239
  <FlexItem>
239
- <Button variant="link" onClick={resetFilters} isInline>
240
+ <Button
241
+ disabled={saveDisabled}
242
+ variant="link"
243
+ onClick={resetFilters}
244
+ isInline
245
+ >
240
246
  {__('Reset filters')}
241
247
  </Button>
242
248
  </FlexItem>
@@ -263,7 +269,7 @@ const CVErrataDateFilterContent = ({
263
269
  </div>
264
270
  </Tab>
265
271
  {(repositories.length || showAffectedRepos) &&
266
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
272
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
267
273
  <div className="tab-body-with-spacing">
268
274
  <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
269
275
  </div>
@@ -317,13 +317,10 @@ const CVErrataIDFilterContent = ({
317
317
  isOpen={bulkActionOpen}
318
318
  isPlain
319
319
  dropdownItems={[
320
- <DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!hasNotAddedSelected} component="button" onClick={bulkAdd}>
321
- {__('Add')}
322
- </DropdownItem>,
323
320
  <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={bulkRemove}>
324
321
  {__('Remove')}
325
322
  </DropdownItem>]
326
- }
323
+ }
327
324
  />
328
325
  </SplitItem>
329
326
  }
@@ -418,11 +415,11 @@ const CVErrataIDFilterContent = ({
418
415
  </div>
419
416
  </Tab>
420
417
  {(repositories.length || showAffectedRepos) &&
421
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
422
- <div className="tab-body-with-spacing">
423
- <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
424
- </div>
425
- </Tab>
418
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
419
+ <div className="tab-body-with-spacing">
420
+ <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
421
+ </div>
422
+ </Tab>
426
423
  }
427
424
  </Tabs>
428
425
  );
@@ -259,9 +259,6 @@ const CVModuleStreamFilterContent = ({
259
259
  isOpen={bulkActionOpen}
260
260
  isPlain
261
261
  dropdownItems={[
262
- <DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!hasNotAddedSelected} component="button" onClick={bulkAdd}>
263
- {__('Add')}
264
- </DropdownItem>,
265
262
  <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={bulkRemove}>
266
263
  {__('Remove')}
267
264
  </DropdownItem>]
@@ -279,11 +276,11 @@ const CVModuleStreamFilterContent = ({
279
276
  </div>
280
277
  </Tab>
281
278
  {(repositories.length || showAffectedRepos) &&
282
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
283
- <div className="tab-body-with-spacing">
284
- <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
285
- </div>
286
- </Tab>
279
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
280
+ <div className="tab-body-with-spacing">
281
+ <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
282
+ </div>
283
+ </Tab>
287
284
  }
288
285
  </Tabs >
289
286
  );
@@ -216,54 +216,51 @@ const CVPackageGroupFilterContent = ({
216
216
  actionResolver={hasPermission(permissions, 'edit_content_views') ? actionResolver : null}
217
217
  onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
218
218
  actionButtons={hasPermission(permissions, 'edit_content_views') &&
219
- <Split hasGutter>
220
- <SplitItem data-testid="allAddedNotAdded">
221
- <Select
222
- variant={SelectVariant.single}
223
- onToggle={setSelectOpen}
224
- onSelect={(_event, selection) => {
225
- setSelectedIndex(allAddedNotAdded.indexOf(selection));
226
- setSelectOpen(false);
227
- }}
228
- selections={allAddedNotAdded[selectedIndex]}
229
- isOpen={selectOpen}
230
- isCheckboxSelectionBadgeHidden
231
- >
232
- {allAddedNotAdded.map(item =>
233
- <SelectOption aria-label={item} key={item} value={item} />)}
234
- </Select>
235
- </SplitItem>
236
- <SplitItem>
237
- <Button isDisabled={!hasNotAddedSelected} onClick={bulkAdd} variant="secondary" aria-label="add_filter_rule">
238
- {__('Add filter rule')}
239
- </Button>
240
- </SplitItem>
241
- <SplitItem>
242
- <Dropdown
243
- toggle={<KebabToggle aria-label="bulk_actions" onToggle={toggleBulkAction} />}
244
- isOpen={bulkActionOpen}
245
- isPlain
246
- dropdownItems={[
247
- <DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!hasNotAddedSelected} component="button" onClick={bulkAdd}>
248
- {__('Add')}
249
- </DropdownItem>,
250
- <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={bulkRemove}>
251
- {__('Remove')}
252
- </DropdownItem>]
253
- }
254
- />
255
- </SplitItem>
256
- </Split>
219
+ <Split hasGutter>
220
+ <SplitItem data-testid="allAddedNotAdded">
221
+ <Select
222
+ variant={SelectVariant.single}
223
+ onToggle={setSelectOpen}
224
+ onSelect={(_event, selection) => {
225
+ setSelectedIndex(allAddedNotAdded.indexOf(selection));
226
+ setSelectOpen(false);
227
+ }}
228
+ selections={allAddedNotAdded[selectedIndex]}
229
+ isOpen={selectOpen}
230
+ isCheckboxSelectionBadgeHidden
231
+ >
232
+ {allAddedNotAdded.map(item =>
233
+ <SelectOption aria-label={item} key={item} value={item} />)}
234
+ </Select>
235
+ </SplitItem>
236
+ <SplitItem>
237
+ <Button isDisabled={!hasNotAddedSelected} onClick={bulkAdd} variant="secondary" aria-label="add_filter_rule">
238
+ {__('Add filter rule')}
239
+ </Button>
240
+ </SplitItem>
241
+ <SplitItem>
242
+ <Dropdown
243
+ toggle={<KebabToggle aria-label="bulk_actions" onToggle={toggleBulkAction} />}
244
+ isOpen={bulkActionOpen}
245
+ isPlain
246
+ dropdownItems={[
247
+ <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={bulkRemove}>
248
+ {__('Remove')}
249
+ </DropdownItem>]
250
+ }
251
+ />
252
+ </SplitItem>
253
+ </Split>
257
254
  }
258
255
  />
259
256
  </div>
260
257
  </Tab>
261
258
  {(repositories.length || showAffectedRepos) &&
262
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
263
- <div className="tab-body-with-spacing">
264
- <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
265
- </div>
266
- </Tab>
259
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
260
+ <div className="tab-body-with-spacing">
261
+ <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
262
+ </div>
263
+ </Tab>
267
264
  }
268
265
  </Tabs>
269
266
  );
@@ -179,7 +179,7 @@ const CVRpmFilterContent = ({
179
179
  {hasPermission(permissions, 'edit_content_views') &&
180
180
  <Split hasGutter>
181
181
  <SplitItem>
182
- <Button onClick={() => setModalOpen(true)} variant="secondary" aria-label="create_rpm_rule">
182
+ <Button onClick={() => setModalOpen(true)} variant="secondary" aria-label="add_rpm_rule">
183
183
  {__('Add RPM rule')}
184
184
  </Button>
185
185
  </SplitItem>
@@ -213,7 +213,7 @@ const CVRpmFilterContent = ({
213
213
  </div>
214
214
  </Tab>
215
215
  {(repositories.length || showAffectedRepos) &&
216
- <Tab eventKey={1} title={<TabTitleText>{__('Affected Repositories')}</TabTitleText>}>
216
+ <Tab eventKey={1} title={<TabTitleText>{__('Affected repositories')}</TabTitleText>}>
217
217
  <div className="tab-body-with-spacing">
218
218
  <AffectedRepositoryTable cvId={cvId} filterId={filterId} repoType="yum" setShowAffectedRepos={setShowAffectedRepos} details={details} />
219
219
  </div>
@@ -5,18 +5,18 @@ import { translate as __ } from 'foremanReact/common/I18n';
5
5
  import RepoIcon from '../Repositories/RepoIcon';
6
6
  import { capitalize, repoType } from '../../../../utils/helpers';
7
7
 
8
- const typeName = (type, errataByDate) => {
8
+ export const typeName = (type, errataByDate) => {
9
9
  if (errataByDate) return 'Errata - by date range';
10
10
  const nameMap = {
11
11
  rpm: __('RPM'),
12
12
  docker: __('Container image tag'),
13
13
  modulemd: __('Module stream'),
14
14
  erratum: __('Errata'),
15
- erratum_date: __('Errata - Date and Type'),
16
- erratum_id: __('Errata - Id'),
15
+ erratum_date: __('Errata - by date range'),
16
+ erratum_id: __('Errata'),
17
17
  };
18
18
 
19
- if (Object.prototype.hasOwnProperty.call(nameMap, type)) return nameMap[type];
19
+ if (type in nameMap) return nameMap[type];
20
20
  return capitalize(type.replace('_', ' '));
21
21
  };
22
22