katello 4.6.2.1 → 4.7.0.rc1

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

Potentially problematic release.


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

Files changed (333) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/common/vendor.js +0 -1
  3. data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
  4. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +4 -4
  5. data/app/controllers/katello/api/v2/capsule_content_controller.rb +5 -0
  6. data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
  7. data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
  8. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -1
  9. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -0
  11. data/app/controllers/katello/api/v2/repositories_controller.rb +78 -12
  12. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
  13. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +7 -1
  14. data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
  15. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -9
  16. data/app/helpers/katello/content_source_helper.rb +9 -0
  17. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +31 -0
  18. data/app/lib/actions/katello/activation_key/destroy.rb +1 -0
  19. data/app/lib/actions/katello/agent_action.rb +1 -0
  20. data/app/lib/actions/katello/alternate_content_source/create.rb +1 -1
  21. data/app/lib/actions/katello/alternate_content_source/update.rb +2 -2
  22. data/app/lib/actions/katello/capsule_content/sync.rb +10 -2
  23. data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
  24. data/app/lib/actions/katello/content_view/promote.rb +1 -0
  25. data/app/lib/actions/katello/content_view/publish.rb +5 -2
  26. data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +7 -3
  27. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +4 -2
  28. data/app/lib/actions/katello/content_view_version/import.rb +22 -10
  29. data/app/lib/actions/katello/product/destroy.rb +1 -1
  30. data/app/lib/actions/katello/repository/destroy.rb +3 -3
  31. data/app/lib/actions/katello/repository/errata_mail.rb +9 -6
  32. data/app/lib/actions/katello/repository/refresh_repository.rb +1 -1
  33. data/app/lib/actions/katello/repository/sync.rb +13 -6
  34. data/app/lib/actions/katello/repository_set/enable_repository.rb +6 -2
  35. data/app/lib/actions/pulp3/alternate_content_source/refresh_remote.rb +16 -0
  36. data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +1 -0
  37. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
  38. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +10 -2
  39. data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
  40. data/app/lib/katello/errors.rb +2 -2
  41. data/app/lib/katello/resources/candlepin.rb +7 -1
  42. data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -13
  43. data/app/lib/katello/resources/cdn.rb +14 -9
  44. data/app/lib/katello/util/candlepin_repository_checker.rb +73 -0
  45. data/app/models/katello/activation_key.rb +12 -1
  46. data/app/models/katello/alternate_content_source.rb +15 -4
  47. data/app/models/katello/alternate_content_source_product.rb +1 -1
  48. data/app/models/katello/authorization/repository.rb +2 -2
  49. data/app/models/katello/cdn_configuration.rb +12 -3
  50. data/app/models/katello/concerns/host_managed_extensions.rb +15 -2
  51. data/app/models/katello/concerns/http_proxy_extensions.rb +5 -10
  52. data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -15
  53. data/app/models/katello/content.rb +15 -0
  54. data/app/models/katello/content_credential.rb +8 -9
  55. data/app/models/katello/content_view.rb +7 -3
  56. data/app/models/katello/content_view_component.rb +4 -0
  57. data/app/models/katello/content_view_version.rb +1 -1
  58. data/app/models/katello/erratum.rb +6 -2
  59. data/app/models/katello/host/content_facet.rb +13 -3
  60. data/app/models/katello/repository.rb +15 -1
  61. data/app/models/katello/root_repository.rb +0 -2
  62. data/app/overrides/add_smart_proxy_form.rb +5 -0
  63. data/app/presenters/katello/content_view_version_compare_presenter.rb +5 -0
  64. data/app/presenters/katello/host_package_presenter.rb +4 -4
  65. data/app/services/katello/pulp3/alternate_content_source.rb +23 -15
  66. data/app/services/katello/pulp3/ansible_collection.rb +7 -10
  67. data/app/services/katello/pulp3/content_view_version/export.rb +19 -6
  68. data/app/services/katello/pulp3/content_view_version/import.rb +2 -0
  69. data/app/services/katello/pulp3/content_view_version/import_validator.rb +21 -5
  70. data/app/services/katello/pulp3/content_view_version/importable_products.rb +11 -1
  71. data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +38 -9
  72. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +12 -5
  73. data/app/services/katello/pulp3/content_view_version/metadata_map.rb +13 -2
  74. data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +5 -1
  75. data/app/services/katello/pulp3/pulp_content_unit.rb +3 -0
  76. data/app/services/katello/pulp3/repository.rb +18 -6
  77. data/app/services/katello/pulp3/repository_mirror.rb +0 -1
  78. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
  79. data/app/services/katello/pulp3/task_group.rb +18 -1
  80. data/app/services/katello/repository_type.rb +5 -2
  81. data/app/services/katello/repository_type_manager.rb +4 -3
  82. data/app/views/dashboard/_content_views_widget.html.erb +1 -1
  83. data/app/views/foreman/job_templates/change_content_source.erb +6 -0
  84. data/app/views/foreman/job_templates/update_packages_by_search_query.erb +7 -1
  85. data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +4 -4
  86. data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +1 -0
  87. data/app/views/katello/api/v2/alternate_content_sources/permissions.rabl +11 -0
  88. data/app/views/katello/api/v2/content_credentials/show.json.rabl +12 -0
  89. data/app/views/katello/api/v2/content_views/permissions.rabl +1 -0
  90. data/app/views/katello/api/v2/host_packages/base.json.rabl +1 -1
  91. data/app/views/katello/api/v2/module_streams/show.json.rabl +7 -0
  92. data/app/views/katello/api/v2/repositories/compare.json.rabl +10 -0
  93. data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
  94. data/app/views/katello/hosts/_errata_counts.html.erb +46 -0
  95. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
  96. data/app/views/overrides/smart_proxies/_acs_http_proxy.html.erb +6 -0
  97. data/config/initializers/monkeys.rb +1 -0
  98. data/config/routes/api/v2.rb +2 -0
  99. data/config/routes.rb +3 -0
  100. data/db/migrate/20220730033504_update_custom_cdn.rb +13 -0
  101. data/db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb +7 -0
  102. data/db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb +6 -0
  103. data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
  104. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
  105. data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +1 -1
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +17 -0
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +10 -0
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +36 -0
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +7 -1
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-acs.html +38 -0
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +3 -0
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +7 -2
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -3
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +14 -1392
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +1 -0
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -0
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
  120. data/lib/katello/permission_creator.rb +1 -0
  121. data/lib/katello/plugin.rb +34 -11
  122. data/lib/katello/repository_types/deb.rb +1 -1
  123. data/lib/katello/repository_types/docker.rb +1 -1
  124. data/lib/katello/repository_types/python.rb +3 -3
  125. data/lib/katello/tasks/check_candlepin_content.rake +16 -0
  126. data/lib/katello/tasks/reset.rake +1 -1
  127. data/lib/katello/version.rb +1 -1
  128. data/lib/monkeys/try_pulp_container_path.rb +35 -0
  129. data/locale/action_names.rb +7 -7
  130. data/locale/bn/katello.po +395 -63
  131. data/locale/cs/katello.po +396 -64
  132. data/locale/de/katello.po +399 -67
  133. data/locale/en/katello.po +395 -63
  134. data/locale/es/katello.po +399 -67
  135. data/locale/fr/katello.po +400 -68
  136. data/locale/gu/katello.po +395 -63
  137. data/locale/hi/katello.po +395 -63
  138. data/locale/it/katello.po +396 -64
  139. data/locale/ja/katello.po +400 -68
  140. data/locale/katello.pot +1916 -1213
  141. data/locale/kn/katello.po +395 -63
  142. data/locale/ko/katello.po +396 -64
  143. data/locale/mr/katello.po +395 -63
  144. data/locale/or/katello.po +395 -63
  145. data/locale/pa/katello.po +395 -63
  146. data/locale/pt/katello.po +395 -63
  147. data/locale/pt_BR/katello.po +399 -67
  148. data/locale/ru/katello.po +396 -64
  149. data/locale/ta/katello.po +395 -63
  150. data/locale/te/katello.po +395 -63
  151. data/locale/zh_CN/katello.po +400 -68
  152. data/locale/zh_TW/katello.po +396 -64
  153. data/webpack/components/Bookmark/index.js +5 -1
  154. data/webpack/components/Content/Details/ContentDetails.js +1 -1
  155. data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +6 -0
  156. data/webpack/components/EditableSwitch.js +1 -0
  157. data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
  158. data/webpack/components/Errata/errataHelpers.js +33 -0
  159. data/webpack/components/Errata/index.js +45 -12
  160. data/webpack/components/Loading.js +18 -8
  161. data/webpack/components/Packages/index.js +8 -24
  162. data/webpack/components/RoutedTabs/index.js +1 -0
  163. data/webpack/components/Search/Search.js +20 -2
  164. data/webpack/components/Search/__tests__/search.test.js +3 -3
  165. data/webpack/components/Table/EmptyStateMessage.js +1 -1
  166. data/webpack/components/Table/PageControls.js +1 -0
  167. data/webpack/components/Table/TableHooks.js +4 -0
  168. data/webpack/components/Table/TableWrapper.js +7 -7
  169. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
  170. data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +2 -0
  171. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +1 -1
  172. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +3 -1
  173. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +2 -1
  174. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +124 -68
  175. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +5 -0
  176. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +30 -4
  177. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.scss +23 -0
  178. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +5 -4
  179. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +25 -10
  180. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -3
  181. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +6 -0
  182. data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +145 -32
  183. data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +3 -1
  184. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +2 -1
  185. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +1 -0
  186. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +78 -26
  187. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -10
  188. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +1 -0
  189. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +9 -4
  190. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +141 -23
  191. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.scss +6 -1
  192. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +9 -8
  193. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +24 -3
  194. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +7 -2
  195. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +2 -1
  196. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +20 -4
  197. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +56 -38
  198. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +3 -3
  199. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +5 -4
  200. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +3 -3
  201. data/webpack/containers/Application/config.js +2 -2
  202. data/webpack/containers/Application/overrides.scss +12 -0
  203. data/webpack/global_test_setup.js +19 -1
  204. data/webpack/ouia_id_check.js +0 -2
  205. data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -8
  206. data/webpack/scenes/AlternateContentSources/ACSActions.js +37 -6
  207. data/webpack/scenes/AlternateContentSources/ACSConstants.js +2 -0
  208. data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +1 -1
  209. data/webpack/scenes/AlternateContentSources/ACSSelectors.js +6 -6
  210. data/webpack/scenes/AlternateContentSources/Acs.scss +3 -0
  211. data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +24 -3
  212. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +10 -8
  213. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +25 -4
  214. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +22 -11
  215. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +27 -2
  216. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +49 -17
  217. data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +76 -23
  218. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +159 -11
  219. data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +83 -29
  220. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -8
  221. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +2 -2
  222. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +2 -2
  223. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +39 -7
  224. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +27 -11
  225. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +58 -55
  226. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +35 -32
  227. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +323 -150
  228. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +5 -1
  229. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +10 -11
  230. data/webpack/scenes/AlternateContentSources/helpers.js +26 -0
  231. data/webpack/scenes/ContentViews/ContentViewsConstants.js +1 -0
  232. data/webpack/scenes/ContentViews/ContentViewsPage.js +1 -1
  233. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -0
  234. data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -0
  235. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -5
  236. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +30 -7
  237. data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +1 -0
  238. data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +21 -6
  239. data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +3 -3
  240. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +1 -0
  241. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +1 -0
  242. data/webpack/scenes/ContentViews/Delete/__tests__/CvData.fixtures.json +2 -0
  243. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -0
  244. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -1
  245. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +1 -1
  246. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  247. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +14 -0
  248. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +11 -1
  249. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -1
  250. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +2 -0
  251. data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +5 -0
  252. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositorySelection.js +1 -0
  253. data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +1 -0
  254. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +8 -2
  255. data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +5 -1
  256. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +22 -6
  257. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +19 -9
  258. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +9 -2
  259. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +9 -2
  260. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +8 -2
  261. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +1 -1
  262. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  263. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +3 -2
  264. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -1
  265. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +2 -2
  266. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
  267. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -1
  268. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +1 -1
  269. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -2
  270. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -0
  271. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
  272. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +3 -3
  273. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +9 -1
  274. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +83 -0
  275. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +32 -8
  276. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +56 -3
  277. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/cvCompareRepositories.fixtures.json +175 -0
  278. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +6 -2
  279. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +3 -3
  280. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +1 -0
  281. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +1 -0
  282. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +2 -2
  283. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
  284. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +2 -2
  285. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -0
  286. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +4 -1
  287. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +5 -4
  288. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +5 -1
  289. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -3
  290. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +10 -5
  291. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +2 -0
  292. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +1 -0
  293. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +81 -19
  294. data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +1 -1
  295. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
  296. data/webpack/scenes/ContentViews/components/InactiveText.js +9 -1
  297. data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +4 -2
  298. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +3 -2
  299. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +18 -11
  300. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +15 -8
  301. data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -4
  302. data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +55 -0
  303. data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +59 -0
  304. data/webpack/scenes/Hosts/ChangeContentSource/constants.js +1 -0
  305. data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -5
  306. data/webpack/scenes/Hosts/ChangeContentSource/index.js +46 -41
  307. data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +5 -5
  308. data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +10 -1
  309. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -1
  310. data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +97 -2
  311. data/webpack/scenes/Organizations/OrganizationSelectors.js +1 -0
  312. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +2 -1
  313. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +10 -25
  314. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +154 -0
  315. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/ExportSyncForm.js +4 -4
  316. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +59 -44
  317. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js +3 -28
  318. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js +97 -0
  319. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js +1 -1
  320. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js +4 -4
  321. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +23 -10
  322. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
  323. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +2 -1
  324. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +5 -5
  325. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -3
  326. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -2
  327. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
  328. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +3 -3
  329. data/webpack/scenes/Tasks/helpers.js +14 -7
  330. metadata +54 -35
  331. data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +0 -18
  332. data/db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb +0 -5
  333. data/vendor/assets/javascripts/katello/jquery.trunk8.js +0 -203
