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
@@ -183,10 +183,6 @@ module Katello
183
183
  RepositoryMirror.new(self).refresh_entities
184
184
  end
185
185
 
186
- def mirror_needs_updates?
187
- RepositoryMirror.new(self).needs_updates?
188
- end
189
-
190
186
  def refresh_if_needed
191
187
  tasks = []
192
188
  tasks << update_remote #always update remote
@@ -478,6 +474,15 @@ module Katello
478
474
  end
479
475
  end
480
476
 
477
+ def repository_import_content(artifact_href, options = {})
478
+ ostree_import = PulpOstreeClient::OstreeRepoImport.new
479
+ ostree_import.artifact = artifact_href
480
+ ostree_import.repository_name = options[:ostree_repository_name]
481
+ ostree_import.ref = options[:ostree_ref]
482
+ ostree_import.parent_commit = options[:ostree_parent_commit]
483
+ api.repositories_api.import_commits(repository_reference.repository_href, ostree_import)
484
+ end
485
+
481
486
  def add_content(content_unit_href, remove_all_units = false)
482
487
  content_unit_href = [content_unit_href] unless content_unit_href.is_a?(Array)
483
488
  if remove_all_units
@@ -79,7 +79,7 @@ module Katello
79
79
  end
80
80
 
81
81
  def publication_href
82
- api.publications_api.list(:repository_version => version_href).results.first.pulp_href
82
+ api.publications_api.list(:repository_version => version_href).results.first&.pulp_href
83
83
  end
84
84
 
85
85
  def create_version(options = {})
@@ -145,7 +145,7 @@ module Katello
145
145
 
146
146
  class ContentType
147
147
  attr_accessor :model_class, :priority, :pulp2_service_class, :pulp3_service_class, :index, :uploadable, :removable,
148
- :primary_content, :index_on_pulp3, :generic_browser, :content_type
148
+ :primary_content, :index_on_pulp3, :generic_browser, :content_type, :repository_import_on_upload
149
149
 
150
150
  def initialize(options)
151
151
  self.model_class = options[:model_class]
@@ -159,6 +159,7 @@ module Katello
159
159
  self.removable = options[:removable] || false
160
160
  self.primary_content = options[:primary_content] || false
161
161
  self.generic_browser = options[:generic_browser]
162
+ self.repository_import_on_upload = options[:repository_import_on_upload]
162
163
  end
163
164
 
164
165
  def label
@@ -39,11 +39,20 @@ module Katello
39
39
  end
40
40
  end
41
41
 
42
- def repositories_available_to_capsule(environments, content_view)
42
+ def repositories_available_to_capsule(environments = nil, content_view = nil)
43
43
  environments = @smart_proxy.lifecycle_environments if environments.nil?
44
44
  yum_repos = Katello::Repository.in_environment(environments)
45
45
  yum_repos = yum_repos.in_content_views([content_view]) if content_view
46
46
  yum_repos.smart_proxy_syncable
47
47
  end
48
+
49
+ def unsyncable_content_types
50
+ unsyncable_content_types = ::Katello::RepositoryTypeManager.defined_repository_types.keys.collect do |type_name|
51
+ unless @smart_proxy.capabilities(::SmartProxy::PULP3_FEATURE).include?(::Katello::RepositoryTypeManager.defined_repository_types[type_name].pulp3_plugin)
52
+ type_name
53
+ end
54
+ end
55
+ unsyncable_content_types.compact & repositories_available_to_capsule.map(&:content_type)
56
+ end
48
57
  end
49
58
  end
