katello 4.7.2 → 4.8.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +6 -4
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -12
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +0 -4
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +22 -81
- data/app/controllers/katello/api/v2/content_exports_controller.rb +11 -80
- data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
- data/app/controllers/katello/api/v2/exports_controller.rb +130 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +7 -8
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +8 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -0
- data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -52
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -6
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -2
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +4 -1
- data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +24 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +3 -3
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +55 -24
- data/app/helpers/katello/katello_urls_helper.rb +0 -15
- data/app/helpers/katello/sync_management_helper.rb +0 -4
- data/app/lib/actions/candlepin/environment/set_content.rb +7 -1
- data/app/lib/actions/candlepin/owner/destroy_imports.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/publish.rb +6 -2
- data/app/lib/actions/katello/content_view/remove.rb +8 -2
- data/app/lib/actions/katello/content_view_version/destroy.rb +1 -1
- data/app/lib/actions/katello/environment/destroy.rb +8 -2
- data/app/lib/actions/katello/host/reassign.rb +4 -2
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +0 -1
- data/app/lib/actions/katello/product/destroy.rb +2 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -10
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/sync.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +5 -3
- data/app/lib/actions/katello/repository/upload_files.rb +0 -1
- data/app/lib/actions/pulp3/abstract.rb +0 -6
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -2
- data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +4 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +1 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +7 -2
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -2
- data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
- data/app/lib/katello/event_daemon/runner.rb +12 -9
- data/app/lib/katello/resources/candlepin/consumer.rb +6 -6
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +3 -4
- data/app/lib/katello/resources/candlepin.rb +4 -4
- data/app/lib/katello/util/errata.rb +12 -10
- data/app/lib/katello/util/search.rb +0 -1
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +5 -2
- data/app/lib/katello/validators/content_view_environment_validator.rb +1 -2
- data/app/lib/katello/validators/generated_content_view_validator.rb +16 -0
- data/app/mailers/katello/errata_mailer.rb +4 -2
- data/app/models/katello/alternate_content_source.rb +5 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -14
- data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
- data/app/models/katello/concerns/redhat_extensions.rb +16 -6
- data/app/models/katello/concerns/smart_proxy_extensions.rb +0 -12
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -0
- data/app/models/katello/content_view.rb +22 -5
- data/app/models/katello/content_view_environment.rb +11 -2
- data/app/models/katello/content_view_environment_content_facet.rb +9 -0
- data/app/models/katello/content_view_version.rb +10 -5
- data/app/models/katello/erratum.rb +6 -1
- data/app/models/katello/glue/candlepin/pool.rb +6 -0
- data/app/models/katello/glue/candlepin/product.rb +7 -1
- data/app/models/katello/glue/candlepin/subscription.rb +5 -0
- data/app/models/katello/glue/provider.rb +26 -26
- data/app/models/katello/host/content_facet.rb +106 -18
- data/app/models/katello/host/info_provider.rb +25 -21
- data/app/models/katello/host/subscription_facet.rb +18 -14
- data/app/models/katello/kt_environment.rb +12 -7
- data/app/models/katello/package_group.rb +0 -12
- data/app/models/katello/pool.rb +4 -1
- data/app/models/katello/product.rb +11 -1
- data/app/models/katello/repository.rb +11 -11
- data/app/models/katello/root_repository.rb +5 -4
- data/app/models/katello/task_status.rb +0 -18
- data/app/services/katello/candlepin/consumer.rb +2 -2
- data/app/services/katello/host/package_profile_uploader.rb +1 -1
- data/app/services/katello/product_content_finder.rb +11 -8
- data/app/services/katello/pulp3/content_view_version/export.rb +8 -65
- data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +7 -0
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +105 -0
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +7 -1
- data/app/services/katello/pulp3/erratum.rb +1 -0
- data/app/services/katello/pulp3/module_stream.rb +26 -11
- data/app/services/katello/pulp3/repository/yum.rb +2 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -1
- data/app/services/katello/registration_manager.rb +46 -26
- data/app/services/katello/repository_type.rb +3 -9
- data/app/services/katello/simple_package.rb +22 -0
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -0
- data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +1 -0
- data/app/views/katello/api/v2/content_facet/base.json.rabl +23 -2
- data/app/views/katello/api/v2/content_facet/show.json.rabl +11 -8
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts/base.json.rabl +22 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +2 -2
- data/config/initializers/monkeys.rb +0 -2
- data/config/routes/api/registry.rb +8 -7
- data/config/routes/api/v2.rb +0 -2
- data/config/routes.rb +3 -0
- data/db/migrate/20200429153103_installed_package_bad_nvrea.rb +1 -1
- data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +7 -3
- data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +1 -1
- data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +52 -0
- data/db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/stylesheets/bastion/bastion.scss +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +5485 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +5397 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +5658 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5284 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +5231 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5275 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +5389 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5212 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +5145 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
- data/lib/katello/engine.rb +2 -1
- data/lib/katello/permission_creator.rb +2 -4
- data/lib/katello/permissions/registry_permissions.rb +5 -5
- data/lib/katello/plugin.rb +22 -14
- data/lib/katello/repository_types/README.md +136 -19
- data/lib/katello/repository_types/deb.rb +0 -1
- data/lib/katello/repository_types/docker.rb +0 -1
- data/lib/katello/repository_types/file.rb +0 -1
- data/lib/katello/repository_types/yum.rb +0 -4
- data/lib/katello/tasks/clean_candlepin_orphaned_products.rake +38 -0
- data/lib/katello/tasks/clean_orphaned_facets.rb +20 -0
- data/lib/katello/tasks/reimport.rake +1 -2
- data/lib/katello/tasks/repository.rake +1 -22
- data/lib/katello/tasks/reset.rake +1 -0
- data/lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake +29 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -5
- data/locale/bn/katello.po +69 -27
- data/locale/cs/katello.po +69 -27
- data/locale/de/katello.po +78 -36
- data/locale/en/katello.po +69 -27
- data/locale/es/katello.po +70 -28
- data/locale/fr/katello.po +73 -31
- data/locale/gu/katello.po +69 -27
- data/locale/hi/katello.po +69 -27
- data/locale/it/katello.po +69 -27
- data/locale/ja/katello.po +73 -31
- data/locale/ka/katello.po +73 -31
- data/locale/katello.pot +335 -262
- data/locale/kn/katello.po +69 -27
- data/locale/ko/katello.po +69 -27
- data/locale/mr/katello.po +69 -27
- data/locale/or/katello.po +69 -27
- data/locale/pa/katello.po +69 -27
- data/locale/pt/katello.po +69 -27
- data/locale/pt_BR/katello.po +70 -28
- data/locale/ru/katello.po +70 -28
- data/locale/ta/katello.po +69 -27
- data/locale/te/katello.po +69 -27
- data/locale/zh_CN/katello.po +73 -31
- data/locale/zh_TW/katello.po +70 -28
- data/webpack/components/Content/ContentPage.js +51 -35
- data/webpack/components/Content/__tests__/ContentPage.test.js +2 -4
- data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +22 -3
- data/webpack/components/RoutedTabs/index.js +6 -11
- data/webpack/components/Table/EmptyStateMessage.js +14 -11
- data/webpack/components/Table/MainTable.js +36 -15
- data/webpack/components/Table/TableWrapper.js +25 -25
- data/webpack/components/Table/__test__/emptyStateMessage.test.js +51 -0
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +5 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +1 -17
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +18 -9
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +47 -27
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +2 -21
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/moduleStreamsTab.test.js +1 -28
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +1 -10
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +2 -19
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +1 -17
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -15
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +7 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +2 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +2 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +1 -0
- data/webpack/global_test_setup.js +1 -1
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -17
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +17 -3
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +6 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +1 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +3 -10
- data/webpack/scenes/AlternateContentSources/Create/Steps/NameACS.js +1 -0
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +3 -3
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +1 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +12 -4
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +7 -4
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +4 -8
- data/webpack/scenes/AlternateContentSources/helpers.js +1 -1
- data/webpack/scenes/Content/Details/ContentRepositories.js +5 -4
- data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +1 -12
- data/webpack/scenes/Content/Table/ContentTable.js +2 -1
- data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -14
- data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -25
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +44 -31
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +6 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +5 -3
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +35 -33
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +48 -45
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +58 -24
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +64 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +36 -20
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +40 -23
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +0 -13
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +0 -13
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -10
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -10
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +21 -9
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +4 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +1 -32
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +3 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -15
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -9
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +4 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +30 -14
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +55 -120
- data/webpack/scenes/ContentViews/components/WizardHeader.js +1 -1
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
- data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +8 -1
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +3 -9
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +7 -1
- data/webpack/scenes/RedHatRepositories/components/Search.js +22 -16
- data/webpack/scenes/RedHatRepositories/index.scss +20 -1
- data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +12 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +21 -19
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +34 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +20 -7
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +0 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +65 -15
- metadata +47 -113
- data/app/lib/actions/katello/pulp_selector.rb +0 -24
- data/app/lib/actions/katello/repository/correct_checksum.rb +0 -24
- data/app/lib/actions/katello/repository/destroy_package_group.rb +0 -26
- data/app/lib/actions/katello/repository/upload_package_group.rb +0 -24
- data/app/lib/actions/pulp/abstract.rb +0 -37
- data/app/lib/actions/pulp/abstract_async_task.rb +0 -154
- data/app/lib/actions/pulp/abstract_async_task_group.rb +0 -94
- data/app/lib/actions/pulp/consumer/sync_capsule.rb +0 -45
- data/app/lib/actions/pulp/consumer/unassociate_units.rb +0 -20
- data/app/lib/actions/pulp/expect_one_task.rb +0 -11
- data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +0 -16
- data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +0 -19
- data/app/lib/actions/pulp/orchestration/repository/delete.rb +0 -15
- data/app/lib/actions/pulp/orchestration/repository/refresh.rb +0 -14
- data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +0 -13
- data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -19
- data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +0 -14
- data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +0 -34
- data/app/lib/actions/pulp/orchestration/repository/sync.rb +0 -18
- data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +0 -37
- data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +0 -15
- data/app/lib/actions/pulp/orphan_cleanup/remove_unneeded_repos.rb +0 -16
- data/app/lib/actions/pulp/repository/abstract_copy_content.rb +0 -45
- data/app/lib/actions/pulp/repository/abstract_remove_content.rb +0 -32
- data/app/lib/actions/pulp/repository/clear.rb +0 -18
- data/app/lib/actions/pulp/repository/copy_all_units.rb +0 -30
- data/app/lib/actions/pulp/repository/copy_units.rb +0 -25
- data/app/lib/actions/pulp/repository/create.rb +0 -28
- data/app/lib/actions/pulp/repository/create_in_plan.rb +0 -15
- data/app/lib/actions/pulp/repository/create_upload_request.rb +0 -20
- data/app/lib/actions/pulp/repository/delete_upload_request.rb +0 -19
- data/app/lib/actions/pulp/repository/destroy.rb +0 -28
- data/app/lib/actions/pulp/repository/distributor_publish.rb +0 -25
- data/app/lib/actions/pulp/repository/download.rb +0 -16
- data/app/lib/actions/pulp/repository/import_upload.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -47
- data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +0 -95
- data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +0 -103
- data/app/lib/actions/pulp/repository/presenters/file_unit_presenter.rb +0 -42
- data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +0 -131
- data/app/lib/actions/pulp/repository/refresh.rb +0 -21
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +0 -21
- data/app/lib/actions/pulp/repository/remove_distribution.rb +0 -11
- data/app/lib/actions/pulp/repository/remove_units.rb +0 -44
- data/app/lib/actions/pulp/repository/sync.rb +0 -99
- data/app/lib/actions/pulp/repository/upload_file.rb +0 -28
- data/app/lib/actions/pulp/repository_group/create.rb +0 -31
- data/app/lib/actions/pulp/repository_group/delete.rb +0 -17
- data/app/lib/actions/pulp/repository_group/export.rb +0 -51
- data/app/lib/katello/util/package_clause_generator.rb +0 -77
- data/app/models/katello/glue/pulp/pulp_errors.rb +0 -9
- data/app/models/katello/glue/pulp/repo.rb +0 -353
- data/app/models/katello/pulp_sync_status.rb +0 -165
- data/app/models/katello/pulp_task_status.rb +0 -63
- data/app/services/katello/pulp/content.rb +0 -24
- data/app/services/katello/pulp/importer_comparison.rb +0 -28
- data/app/services/katello/pulp/repository/deb.rb +0 -61
- data/app/services/katello/pulp/repository/docker.rb +0 -82
- data/app/services/katello/pulp/repository/file.rb +0 -52
- data/app/services/katello/pulp/repository/yum.rb +0 -205
- data/app/services/katello/pulp/repository.rb +0 -327
- data/app/services/katello/pulp/server.rb +0 -35
- data/app/services/katello/pulp/simple_package.rb +0 -24
- data/app/services/katello/pulp/smart_proxy_repository.rb +0 -52
- data/lib/monkeys/fix_deb_optimized_sync.rb +0 -35
- data/lib/monkeys/fix_pulp_container_path.rb +0 -35
- data/locale/zanata.xml +0 -30
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentSearch.fixtures.json +0 -33
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
3
|
-
import { nockInstance, assertNockRequest, mockAutocomplete
|
3
|
+
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../test-utils/nockWrapper';
|
4
4
|
import api from '../../../../../services/api';
|
5
5
|
import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
|
6
6
|
import ContentViewComponents from '../ContentViewComponents';
|
@@ -15,27 +15,21 @@ const cvComponents = api.getApiUrl('/content_views/4/content_view_components/sho
|
|
15
15
|
const addComponentURL = api.getApiUrl('/content_views/4/content_view_components/add');
|
16
16
|
const publishedComponentDetailsURL = api.getApiUrl('/content_views/13');
|
17
17
|
const removeComponentURL = api.getApiUrl('/content_views/4/content_view_components/remove');
|
18
|
-
const cvComponentsSearchURL = api.getApiUrl('/content_views/4/content_view_components/show_all?per_page=20&page=1&search=name+%3D+%227%22&status=All');
|
19
18
|
const autocompleteUrl = '/content_views/auto_complete_search';
|
19
|
+
const autocompleteQuery = {
|
20
|
+
organization_id: 1,
|
21
|
+
search: '',
|
22
|
+
};
|
20
23
|
|
21
24
|
let firstComponent;
|
22
|
-
let searchDelayScope;
|
23
|
-
let autoSearchScope;
|
24
25
|
|
25
26
|
beforeEach(() => {
|
26
27
|
const { results } = cvComponentData;
|
27
28
|
[firstComponent] = results;
|
28
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
29
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
30
|
-
});
|
31
|
-
|
32
|
-
afterEach(() => {
|
33
|
-
assertNockRequest(searchDelayScope);
|
34
|
-
assertNockRequest(autoSearchScope);
|
35
29
|
});
|
36
30
|
|
37
31
|
test('Can call API and show components on page load', async (done) => {
|
38
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
32
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
39
33
|
const scope = nockInstance
|
40
34
|
.get(cvComponents)
|
41
35
|
.reply(200, cvComponentData);
|
@@ -55,7 +49,7 @@ test('Can call API and show components on page load', async (done) => {
|
|
55
49
|
});
|
56
50
|
|
57
51
|
test('Can call API and show unpublished components', async (done) => {
|
58
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
52
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
59
53
|
const scope = nockInstance
|
60
54
|
.get(cvComponents)
|
61
55
|
.reply(200, cvUnpublishedComponentData);
|
@@ -79,7 +73,7 @@ test('Can call API and show unpublished components', async (done) => {
|
|
79
73
|
});
|
80
74
|
|
81
75
|
test('Can link to view environment', async () => {
|
82
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
76
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
83
77
|
const scope = nockInstance
|
84
78
|
.get(cvComponents)
|
85
79
|
.reply(200, cvComponentData);
|
@@ -102,17 +96,36 @@ test('Can search for component content views in composite view', async (done) =>
|
|
102
96
|
const lastComponent = cvComponentData.results[1];
|
103
97
|
const { name: firstComponentName } = firstComponent.content_view;
|
104
98
|
const { name: lastComponentName } = lastComponent.content_view;
|
105
|
-
const searchQueryMatcher =
|
99
|
+
const searchQueryMatcher = {
|
100
|
+
organization_id: 1,
|
101
|
+
search: `name = ${lastComponentName}`,
|
102
|
+
};
|
103
|
+
const searchResults = [
|
104
|
+
{
|
105
|
+
completed: `name = ${lastComponentName}`,
|
106
|
+
part: 'and',
|
107
|
+
label: `name = ${lastComponentName} and`,
|
108
|
+
category: 'Operators',
|
109
|
+
},
|
110
|
+
{
|
111
|
+
completed: `name = ${lastComponentName}`,
|
112
|
+
part: 'or',
|
113
|
+
label: `name = ${lastComponentName} or`,
|
114
|
+
category: 'Operators',
|
115
|
+
},
|
116
|
+
];
|
106
117
|
|
107
118
|
const cvComponentsScope = nockInstance
|
108
119
|
.get(cvComponents)
|
109
120
|
.reply(200, cvComponentData);
|
110
|
-
const cvComponentsSearchScope = nockInstance
|
111
|
-
.get(cvComponentsSearchURL)
|
112
|
-
.reply(200, { results: [lastComponent] });
|
113
121
|
|
114
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
115
|
-
const withSearchScope = mockAutocomplete(
|
122
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
123
|
+
const withSearchScope = mockAutocomplete(
|
124
|
+
nockInstance,
|
125
|
+
autocompleteUrl,
|
126
|
+
searchQueryMatcher,
|
127
|
+
searchResults,
|
128
|
+
);
|
116
129
|
const { getByText, queryByText, getByLabelText } =
|
117
130
|
renderWithRedux(<ContentViewComponents cvId={4} details={cvDetails} />, renderOptions);
|
118
131
|
|
@@ -123,23 +136,23 @@ test('Can search for component content views in composite view', async (done) =>
|
|
123
136
|
});
|
124
137
|
|
125
138
|
// Search and only searched result shows
|
126
|
-
const searchInput = getByLabelText(
|
139
|
+
const searchInput = getByLabelText('Search input');
|
127
140
|
expect(searchInput).toBeInTheDocument();
|
128
|
-
|
141
|
+
searchInput.focus();
|
142
|
+
fireEvent.change(searchInput, { target: { value: `name = ${lastComponentName}` } });
|
129
143
|
|
130
144
|
await patientlyWaitFor(() => {
|
131
|
-
expect(getByText(lastComponentName)).toBeInTheDocument();
|
132
|
-
expect(queryByText(firstComponentName)).not.toBeInTheDocument();
|
145
|
+
expect(getByText(`name = ${lastComponentName} and`)).toBeInTheDocument();
|
146
|
+
expect(queryByText(`name = ${firstComponentName} and`)).not.toBeInTheDocument();
|
133
147
|
});
|
134
148
|
|
135
149
|
assertNockRequest(autocompleteScope);
|
136
150
|
assertNockRequest(cvComponentsScope);
|
137
|
-
assertNockRequest(withSearchScope);
|
138
|
-
assertNockRequest(cvComponentsSearchScope, done);
|
151
|
+
assertNockRequest(withSearchScope, done);
|
139
152
|
});
|
140
153
|
|
141
154
|
test('Can handle no components being present', async (done) => {
|
142
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
155
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
143
156
|
|
144
157
|
const noResults = {
|
145
158
|
total: 0,
|
@@ -172,7 +185,7 @@ test('Can handle no components being present', async (done) => {
|
|
172
185
|
});
|
173
186
|
|
174
187
|
test('Can add published component views to content view with modal', async (done) => {
|
175
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
188
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
176
189
|
const scope = nockInstance
|
177
190
|
.get(cvComponentsWithoutSearch)
|
178
191
|
.reply(200, cvComponentData);
|
@@ -225,7 +238,7 @@ test('Can add published component views to content view with modal', async (done
|
|
225
238
|
});
|
226
239
|
|
227
240
|
test('Can add unpublished component views to content view', async (done) => {
|
228
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
241
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
229
242
|
const scope = nockInstance
|
230
243
|
.get(cvComponentsWithoutSearch)
|
231
244
|
.reply(200, cvComponentData);
|
@@ -261,7 +274,7 @@ test('Can add unpublished component views to content view', async (done) => {
|
|
261
274
|
});
|
262
275
|
|
263
276
|
test('Can remove component views from content view', async (done) => {
|
264
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
277
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
265
278
|
const scope = nockInstance
|
266
279
|
.get(cvComponentsWithoutSearch)
|
267
280
|
.reply(200, cvComponentData);
|
@@ -297,7 +310,7 @@ test('Can remove component views from content view', async (done) => {
|
|
297
310
|
});
|
298
311
|
|
299
312
|
test('Can bulk add component views to content view with modal', async (done) => {
|
300
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
313
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
301
314
|
const scope = nockInstance
|
302
315
|
.get(cvComponentsWithoutSearch)
|
303
316
|
.reply(200, cvComponentData);
|
@@ -82,6 +82,7 @@ export default () => {
|
|
82
82
|
const dropDownItems = [
|
83
83
|
<DropdownItem
|
84
84
|
key="copy"
|
85
|
+
ouiaId="cv-copy"
|
85
86
|
onClick={() => {
|
86
87
|
setCopying(true);
|
87
88
|
}}
|
@@ -90,6 +91,7 @@ export default () => {
|
|
90
91
|
</DropdownItem>,
|
91
92
|
<DropdownItem
|
92
93
|
key="delete"
|
94
|
+
ouiaId="cv-delete"
|
93
95
|
onClick={() => {
|
94
96
|
setDeleting(true);
|
95
97
|
}}
|
data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js
CHANGED
@@ -178,6 +178,9 @@ const AffectedRepositoryTable = ({
|
|
178
178
|
const emptySearchBody = __('Try changing your search settings.');
|
179
179
|
const activeFilters = [productSelected];
|
180
180
|
const defaultFilters = [allProducts];
|
181
|
+
const resetFilters = () => {
|
182
|
+
setProductSelected(allProducts);
|
183
|
+
};
|
181
184
|
const dropdownItems = [
|
182
185
|
<DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={removeBulk}>
|
183
186
|
{__('Remove')}
|
@@ -197,6 +200,7 @@ const AffectedRepositoryTable = ({
|
|
197
200
|
updateSearchQuery,
|
198
201
|
activeFilters,
|
199
202
|
defaultFilters,
|
203
|
+
resetFilters,
|
200
204
|
error,
|
201
205
|
status,
|
202
206
|
}}
|
@@ -204,7 +208,8 @@ const AffectedRepositoryTable = ({
|
|
204
208
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
205
209
|
cells={columnHeaders}
|
206
210
|
variant={TableVariant.compact}
|
207
|
-
autocompleteEndpoint="/repositories
|
211
|
+
autocompleteEndpoint="/katello/api/v2/repositories"
|
212
|
+
bookmarkController="katello_content_view_filters"
|
208
213
|
fetchItems={useCallback(params => getCVReposWithOptions(params), [getCVReposWithOptions])}
|
209
214
|
additionalListeners={[productSelected]}
|
210
215
|
actionButtons={
|
@@ -152,7 +152,8 @@ const CVContainerImageFilterContent = ({
|
|
152
152
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
153
153
|
cells={columnHeaders}
|
154
154
|
variant={TableVariant.compact}
|
155
|
-
autocompleteEndpoint={`/content_view_filters/${filterId}/rules
|
155
|
+
autocompleteEndpoint={`/katello/api/v2/content_view_filters/${filterId}/rules`}
|
156
|
+
bookmarkController="katello_content_view_docker_filter_rules"
|
156
157
|
fetchItems={useCallback(params => getCVFilterRules(filterId, params), [filterId])}
|
157
158
|
actionButtons={hasPermission(permissions, 'edit_content_views') &&
|
158
159
|
<>
|
@@ -170,7 +170,8 @@ const CVDebFilterContent = ({
|
|
170
170
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
171
171
|
cells={columnHeaders}
|
172
172
|
variant={TableVariant.compact}
|
173
|
-
autocompleteEndpoint={`/content_view_filters/${filterId}/rules
|
173
|
+
autocompleteEndpoint={`/katello/api/v2/content_view_filters/${filterId}/rules`}
|
174
|
+
bookmarkController="katello_content_view_deb_filter_rules"
|
174
175
|
fetchItems={useCallback(params => getCVFilterRules(filterId, params), [filterId])}
|
175
176
|
actionButtons={
|
176
177
|
<>
|
@@ -205,7 +205,7 @@ const CVErrataDateFilterContent = ({
|
|
205
205
|
value={startDate}
|
206
206
|
invalidFormatText={invalidDateFormat}
|
207
207
|
dateFormat={dateFormat}
|
208
|
-
onChange={setStartDate}
|
208
|
+
onChange={(e, val) => setStartDate(val)}
|
209
209
|
dateParse={dateParse}
|
210
210
|
placeholder={startEntry ? 'MM/DD/YYYY' : __('Start date')}
|
211
211
|
isDisabled={!hasPermission(permissions, 'edit_content_views')}
|
@@ -227,7 +227,7 @@ const CVErrataDateFilterContent = ({
|
|
227
227
|
value={endDate}
|
228
228
|
invalidFormatText={invalidDateFormat}
|
229
229
|
dateFormat={dateFormat}
|
230
|
-
onChange={setEndDate}
|
230
|
+
onChange={(e, val) => setEndDate(val)}
|
231
231
|
dateParse={dateParse}
|
232
232
|
placeholder={endEntry ? 'MM/DD/YYYY' : __('End date')}
|
233
233
|
isDisabled={!hasPermission(permissions, 'edit_content_views')}
|
@@ -206,12 +206,12 @@ const CVErrataIDFilterContent = ({
|
|
206
206
|
} else setSelectedTypes([...selectedTypes, selection]);
|
207
207
|
};
|
208
208
|
|
209
|
-
const setValidStartDate = (value) => {
|
209
|
+
const setValidStartDate = (e, value) => {
|
210
210
|
setStartDate(value);
|
211
211
|
if (validAPIDate(value)) setApiStartDate(value);
|
212
212
|
};
|
213
213
|
|
214
|
-
const setValidEndDate = (value) => {
|
214
|
+
const setValidEndDate = (e, value) => {
|
215
215
|
setEndDate(value);
|
216
216
|
if (validAPIDate(value)) setApiEndDate(value);
|
217
217
|
};
|
@@ -276,7 +276,9 @@ const CVErrataIDFilterContent = ({
|
|
276
276
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
277
277
|
cells={columnHeaders}
|
278
278
|
variant={TableVariant.compact}
|
279
|
-
autocompleteEndpoint=
|
279
|
+
autocompleteEndpoint="/katello/api/v2/errata"
|
280
|
+
autocompleteQueryParams={{ filterid: filterId }}
|
281
|
+
bookmarkController="katello_content_view_erratum_filter_rules"
|
280
282
|
additionalListeners={[statusSelected, selectedTypes.length,
|
281
283
|
dateType, apiStartDate, apiEndDate]}
|
282
284
|
fetchItems={useCallback(params =>
|
@@ -229,7 +229,9 @@ const CVModuleStreamFilterContent = ({
|
|
229
229
|
defaultFilters={[allAddedNotAdded[0]]}
|
230
230
|
cells={columnHeaders}
|
231
231
|
variant={TableVariant.compact}
|
232
|
-
autocompleteEndpoint=
|
232
|
+
autocompleteEndpoint="/katello/api/v2/module_streams"
|
233
|
+
autocompleteQueryParams={{ filterid: filterId }}
|
234
|
+
bookmarkController="katello_content_view_module_stream_filter_rules"
|
233
235
|
fetchItems={fetchItems}
|
234
236
|
actionResolver={hasPermission(permissions, 'edit_content_views') ? actionResolver : null}
|
235
237
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
@@ -219,7 +219,9 @@ const CVPackageGroupFilterContent = ({
|
|
219
219
|
defaultFilters={[allAddedNotAdded[0]]}
|
220
220
|
cells={columnHeaders}
|
221
221
|
variant={TableVariant.compact}
|
222
|
-
autocompleteEndpoint=
|
222
|
+
autocompleteEndpoint="/katello/api/v2/package_groups"
|
223
|
+
autocompleteQueryParams={{ filterid: filterId }}
|
224
|
+
bookmarkController="katello_content_view_package_group_filter_rules"
|
223
225
|
fetchItems={fetchItems}
|
224
226
|
actionResolver={hasPermission(permissions, 'edit_content_views') ? actionResolver : null}
|
225
227
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
@@ -183,7 +183,8 @@ const CVRpmFilterContent = ({
|
|
183
183
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
184
184
|
cells={columnHeaders}
|
185
185
|
variant={TableVariant.compact}
|
186
|
-
autocompleteEndpoint={`/content_view_filters/${filterId}/rules
|
186
|
+
autocompleteEndpoint={`/katello/api/v2/content_view_filters/${filterId}/rules`}
|
187
|
+
bookmarkController="katello_content_view_package_filter_rules"
|
187
188
|
fetchItems={useCallback(params => getCVFilterRules(filterId, params), [filterId])}
|
188
189
|
actionButtons={
|
189
190
|
<>
|
@@ -67,6 +67,7 @@ const ContentViewFilterDetailsHeader = ({
|
|
67
67
|
const dropDownItems = [
|
68
68
|
<DropdownItem
|
69
69
|
key="delete"
|
70
|
+
ouiaId="cv-filter-delete"
|
70
71
|
onClick={() => {
|
71
72
|
dispatch(deleteContentViewFilter(filterId, () => {
|
72
73
|
push(`/content_views/${cvId}#/filters/`);
|
@@ -129,6 +130,7 @@ const ContentViewFilterDetailsHeader = ({
|
|
129
130
|
</FlexItem>
|
130
131
|
<FlexItem>
|
131
132
|
<Dropdown
|
133
|
+
ouiaId="cv-filter-actions-kebab"
|
132
134
|
position={DropdownPosition.right}
|
133
135
|
style={{ marginLeft: 'auto' }}
|
134
136
|
toggle={<KebabToggle onToggle={setDropdownOpen} id="toggle-dropdown" />}
|
@@ -142,7 +142,8 @@ const ContentViewFilters = ({ cvId, details }) => {
|
|
142
142
|
onSelect={hasPermission(permissions, 'edit_content_views') ? onSelect(rows, setRows) : null}
|
143
143
|
cells={columnHeaders}
|
144
144
|
variant={TableVariant.compact}
|
145
|
-
autocompleteEndpoint="/content_view_filters
|
145
|
+
autocompleteEndpoint="/katello/api/v2/content_view_filters"
|
146
|
+
bookmarkController="katello_content_view_filters"
|
146
147
|
fetchItems={useCallback(params => getContentViewFilters(cvId, params), [cvId])}
|
147
148
|
actionButtons={hasPermission(permissions, 'edit_content_views') &&
|
148
149
|
<>
|
data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js
CHANGED
@@ -54,7 +54,7 @@ const CVDebMatchContentModal = ({ filterId, onClose, filterRuleId }) => {
|
|
54
54
|
status,
|
55
55
|
}}
|
56
56
|
ouiaId="content-view-deb-match-content-table"
|
57
|
-
autocompleteEndpoint="/debs
|
57
|
+
autocompleteEndpoint="/katello/api/v2/debs"
|
58
58
|
variant={TableVariant.compact}
|
59
59
|
>
|
60
60
|
<Thead>
|
data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js
CHANGED
@@ -55,7 +55,7 @@ const CVRpmMatchContentModal = ({ filterId, onClose, filterRuleId }) => {
|
|
55
55
|
status,
|
56
56
|
}}
|
57
57
|
ouiaId="content-view-rpm-match-content-table"
|
58
|
-
autocompleteEndpoint="/packages
|
58
|
+
autocompleteEndpoint="/katello/api/v2/packages"
|
59
59
|
variant={TableVariant.compact}
|
60
60
|
>
|
61
61
|
<Thead>
|
@@ -1,39 +1,28 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
3
3
|
|
4
|
-
|
5
4
|
import api from '../../../../../../services/api';
|
6
5
|
import CVRpmMatchContentModal from '../CVRpmMatchContentModal';
|
7
|
-
import { nockInstance, assertNockRequest,
|
6
|
+
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../../test-utils/nockWrapper';
|
8
7
|
|
9
8
|
import CVMatchedContent from './CVRpmMatchContent.fixtures.json';
|
10
|
-
import CVMatchContentSearch from './CVRpmMatchContentSearch.fixtures.json';
|
11
9
|
|
12
10
|
const firstMatchContent = CVMatchedContent.results[0];
|
13
11
|
const { nvra: secondMatchContentName } = CVMatchedContent.results[1];
|
14
12
|
const cvMatchContentPath = api.getApiUrl('/packages');
|
15
13
|
const autocompleteUrl = '/packages/auto_complete_search';
|
14
|
+
const autocompleteQuery = {
|
15
|
+
organization_id: 1,
|
16
|
+
search: '',
|
17
|
+
};
|
16
18
|
|
17
19
|
const onClose = jest.fn();
|
18
20
|
|
19
21
|
const MatchContentModal =
|
20
22
|
<CVRpmMatchContentModal filterId={194} filterRuleId={13} onClose={onClose} />;
|
21
23
|
|
22
|
-
let searchDelayScope;
|
23
|
-
let autoSearchScope;
|
24
|
-
beforeEach(() => {
|
25
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
26
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
27
|
-
});
|
28
|
-
|
29
|
-
afterEach(() => {
|
30
|
-
assertNockRequest(searchDelayScope);
|
31
|
-
assertNockRequest(autoSearchScope);
|
32
|
-
});
|
33
|
-
|
34
|
-
|
35
24
|
test('Can show matching content modal', async (done) => {
|
36
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
25
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
37
26
|
const cvMatchContentscope = nockInstance
|
38
27
|
.get(cvMatchContentPath)
|
39
28
|
.query(true)
|
@@ -50,22 +39,36 @@ test('Can show matching content modal', async (done) => {
|
|
50
39
|
});
|
51
40
|
|
52
41
|
test('Can search with filter', async (done) => {
|
53
|
-
const
|
42
|
+
const matchQuery = {
|
43
|
+
organization_id: 1,
|
44
|
+
search: `nvra = ${firstMatchContent.nvra}`,
|
45
|
+
};
|
46
|
+
const searchResults = [
|
47
|
+
{
|
48
|
+
completed: `nvra = ${firstMatchContent.nvra}`,
|
49
|
+
part: 'and',
|
50
|
+
label: `nvra = ${firstMatchContent.nvra} and`,
|
51
|
+
category: 'Operators',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
completed: `nvra = ${firstMatchContent.nvra}`,
|
55
|
+
part: 'or',
|
56
|
+
label: `nvra = ${firstMatchContent.nvra} or`,
|
57
|
+
category: 'Operators',
|
58
|
+
},
|
59
|
+
];
|
60
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
61
|
+
const secondGetMatchContentscope = mockAutocomplete(
|
62
|
+
nockInstance,
|
63
|
+
autocompleteUrl,
|
64
|
+
matchQuery,
|
65
|
+
searchResults,
|
66
|
+
);
|
54
67
|
const getMatchContentscope = nockInstance
|
55
68
|
.get(cvMatchContentPath)
|
56
69
|
.query(true)
|
57
70
|
.reply(200, CVMatchedContent);
|
58
71
|
|
59
|
-
const autocompleteSearchScope = nockInstance
|
60
|
-
.get(api.getApiUrl(autocompleteUrl))
|
61
|
-
.query(true)
|
62
|
-
.reply(200, []);
|
63
|
-
|
64
|
-
const secondGetMatchContentscope = nockInstance
|
65
|
-
.get(cvMatchContentPath)
|
66
|
-
.query(true)
|
67
|
-
.reply(200, CVMatchContentSearch);
|
68
|
-
|
69
72
|
const { queryByText, getByLabelText } = renderWithRedux(MatchContentModal);
|
70
73
|
|
71
74
|
await patientlyWaitFor(() => {
|
@@ -73,17 +76,16 @@ test('Can search with filter', async (done) => {
|
|
73
76
|
expect(queryByText(secondMatchContentName)).toBeInTheDocument();
|
74
77
|
});
|
75
78
|
|
76
|
-
|
79
|
+
getByLabelText('Search input').focus();
|
80
|
+
fireEvent.change(getByLabelText('Search input'), { target: { value: `nvra = ${firstMatchContent.nvra}` } });
|
77
81
|
|
78
82
|
await patientlyWaitFor(() => {
|
79
|
-
expect(queryByText(
|
83
|
+
expect(queryByText(`nvra = ${firstMatchContent.nvra} and`)).toBeInTheDocument();
|
80
84
|
expect(queryByText(firstMatchContent.nvra)).toBeInTheDocument();
|
81
|
-
expect(queryByText(secondMatchContentName)).not.toBeInTheDocument();
|
85
|
+
expect(queryByText(`nvra = ${secondMatchContentName} and`)).not.toBeInTheDocument();
|
82
86
|
});
|
83
87
|
|
84
|
-
|
85
88
|
assertNockRequest(autocompleteScope);
|
86
89
|
assertNockRequest(getMatchContentscope);
|
87
|
-
assertNockRequest(autocompleteSearchScope);
|
88
90
|
assertNockRequest(secondGetMatchContentscope, done);
|
89
91
|
});
|