@@ -37,12 +37,22 @@ module Katello
37
37
  def create_params(metadata_product)
38
38
  {
39
39
  gpg_key_id: gpg_key_id(metadata_product),
40
- name: metadata_product.name,
40
+ name: find_unique_name(metadata_product),
41
41
  label: metadata_product.label,
42
42
  description: metadata_product.description
43
43
  }
44
44
  end
45
45
 
46
+ def find_unique_name(metadata_product)
47
+ name = metadata_product.name
48
+ i = 1
49
+ while @products_in_library.where(name: name).exists?
50
+ name = "#{metadata_product.name} #{i}"
51
+ i += 1
52
+ end
53
+ name
54
+ end
55
+
46
56
  def update_params(metadata_product)
47
57
  params = {
48
58
  gpg_key_id: gpg_key_id(metadata_product),
@@ -4,11 +4,16 @@ module Katello
4
4
  class ImportableRepositories
5
5
  attr_reader :creatable, :updatable
6
6
 
7
- def initialize(organization:, metadata_repositories:)
7
+ def initialize(organization:,
8
+ metadata_repositories:,
9
+ syncable_format: false,
10
+ path: nil)
8
11
  @organization = organization
9
12
  @metadata_repositories = metadata_repositories
10
13
  @creatable = []
11
14
  @updatable = []
15
+ @syncable_format = syncable_format
16
+ @path = path
12
17
  end
13
18
 
14
19
  def generate!
@@ -41,15 +46,29 @@ module Katello
41
46
  basearch: repo.arch,
42
47
  releasever: repo.minor
43
48
  }