@@ -0,0 +1,42 @@
1
+ <%#
2
+ kind: job_template
3
+ name: Change content source
4
+ job_category: Katello
5
+ model: JobTemplate
6
+ provider_type: SSH
7
+ description_format: Configure subscription manager to new content source
8
+ feature: katello_change_content_source
9
+ %>
10
+ #!/bin/sh
11
+ <%
12
+ content_source = @host.content_source
13
+ -%>
14
+
15
+ <% if content_source -%>
16
+ SSL_CA_CERT=$(mktemp)
17
+ cat << EOF > $SSL_CA_CERT
18
+ <%= foreman_server_ca_cert %>
19
+ EOF
20
+
21
+ KATELLO_SERVER_CA_CERT=/etc/rhsm/ca/katello-server-ca.pem
22
+ RHSM_CFG=/etc/rhsm/rhsm.conf
23
+
24
+ # Prepare SSL certificate
25
+ mkdir -p /etc/rhsm/ca
26
+ cp -f $SSL_CA_CERT $KATELLO_SERVER_CA_CERT
27
+ chmod 644 $KATELLO_SERVER_CA_CERT
28
+
29
+ # Configure subscription-manager
30
+ test -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak
31
+
32
+ subscription-manager config \
33
+ --server.hostname="<%= content_source.rhsm_url.host %>" \
34
+ --server.port="<%= content_source.rhsm_url.port %>" \
35
+ --server.prefix="<%= content_source.rhsm_url.path %>" \
36
+ --rhsm.repo_ca_cert="$KATELLO_SERVER_CA_CERT" \
37
+ --rhsm.baseurl="<%= content_source.pulp_content_url %>"
38
+
39
+ <% else -%>
40
+ echo "Host [<%= @host.name %>] doesn't have assigned content source!"
41
+ exit 1
42
+ <% end -%>
@@ -2,14 +2,14 @@
2
2
  kind: job_template
3
3
  name: Install Errata - Katello SSH Default
4
4
  job_category: Katello
5
- description_format: 'Install errata %{errata}'
5
+ description_format: 'Install errata %{Errata search query}'
6
6
  feature: katello_errata_install
7
7
  provider_type: SSH
8
8
  template_inputs:
9
- - name: errata
10
- description: A comma separated list of errata to install
9
+ - name: Errata search query
10
+ description: Filter criteria for errata to be installed.
11
11
  input_type: user
12
- required: true
12
+ required: false
13
13
  foreign_input_sets:
14
14
  - template: Package Action - SSH Default
15
15
  exclude: action,package
@@ -19,6 +19,8 @@ foreign_input_sets:
19
19
  <% advisories = input(:errata).split(',').join(' ') %>
20
20
  <%= render_template('Package Action - SSH Default', :action => 'install -n -t patch', :package => advisories) %>
21
21
  <% else %>
22
- <% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') %>
22
+ <% advisory_ids = @host.advisory_ids(search: input("Errata search query")) %>
23
+
24
+ <% advisories = advisory_ids.map { |e| "--advisory=#{e}" }.join(' ') %>
23
25
  <%= render_template('Package Action - SSH Default', :action => 'update-minimal', :package => advisories) %>
24
- <% end %>
26
+ <% end %>
@@ -6,15 +6,14 @@ description_format: 'Resolve Traces'
6
6
  feature: katello_host_tracer_resolve
7
7
  provider_type: SSH
8
8
  template_inputs:
9
- - name: ids
10
- description: A comma-separated list of trace IDs to resolve
9
+ - name: Traces search query
10
+ description: Search query to provide traces to resolve
11
11
  input_type: user
12
- required: true
12
+ required: false
13
13
  %>
14
14
 
15
15
  <%
16
- ids = input(:ids).split(',').map { |split| split.strip.to_i }
17
- commands = @host.traces_helpers(ids)
16
+ commands = @host.traces_helpers(search: input('Traces search query'))
18
17
  reboot = commands.delete('reboot')
19
18
  -%>
20
19
  <% if reboot -%>
@@ -5,18 +5,16 @@ model: JobTemplate
5
5
  job_category: Katello via Ansible
6
6
  description_format: Resolve Traces
7
7
  template_inputs:
8
- - name: ids
9
- description: A comma-separated list of trace IDs to resolve
8
+ - name: Traces search query
9
+ description: Search query to provide traces to resolve
10
10
  input_type: user
11
11
  required: true
12
- advanced: false
13
12
  provider_type: Ansible
14
13
  kind: job_template
15
14
  %>
16
15
 
17
16
  <%
18
- ids = input(:ids).split(',').map { |split| split.strip.to_i }
19
- commands = @host.traces_helpers(ids)
17
+ commands = @host.traces_helpers(search: input('Traces search query'))
20
18
  reboot = commands.delete('reboot')
