katello 4.5.0.rc2 → 4.6.0.rc2
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.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +10 -0
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -0
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +7 -0
- data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +52 -22
- data/app/controllers/katello/api/v2/content_exports_controller.rb +33 -3
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -0
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/debs_controller.rb +42 -10
- data/app/controllers/katello/api/v2/host_collections_controller.rb +5 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -0
- data/app/controllers/katello/api/v2/host_module_streams_controller.rb +9 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +8 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -1
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +8 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +34 -11
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +7 -16
- data/app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb +16 -0
- data/app/lib/actions/katello/alternate_content_source/create.rb +11 -5
- data/app/lib/actions/katello/alternate_content_source/destroy.rb +3 -4
- data/app/lib/actions/katello/alternate_content_source/refresh.rb +3 -5
- data/app/lib/actions/katello/alternate_content_source/update.rb +57 -13
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -2
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +4 -2
- data/app/lib/actions/katello/content_view/publish.rb +5 -2
- data/app/lib/actions/katello/organization/environment_contents_refresh.rb +20 -0
- data/app/lib/actions/katello/organization/manifest_refresh.rb +10 -4
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +1 -9
- data/app/lib/actions/katello/repository/create.rb +9 -0
- data/app/lib/actions/katello/repository/destroy.rb +21 -0
- data/app/lib/actions/katello/repository/errata_mail.rb +3 -3
- data/app/lib/actions/katello/repository/refresh_repository.rb +3 -0
- data/app/lib/actions/katello/repository/update.rb +33 -0
- data/app/lib/actions/katello/repository/update_redhat_repository.rb +1 -1
- data/app/lib/actions/pulp3/alternate_content_source/create.rb +5 -4
- data/app/lib/actions/pulp3/alternate_content_source/create_remote.rb +5 -4
- data/app/lib/actions/pulp3/alternate_content_source/delete.rb +4 -4
- data/app/lib/actions/pulp3/alternate_content_source/delete_remote.rb +4 -4
- data/app/lib/actions/pulp3/alternate_content_source/refresh.rb +4 -4
- data/app/lib/actions/pulp3/alternate_content_source/update.rb +4 -4
- data/app/lib/actions/pulp3/alternate_content_source/update_remote.rb +5 -5
- data/app/lib/actions/pulp3/capsule_content/reclaim_space.rb +1 -0
- data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +3 -1
- data/app/lib/actions/pulp3/content_view_version/create_exporter.rb +9 -2
- data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +45 -0
- data/app/lib/actions/pulp3/content_view_version/destroy_exporter.rb +6 -1
- data/app/lib/actions/pulp3/content_view_version/export.rb +8 -3
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/create.rb +3 -3
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/delete.rb +6 -7
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +18 -0
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/update.rb +3 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +28 -13
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +6 -4
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +6 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +82 -0
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +1 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +25 -12
- data/app/lib/katello/errors.rb +1 -1
- data/app/lib/katello/resources/candlepin/owner.rb +9 -2
- data/app/lib/katello/validators/alternate_content_source_products_validator.rb +17 -0
- data/app/models/katello/alternate_content_source.rb +39 -8
- data/app/models/katello/alternate_content_source_product.rb +13 -0
- data/app/models/katello/authorization/repository.rb +4 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +12 -2
- data/app/models/katello/concerns/pulp_database_unit.rb +2 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +5 -6
- data/app/models/katello/content_view.rb +50 -32
- data/app/models/katello/content_view_deb_filter.rb +51 -0
- data/app/models/katello/content_view_deb_filter_rule.rb +24 -0
- data/app/models/katello/content_view_filter.rb +10 -3
- data/app/models/katello/glue/candlepin/owner.rb +0 -1
- data/app/models/katello/installed_package.rb +1 -0
- data/app/models/katello/product.rb +3 -0
- data/app/models/katello/repository.rb +5 -3
- data/app/models/katello/rpm.rb +1 -0
- data/app/models/katello/smart_proxy_alternate_content_source.rb +6 -0
- data/app/services/cert/certs.rb +8 -16
- data/app/services/katello/organization_creator.rb +18 -7
- data/app/services/katello/pulp/server.rb +2 -2
- data/app/services/katello/pulp3/alternate_content_source.rb +22 -4
- data/app/services/katello/pulp3/api/apt.rb +12 -0
- data/app/services/katello/pulp3/api/core.rb +8 -0
- data/app/services/katello/pulp3/api/generic.rb +0 -4
- data/app/services/katello/pulp3/content_view_version/export.rb +61 -17
- data/app/services/katello/pulp3/content_view_version/import.rb +12 -5
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +20 -5
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +3 -1
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +34 -0
- data/app/services/katello/pulp3/deb.rb +3 -1
- data/app/services/katello/pulp3/pulp_content_unit.rb +2 -0
- data/app/services/katello/pulp3/repository/apt.rb +186 -2
- data/app/services/katello/pulp3/repository.rb +5 -4
- data/app/services/katello/pulp3/service_common.rb +1 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +4 -3
- data/app/views/foreman/smart_proxies/show.html.erb +3 -3
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +18 -3
- data/app/views/katello/api/v2/alternate_content_sources/show.json.rabl +20 -0
- data/app/views/katello/api/v2/ansible_collections/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/base.json.rabl +5 -0
- data/app/views/katello/api/v2/module_streams/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +4 -0
- data/app/views/katello/layouts/foreman_with_bastion.html.erb +1 -1
- data/app/views/katello/layouts/react.html.erb +1 -1
- data/app/views/overrides/organizations/_edit_override.html.erb +5 -8
- data/app/views/overrides/organizations/_index_row_override.html.erb +1 -1
- data/app/views/overrides/organizations/_step_1_override.html.erb +5 -0
- data/ca/redhat-uep.pem +18 -23
- data/config/katello.yaml.example +0 -2
- data/config/routes/api/v2.rb +2 -0
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20201116161820_create_content_view_deb_filter_rules.rb +17 -0
- data/db/migrate/20211220185935_clean_duplicate_content_units.rb +11 -9
- data/db/migrate/20220524132259_remove_last_refreshed_from_katello_alternate_content_sources.rb +5 -0
- data/db/migrate/20220601163911_add_vendor_to_katello_installed_packages.rb +5 -0
- data/db/migrate/20220610165621_add_repositories_and_products_to_acs.rb +23 -0
- data/engines/bastion/app/views/bastion/layouts/application.html.erb +1 -1
- data/engines/bastion/app/views/bastion/layouts/application_ie.html.erb +1 -1
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +0 -3
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -1
- data/lib/katello/engine.rb +1 -2
- data/lib/katello/permission_creator.rb +2 -2
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +6 -12
- data/lib/katello/tasks/refresh_alternate_content_sources.rake +9 -4
- data/lib/katello/tasks/refresh_repos.rake +8 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +49 -46
- data/locale/bn/katello.po +361 -53
- data/locale/cs/katello.po +361 -53
- data/locale/de/katello.po +366 -58
- data/locale/en/katello.po +361 -53
- data/locale/es/katello.po +364 -56
- data/locale/fr/katello.po +374 -66
- data/locale/gu/katello.po +361 -53
- data/locale/hi/katello.po +361 -53
- data/locale/it/katello.po +361 -53
- data/locale/ja/katello.po +374 -66
- data/locale/katello.pot +1626 -1079
- data/locale/kn/katello.po +361 -53
- data/locale/ko/katello.po +361 -53
- data/locale/mr/katello.po +361 -53
- data/locale/or/katello.po +361 -53
- data/locale/pa/katello.po +361 -53
- data/locale/pt/katello.po +361 -53
- data/locale/pt_BR/katello.po +364 -56
- data/locale/ru/katello.po +361 -53
- data/locale/ta/katello.po +361 -53
- data/locale/te/katello.po +361 -53
- data/locale/zh_CN/katello.po +374 -66
- data/locale/zh_TW/katello.po +361 -53
- data/webpack/components/EditableTextInput/EditableTextInput.js +3 -16
- data/webpack/components/EditableTextInput/PencilEditButton.js +33 -0
- data/webpack/components/Errata/index.js +18 -3
- data/webpack/components/Loading.js +1 -1
- data/webpack/components/RoutedTabs/index.js +1 -17
- data/webpack/components/Search/Search.js +0 -1
- data/webpack/components/Search/__tests__/search.test.js +1 -2
- data/webpack/components/SelectAllCheckbox/index.js +7 -4
- data/webpack/components/SelectableDropdown/SelectableDropdown.js +1 -0
- data/webpack/components/Table/EmptyStateMessage.js +77 -2
- data/webpack/components/Table/MainTable.js +46 -4
- data/webpack/components/Table/TableHooks.js +8 -4
- data/webpack/components/Table/TableWrapper.js +14 -8
- data/webpack/components/TypeAhead/TypeAhead.js +26 -11
- data/webpack/components/TypeAhead/pf3Search/TypeAheadItems.js +1 -1
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
- data/webpack/components/extensions/HostDetails/ActionsBar/index.js +8 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +2 -1
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +9 -4
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeActions.js +37 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +175 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.scss +6 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeConstants.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +301 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeSelectors.js +25 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeCard.test.js +109 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +161 -0
- data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +12 -12
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +103 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/InstalledProductsCard.js +1 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +1 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/SystemPropertiesCardExtensions.js +26 -4
- data/webpack/components/extensions/HostDetails/HostDetailsConstants.js +3 -1
- data/webpack/components/extensions/HostDetails/HostDetailsReducer.js +14 -0
- data/webpack/components/extensions/HostDetails/HostDetailsSelectors.js +8 -2
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +9 -1
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -8
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +11 -9
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +58 -8
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +2 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +30 -3
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySets.fixtures.json +3 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +48 -20
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -10
- data/webpack/components/extensions/HostDetails/hostDetailsHelpers.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/index.js +49 -17
- data/webpack/containers/Application/config.js +5 -10
- data/webpack/global_index.js +19 -7
- data/webpack/global_test_setup.js +14 -2
- data/webpack/ouia_id_check.js +95 -0
- data/webpack/redux/actions/RedHatRepositories/helpers.js +2 -0
- data/webpack/redux/reducers/index.js +2 -4
- data/webpack/scenes/AlternateContentSources/ACSActions.js +36 -3
- data/webpack/scenes/AlternateContentSources/ACSConstants.js +3 -0
- data/webpack/scenes/AlternateContentSources/ACSSelectors.js +15 -6
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +73 -42
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +26 -10
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSProducts.js +44 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +59 -45
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +4 -3
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +0 -1
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +35 -19
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +120 -13
- data/webpack/scenes/AlternateContentSources/Create/__tests__/products.fixtures.json +92 -0
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +459 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +354 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +104 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +120 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +118 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +118 -0
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +242 -0
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +106 -0
- data/webpack/scenes/AlternateContentSources/Details/__tests__/acsDetails.fixtures.json +49 -0
- data/webpack/scenes/AlternateContentSources/Details/__tests__/acsProducts.fixtures.json +95 -0
- data/webpack/scenes/AlternateContentSources/Details/__tests__/simplifiedAcsDetails.fixtures.json +39 -0
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +215 -87
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.scss +3 -0
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +1 -2
- data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +15 -4
- data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +113 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +89 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +32 -9
- data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterAdd.test.js +13 -3
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +39 -27
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +236 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +10 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +17 -4
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +34 -22
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +97 -0
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js +128 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +56 -3
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +62 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +1 -5
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +32 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/emptyCVContainerImageFilterContent.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/emptyCVPackageFilterRules.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/emptyContentViewFilters.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +5 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteModal.test.js +3 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +143 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.scss +51 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +314 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareHeader.js +186 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +74 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/AnsibleCollectionsCompareAllContentData.fixtures.json +63 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +657 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionEmptyContentCompareData.fixtures.json +14 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/ContainerTagsCompareAllContentData.fixtures.json +95 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/DebPackagesCompareAllContentData.fixtures.json +87 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/ErrataCompareAllContentData.fixtures.json +319 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/ErrataCompareThreeContentTypesData.fixtures.json +131 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/FilesCompareAllContentData.fixtures.json +51 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/FilesCompareThreeContentTypesData.fixtures.json +48 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/ModuleStreamsCompareAllContentData.fixtures.json +239 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/PackageGroupsCompareAllContentData.fixtures.json +51 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/PythonPackagesCompareAllContentData.fixtures.json +315 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/RPMPackagesCompareAllContentData.fixtures.json +470 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/RPMPackagesCompareThreeContentTypesData.fixtures.json +475 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewDetails.fixtures.json +160 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionOneDetials.fixtures.json +161 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionThreeDetails.fixtures.json +154 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionTwoDetails.fixtures.json +211 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersions.fixtures.json +1013 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionOneDetails.fixtures.json +145 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionTwoDetails.fixtures.json +145 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +102 -36
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +113 -40
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +96 -81
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +1 -2
- data/webpack/scenes/ContentViews/__tests__/mockDetails.fixtures.json +7 -2
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +0 -30
- data/webpack/test-utils/nockWrapper.js +7 -0
- metadata +83 -181
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -751
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-deletion.controller.js +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-activation-keys.controller.js +0 -81
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-confirm.controller.js +0 -65
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +0 -82
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-environments.controller.js +0 -76
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion.controller.js +0 -160
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/content-view-deletion.html +0 -58
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +0 -94
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-confirm.html +0 -76
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +0 -88
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-environments.html +0 -73
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-component.factory.js +0 -32
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +0 -75
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-content-views-list.controller.js +0 -68
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -81
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -81
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite.html +0 -24
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-deb-repositories.controller.js +0 -50
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-file-repositories.controller.js +0 -50
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-repositories.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-deb-repositories-list.controller.js +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +0 -100
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +0 -49
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-file-repositories-list.controller.js +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +0 -49
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-promotion.controller.js +0 -129
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +0 -46
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories-list.controller.js +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories.service.js +0 -91
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +0 -240
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +0 -115
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-module-stream-filter.controller.js +0 -68
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +0 -77
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/docker-tag-filter.controller.js +0 -137
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/edit-filter.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter-list.controller.js +0 -78
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter.controller.js +0 -74
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-content-type.filter.js +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-details.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-helper.service.js +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-repositories.controller.js +0 -86
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-rule-matching-package-modal.controller.js +0 -37
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-type.filter.js +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter.factory.js +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filters.controller.js +0 -85
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/module-stream-list-filter.controller.js +0 -73
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +0 -100
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-filter.controller.js +0 -179
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-group-list-filter.controller.js +0 -75
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/rule.factory.js +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata-filter.html +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata.html +0 -75
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/docker-filter.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/docker-tag-filter-details.html +0 -65
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/edit-filter.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +0 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter.html +0 -50
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-details.html +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +0 -121
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-rule-matching-package-modal.html +0 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +0 -85
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter-details.html +0 -58
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter.html +0 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/new-filter.html +0 -62
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +0 -182
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-group-filter-details.html +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-group-filter.html +0 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/partials/filter-repositories-count.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +0 -47
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.factory.js +0 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-copy.html +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +0 -87
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details-tasks.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +0 -144
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +0 -114
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +0 -87
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +0 -87
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-promotion.html +0 -59
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +0 -58
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +0 -116
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -126
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/content-view-new.controller.js +0 -78
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +0 -127
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +0 -138
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js +0 -59
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-apt.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-components.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-deb.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-docker.html +0 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-file.html +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-module-streams.html +0 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-package-groups.html +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-packages.html +0 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +0 -74
- data/lib/katello/tasks/reset.rake.bak +0 -67
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsActions.js +0 -30
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsConstants.js +0 -3
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsPage.js +0 -80
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js +0 -39
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js +0 -60
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTables.scss +0 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetails.js +0 -94
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js +0 -23
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsConstants.js +0 -3
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsReducer.js +0 -30
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionsSchema.js +0 -35
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailInfo.test.js +0 -16
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetails.fixtures.js +0 -25
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetails.test.js +0 -27
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsActions.test.js +0 -41
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsReducer.test.js +0 -33
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailInfo.test.js.snap +0 -83
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetails.test.js.snap +0 -190
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailsActions.test.js.snap +0 -58
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailsReducer.test.js.snap +0 -50
- data/webpack/scenes/AnsibleCollections/Details/index.js +0 -17
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionPage.test.js +0 -23
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollections.fixtures.js +0 -52
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsActions.test.js +0 -48
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsReducer.test.js +0 -46
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsTable.test.js +0 -25
- data/webpack/scenes/AnsibleCollections/__tests__/__snapshots__/AnsibleCollectionPage.test.js.snap +0 -73
- data/webpack/scenes/AnsibleCollections/__tests__/__snapshots__/AnsibleCollectionsTable.test.js.snap +0 -81
- data/webpack/scenes/AnsibleCollections/index.js +0 -17
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +0 -123
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0ba7b81fa3fb7760c23bcc1894d99c7cf37683bcde4b134fc39ecefd51d53ec
|
4
|
+
data.tar.gz: d5f25c7952274b118b9202ff09e4d00df68882a8cf7ab00db0879aea756cd8e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71c53ca934d2b5d33fee3fd0576d7b1296817289e2adab027fbbaf77f6aaf00f6e5c62335661563e820f864f9e14d445bbc05422d2ce331eef9e00066ad8b814
|
7
|
+
data.tar.gz: 68ef597c48b0612ac77e5e05eb1fa3af007563701a3d60aaa71e195e944785d9743f5d1ec2c21b0491b55b0f3d6871acbbe8b8d3926ea2e6867288a4afdae76c
|
@@ -59,6 +59,16 @@ module Katello
|
|
59
59
|
@host = facet.host
|
60
60
|
end
|
61
61
|
|
62
|
+
rescue_from RestClient::Exception do |e|
|
63
|
+
Rails.logger.error(pp_exception(e, with_backtrace: false))
|
64
|
+
Rails.logger.error(e.backtrace.detect { |line| line.match("katello.*controller") })
|
65
|
+
if request_from_katello_cli?
|
66
|
+
render :json => { :errors => [e.http_body] }, :status => e.http_code
|
67
|
+
else
|
68
|
+
render :plain => e.http_body, :status => e.http_code
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
62
72
|
def authorize_client_or_user
|
63
73
|
client_authorized? || authorize
|
64
74
|
end
|
@@ -313,6 +313,9 @@ module Katello
|
|
313
313
|
|
314
314
|
if params.key?(:environment_id)
|
315
315
|
environment = get_content_view_environment("cp_id", params[:environment_id])
|
316
|
+
elsif params.key?(:environments)
|
317
|
+
fail HttpErrors::BadRequest, _('Multiple environments are not supported.') if params['environments'].length > 1
|
318
|
+
environment = get_content_view_environment("cp_id", params['environments'].first['id'])
|
316
319
|
elsif params.key?(:organization_id) && !params.key?(:environment_id)
|
317
320
|
organization = Organization.current
|
318
321
|
environment = organization.library.content_view_environment
|
@@ -11,6 +11,7 @@ module Katello
|
|
11
11
|
:content_override, :add_subscriptions, :remove_subscriptions,
|
12
12
|
:subscriptions]
|
13
13
|
before_action :verify_simple_content_access_disabled, :only => [:add_subscriptions]
|
14
|
+
before_action :validate_release_version, :only => [:create, :update]
|
14
15
|
|
15
16
|
wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach purpose_role purpose_usage purpose_addons content_view_environment))
|
16
17
|
|
@@ -337,5 +338,11 @@ module Katello
|
|
337
338
|
fail HttpErrors::BadRequest, _("The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled")
|
338
339
|
end
|
339
340
|
end
|
341
|
+
|
342
|
+
def validate_release_version
|
343
|
+
if params[:release_version].present? && !@organization.library.available_releases.include?(params[:release_version])
|
344
|
+
fail HttpErrors::BadRequest, _("Invalid release version: [%s]") % params[:release_version]
|
345
|
+
end
|
346
|
+
end
|
340
347
|
end
|
341
348
|
end
|
@@ -2,10 +2,12 @@ module Katello
|
|
2
2
|
class Api::V2::AlternateContentSourcesController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
acs_wrap_params = AlternateContentSource.attribute_names + [:smart_proxy_ids, :smart_proxy_names]
|
5
|
+
acs_wrap_params = AlternateContentSource.attribute_names + [:smart_proxy_ids, :smart_proxy_names, :product_ids]
|
6
6
|
wrap_parameters :alternate_content_source, include: acs_wrap_params
|
7
7
|
|
8
8
|
before_action :find_authorized_katello_resource, only: [:show, :update, :destroy, :refresh]
|
9
|
+
before_action :find_smart_proxies, only: :create
|
10
|
+
before_action :find_products, only: :create
|
9
11
|
|
10
12
|
def_param_group :acs do
|
11
13
|
param :name, String, desc: N_("Name of the alternate content source")
|
@@ -14,8 +16,6 @@ module Katello
|
|
14
16
|
param :subpaths, Array, desc: N_('Path suffixes for finding alternate content'), required: false
|
15
17
|
param :smart_proxy_ids, Array, desc: N_("Ids of smart proxies to associate"), required: false
|
16
18
|
param :smart_proxy_names, Array, desc: N_("Names of smart proxies to associate"), required: false
|
17
|
-
param :content_type, RepositoryTypeManager.defined_repository_types.keys & AlternateContentSource::CONTENT_TYPES, desc: N_("The content type for the Alternate Content Source"), required: false
|
18
|
-
param :alternate_content_source_type, AlternateContentSource::ACS_TYPES, desc: N_("The Alternate Content Source type")
|
19
19
|
param :upstream_username, String, desc: N_("Basic authentication username"), required: false
|
20
20
|
param :upstream_password, String, desc: N_("Basic authentication password"), required: false
|
21
21
|
param :ssl_ca_cert_id, :number, desc: N_("Identifier of the content credential containing the SSL CA Cert"), required: false
|
@@ -23,9 +23,10 @@ module Katello
|
|
23
23
|
param :ssl_client_key_id, :number, desc: N_("Identifier of the content credential containing the SSL Client Key"), required: false
|
24
24
|
param :http_proxy_id, :number, desc: N_("ID of a HTTP Proxy"), required: false
|
25
25
|
param :verify_ssl, :bool, desc: N_("If SSL should be verified for the upstream URL"), required: false
|
26
|
+
param :product_ids, Array, desc: N_("IDs of products to copy repository information from into a Simplified Alternate Content Source. Products must include at least one repository of the chosen content type."), required: false
|
26
27
|
end
|
27
28
|
|
28
|
-
api :GET, "/alternate_content_sources", N_("List
|
29
|
+
api :GET, "/alternate_content_sources", N_("List alternate content sources.")
|
29
30
|
param_group :search, Api::V2::ApiController
|
30
31
|
add_scoped_search_description_for(AlternateContentSource)
|
31
32
|
def index
|
@@ -33,9 +34,15 @@ module Katello
|
|
33
34
|
format.csv do
|
34
35
|
options[:csv] = true
|
35
36
|
alternate_content_sources = scoped_search(index_relation, :name, :asc)
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
if @acs.custom?
|
38
|
+
csv_response(alternate_content_sources,
|
39
|
+
[:id, :name, :description, :label, :base_url, :subpaths, :content_type, :alternate_content_source_type],
|
40
|
+
['Id', 'Name', 'Description', 'label', 'Base URL', 'Subpaths', 'Content Type', 'Alternate Content Source Type'])
|
41
|
+
elsif @acs.simplified?
|
42
|
+
csv_response(alternate_content_sources,
|
43
|
+
[:id, :name, :description, :label, :content_type, :alternate_content_source_type, :products],
|
44
|
+
['Id', 'Name', 'Description', 'label', 'Content Type', 'Alternate Content Source Type', 'Products'])
|
45
|
+
end
|
39
46
|
end
|
40
47
|
format.any do
|
41
48
|
alternate_content_sources = scoped_search(index_relation, :name, :asc)
|
@@ -48,46 +55,56 @@ module Katello
|
|
48
55
|
AlternateContentSource.readable.distinct
|
49
56
|
end
|
50
57
|
|
51
|
-
api :GET, '/alternate_content_sources/:id', N_('Show an alternate content source')
|
58
|
+
api :GET, '/alternate_content_sources/:id', N_('Show an alternate content source.')
|
52
59
|
param :id, :number, :required => true, :desc => N_("Alternate content source ID")
|
53
60
|
def show
|
54
61
|
respond_for_show(:resource => @alternate_content_source)
|
55
62
|
end
|
56
63
|
|
57
|
-
api :POST, '/alternate_content_sources', N_('Create an
|
64
|
+
api :POST, '/alternate_content_sources', N_('Create an alternate content source to download content from during repository syncing. Note: alternate content sources are global and affect ALL sync actions on their smart proxies regardless of organization.')
|
65
|
+
param :content_type, RepositoryTypeManager.defined_repository_types.keys & AlternateContentSource::CONTENT_TYPES, desc: N_("The content type for the Alternate Content Source"), required: false
|
66
|
+
param :alternate_content_source_type, AlternateContentSource::ACS_TYPES, desc: N_("The Alternate Content Source type")
|
58
67
|
param_group :acs
|
59
68
|
def create
|
60
|
-
|
61
|
-
@alternate_content_source =
|
62
|
-
sync_task(::Actions::Katello::AlternateContentSource::Create, @alternate_content_source, @smart_proxies)
|
69
|
+
@alternate_content_source = ::Katello::AlternateContentSource.new(acs_params.except(:smart_proxy_ids, :smart_proxy_names, :product_ids))
|
70
|
+
@alternate_content_source.verify_ssl = nil if @alternate_content_source.simplified?
|
71
|
+
sync_task(::Actions::Katello::AlternateContentSource::Create, @alternate_content_source, @smart_proxies, @products)
|
63
72
|
@alternate_content_source.reload
|
64
73
|
respond_for_create(resource: @alternate_content_source)
|
65
74
|
end
|
66
75
|
|
67
|
-
api :PUT, '/alternate_content_sources/:id', N_('Update an alternate content source')
|
76
|
+
api :PUT, '/alternate_content_sources/:id', N_('Update an alternate content source.')
|
68
77
|
param_group :acs
|
69
78
|
param :id, :number, :required => true, :desc => N_("Alternate content source ID")
|
70
79
|
def update
|
71
|
-
# If a user doesn't include smart proxies in the update call, don't accidentally remove all of them.
|
72
|
-
if params[:smart_proxy_ids].nil?
|
80
|
+
# If a user doesn't include smart proxies or products in the update call, don't accidentally remove all of them.
|
81
|
+
if params[:smart_proxy_ids].nil? && params[:smart_proxy_names].nil?
|
73
82
|
@smart_proxies = @alternate_content_source.smart_proxies
|
74
|
-
elsif params[:smart_proxy_ids]
|
83
|
+
elsif params[:smart_proxy_ids] == [] || params[:smart_proxy_names] == []
|
75
84
|
@smart_proxies = []
|
76
85
|
else
|
77
86
|
find_smart_proxies
|
78
87
|
end
|
79
|
-
|
88
|
+
|
89
|
+
if params[:product_ids].nil?
|
90
|
+
@products = @alternate_content_source.products
|
91
|
+
elsif params[:product_ids] == []
|
92
|
+
@products = []
|
93
|
+
else
|
94
|
+
find_products
|
95
|
+
end
|
96
|
+
sync_task(::Actions::Katello::AlternateContentSource::Update, @alternate_content_source, @smart_proxies, @products, acs_params.except(:smart_proxy_ids, :smart_proxy_names, :product_ids))
|
80
97
|
respond_for_show(:resource => @alternate_content_source)
|
81
98
|
end
|
82
99
|
|
83
|
-
api :DELETE, '/alternate_content_sources/:id', N_('Destroy an alternate content source')
|
100
|
+
api :DELETE, '/alternate_content_sources/:id', N_('Destroy an alternate content source.')
|
84
101
|
param :id, :number, :required => true, :desc => N_("Alternate content source ID")
|
85
102
|
def destroy
|
86
103
|
sync_task(::Actions::Katello::AlternateContentSource::Destroy, @alternate_content_source)
|
87
104
|
respond_for_destroy
|
88
105
|
end
|
89
106
|
|
90
|
-
api :POST, '/alternate_content_sources/:id/refresh', N_('Refresh an alternate content source')
|
107
|
+
api :POST, '/alternate_content_sources/:id/refresh', N_('Refresh an alternate content source. Refreshing, like repository syncing, is required before using an alternate content source.')
|
91
108
|
param :id, :number, :required => true, :desc => N_("Alternate content source ID")
|
92
109
|
def refresh
|
93
110
|
task = async_task(::Actions::Katello::AlternateContentSource::Refresh, @alternate_content_source)
|
@@ -97,9 +114,9 @@ module Katello
|
|
97
114
|
protected
|
98
115
|
|
99
116
|
def acs_params
|
100
|
-
keys = [:name, :label, :
|
101
|
-
|
102
|
-
|
117
|
+
keys = [:name, :label, :description, {smart_proxy_ids: []}, {smart_proxy_names: []}, :content_type, :alternate_content_source_type]
|
118
|
+
keys += [:base_url, {subpaths: []}, :upstream_username, :upstream_password, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :http_proxy_id, :verify_ssl] if params[:action] == 'create' || @alternate_content_source&.custom?
|
119
|
+
keys += [{product_ids: []}] if params[:action] == 'create' || @alternate_content_source&.simplified?
|
103
120
|
params.require(:alternate_content_source).permit(*keys).to_h.with_indifferent_access
|
104
121
|
end
|
105
122
|
|
@@ -117,5 +134,18 @@ module Katello
|
|
117
134
|
fail HttpErrors::NotFound, _("Couldn't find smart proxies with name '%s'") % missing_smart_proxies.to_sentence
|
118
135
|
end
|
119
136
|
end
|
137
|
+
|
138
|
+
def find_products
|
139
|
+
if params[:product_ids]
|
140
|
+
@products = ::Katello::Product.where(id: params[:product_ids])
|
141
|
+
else
|
142
|
+
@products = nil
|
143
|
+
end
|
144
|
+
|
145
|
+
if params[:product_ids] && @products.length < params[:product_ids].length
|
146
|
+
missing_products = params[:product_ids] - @products.pluck(:id)
|
147
|
+
fail HttpErrors::NotFound, _("Couldn't find products with id '%s'") % missing_products.to_sentence
|
148
|
+
end
|
149
|
+
end
|
120
150
|
end
|
121
151
|
end
|
@@ -34,12 +34,18 @@ module Katello
|
|
34
34
|
"no greater than the specified size in gigabytes."), :required => false
|
35
35
|
param :fail_on_missing_content, :bool, :desc => N_("Fails if any of the repositories belonging to this version"\
|
36
36
|
" are unexportable. False by default."), :required => false
|
37
|
+
param :format, ::Katello::Pulp3::ContentViewVersion::Export::FORMATS,
|
38
|
+
:desc => N_("Export formats. Choose syncable if content is to be imported via repository sync. "\
|
39
|
+
"Choose importable if content is to be imported via hammer content-import.
|
40
|
+
Defaults to importable."),
|
41
|
+
:required => false
|
37
42
|
def version
|
38
43
|
tasks = async_task(::Actions::Katello::ContentViewVersion::Export,
|
39
44
|
content_view_version: @version,
|
40
45
|
destination_server: params[:destination_server],
|
41
46
|
chunk_size: params[:chunk_size_gb],
|
42
|
-
fail_on_missing_content: ::Foreman::Cast.to_bool(params[:fail_on_missing_content])
|
47
|
+
fail_on_missing_content: ::Foreman::Cast.to_bool(params[:fail_on_missing_content]),
|
48
|
+
format: find_export_format)
|
43
49
|
respond_for_async :resource => tasks
|
44
50
|
end
|
45
51
|
|
@@ -50,12 +56,18 @@ module Katello
|
|
50
56
|
"no greater than the specified size in gigabytes."), :required => false
|
51
57
|
param :fail_on_missing_content, :bool, :desc => N_("Fails if any of the repositories belonging to this organization"\
|
52
58
|
" are unexportable. False by default."), :required => false
|
59
|
+
param :format, ::Katello::Pulp3::ContentViewVersion::Export::FORMATS,
|
60
|
+
:desc => N_("Export formats. Choose syncable if content is to be imported via repository sync. "\
|
61
|
+
"Choose importable if content is to be imported via hammer content-import.
|
62
|
+
Defaults to importable."),
|
63
|
+
:required => false
|
53
64
|
def library
|
54
65
|
tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::ExportLibrary,
|
55
66
|
@organization,
|
56
67
|
destination_server: params[:destination_server],
|
57
68
|
chunk_size: params[:chunk_size_gb],
|
58
|
-
fail_on_missing_content: ::Foreman::Cast.to_bool(params[:fail_on_missing_content])
|
69
|
+
fail_on_missing_content: ::Foreman::Cast.to_bool(params[:fail_on_missing_content]),
|
70
|
+
format: find_export_format)
|
59
71
|
respond_for_async :resource => tasks
|
60
72
|
end
|
61
73
|
|
@@ -63,10 +75,16 @@ module Katello
|
|
63
75
|
param :id, :number, :desc => N_("Repository identifier"), :required => true
|
64
76
|
param :chunk_size_gb, :number, :desc => N_("Split the exported content into archives "\
|
65
77
|
"no greater than the specified size in gigabytes."), :required => false
|
78
|
+
param :format, ::Katello::Pulp3::ContentViewVersion::Export::FORMATS,
|
79
|
+
:desc => N_("Export formats. Choose syncable if content is to be imported via repository sync. "\
|
80
|
+
"Choose importable if content is to be imported via hammer content-import.
|
81
|
+
Defaults to importable."),
|
82
|
+
:required => false
|
66
83
|
def repository
|
67
84
|
tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::ExportRepository,
|
68
85
|
@repository,
|
69
|
-
chunk_size: params[:chunk_size_gb]
|
86
|
+
chunk_size: params[:chunk_size_gb],
|
87
|
+
format: find_export_format)
|
70
88
|
respond_for_async :resource => tasks
|
71
89
|
end
|
72
90
|
|
@@ -90,5 +108,17 @@ module Katello
|
|
90
108
|
throw_resource_not_found(name: 'organization', id: params[:organization_id])
|
91
109
|
end
|
92
110
|
end
|
111
|
+
|
112
|
+
def find_export_format
|
113
|
+
if params[:format]
|
114
|
+
unless ::Katello::Pulp3::ContentViewVersion::Export::FORMATS.include?(params[:format])
|
115
|
+
fail HttpErrors::UnprocessableEntity, _('Invalid export format provided. Format must be one of %s ') %
|
116
|
+
::Katello::Pulp3::ContentViewVersion::Export::FORMATS.join(',')
|
117
|
+
end
|
118
|
+
params[:format]
|
119
|
+
else
|
120
|
+
::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE
|
121
|
+
end
|
122
|
+
end
|
93
123
|
end
|
94
124
|
end
|
@@ -2,6 +2,8 @@ module Katello
|
|
2
2
|
class Api::V2::ContentUploadsController < Api::V2::ApiController
|
3
3
|
before_action :find_repository
|
4
4
|
skip_before_action :check_media_type, :only => [:update]
|
5
|
+
# https://github.com/rails/rails/issues/42278#issuecomment-918079123
|
6
|
+
skip_parameter_encoding :update
|
5
7
|
|
6
8
|
include ::Foreman::Controller::FilterParameters
|
7
9
|
filter_parameters :content
|
@@ -27,7 +27,7 @@ module Katello
|
|
27
27
|
api :POST, "/content_view_filters/:content_view_filter_id/rules",
|
28
28
|
N_("Create a filter rule. The parameters included should be based upon the filter type.")
|
29
29
|
param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true
|
30
|
-
param :name, Array, of: [String], :desc => N_("package, package group, or docker tag names")
|
30
|
+
param :name, Array, of: [String], :desc => N_("deb, package, package group, or docker tag names")
|
31
31
|
param :uuid, String, :desc => N_("package group: uuid")
|
32
32
|
param :version, String, :desc => N_("package: version")
|
33
33
|
param :architecture, String, :desc => N_("package: architecture")
|
@@ -34,7 +34,7 @@ module Katello
|
|
34
34
|
api :post, "/content_view_filters", N_("create a filter for a content view")
|
35
35
|
param :content_view_id, :number, :desc => N_("content view identifier"), :required => true
|
36
36
|
param :name, String, :desc => N_("name of the filter"), :required => true
|
37
|
-
param :type, String, :desc => N_("type of filter (e.g. rpm, package_group, erratum, erratum_id, erratum_date, docker, modulemd)"), :required => true
|
37
|
+
param :type, String, :desc => N_("type of filter (e.g. deb, rpm, package_group, erratum, erratum_id, erratum_date, docker, modulemd)"), :required => true
|
38
38
|
param :original_packages, :bool, :desc => N_("add all packages without errata to the included/excluded list. " \
|
39
39
|
"(package filter only)")
|
40
40
|
param :original_module_streams, :bool, :desc => N_("add all module streams without errata to the included/excluded list. " \
|
@@ -66,7 +66,7 @@ module Katello
|
|
66
66
|
|
67
67
|
def index_relation
|
68
68
|
content_views = ContentView.readable
|
69
|
-
content_views = content_views.
|
69
|
+
content_views = content_views.ignore_generated unless Foreman::Cast.to_bool(params[:include_generated])
|
70
70
|
content_views = content_views.where(:organization_id => @organization.id) if @organization
|
71
71
|
content_views = content_views.in_environment(@environment) if @environment
|
72
72
|
content_views = ::Foreman::Cast.to_bool(params[:nondefault]) ? content_views.non_default : content_views.default if params[:nondefault]
|
@@ -7,23 +7,28 @@ module Katello
|
|
7
7
|
apipie_concern_subst(:a_resource => N_("a deb package"), :resource => "deb packages")
|
8
8
|
include Katello::Concerns::Api::V2::RepositoryContentController
|
9
9
|
|
10
|
-
before_action :find_repositories, :only => [:auto_complete_name, :auto_complete_arch]
|
11
10
|
before_action :find_hosts, :only => :index
|
11
|
+
before_action :find_repositories, :only => [:auto_complete_name, :auto_complete_arch]
|
12
12
|
|
13
|
-
def
|
13
|
+
def auto_complete(search)
|
14
14
|
page_size = Katello::Concerns::FilteredAutoCompleteSearch::PAGE_SIZE
|
15
15
|
debs = Deb.in_repositories(@repositories)
|
16
|
-
col =
|
17
|
-
|
16
|
+
col = ''
|
17
|
+
if search == 'name'
|
18
|
+
col = "#{Deb.table_name}.name"
|
19
|
+
elsif search == 'arch'
|
20
|
+
col = "#{Deb.table_name}.architecture"
|
21
|
+
end
|
22
|
+
debs = debs.where("#{col} ILIKE ?", "#{params[:term]}%").select(col).group(col).order(col).limit(page_size)
|
18
23
|
render :json => debs.pluck(col)
|
19
24
|
end
|
20
25
|
|
26
|
+
def auto_complete_name
|
27
|
+
auto_complete('name')
|
28
|
+
end
|
29
|
+
|
21
30
|
def auto_complete_arch
|
22
|
-
|
23
|
-
debs = Deb.in_repositories(@repositories)
|
24
|
-
col = "#{Deb.table_name}.architecture"
|
25
|
-
debs = debs.where("#{col} ILIKE ?", "%#{params[:term]}%").select(col).group(col).order(col).limit(page_size)
|
26
|
-
render :json => debs.pluck(col)
|
31
|
+
auto_complete('architecture')
|
27
32
|
end
|
28
33
|
|
29
34
|
api :GET, "/debs", N_("List deb packages")
|
@@ -39,14 +44,41 @@ module Katello
|
|
39
44
|
param :host_id, :number, :desc => N_("Host id to list applicable deb packages for")
|
40
45
|
param :packages_restrict_applicable, :boolean, :desc => N_("Return deb packages that are applicable to one or more hosts (defaults to true if host_id is specified)")
|
41
46
|
param :packages_restrict_upgradable, :boolean, :desc => N_("Return deb packages that are upgradable on one or more hosts")
|
47
|
+
param :packages_restrict_latest, :boolean, :desc => N_("Return only the latest version of each package")
|
42
48
|
param :available_for, String, :desc => N_("Return deb packages that can be added to the specified object. Only the value 'content_view_version' is supported.")
|
43
49
|
param_group :search, ::Katello::Api::V2::ApiController
|
44
50
|
def index
|
45
51
|
super
|
46
52
|
end
|
47
53
|
|
54
|
+
def final_custom_index_relation(collection)
|
55
|
+
# :packages_restrict_latest is intended to filter the result set after all
|
56
|
+
# other constraints have been applied, including the scoped_search
|
57
|
+
# constraints. If any constraints are applied after this, then a package
|
58
|
+
# will not be returned if its latest version does not match those
|
59
|
+
# constraints, even if an older version does match those constraints.
|
60
|
+
collection = Katello::Deb.latest(collection) if ::Foreman::Cast.to_bool(params[:packages_restrict_latest])
|
61
|
+
collection
|
62
|
+
end
|
63
|
+
|
64
|
+
def filter_by_content_view_filter(filter, collection)
|
65
|
+
filtered_debs = []
|
66
|
+
filter.deb_rules.each do |rule|
|
67
|
+
filtered_debs += filter.query_debs_from_collection(collection, rule).pluck(:id)
|
68
|
+
end
|
69
|
+
|
70
|
+
collection.where(id: filter.applicable_debs.pluck(:id) & filtered_debs)
|
71
|
+
end
|
72
|
+
|
73
|
+
def filter_by_content_view_filter_rule(rule, collection)
|
74
|
+
filter = rule.filter
|
75
|
+
filtered_debs = filter.query_debs_from_collection(collection, rule).pluck(:id)
|
76
|
+
collection.where(id: filter.applicable_debs.pluck(:id) & filtered_debs)
|
77
|
+
end
|
78
|
+
|
48
79
|
def default_sort
|
49
|
-
|
80
|
+
lambda { |query| query.default_sort }
|
81
|
+
# %w(name asc)
|
50
82
|
end
|
51
83
|
|
52
84
|
def available_for_content_view_version(version)
|
@@ -194,7 +194,11 @@ module Katello
|
|
194
194
|
|
195
195
|
def host_collection_params_with_host_ids
|
196
196
|
result = host_collection_params
|
197
|
-
|
197
|
+
if params[:unlimited_hosts]
|
198
|
+
result[:max_hosts] = nil
|
199
|
+
elsif params[:max_hosts]
|
200
|
+
result[:unlimited_hosts] = false
|
201
|
+
end
|
198
202
|
result
|
199
203
|
end
|
200
204
|
|
@@ -104,6 +104,7 @@ module Katello
|
|
104
104
|
relation = relation.where(:errata_type => TYPES_FROM_PARAMS[params[:type].to_sym])
|
105
105
|
end
|
106
106
|
if params[:severity].present?
|
107
|
+
params[:severity] = ['None', ''] if params[:severity] == 'None'
|
107
108
|
relation = relation.where(:severity => params[:severity])
|
108
109
|
end
|
109
110
|
relation
|
@@ -22,7 +22,7 @@ module Katello
|
|
22
22
|
def index_relation
|
23
23
|
return HostAvailableModuleStream.upgradable([@host]) if params[:status] == HostAvailableModuleStream::UPGRADABLE
|
24
24
|
|
25
|
-
rel = @host.host_available_module_streams
|
25
|
+
rel = @host.host_available_module_streams.where(available_module_stream_id: find_available_module_stream_ids)
|
26
26
|
if params[:sort_by] == 'installed_profiles'
|
27
27
|
rel = rel.order([:installed_profiles, :status])
|
28
28
|
end
|
@@ -38,6 +38,14 @@ module Katello
|
|
38
38
|
|
39
39
|
private
|
40
40
|
|
41
|
+
def find_available_module_stream_ids
|
42
|
+
items = @host.host_available_module_streams.includes(:available_module_stream).map(&:available_module_stream)
|
43
|
+
grouped = items.group_by { |item| [item.name, item.stream] }
|
44
|
+
grouped.values.map do |item|
|
45
|
+
item.first.id
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
41
49
|
def find_host
|
42
50
|
@host = resource_finder(::Host::Managed.authorized(:view_hosts, ::Host::Managed), params[:host_id])
|
43
51
|
end
|
@@ -187,6 +187,13 @@ module Katello
|
|
187
187
|
respond_for_index :collection => full_result_response(releases)
|
188
188
|
end
|
189
189
|
|
190
|
+
api :GET, "/hosts/:host_id/subscriptions/enabled_repositories", N_("Show repositories enabled on the host that are known to Katello")
|
191
|
+
param :host_id, String, :desc => N_("id of host"), :required => true
|
192
|
+
def enabled_repositories
|
193
|
+
repositories = @host.content_facet.try(:bound_repositories) || []
|
194
|
+
respond_with_template_collection "index", 'repositories', :collection => full_result_response(repositories)
|
195
|
+
end
|
196
|
+
|
190
197
|
private
|
191
198
|
|
192
199
|
def fetch_product_content
|
@@ -216,7 +223,7 @@ module Katello
|
|
216
223
|
def action_permission
|
217
224
|
if ['add_subscriptions', 'destroy', 'remove_subscriptions', 'auto_attach', 'content_override'].include?(params[:action])
|
218
225
|
:edit
|
219
|
-
elsif ['index', 'events', 'product_content', 'available_release_versions'].include?(params[:action])
|
226
|
+
elsif ['index', 'events', 'product_content', 'available_release_versions', 'enabled_repositories'].include?(params[:action])
|
220
227
|
:view
|
221
228
|
else
|
222
229
|
fail ::Foreman::Exception.new(N_("unknown permission for %s"), "#{params[:controller]}##{params[:action]}")
|
@@ -68,9 +68,11 @@ module Katello
|
|
68
68
|
param :organization, Hash do
|
69
69
|
param :label, String, :required => false
|
70
70
|
end
|
71
|
+
param :simple_content_access, :bool, :desc => N_('Whether to turn on Simple Content Access for the organization.'), :required => false, :default => true
|
71
72
|
def create
|
72
73
|
@organization = Organization.new(resource_params)
|
73
|
-
|
74
|
+
sca = params.key?(:simple_content_access) ? ::Foreman::Cast.to_bool(params[:simple_content_access]) : true
|
75
|
+
creator = ::Katello::OrganizationCreator.new(@organization, sca: sca)
|
74
76
|
creator.create!
|
75
77
|
@organization.reload
|
76
78
|
# @taxonomy instance variable is necessary for foreman side
|
@@ -15,6 +15,14 @@ module Katello
|
|
15
15
|
render json: { simple_content_access_eligible: eligible }
|
16
16
|
end
|
17
17
|
|
18
|
+
api :GET, "/organizations/:organization_id/simple_content_access/status",
|
19
|
+
N_("Check if the specified organization has Simple Content Access enabled")
|
20
|
+
param :organization_id, :number, :desc => N_("Organization ID"), :required => true
|
21
|
+
def status
|
22
|
+
status = @organization.simple_content_access?
|
23
|
+
render json: { simple_content_access: status }
|
24
|
+
end
|
25
|
+
|
18
26
|
api :PUT, "/organizations/:organization_id/simple_content_access/enable",
|
19
27
|
N_("Enable simple content access for a manifest")
|
20
28
|
param :organization_id, :number, :desc => N_("Organization ID"), :required => true
|
@@ -30,6 +30,7 @@ module Katello
|
|
30
30
|
param :ids, Array, :desc => N_("ids to filter content by")
|
31
31
|
param :include_filter_ids, :bool, desc: N_("Includes associated content view filter ids in response")
|
32
32
|
param_group :search, ::Katello::Api::V2::ApiController
|
33
|
+
|
33
34
|
def index
|
34
35
|
sort_by, sort_order, options = sort_options
|
35
36
|
respond(:collection => scoped_search(index_relation, sort_by, sort_order, options))
|
@@ -40,6 +41,7 @@ module Katello
|
|
40
41
|
param :repository_id, :number, :desc => N_("repository identifier")
|
41
42
|
param :organization_id, :number, :desc => N_("organization identifier")
|
42
43
|
param :id, String, :desc => N_(":a_resource identifier"), :required => true
|
44
|
+
|
43
45
|
def show
|
44
46
|
respond :resource => @resource
|
45
47
|
end
|
@@ -47,10 +49,11 @@ module Katello
|
|
47
49
|
api :GET, "/:resource_id/compare/", N_("List :resource")
|
48
50
|
param :content_view_version_ids, Array, :desc => N_("content view versions to compare")
|
49
51
|
param :repository_id, :number, :desc => N_("Library repository id to restrict comparisons to")
|
52
|
+
param :restrict_comparison, String, :desc => N_("Return same, different or all results")
|
53
|
+
|
50
54
|
def compare
|
51
55
|
fail _("No content_view_version_ids provided") if params[:content_view_version_ids].empty?
|
52
56
|
@versions = ContentViewVersion.readable.where(:id => params[:content_view_version_ids])
|
53
|
-
|
54
57
|
if @versions.count != params[:content_view_version_ids].uniq.length
|
55
58
|
missing = params[:content_view_version_ids] - @versions.pluck(:id)
|
56
59
|
fail HttpErrors::NotFound, _("Couldn't find content view versions '%s'") % missing.join(',')
|
@@ -63,9 +66,8 @@ module Katello
|
|
63
66
|
else
|
64
67
|
repos = Katello::Repository.where(:content_view_version_id => @versions.pluck(:id))
|
65
68
|
repos = repos.where(:root_id => @repo.root_id) if @repo
|
66
|
-
collection = filter_by_repos(repos, resource_class.all)
|
69
|
+
collection = filter_by_repos(repos, resource_class.all, @versions, params[:restrict_comparison])
|
67
70
|
end
|
68
|
-
|
69
71
|
collection = scoped_search(collection.distinct, sort_by, sort_order, options)
|
70
72
|
collection[:results] = collection[:results].map { |item| ContentViewVersionComparePresenter.new(item, @versions, @repo) }
|
71
73
|
respond_for_index(:collection => collection)
|
@@ -75,6 +77,7 @@ module Katello
|
|
75
77
|
param :show_all_for, :bool,
|
76
78
|
:desc => N_("Returns content that can be both added and is currently added to the object. The value 'content_view_filter' is supported")
|
77
79
|
param :filterId, :integer, :desc => N_("Content View Filter id"), deprecated: true
|
80
|
+
|
78
81
|
def index_relation
|
79
82
|
if @version && params[:available_for] == "content_view_version" && self.respond_to?(:available_for_content_view_version)
|
80
83
|
collection = self.available_for_content_view_version(@version)
|
@@ -125,8 +128,28 @@ module Katello
|
|
125
128
|
repos
|
126
129
|
end
|
127
130
|
|
128
|
-
def filter_by_repos(repos, collection)
|
129
|
-
collection.in_repositories(repos)
|
131
|
+
def filter_by_repos(repos, collection, content_view_versions = nil, compare = 'all')
|
132
|
+
collection = collection.in_repositories(repos)
|
133
|
+
case compare
|
134
|
+
when 'same'
|
135
|
+
compare_same(collection, content_view_versions)
|
136
|
+
when 'different'
|
137
|
+
collection_all_ids = collection&.pluck(:id)
|
138
|
+
collection_same_ids = compare_same(collection, content_view_versions)&.pluck(:id)
|
139
|
+
collection.where(id: collection_all_ids - collection_same_ids)
|
140
|
+
else
|
141
|
+
collection
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
def compare_same(collection, content_view_versions = nil)
|
146
|
+
cv_version_first = content_view_versions[0]
|
147
|
+
collection_ids = collection.in_repositories(Katello::Repository.where(:content_view_version_id => cv_version_first&.id))&.pluck(:id)
|
148
|
+
content_view_versions[1..-1].each do |version|
|
149
|
+
collection_version_ids = collection.in_repositories(Katello::Repository.where(:content_view_version_id => version&.id))&.pluck(:id)
|
150
|
+
collection_ids = collection_ids.intersection collection_version_ids
|
151
|
+
end
|
152
|
+
return collection.where(id: collection_ids)
|
130
153
|
end
|
131
154
|
|
132
155
|
def filter_by_content_view_version(version, collection)
|
@@ -145,12 +168,12 @@ module Katello
|
|
145
168
|
|
146
169
|
if @resource.blank?
|
147
170
|
fail HttpErrors::NotFound, _("Failed to find %{content} with id '%{id}'.") %
|
148
|
-
{content: resource_name, id: params[:id]}
|
171
|
+
{ content: resource_name, id: params[:id] }
|
149
172
|
end
|
150
173
|
|
151
174
|
if params[:repository_id] && !@resource.repositories.include?(@repo)
|
152
175
|
fail HttpErrors::NotFound, _("Could not find %{content} with id '%{id}' in repository.") %
|
153
|
-
{content: resource_name, id: params[:id]}
|
176
|
+
{ content: resource_name, id: params[:id] }
|
154
177
|
end
|
155
178
|
|
156
179
|
if params[:organization_id] && !@resource.repositories.any? { |repo| repo.organization_id == params[:organization_id].to_i }
|
@@ -174,7 +197,7 @@ module Katello
|
|
174
197
|
@environment = KTEnvironment.readable.find_by(:id => params[:environment_id])
|
175
198
|
if @environment.nil?
|
176
199
|
fail HttpErrors::NotFound, _("Could not find Lifecycle Environment with id '%{id}'.") %
|
177
|
-
{id: params[:environment_id]}
|
200
|
+
{ id: params[:environment_id] }
|
178
201
|
end
|
179
202
|
end
|
180
203
|
end
|
@@ -196,7 +219,7 @@ module Katello
|
|
196
219
|
|
197
220
|
unless @filter
|
198
221
|
fail HttpErrors::NotFound, _("Couldn't find %{type} Filter with id %{id}") %
|
199
|
-
{:type => resource_name, :id => params[:filter_id]}
|
222
|
+
{ :type => resource_name, :id => params[:filter_id] }
|
200
223
|
end
|
201
224
|
end
|
202
225
|
end
|
@@ -209,7 +232,7 @@ module Katello
|
|
209
232
|
|
210
233
|
unless @filter_rule
|
211
234
|
fail HttpErrors::NotFound, _("Couldn't find %{type} Filter with id %{id}") %
|
212
|
-
{:type => resource_name, :id => filter_rule_id}
|
235
|
+
{ :type => resource_name, :id => filter_rule_id }
|
213
236
|
end
|
214
237
|
end
|
215
238
|
end
|
@@ -272,7 +295,7 @@ module Katello
|
|
272
295
|
def check_repo_for_content_resource
|
273
296
|
if params[:repository_id] && !@resource.send(repo_association).include?(@repo.pulp_id)
|
274
297
|
fail HttpErrors::NotFound, _("Could not find %{content} with id '%{id}' in repository.") %
|
275
|
-
{content: resource_name, id: params[:id]}
|
298
|
+
{ content: resource_name, id: params[:id] }
|
276
299
|
end
|
277
300
|
end
|
278
301
|
|