44
- creatable << { product: product, content: product_content, substitutions: substitutions }
49
+ creatable << { product: product,
50
+ content: product_content,
51
+ substitutions: substitutions,
52
+ override_url: fetch_feed_url(repo)
53
+ }
45
54
  else
46
- creatable << { repository: product.add_repo(create_repo_params(repo)) }
55
+ creatable << { repository: product.add_repo(create_repo_params(repo, product)) }
47
56
  end
48
57
  end
49
58
  end
50
59
 
51
60
  private
52
61
 
62
+ def find_unique_name(metadata_repo, product)
63
+ name = metadata_repo.name
64
+ i = 1
65
+ while product.root_repositories.where(name: name).exists?
66
+ name = "#{metadata_repo.name} #{i}"
67
+ i += 1
68
+ end
69
+ name
70
+ end
71
+
53
72
  def product_for_metadata_repo(repo)
54
73
  if repo.redhat && repo.product.cp_id
55
74
  @organization.products.includes(:root_repositories).find_by(cp_id: repo.product.cp_id)
@@ -74,9 +93,8 @@ module Katello
74
93
  end
75
94
  end
76
95
 
77
- def create_repo_params(metadata_repo)
96
+ def create_repo_params(metadata_repo, product)
78
97
  keys = [
79
- :name,
80
98
  :label,
81
99
  :description,
82
100
  :arch,
@@ -90,16 +108,26 @@ module Katello
90
108
  :mirroring_policy
91
109
  ]