21
19
  -%>
22
20
  <%= render_template(
@@ -2,7 +2,7 @@
2
2
  <h3><%= _('Content Sync') %></h3>
3
3
 
4
4
  {{ syncStatusText(syncState, syncStatus) }}
5
- <div ng-show="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED, syncState.FAILURE)">
5
+ <div ng-show="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED, syncState.RECLAIMING_SPACE, syncState.RECLAIM_SPACE_TRIGGERED, syncState.FAILURE)">
6
6
  {{ syncTask.progressbar.value || 0 | number: 0 }}%
7
7
  <a href="<%= @task_search_url %>" target="_self">
8
8
  <div ng-class="{ active: isTaskInProgress(syncTask) }" class="progress progress-striped">
@@ -19,12 +19,19 @@
19
19
  </div>
20
20
 
21
21
  <br>
22
- <div ng-show="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED)">
23
- <a ng-click="cancelSync()" class="btn btn-default" ng-disabled="!syncState.is(syncState.SYNCING)">
22
+ <div ng-hide="syncStatus.unsyncable_content_types.length == 0">
23
+ <span translate>
24
+ Pulp plugin missing for synchronizable content types: <b>{{ syncStatus.unsyncable_content_types.join(", ") }}.</b><br />
25
+ Repositories containing these content types will not be synced.
26
+ </span>
27
+ </div>
28
+
29
+ <div ng-show="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED, syncState.RECLAIMING_SPACE, syncState.RECLAIM_SPACE_TRIGGERED)">
30
+ <a ng-click="cancelSync()" class="btn btn-default" ng-disabled="!syncState.is(syncState.SYNCING, syncState.RECLAIMING_SPACE)">
24
31
  <span translate>Cancel Sync</span>
25
32
  </a>
26
33
  </div>
27
- <div class="dropdown" ng-hide="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED)">
34
+ <div class="dropdown" ng-hide="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED, syncState.RECLAIMING_SPACE, syncState.RECLAIM_SPACE_TRIGGERED)">
28
35
  <button class="btn btn-default dropdown-toggle" type="button" id="syncDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
29
36
  Synchronize
30
37
  <span class="caret"></span>
@@ -45,6 +52,12 @@
45
52
  Complete Sync is only relevant for yum/deb repositories and will take longer than an optimized sync.</p>
46
53
  </a>
47
54
  </li>
55
+ <li>
56
+ <a ng-click="reclaimSpace()" ng-hide="syncStatus.download_policy != 'on_demand'">
57
+ <span translate><strong>Reclaim Space</strong></span>
58
+ <p translate> Delete cached content units from an "On Demand" Smart Proxy.</p>
59
+ </a>
60
+ </li>
48
61
  </ul>
49
62
  </div>
50
63
  </div>
@@ -0,0 +1,12 @@
1
+ <div>
2
+ <h3><%= _('Reclaim Space') %></h3>
3
+ <p translate>
4
+ <strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
5
+ Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
6
+ </p>
7
+ <div class="button">
8
+ <button class="btn btn-default" type="button" id="reclaimSpaceButton" ng-click="reclaimSpace()" translate>
9
+ Reclaim Space
10
+ </button>
11
+ </div>
12
+ </div>
@@ -2,6 +2,8 @@
2
2
  <div ng-controller="CapsuleContentController">
3
3
  <%= render :file => 'smart_proxies/show' %>
4
4
  </div>
5
- <% else -%>
6
- <%= render :file => 'smart_proxies/show' %>
5
+ <% elsif @smart_proxy.pulp_primary? -%>
6
+ <div ng-controller="PulpPrimaryController">
7
+ <%= render :file => 'smart_proxies/show' %>
8
+ </div>
7
9
  <% end -%>
@@ -2,6 +2,12 @@ object @capsule
2
2
 
3
3
  attribute :last_sync_time
4
4
 
5
+ attribute :download_policy
6
+
7
+ node :unsyncable_content_types do
8
+ ::Katello::SmartProxyHelper.new(@capsule).unsyncable_content_types
9
+ end
10
+
5
11
  child :active_sync_tasks => :active_sync_tasks do
6
12
  extends 'foreman_tasks/api/tasks/show'
7
13
  end
@@ -1 +1,5 @@
1
1
  attributes :url, :username, :upstream_organization_label, :ssl_ca_credential_id
2
+
3
+ node :password_exists do |config|
4
+ config.password.present?
5
+ end
@@ -25,6 +25,14 @@ child :content_facet => :content_facet_attributes do
25
25
  node :katello_tracer_installed do |content_facet|
26
26
  content_facet.tracer_installed?
27
27
  end
28
+
29
+ node :katello_agent_enabled do
30
+ Katello.with_katello_agent?
31
+ end
32
+
33
+ node :remote_execution_by_default do
34
+ Katello.remote_execution_by_default?
35
+ end
28
36
  end
29
37
 
30
38
  attributes :description, :facts
@@ -14,7 +14,6 @@ child :content_view => :content_view do
14
14
 
15
15
  node :content_counts do |repo|
16
16
  {
17
- :ostree_branch => repo.ostree_branches.count,
18
17
  :docker_manifest => repo.docker_manifests.count,
19
18
  :docker_tag => repo.docker_tags.count,
20
19
  :rpm => repo.rpms.count,
@@ -17,7 +17,7 @@ node :next_version do |content_view|
17
17
  end
18
18
 
19
19
  child :last_task => :last_task do |_task|
20
- attributes :id
20
+ attributes :id, :started_at
21
21
  attributes :result => :result
22
22
  node :last_sync_words do |object|
23
23
  if object.try(:started_at)
@@ -2,3 +2,5 @@ object @resource
2
2
 
3
3
  attributes :id, :name
4
4
  attributes :nvrea, :nvra
5
+ attributes :upgradable_version
6
+ attributes :rpm_id
@@ -16,7 +16,7 @@ node :owner_details do |org|
16
16
  end
17
17
 
18
18
  node :cdn_configuration do |org|
19
- partial('katello/api/v2/organizations/cdn_configuration', object: org.cdn_configuration)
19
+ partial('katello/api/v2/cdn_configurations/show', object: org.cdn_configuration)
20
20
  end
21
21
 
22
22
  node :default_content_view_id do |org|
@@ -21,8 +21,6 @@ glue(@resource.root) do
21
21
 
22
22
  attributes :product_type
23
23
  attributes :upstream_username
24
- attributes :ostree_upstream_sync_policy, :ostree_upstream_sync_depth
25
- attributes :compute_ostree_upstream_sync_depth => :computed_ostree_upstream_sync_depth
26
24
  attributes :deb_releases, :deb_components, :deb_architectures
27
25
  attributes :http_proxy_policy
28
26
  attributes :http_proxy_id
@@ -53,7 +51,6 @@ glue(@resource.root) do
53
51
  end
54
52
  end
55
53
 
56
- attributes :ostree_branch_names => :ostree_branches
57
54
  attributes :relative_path
58
55
  attributes :promoted? => :promoted
59
56
  attributes :content_view_version_id, :library_instance_id
@@ -14,8 +14,6 @@ Katello::Engine.routes.draw do
14
14
  # re-routes alphabetical
15
15
  ##############################
16
16
 
17
- root :to => 'root#resource_list'
18
-
19
17
  api_resources :capsules, :only => [:index, :show] do
20
18
  member do
21
19
  resource :content, :only => [], :controller => 'capsule_content' do
@@ -24,6 +22,7 @@ Katello::Engine.routes.draw do
24
22
  post :sync
25
23
  get :sync, :action => :sync_status
26
24
  delete :sync, :action => :cancel_sync
25
+ post :reclaim_space
27
26
  post '/lifecycle_environments' => 'capsule_content#add_lifecycle_environment'
28
27
  delete '/lifecycle_environments/:environment_id' => 'capsule_content#remove_lifecycle_environment'
29
28
  end
@@ -162,13 +161,6 @@ Katello::Engine.routes.draw do
162
161
  end
163
162
  end
164
163
 
165
- api_resources :ostree_branches, :only => [:index, :show] do
166
- collection do
167
- get :auto_complete_search
168
- get :compare
169
- end
170
- end
171
-
172
164
  api_resources :debs, :only => [:index, :show] do
173
165
  collection do
174
166
  get :auto_complete_search
@@ -295,6 +287,7 @@ Katello::Engine.routes.draw do
295
287
  end
296
288
  end
297
289
  end
290
+ api_resources :content_units, :only => [:index, :show], :controller => 'generic_content_units'
298
291
 
299
292
  match "/ping" => "katello_ping#index", :via => :get
300
293
  match "/status" => "katello_ping#server_status", :via => :get
@@ -400,6 +393,7 @@ Katello::Engine.routes.draw do
400
393
  collection do
401
394
  match '/bulk/destroy' => 'repositories_bulk_actions#destroy_repositories', :via => :put
402
395
  match '/bulk/sync' => 'repositories_bulk_actions#sync_repositories', :via => :post
396
+ match '/bulk/reclaim_space' => 'repositories_bulk_actions#reclaim_space_from_repositories', :via => :post
403
397
  get :auto_complete_search
404
398
  end
405
399
  api_resources :sync, :only => [:index]
@@ -417,7 +411,7 @@ Katello::Engine.routes.draw do
417
411
  Katello::RepositoryTypeManager.generic_content_types(false).each do |type|
418
412
  api_resources type.pluralize.to_sym, :only => [:index, :show], :controller => 'generic_content_units', :content_type => type
419
413
  end
420
- api_resources :ostree_branches, :only => [:index, :show]
414
+ api_resources :content_units, :only => [:index, :show], :controller => 'generic_content_units'
421
415
 
422
416
  api_resources :content_uploads, :controller => :content_uploads, :only => [:create, :destroy, :update]
423
417
 
@@ -428,6 +422,7 @@ Katello::Engine.routes.draw do
428
422
  put :remove_content
429
423
  post :sync
430
424
  post :verify_checksum
425
+ post :reclaim_space
431
426
  post :upload_content
432
427
  put :import_uploads
433
428
  end
@@ -1,6 +1,8 @@
1
1
  class KatelloPoolOrganizationIdNotNullable < ActiveRecord::Migration[6.0]
2
2
  def up
3
3
  ::Katello::Pool.where(organization_id: nil).destroy_all
4
+ ::Katello::Pool.where(subscription_id: nil).destroy_all
5
+
4
6
  change_column :katello_pools, :organization_id, :integer, null: false
5
7
  change_column :katello_pools, :subscription_id, :integer, null: false
6
8
 
@@ -0,0 +1,13 @@
1
+ class DropOstreeBranches < ActiveRecord::Migration[6.0]
2
+ def up
3
+ drop_table :katello_repository_ostree_branches
4
+ drop_table :katello_ostree_branches
5
+
6
+ remove_column :katello_root_repositories, :ostree_upstream_sync_policy
7
+ remove_column :katello_root_repositories, :ostree_upstream_sync_depth
8
+ end
9
+
10
+ def down
11
+ fail ActiveRecord::IrreversibleMigration
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveDependencySolvingAlgorithmSetting < ActiveRecord::Migration[6.0]
2
+ def change
3
+ Setting.where(:name => 'dependency_solving_algorithm', :category => 'Setting::Content').delete_all
4
+ end
5
+ end
@@ -1,5 +1,6 @@
1
1
  BASTION_MODULES.push(
2
2
  'Bastion.capsule-content',
3
+ 'Bastion.pulp-primary',
3
4
  'Bastion.activation-keys',
4
5
  'Bastion.architectures' ,
5
6
  'Bastion.common',
@@ -9,9 +10,7 @@ BASTION_MODULES.push(
9
10
  'Bastion.docker-tags',
10
11
  'Bastion.files',
11
12
  'Bastion.ansible-collections',
12
- 'Bastion.ostree-branches',
13
13
  'Bastion.hosts',
14
- 'Bastion.ostree-branches',
15
14
  'Bastion.module-streams',
16
15
  'Bastion.environments',
17
16
  'Bastion.content-credentials',
@@ -40,9 +40,6 @@
40
40
  //= require "bastion_katello/ansible-collections/ansible-collections.module.js"
41
41
  //= require_tree "./ansible-collections"
42
42
 
43
- //= require "bastion_katello/ostree-branches/ostree-branches.module.js"
44
- //= require_tree "./ostree-branches"
45
-
46
43
  //= require "bastion_katello/debs/debs.module.js"
47
44
  //= require_tree "./debs"
48
45
 
@@ -60,6 +57,9 @@
60
57
 
61
58
  //= require "bastion_katello/capsule-content/capsule-content.module.js"
62
59
  //= require_tree "./capsule-content"
60
+ //
61
+ //= require "bastion_katello/pulp-primary/pulp-primary.module.js"
62
+ //= require_tree "./pulp-primary"
63
63
 
64
64
  //= require "bastion_katello/organizations/organizations.module.js"
65
65
  //= require_tree "./organizations"
@@ -131,8 +131,24 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
131
131
 
132
132
  $scope.isTaskInProgress = isTaskInProgress;
133
133
 
134
+ $scope.reclaimSpace = function () {
135
+ if (!$scope.syncState.is(syncState.SYNCING) && !$scope.syncState.is(syncState.RECLAIMING_SPACE)) {
136
+
137
+ $scope.syncState.set(syncState.RECLAIM_SPACE_TRIGGERED);
138
+
139
+ CapsuleContent.reclaimSpace({id: capsuleId}).$promise.then(function (task) {
140
+ $scope.syncStatus['active_sync_tasks'].push(task);
141
+ $scope.syncTask = aggregateTasks($scope.syncStatus['active_sync_tasks']);
142
+ $scope.syncState.set(syncState.RECLAIMING_SPACE);
143
+ }, function (response) {
144
+ processError(response);
145
+ $scope.syncState.set(syncState.DEFAULT);
146
+ });
147
+ }
148
+ };
149
+
134
150
  $scope.syncCapsule = function (skipMetadataCheck) {
135
- if (!$scope.syncState.is(syncState.SYNCING)) {
151
+ if (!$scope.syncState.is(syncState.SYNCING) && !$scope.syncState.is(syncState.RECLAIMING_SPACE)) {
136
152
 
137
153
  $scope.syncState.set(syncState.SYNC_TRIGGERED);
138
154
 
@@ -164,10 +180,14 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
164
180
 
165
181
  if (currentSyncState.is(currentSyncState.SYNCING)) {
166
182
  message = translate("Smart proxy currently syncing to your locations...");
183
+ } else if (currentSyncState.is(currentSyncState.RECLAIMING_SPACE)) {
184
+ message = translate("Smart proxy currently reclaiming space...");
167
185
  } else if (currentSyncState.is(currentSyncState.SYNC_TRIGGERED)) {
168
186
  message = translate("Synchronization is about to start...");
169
187
  } else if (currentSyncState.is(currentSyncState.CANCEL_TRIGGERED)) {
170
188
  message = translate("Synchronization is being cancelled...");
189
+ } else if (currentSyncState.is(currentSyncState.RECLAIM_SPACE_TRIGGERED)) {
190
+ message = translate("Space reclamation is about to start...");
171
191
  } else {
172
192
  syncableEnvs = _.filter(syncStatus['lifecycle_environments'], {syncable: true});
173
193
 
@@ -13,7 +13,8 @@ angular.module('Bastion.capsule-content').factory('CapsuleContent',
13
13
  return BastionResource('katello/api/capsules/:id/content/:action', {id: '@id'}, {
14
14
  syncStatus: {method: 'GET', isArray: false, params: {action: 'sync'}},
15
15
  sync: {method: 'post', isArray: false, params: {action: 'sync'}},
16
- cancelSync: {method: 'delete', isArray: false, params: {action: 'sync'}}
16
+ cancelSync: {method: 'delete', isArray: false, params: {action: 'sync'}},
17
+ reclaimSpace: {method: 'post', isArray: false, params: {action: 'reclaim_space'}}
17
18
  });
18
19
 
19
20
  }]
@@ -9,6 +9,8 @@ angular.module('Bastion.capsule-content').service('syncState', function () {
9
9
 
10
10
  this.DEFAULT = 'DEFAULT';
11
11
  this.SYNCING = 'SYNCING';
12
+ this.RECLAIMING_SPACE = 'RECLAIMING_SPACE';
13
+ this.RECLAIM_SPACE_TRIGGERED = 'RECLAIM_SPACE_TRIGGERED';
12
14
  this.SYNC_TRIGGERED = 'SYNC_TRIGGERED';
13
15
  this.CANCEL_TRIGGERED = 'CANCEL_TRIGGERED';
14
16
  this.FAILURE = 'FAILURE';
@@ -130,16 +130,6 @@ angular.module('Bastion.content-views').config(['$stateProvider', function ($sta
130
130
  parent: 'content-view.version.details'
131
131
  }
132
132
  })
133
- .state('content-view.version.ostree-branches', {
134
- url: '/ostree_branches',
135
- permission: 'view_content_views',
136
- controller: 'ContentViewVersionContentController',
137
- templateUrl: 'content-views/versions/views/content-view-version-ostree-branches.html',
138
- ncyBreadcrumb: {
139
- label: '{{ "OSTree Branches" | translate }}',
140
- parent: 'content-view.version.details'
141
- }
142
- })
143
133
  .state('content-view.version.module-streams', {
144
134
  url: '/module_streams',
145
135
  permission: 'view_content_views',
@@ -74,9 +74,6 @@
74
74
  <div translate ng-if="version.docker_tag_count && version.docker_tag_count > 0">
75
75
  {{ version.docker_tag_count }} Container Image Tags
76
76
  </div>
77
- <div translate ng-if="version.ostree_branch_count && version.ostree_branch_count > 0">
78
- {{ version.ostree_branch_count }} OSTree Branches
79
- </div>
80
77
  <div translate ng-if="version.file_count && version.file_count > 0">
81
78
  {{ version.file_count }} Files
82
79
  </div>
@@ -52,16 +52,6 @@
52
52
  type: Erratum,
53
53
  repositoryType: 'yum'
54
54
  },
55
- 'ostree-branches': {
56
- type: OstreeBranch,
57
- repositoryType: 'ostree',
58
- params: {
59
- 'content_type': "ostree",
60
- 'content_view_version_id': $scope.$stateParams.versionId,
61
- 'sort_by': 'version',
62
- 'sort_order': 'DESC'
63
- }
64
- },
65
55
  'module-streams': {
66
56
  type: ModuleStream,
67
57
  repositoryType: 'yum',
@@ -15,7 +15,6 @@ angular.module('Bastion.content-views.versions', [
15
15
  'Bastion.packages',
16
16
  'Bastion.errata',
17
17
  'Bastion.package-groups',
18
- 'Bastion.ostree-branches',
19
18
  'Bastion.module-streams',
20
19
  'Bastion.files',
21
20
  'Bastion.debs'
@@ -71,13 +71,6 @@
71
71
  </a>
72
72
  </li>
73
73
 
74
- <li ng-class="{active: isState('content-view.version.ostree-branches')}"
75
- ng-show="version.ostree_branch_count !== 0">
76
- <a ui-sref="content-view.version.ostree-branches({versionId: version.id})">
77
- <span translate>OSTree Branches</span>
78
- </a>
79
- </li>
80
-
81
74
  <li ng-class="{active: isState('content-view.version.details')}">
82
75
  <a ui-sref="content-view.version.details({versionId: version.id})">
83
76
  <span translate>Details</span>
@@ -50,11 +50,6 @@
50
50
  resource: 'DockerTag',
51
51
  display: translate('Container Image Tags'),
52
52
  repositoryType: 'docker'
53
- }, {
54
- state: 'ostree',
55
- resource: 'OstreeBranch',
56
- display: translate('OSTree Branches'),
57
- repositoryType: 'ostree'
58
53
  }, {
59
54
  state: 'module-streams',
60
55
  resource: 'ModuleStream',
@@ -14,7 +14,6 @@ angular.module('Bastion.environments', [
14
14
  'Bastion.components',
15
15
  'Bastion.errata',
16
16
  'Bastion.packages',
17
- 'Bastion.ostree-branches',
18
17
  'Bastion.repositories',
19
18
  'Bastion.content-views',
20
19
  'Bastion.dates'