92
110
 
93
- params = {}
111
+ params = { name: find_unique_name(metadata_repo, product) }
94
112
  params[:gpg_key_id] = gpg_key_id(metadata_repo)
95
-
96
113
  keys.each do |key|
97
114
  params[key] = metadata_repo.send(key)
98
115
  end
99
-
116
+ url = fetch_feed_url(metadata_repo)
117
+ params[:url] = url if url
100
118
  params
101
119
  end
102
120
 
121
+ def fetch_feed_url(metadata_repo)
122
+ return unless @syncable_format
123
+ uri = URI(@path)
124
+ if uri.scheme.blank? || uri.scheme == "file"
125
+ "file://#{uri.path.chomp('/')}#{metadata_repo.content.url}"
126
+ else
127
+ "#{@path.chomp('/')}#{metadata_repo.content.url}"
128
+ end
129
+ end
130
+
103
131
  def update_repo_params(metadata_repo)
104
132
  keys = [
105
133
  :description,
@@ -112,8 +140,9 @@ module Katello
112
140
  :download_policy,
113
141
  :mirroring_policy
114
142
  ]
115
-
116
143
  params = {}
144
+ url = fetch_feed_url(metadata_repo)
145
+ params[:url] = url if url
117
146
  params[:gpg_key_id] = gpg_key_id(metadata_repo)
118
147
 
119
148
  keys.each do |key|
@@ -23,7 +23,6 @@ module Katello
23
23
  incremental: from_content_view_version.present?,
24
24
  format: export_service.format
25
25
  }
26
-
27
26
  unless from_content_view_version.blank?
28
27
  ret[:from_content_view_version] = from_content_view_version.slice(:major, :minor)
29
28
  end
@@ -45,10 +44,11 @@ module Katello
45
44
 
46
45
  def generate_repository_metadata(repo)
47
46
  repo.slice(:name, :label, :description, :arch, :content_type, :unprotected,
48
- :checksum_type, :os_versions, :major, :minor, :download_policy, :mirroring_policy).
47
+ :checksum_type, :os_versions, :major, :minor,
48
+ :download_policy, :mirroring_policy).
49
49
  merge(product: generate_product_metadata(repo.product),
50
50
  gpg_key: generate_gpg_metadata(repo.gpg_key),
51
- content: generate_content_metadata(repo.content),
51
+ content: generate_content_metadata(repo),
52
52
  redhat: repo.redhat?)
53
53
  end
54
54
 
@@ -63,9 +63,16 @@ module Katello
63
63
  gpg.slice(:name, :content_type, :content)
64
64
  end
65
65
 
66
- def generate_content_metadata(content)
66
+ def generate_content_metadata(repo)
67
+ content = repo.content
67
68
  return {} if content.blank?
68
- { id: content.cp_content_id, label: content.label }
69
+ content_data = Katello::Content.substitute_content_path(arch: repo.arch,
70
+ releasever: repo.minor,
71
+ content_path: content.content_url)
72
+ { id: content.cp_content_id,
73
+ label: content.label,
74
+ url: content_data[:path]
75
+ }
69
76
  end
70
77
 
71
78
  def zip_gpg_keys(entities)
@@ -20,7 +20,8 @@ module Katello
20
20
  :gpg_keys,
21
21
  :content_view,
22
22
  :content_view_version,
23
- :from_content_view_version
23
+ :from_content_view_version,
24
+ :format
24
25
 
25
26
  def initialize(metadata:)
26
27
  @toc = metadata[:toc]
@@ -30,6 +31,11 @@ module Katello
30
31
  @content_view = parse_content_view(metadata[:content_view]) if metadata[:content_view]
31
32
  @content_view_version = parse_content_view_version(metadata[:content_view_version]) if metadata[:content_view_version]
32
33
  @from_content_view_version = parse_content_view_version(metadata[:from_content_view_version]) if metadata[:from_content_view_version]
34
+ @format = metadata[:format]
35
+ end
36
+
37
+ def syncable_format?
38
+ @format == ::Katello::Pulp3::ContentViewVersion::Export::SYNCABLE
33
39
  end
34
40
 
35
41
  private
@@ -76,6 +82,11 @@ module Katello
76
82
 
77
83
  def parse_repositories(repositories)
78
84
  repositories.map do |pulp_name, repo|
85
+ if repo[:content]
86
+ content = MetadataRepositoryContent.new(id: repo[:content][:id],
87
+ label: repo[:content][:label],
88
+ url: repo[:content][:url])
89
+ end
79
90
  MetadataRepository.new(
80
91
  pulp_name: pulp_name,
81
92
  name: repo[:name],
@@ -93,7 +104,7 @@ module Katello
93
104
  redhat: repo[:redhat],
94
105
  product: product_for_repo(repo),
95
106
  gpg_key: gpg_key_for_repo(repo),
96
- content: repo[:content] ? MetadataRepositoryContent.new(id: repo[:content][:id], label: repo[:content][:label]) : nil
107
+ content: content
97
108
  )
98
109
  rescue => e
99
110
  raise _("Invalid repository in the metadata %{repo} error=%{error}") % { repo: repo, error: e.message }
@@ -24,7 +24,11 @@ module Katello
24
24
  end
25
25
 
26
26
  def generate_repository_exporter_path
27
- _org, _content, content_path = repository.library_instance_or_self.relative_path.split("/", 3)
27
+ if repository.docker?
28
+ content_path = repository.library_instance_or_self.relative_path
29
+ else
30
+ _org, _content, content_path = repository.library_instance_or_self.relative_path.split("/", 3)
31
+ end
28
32
  content_path = content_path.sub(%r|^/|, '')
29
33
  "#{generate_exporter_path}/#{content_path}".gsub(/\s/, '_')
30
34
  end
@@ -17,6 +17,9 @@ module Katello
17
17
  repository_type = Katello::Repository.find(opts[:repository_id]).repository_type
18
18
  content_type = opts[:content_type]
19
19
  self.content_api(repository_type, content_type).create(relative_path, opts)
20
+ elsif self.content_type == 'rpm' || self.content_type == 'srpm'
21
+ # The pulp_rpm API bindings expect relative_path to be within the options hash.
22
+ self.content_api.create(opts)
20
23
  else
21
24
  self.content_api.create(relative_path, opts)
22
25
  end
@@ -200,7 +200,7 @@ module Katello
200
200
 
201
201
  def sync_url_params(_sync_options)
202
202
  params = {remote: repo.remote_href, mirror: repo.root.mirroring_policy == Katello::RootRepository::MIRRORING_POLICY_CONTENT}
203
- params[:skip_types] = skip_types if (skip_types && repo.root.mirroring_policy != Katello::RootRepository::MIRRORING_POLICY_COMPLETE)
203
+ params[:skip_types] = skip_types if skip_types
204
204
  params
205
205
  end
206
206
 
@@ -418,27 +418,39 @@ module Katello
418
418
  end
419
419
 
420
420
  def ssl_remote_options
421
+ options = {}
421
422
  if root.redhat? && root.cdn_configuration.redhat_cdn?
422
- {
423
+ options = {
423
424
  client_cert: root.product.certificate,
424
425
  client_key: root.product.key,
425
426
  ca_cert: Katello::Repository.feed_ca_cert(root.url)
426
427
  }
428
+ elsif root.redhat? && root.cdn_configuration.custom_cdn?
429
+ options = {
430
+ ca_cert: root.cdn_configuration.ssl_ca
431
+ }
427
432
  elsif root.redhat? && root.cdn_configuration.network_sync?
428
- {
433
+ options = {
429
434
  client_cert: root.cdn_configuration.ssl_cert,
430
435
  client_key: root.cdn_configuration.ssl_key,
431
436
  ca_cert: root.cdn_configuration.ssl_ca
432
437
  }
433
438
  elsif root.custom?
434
- {
439
+ options = {
435
440
  client_cert: root.ssl_client_cert&.content,
436
441
  client_key: root.ssl_client_key&.content,
437
442
  ca_cert: root.ssl_ca_cert&.content
438
443
  }
439
- else
440
- {}
441
444
  end
445
+ append_proxy_cacert(options) if options.key?(:cacert)
446
+ options
447
+ end
448
+
449
+ def append_proxy_cacert(options)
450
+ if root.http_proxy&.cacert && options.key?(:cacert)
451
+ options[:cacert] += "\n#{root.http_proxy&.cacert}"
452
+ end
453
+ options
442
454
  end
443
455
 
444
456
  def lookup_version(href)
@@ -132,7 +132,6 @@ module Katello
132
132
  sync_params = repo_service.sync_url_params(options)
133
133
  sync_params[:remote] = remote_href
134
134
  if repo.yum?
135
- sync_params.delete(:skip_types) if sync_params[:skip_types]
136
135
  sync_params[:sync_policy] = 'mirror_complete'
137
136
  else
138
137
  sync_params.delete(:sync_policy)
@@ -26,7 +26,7 @@ module Katello
26
26
  api = repo_type.pulp3_api(smart_proxy)
27
27
  version_hrefs = api.repository_versions
28
28
  orphan_version_hrefs = api.list_all.collect do |pulp_repo|
29
- mirror_repo_versions = api.versions_list_for_repository(pulp_repo.pulp_href, ordering: ['-pulp_created'])
29
+ mirror_repo_versions = api.versions_list_for_repository(pulp_repo.pulp_href, ordering: :_created)
30
30
  version_hrefs = mirror_repo_versions.select { |repo_version| repo_version.number != 0 }.collect { |version| version.pulp_href }
31
31
 
32
32
  version_hrefs - [pulp_repo.latest_version_href]
@@ -83,7 +83,7 @@ module Katello
83
83
 
84
84
  remotes.each do |remote|
85
85
  if !repo_names.include?(remote.name) && !acs_remotes.include?(remote.pulp_href)
86
- tasks << api.delete_remote(remote.pulp_href)
86
+ tasks << api.delete_remote(href: remote.pulp_href)
87
87
  end
88
88
  end
89
89
  end
@@ -50,6 +50,10 @@ module Katello
50
50
  ::Katello::Pulp3::Api::Core.new(@smart_proxy).task_groups_api
51
51
  end
52
52
 
53
+ def tasks_api
54
+ ::Katello::Pulp3::Api::Core.new(@smart_proxy).tasks_api
55
+ end
56
+
53
57
  def done?
54
58
  task_group_data['all_tasks_dispatched'] == true && IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
55
59
  end
@@ -74,12 +78,25 @@ module Katello
74
78
  def error
75
79
  return if task_group_data[WAITING] > 0 || task_group_data[RUNNING] > 0
76
80
  if task_group_data[FAILED] > 0
77
- "#{task_group_data[FAILED]} subtask(s) failed for task group #{@href}."
81
+ messages = query_task_group_errors(task_group_data)
82
+ return "#{task_group_data[FAILED]} subtask(s) failed for task group #{@href}.\nErrors:\n #{messages.join("\n")}"
78
83
  elsif task_group_data[CANCELLED] > 0
79
84
  "#{task_group_data[CANCELLED]} subtask(s) cancelled for task group #{@href}."
80
85
  end
81
86
  end
82
87
 
88
+ def query_task_group_errors(task_group_data)
89
+ messages = []
90
+ tasks_api = core_api.tasks_api
91
+ tasks_response = core_api.class.fetch_from_list do |page_opts|
92
+ tasks_api.list(page_opts.merge(task_group: task_group_data['pulp_href'], state__in: [FAILED]))
93
+ end
94
+ tasks_response.collect do |result|
95
+ messages << result.error
96
+ end
97
+ return messages
98
+ end
99
+
83
100
  def core_api
84
101
  ::Katello::Pulp3::Api::Core.new(@smart_proxy)
85
102
  end
@@ -174,7 +174,9 @@ module Katello
174
174
  label: label,
175
175
  generic_browser: generic_browser,
176
176
  generic: false,
177
- removable: removable
177
+ removable: removable,
178
+ uploadable: uploadable,
179
+ indexed: index && index_on_pulp3
178
180
  }
179
181
  end
180
182
 
@@ -230,7 +232,7 @@ module Katello
230
232
  end
231
233
 
232
234
  class GenericRemoteOption
233
- attr_accessor :name, :title, :type, :description, :input_type, :delimiter
235
+ attr_accessor :name, :title, :type, :description, :input_type, :delimiter, :default
234
236
 
235
237
  def initialize(options)
236
238
  self.name = options[:name]
@@ -239,6 +241,7 @@ module Katello
239
241
  self.description = options[:description]
240
242
  self.input_type = options[:input_type]
241
243
  self.delimiter = options[:delimiter]
244
+ self.default = options[:default]
242
245
  end
243
246
  end
244
247
 
@@ -139,9 +139,10 @@ module Katello
139
139
  enabled_repository_types[katello_label]
140
140
  end
141
141
 
142
- def find_content_type(katello_label)
142
+ def find_content_type(katello_label, indexable = false)
143
143
  enabled_repository_types.values.each do |repo_type|
144
- repo_type.content_types.each do |content_type|
144
+ content_types = indexable ? repo_type.content_types_to_index : repo_type.content_types
145
+ content_types.each do |content_type|
145
146
  return content_type if content_type.label == katello_label.to_s
146
147
  end
147
148
  end
@@ -167,7 +168,7 @@ module Katello
167
168
  def check_content_matches_repo_type!(repository, content_type)
168
169
  repo_content_types = repository.repository_type.content_types.collect { |type| type.label }
169
170
  unless repo_content_types.include?(content_type)
170
- fail _("Content type %{content_type} is incompatible with repositories of type %{repo_type}") %
171
+ fail HttpErrors::BadRequest, _("Content type %{content_type} is incompatible with repositories of type %{repo_type}") %
171
172
  { content_type: content_type, repo_type: repository.content_type }
172
173
  end
173
174
  end
@@ -3,7 +3,7 @@
3
3
  </h4>
4
4
 
5
5
  <% organizations = Organization.current.present? ? [Organization.current] : User.current.allowed_organizations %>
6
- <% histories = Katello::ContentViewHistory.includes(:content_view_version => [:content_view]).includes(:task, :environment).in_organizations(organizations) %>
6
+ <% histories = Katello::ContentViewHistory.includes(:content_view_version => [:content_view]).includes(:task, :environment).in_organizations(organizations).where("#{Katello::ContentView.table_name}.generated_for" => :none) %>
7
7
  <% histories = histories.readable.limit(6) %>
8
8
 
9
9
  <% if histories.empty? %>
@@ -10,3 +10,9 @@ feature: katello_change_content_source
10
10
  #!/bin/sh
11
11
 
12
12
  <%= change_content_source(@host, foreman_server_ca_cert) %>
13
+
14
+ if [ -f /etc/yggdrasil/config.toml ]; then
15
+ cp /etc/yggdrasil/config.toml /etc/yggdrasil/config.toml.bak
16
+ export YGGDRASIL_RESTART_DELAY=10
17
+ <%= snippet 'remote_execution_pull_setup' %>
18
+ fi
@@ -10,10 +10,16 @@ template_inputs:
10
10
  description: Filter criteria for packages to be updated.
11
11
  input_type: user
12
12
  required: false
13
+ - name: Selected update versions
14
+ description: JSON string of selected package versions to be updated, in the format [ nvra ]. Leave blank to upgrade to latest available version.
15
+ input_type: user
16
+ required: false
17
+ value_type: plain
13
18
  %>
14
19
  <% package_names = @host.package_names_for_job_template(
15
20
  action: 'update',
16
- search: input('Packages search query')
21
+ search: input('Packages search query'),
22
+ versions: input('Selected update versions')
17
23
  ) -%>
18
24
 
19
25
  <%= render_template('Package Action - Script Default', :action => 'update', :package => package_names.join(' ')) %>
@@ -1,8 +1,8 @@
1
1
  extends 'katello/api/v2/common/identifier'
2
2
 
3
3
  if @object.respond_to?(:alternate_content_source_type)
4
- if @object.custom?
5
- attributes :name, :alternate_content_source_type, :content_type, :base_url, :subpaths, :upstream_username, :smart_proxies, :verify_ssl
4
+ if @object.custom? || @object.rhui?
5
+ attributes :name, :alternate_content_source_type, :content_type, :base_url, :subpaths, :upstream_username, :smart_proxies, :verify_ssl, :use_http_proxies
6
6
  child :ssl_ca_cert => :ssl_ca_cert do |_object|
7
7
  attributes :id, :name
8
8
  end
@@ -15,7 +15,7 @@ if @object.respond_to?(:alternate_content_source_type)
15
15
  attributes :id, :name
16
16
  end
17
17
  elsif @object.simplified?
18
- attributes :name, :alternate_content_source_type, :content_type, :products, :smart_proxies
18
+ attributes :name, :alternate_content_source_type, :content_type, :products, :smart_proxies, :use_http_proxies
19
19
  end
20
20
  end
21
21
 
@@ -28,7 +28,7 @@ child :latest_dynflow_refresh_task => :last_refresh do |_object|
28
28
  end
29
29
  end
30
30
 
31
- if params.key?(:include_permissions)
31
+ if ::Foreman::Cast.to_bool(params.fetch(:include_permissions, false))
32
32
  node :permissions do |alternate_content_source|
33
33
  {
34
34
  :view_alternate_content_sources => alternate_content_source.readable?,
@@ -1,6 +1,7 @@
1
1
  object false
2
2
 
3
3
  extends "katello/api/v2/common/index"
4
+ extends 'katello/api/v2/alternate_content_sources/permissions'
4
5
 
5
6
  child @collection[:results] => :results do
6
7
  extends "katello/api/v2/alternate_content_sources/base"
@@ -0,0 +1,11 @@
1
+ collection @alternate_content_sources
2
+
3
+ if ::Foreman::Cast.to_bool(params.fetch(:include_permissions, false))
4
+ user = User.current # current_user is not available here
5
+ node do
6
+ node(:can_create) { user.can?("create_alternate_content_sources") }
7
+ node(:can_edit) { user.can?("edit_alternate_content_sources") }
8
+ node(:can_delete) { user.can?("destroy_alternate_content_sources") }
9
+ node(:can_view) { user.can?("view_alternate_content_sources") }
10
+ end
11
+ end
@@ -31,6 +31,18 @@ child :root_repositories => :gpg_key_repos do
31
31
  end
32
32
  end
33
33
 
34
+ child :ssl_ca_alternate_content_sources => :ssl_ca_alternate_content_sources do
35
+ attributes :id, :name
36
+ end
37
+
38
+ child :ssl_client_alternate_content_sources => :ssl_client_alternate_content_sources do
39
+ attributes :id, :name
40
+ end
41
+
42
+ child :ssl_client_key_alternate_content_sources => :ssl_client_key_alternate_content_sources do
43
+ attributes :id, :name
44
+ end
45
+
34
46
  child :ssl_ca_products => :ssl_ca_products do
35
47
  attributes :id, :cp_id, :name
36
48
  node :repository_count do |product|
@@ -4,5 +4,6 @@ if params.key?(:include_permissions)
4
4
  user = User.current # current_user is not available here
5
5
  node do
6
6
  node(:can_create) { user.can?("create_content_views") }
7
+ node(:can_view) { user.can?("view_content_views") }
7
8
  end
8
9
  end
@@ -2,5 +2,5 @@ object @resource
2
2
 
3
3
  attributes :id, :name
4
4
  attributes :nvrea, :nvra
5
- attributes :upgradable_version
5
+ attributes :upgradable_versions
6
6
  attributes :rpm_id
@@ -6,6 +6,13 @@ child :artifacts => :artifacts do
6
6
  attributes :id, :name
7
7
  end
8
8
 
9
+ child :profiles => :profiles do
10
+ attributes :id, :name
11
+ child :rpms => :rpms do
12
+ attributes :id, :name
13
+ end
14
+ end
15
+
9
16
  child :library_repositories => :repositories do
10
17
  attributes :id, :name
11
18
  glue :product do
@@ -0,0 +1,10 @@
1
+ object false
2
+
3
+ extends "katello/api/v2/common/metadata"
4
+
5
+ child @collection[:results] => :results do
6
+ extends 'katello/api/v2/repositories/base'
7
+ node :comparison do |result|
8
+ result.comparison_repositories
9
+ end
10
+ end
@@ -1,2 +1,3 @@
1
1
  attributes :download_policy
2
2
  attributes :supported_pulp_types
3
+ attributes :lifecycle_environments
@@ -0,0 +1,46 @@
1
+ <a href="/content_hosts/<%= host.id %>/errata">
2
+ <span class="aligned-errata-count">
3
+ <span class="errata-count <%= counts[:security].to_i.positive? ? 'red' : 'black' %>">
4
+ <span>
5
+ <%= counts[:security] || 0 %>
6
+ </span>
7
+ <i class="fa fa-warning inline-icon" title="<%= _('Security') %>"></i>
8
+ </span>
9
+ <span class="errata-count <%= counts[:bugfix].to_i.positive? ? 'yellow' : 'black' %>">
10
+ <span>
11
+ <%= counts[:bugfix] || 0 %>
12
+ </span>
13
+ <i class="fa fa-bug inline-icon" title="<%= _('Bug Fix') %>"></i>
14
+ </span>
15
+ <span class="errata-count <%= counts[:enhancement].to_i.positive? ? 'yellow' : 'black' %>">
16
+ <span>
17
+ <%= counts[:enhancement] || 0 %>
18
+ </span>
19
+ <i class="fa fa-plus-square inline-icon" title="<%= _('Enhancement') %>"></i>
20
+ </span>
21
+ </span>
22
+ </a>
23
+ <% if !host.operatingsystem_name&.match(/Debian|Ubuntu/) %>
24
+ <a href="/content_hosts/<%= host.id %>/packages/applicable">
25
+ <span class="aligned-errata-count">
26
+ <span class="errata-count <%= host.content_facet_attributes&.upgradable_rpm_count&.positive? ? 'green' : 'black' %>"
27
+ <span>
28
+ <%= host.content_facet_attributes&.upgradable_rpm_count || 0 %>
29
+ </span>
30
+ <i class="fa fa-cube inline-icon" title="<%= _('RPM package updates') %>"></i>
31
+ </span>
32
+ </span>
33
+ </a>
34
+ <% end %>
35
+ <% if host.operatingsystem_name&.match(/Debian|Ubuntu/) %>
36
+ <a href="/content_hosts/<%= host.id %>/debs/applicable">
37
+ <span class="aligned-errata-count">
38
+ <span class="errata-count <%= host.content_facet_attributes&.upgradable_deb_count&.positive? ? 'green' : 'black' %>"
39
+ <span>
40
+ <%= host.content_facet_attributes&.upgradable_deb_count || 0 %>
41
+ </span>
42
+ <i class="fa fa-cube inline-icon" title="<%= _('DEB package updates') %>"></i>
43
+ </span>
44
+ </span>
45
+ </a>
46
+ <% end %>
@@ -1,5 +1,6 @@
1
1
  <%
2
2
  kickstart_repo_id = using_hostgroups_page? ? kickstart_repository_id(@hostgroup) : kickstart_repository_id(@host, :selected_host_group => @hostgroup)
3
+ kickstart_repo_id = 'unset' if kickstart_repo_id.blank?
3
4
  host = using_hostgroups_page? ? @hostgroup : @host
4
5
  kickstart_options = kickstart_repository_options(host, :selected_host_group => @hostgroup)
5
6
  ks_repo_select_id = using_hostgroups_page? ? :host_group_kickstart_repository_id : :host_kickstart_repository_id
@@ -0,0 +1,6 @@
1
+ <%# I'm thinking that creating test ACS remotes is not worth it for HTTP proxies because
2
+ we're editing 'n' remotes rather than just one. At sync time, if a remote fails to
3
+ update, the user can look at the error in Dynflow and likely figure out that something
4
+ is wrong with the HTTP proxy config. %>
5
+ <%= select_f(f, :http_proxy_id, ::HttpProxy.all, :id, :name, {:include_blank => true}, {:label => _("Alternate Content Source HTTP Proxy"),
6
+ :label_help => _('Traffic for all alternate content sources associated with this smart proxy will go through the chosen HTTP proxy.')}) %>
@@ -2,3 +2,4 @@
2
2
  require 'monkeys/anemone'
3
3
  require 'monkeys/ar_postgres_evr_t'
4
4
  require 'monkeys/fx_sqlite_skip'
5
+ require 'monkeys/try_pulp_container_path'
@@ -252,6 +252,7 @@ Katello::Engine.routes.draw do
252
252
  end
253
253
  api_resources :products, :only => [:index]
254
254
  api_resources :repositories, :only => [:index]
255
+ api_resources :alternate_content_sources, :only => [:index]
255
256
  api_resources :subscriptions, :only => [:index] do
256
257
  collection do
257
258
  match '/available' => 'subscriptions#available', :via => :get
@@ -322,6 +323,7 @@ Katello::Engine.routes.draw do
322
323
  get :auto_complete_search
323
324
  get :repository_types
324
325
  get :content_types
326
+ get :compare
325
327
  end
326
328
  member do
327
329
  put :republish