katello 4.7.3 → 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/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/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 +1 -18
- 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/global_test_setup.js +1 -1
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -10
- 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/CVErrataIDFilterContent.js +3 -1
- 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
@@ -6,7 +6,7 @@ import CONTENT_VIEWS_KEY from '../ContentViewsConstants';
|
|
6
6
|
import ContentViewsPage from '../../ContentViews';
|
7
7
|
import api from '../../../services/api';
|
8
8
|
import {
|
9
|
-
nockInstance, assertNockRequest, mockAutocomplete,
|
9
|
+
nockInstance, assertNockRequest, mockAutocomplete,
|
10
10
|
} from '../../../test-utils/nockWrapper';
|
11
11
|
import createBasicCVs from './basicContentViews.fixtures';
|
12
12
|
import cvIndexData from './contentViewList.fixtures.json';
|
@@ -14,28 +14,23 @@ import cvIndexData from './contentViewList.fixtures.json';
|
|
14
14
|
const cvIndexPath = api.getApiUrl('/content_views');
|
15
15
|
const autocompleteUrl = '/content_views/auto_complete_search';
|
16
16
|
const renderOptions = { apiNamespace: CONTENT_VIEWS_KEY };
|
17
|
+
const autocompleteQuery = {
|
18
|
+
organization_id: 1,
|
19
|
+
search: '',
|
20
|
+
};
|
17
21
|
|
18
22
|
let firstCV;
|
19
|
-
let searchDelayScope;
|
20
|
-
let autoSearchScope;
|
21
|
-
let scopeBookmark;
|
22
23
|
beforeEach(() => {
|
23
24
|
const { results } = cvIndexData;
|
24
25
|
[firstCV] = results;
|
25
26
|
});
|
26
27
|
|
27
28
|
test('Can call API for CVs and show on screen on page load', async (done) => {
|
28
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
29
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
29
30
|
const scope = nockInstance
|
30
31
|
.get(cvIndexPath)
|
31
32
|
.query(true)
|
32
33
|
.reply(200, cvIndexData);
|
33
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
34
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
35
|
-
scopeBookmark = nockInstance
|
36
|
-
.get('/api/v2/bookmarks')
|
37
|
-
.query(true)
|
38
|
-
.reply(200, {});
|
39
34
|
|
40
35
|
const { queryByText, queryAllByText } = renderWithRedux(<ContentViewsPage />, renderOptions);
|
41
36
|
|
@@ -49,25 +44,16 @@ test('Can call API for CVs and show on screen on page load', async (done) => {
|
|
49
44
|
});
|
50
45
|
|
51
46
|
|
52
|
-
assertNockRequest(scopeBookmark);
|
53
47
|
assertNockRequest(autocompleteScope);
|
54
|
-
assertNockRequest(searchDelayScope);
|
55
|
-
assertNockRequest(autoSearchScope);
|
56
48
|
assertNockRequest(scope, done);
|
57
49
|
});
|
58
50
|
|
59
51
|
test('Can show last task and link to it', async (done) => {
|
60
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
52
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
61
53
|
const scope = nockInstance
|
62
54
|
.get(cvIndexPath)
|
63
55
|
.query(true)
|
64
56
|
.reply(200, cvIndexData);
|
65
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
66
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
67
|
-
scopeBookmark = nockInstance
|
68
|
-
.get('/api/v2/bookmarks')
|
69
|
-
.query(true)
|
70
|
-
.reply(200, {});
|
71
57
|
|
72
58
|
const { getByText, queryByText } = renderWithRedux(<ContentViewsPage />, renderOptions);
|
73
59
|
|
@@ -82,25 +68,16 @@ test('Can show last task and link to it', async (done) => {
|
|
82
68
|
expect(queryByText('N/A')).toBeTruthy();
|
83
69
|
});
|
84
70
|
|
85
|
-
assertNockRequest(scopeBookmark);
|
86
71
|
assertNockRequest(autocompleteScope);
|
87
|
-
assertNockRequest(searchDelayScope);
|
88
|
-
assertNockRequest(autoSearchScope);
|
89
72
|
assertNockRequest(scope, done); // Pass jest callback to confirm test is done
|
90
73
|
});
|
91
74
|
|
92
75
|
test('Can show latest version and link to it', async (done) => {
|
93
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
76
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
94
77
|
const scope = nockInstance
|
95
78
|
.get(cvIndexPath)
|
96
79
|
.query(true)
|
97
80
|
.reply(200, cvIndexData);
|
98
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
99
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
100
|
-
scopeBookmark = nockInstance
|
101
|
-
.get('/api/v2/bookmarks')
|
102
|
-
.query(true)
|
103
|
-
.reply(200, {});
|
104
81
|
|
105
82
|
const {
|
106
83
|
getByText,
|
@@ -123,25 +100,16 @@ test('Can show latest version and link to it', async (done) => {
|
|
123
100
|
expect(getByText('dev').closest('a'))
|
124
101
|
.toHaveAttribute('href', '/lifecycle_environments/2');
|
125
102
|
});
|
126
|
-
assertNockRequest(scopeBookmark);
|
127
103
|
assertNockRequest(autocompleteScope);
|
128
|
-
assertNockRequest(searchDelayScope);
|
129
|
-
assertNockRequest(autoSearchScope);
|
130
104
|
assertNockRequest(scope, done); // Pass jest callback to confirm test is done
|
131
105
|
});
|
132
106
|
|
133
107
|
test('Can expand cv and show activation keys and hosts', async (done) => {
|
134
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
108
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
135
109
|
const scope = nockInstance
|
136
110
|
.get(cvIndexPath)
|
137
111
|
.query(true)
|
138
112
|
.reply(200, cvIndexData);
|
139
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
140
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
141
|
-
scopeBookmark = nockInstance
|
142
|
-
.get('/api/v2/bookmarks')
|
143
|
-
.query(true)
|
144
|
-
.reply(200, {});
|
145
113
|
|
146
114
|
const {
|
147
115
|
queryByLabelText,
|
@@ -171,9 +139,6 @@ test('Can expand cv and show activation keys and hosts', async (done) => {
|
|
171
139
|
});
|
172
140
|
|
173
141
|
assertNockRequest(autocompleteScope);
|
174
|
-
assertNockRequest(searchDelayScope);
|
175
|
-
assertNockRequest(autoSearchScope);
|
176
|
-
assertNockRequest(scopeBookmark);
|
177
142
|
assertNockRequest(scope, done); // Pass jest callback to confirm test is done
|
178
143
|
});
|
179
144
|
|
@@ -215,25 +180,16 @@ test('Can handle unpublished Content Views', async (done) => {
|
|
215
180
|
const { results } = cvIndexData;
|
216
181
|
const unpublishedCVs = results.map(cv => ({ ...cv, last_published: null }));
|
217
182
|
const unpublishedCVData = { ...cvIndexData, results: unpublishedCVs };
|
218
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
183
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
219
184
|
const scope = nockInstance
|
220
185
|
.get(cvIndexPath)
|
221
186
|
.query(true)
|
222
187
|
.reply(200, unpublishedCVData);
|
223
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
224
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
225
|
-
scopeBookmark = nockInstance
|
226
|
-
.get('/api/v2/bookmarks')
|
227
|
-
.query(true)
|
228
|
-
.reply(200, {});
|
229
188
|
|
230
189
|
const { getAllByText } = renderWithRedux(<ContentViewsPage />, renderOptions);
|
231
190
|
|
232
191
|
await patientlyWaitFor(() => expect(getAllByText(/not yet published/i).length).toBeGreaterThan(0));
|
233
192
|
assertNockRequest(autocompleteScope);
|
234
|
-
assertNockRequest(searchDelayScope);
|
235
|
-
assertNockRequest(autoSearchScope);
|
236
|
-
assertNockRequest(scopeBookmark);
|
237
193
|
assertNockRequest(scope, done);
|
238
194
|
});
|
239
195
|
|
@@ -242,13 +198,7 @@ test('Can handle pagination', async (done) => {
|
|
242
198
|
const { results } = cvIndexLarge;
|
243
199
|
const cvIndexFirstPage = { ...cvIndexLarge, ...{ results: results.slice(0, 20) } };
|
244
200
|
const cvIndexSecondPage = { ...cvIndexLarge, page: 2, results: results.slice(20, 40) };
|
245
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
246
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
247
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
248
|
-
scopeBookmark = nockInstance
|
249
|
-
.get('/api/v2/bookmarks')
|
250
|
-
.query(true)
|
251
|
-
.reply(200, {});
|
201
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
252
202
|
|
253
203
|
// Match first page API request
|
254
204
|
const firstPageScope = nockInstance
|
@@ -283,39 +233,43 @@ test('Can handle pagination', async (done) => {
|
|
283
233
|
expect(queryByText(results[41].name)).not.toBeInTheDocument();
|
284
234
|
});
|
285
235
|
assertNockRequest(autocompleteScope);
|
286
|
-
assertNockRequest(autoSearchScope);
|
287
|
-
assertNockRequest(searchDelayScope);
|
288
|
-
assertNockRequest(scopeBookmark);
|
289
236
|
assertNockRequest(firstPageScope);
|
290
237
|
assertNockRequest(secondPageScope, done); // Only pass jest callback to the last API request
|
291
238
|
});
|
292
239
|
|
293
240
|
test('Can search for specific Content View', async (done) => {
|
294
241
|
const cvname = 'composite one';
|
295
|
-
const
|
296
|
-
|
297
|
-
|
298
|
-
...cvIndexData,
|
299
|
-
...{ total: 1, subtotal: 1, results: results.slice(-1) },
|
242
|
+
const matchQuery = {
|
243
|
+
organization_id: 1,
|
244
|
+
search: `name = ${firstCV.name}`,
|
300
245
|
};
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
246
|
+
const searchResults = [
|
247
|
+
{
|
248
|
+
completed: 'name = cv1',
|
249
|
+
part: 'and',
|
250
|
+
label: 'name = cv1 and',
|
251
|
+
category: 'Operators',
|
252
|
+
},
|
253
|
+
{
|
254
|
+
completed: 'name = cv1',
|
255
|
+
part: 'or',
|
256
|
+
label: 'name = cv1 or',
|
257
|
+
category: 'Operators',
|
258
|
+
},
|
259
|
+
];
|
260
|
+
|
261
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
262
|
+
const withSearchScope = mockAutocomplete(
|
263
|
+
nockInstance,
|
264
|
+
autocompleteUrl,
|
265
|
+
matchQuery,
|
266
|
+
searchResults,
|
267
|
+
);
|
310
268
|
|
311
269
|
const initialScope = nockInstance
|
312
270
|
.get(cvIndexPath)
|
313
271
|
.query(true)
|
314
272
|
.reply(200, cvIndexData);
|
315
|
-
const searchResultScope = nockInstance
|
316
|
-
.get(cvIndexPath)
|
317
|
-
.query(matchQuery)
|
318
|
-
.reply(200, searchResults);
|
319
273
|
|
320
274
|
const {
|
321
275
|
getByLabelText,
|
@@ -325,71 +279,52 @@ test('Can search for specific Content View', async (done) => {
|
|
325
279
|
|
326
280
|
await patientlyWaitFor(() => expect(getByText(firstCV.name)).toBeInTheDocument());
|
327
281
|
|
328
|
-
const searchInput = getByLabelText(
|
282
|
+
const searchInput = getByLabelText('Search input');
|
329
283
|
expect(searchInput).toBeInTheDocument();
|
330
|
-
|
284
|
+
searchInput.focus();
|
285
|
+
fireEvent.change(searchInput, { target: { value: `name = ${firstCV.name}` } });
|
331
286
|
|
332
287
|
await patientlyWaitFor(() => {
|
333
|
-
expect(getByText(
|
334
|
-
expect(queryByText(
|
288
|
+
expect(getByText(`name = ${firstCV.name} and`)).toBeInTheDocument();
|
289
|
+
expect(queryByText(`name = ${cvname} and`)).not.toBeInTheDocument();
|
335
290
|
});
|
336
291
|
|
337
292
|
assertNockRequest(autocompleteScope);
|
338
|
-
assertNockRequest(searchDelayScope);
|
339
|
-
assertNockRequest(autoSearchScope);
|
340
|
-
assertNockRequest(scopeBookmark);
|
341
293
|
assertNockRequest(initialScope);
|
342
|
-
assertNockRequest(withSearchScope);
|
343
|
-
assertNockRequest(searchResultScope, done);
|
294
|
+
assertNockRequest(withSearchScope, done);
|
344
295
|
});
|
345
296
|
|
346
|
-
test('
|
297
|
+
test('Nothing is shown for empty search', async (done) => {
|
347
298
|
const cvname = 'notanactualname';
|
348
299
|
const query = `name = \"${cvname}\"`;
|
349
|
-
const matchQuery =
|
350
|
-
|
351
|
-
total: 0,
|
352
|
-
subtotal: 0,
|
353
|
-
page: 1,
|
354
|
-
per_page: 20,
|
300
|
+
const matchQuery = {
|
301
|
+
organization_id: 1,
|
355
302
|
search: query,
|
356
|
-
results: [],
|
357
|
-
can_view: true,
|
358
|
-
can_create: true,
|
359
303
|
};
|
360
304
|
|
361
|
-
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
362
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
363
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
364
|
-
scopeBookmark = nockInstance
|
365
|
-
.get('/api/v2/bookmarks')
|
366
|
-
.query(true)
|
367
|
-
.reply(200, {});
|
305
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
368
306
|
const withSearchScope = mockAutocomplete(nockInstance, autocompleteUrl, matchQuery);
|
369
307
|
const initialScope = nockInstance
|
370
308
|
.get(cvIndexPath)
|
371
309
|
.query(true)
|
372
310
|
.reply(200, cvIndexData);
|
373
|
-
const searchResultScope = nockInstance
|
374
|
-
.get(cvIndexPath)
|
375
|
-
.query(matchQuery)
|
376
|
-
.reply(200, emptyResults);
|
377
311
|
|
378
|
-
const {
|
312
|
+
const {
|
313
|
+
getByLabelText,
|
314
|
+
getByText,
|
315
|
+
queryByText,
|
316
|
+
} = renderWithRedux(<ContentViewsPage />, renderOptions);
|
379
317
|
|
380
318
|
await patientlyWaitFor(() => expect(getByText(firstCV.name)).toBeInTheDocument());
|
381
319
|
|
382
|
-
|
320
|
+
getByLabelText('Search input').focus();
|
321
|
+
fireEvent.change(getByLabelText('Search input'), { target: { value: query } });
|
383
322
|
|
384
|
-
await patientlyWaitFor(() => expect(
|
323
|
+
await patientlyWaitFor(() => expect(queryByText(`${query} and`)).not.toBeInTheDocument());
|
385
324
|
|
386
325
|
assertNockRequest(autocompleteScope);
|
387
|
-
assertNockRequest(searchDelayScope);
|
388
|
-
assertNockRequest(autoSearchScope);
|
389
|
-
assertNockRequest(scopeBookmark);
|
390
326
|
assertNockRequest(initialScope);
|
391
|
-
assertNockRequest(withSearchScope);
|
392
|
-
assertNockRequest(searchResultScope, done);
|
327
|
+
assertNockRequest(withSearchScope, done);
|
393
328
|
});
|
394
329
|
|
395
330
|
test('Displays Create Content View and opens modal with Form', async () => {
|
@@ -9,7 +9,7 @@ const WizardHeader = ({
|
|
9
9
|
<Grid style={{ gridGap: '24px' }}>
|
10
10
|
{title &&
|
11
11
|
<TextContent>
|
12
|
-
<Text component={TextVariants.h2}>{title}</Text>
|
12
|
+
<Text ouiaId="wizard-header-text" component={TextVariants.h2}>{title}</Text>
|
13
13
|
</TextContent>}
|
14
14
|
{description &&
|
15
15
|
<TextContent>
|
@@ -70,7 +70,7 @@ const RelatedContentViewsModal = ({ cvName, cvId, relatedCVCount }) => {
|
|
70
70
|
ouiaId="related-content-view-components-table"
|
71
71
|
fetchItems={useCallback(params => getContentViewComponents(cvId, params, 'Added'), [cvId])}
|
72
72
|
variant={TableVariant.compact}
|
73
|
-
autocompleteEndpoint="/content_views
|
73
|
+
autocompleteEndpoint="/katello/api/v2/content_views"
|
74
74
|
emptyContentTitle={__('You currently don\'t have any related content views.')}
|
75
75
|
emptySearchTitle={__('No matching content views found')}
|
76
76
|
emptyContentBody={__('Related content views will appear here when created.')}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
3
3
|
|
4
|
-
import { nockInstance, assertNockRequest } from '../../../../test-utils/nockWrapper';
|
4
|
+
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../test-utils/nockWrapper';
|
5
5
|
import api from '../../../../services/api';
|
6
6
|
|
7
7
|
import RelatedContentViewComponentsModal from '../RelatedContentViewComponentsModal';
|
@@ -16,6 +16,12 @@ test('Can call API and show Related Content Views Components Modal', async (done
|
|
16
16
|
const relatedCvCount = 2;
|
17
17
|
const cvName = 'italiano';
|
18
18
|
const contentViewComponentsPath = api.getApiUrl(`/content_views/${cvId}/content_view_components/show_all`);
|
19
|
+
const autocompleteUrl = '/content_views/auto_complete_search';
|
20
|
+
const autocompleteQuery = {
|
21
|
+
organization_id: 1,
|
22
|
+
search: '',
|
23
|
+
};
|
24
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl, autocompleteQuery);
|
19
25
|
|
20
26
|
const scope = nockInstance
|
21
27
|
.get(contentViewComponentsPath)
|
@@ -32,6 +38,7 @@ test('Can call API and show Related Content Views Components Modal', async (done
|
|
32
38
|
fireEvent.click(getByLabelText(`button_${cvId}`));
|
33
39
|
await patientlyWaitFor(() => expect(getByText('Related content views')).toBeInTheDocument());
|
34
40
|
|
41
|
+
assertNockRequest(autocompleteScope);
|
35
42
|
assertNockRequest(scope, done);
|
36
43
|
});
|
37
44
|
|
@@ -32,14 +32,6 @@ class ModuleStreamsPage extends Component {
|
|
32
32
|
this.props.getModuleStreams({ search });
|
33
33
|
};
|
34
34
|
|
35
|
-
getAutoCompleteParams = search => ({
|
36
|
-
endpoint: '/module_streams/auto_complete_search',
|
37
|
-
params: {
|
38
|
-
organization_id: orgId(),
|
39
|
-
search,
|
40
|
-
},
|
41
|
-
});
|
42
|
-
|
43
35
|
updateSearchQuery = (searchQuery) => {
|
44
36
|
this.setState({ searchQuery });
|
45
37
|
};
|
@@ -52,7 +44,9 @@ class ModuleStreamsPage extends Component {
|
|
52
44
|
content={moduleStreams}
|
53
45
|
tableSchema={TableSchema}
|
54
46
|
onSearch={this.onSearch}
|
55
|
-
|
47
|
+
autocompleteEndpoint="/katello/api/v2/module_streams"
|
48
|
+
autocompleteQueryParams={{ organization_id: orgId() }}
|
49
|
+
bookmarkController="katello_module_streams"
|
56
50
|
updateSearchQuery={this.updateSearchQuery}
|
57
51
|
initialInputValue={this.state.searchQuery}
|
58
52
|
onPaginationChange={this.onPaginationChange}
|
@@ -2,8 +2,14 @@
|
|
2
2
|
|
3
3
|
exports[`Module streams page should render and contain appropiate components 1`] = `
|
4
4
|
<ContentPage
|
5
|
+
autocompleteEndpoint="/katello/api/v2/module_streams"
|
6
|
+
autocompleteQueryParams={
|
7
|
+
Object {
|
8
|
+
"organization_id": 1,
|
9
|
+
}
|
10
|
+
}
|
11
|
+
bookmarkController="katello_module_streams"
|
5
12
|
content={Object {}}
|
6
|
-
getAutoCompleteParams={[Function]}
|
7
13
|
header="Module Streams"
|
8
14
|
initialInputValue=""
|
9
15
|
onPaginationChange={[Function]}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import React, { Component } from 'react';
|
3
3
|
import { DropdownButton, MenuItem } from 'patternfly-react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
|
+
import SearchBar from 'foremanReact/components/SearchBar';
|
5
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
6
7
|
import '../index.scss';
|
7
|
-
import Search from '../../../components/Search/index';
|
8
8
|
import { orgId } from '../../../services/api';
|
9
9
|
|
10
10
|
class RepositorySearch extends Component {
|
@@ -29,7 +29,6 @@ class RepositorySearch extends Component {
|
|
29
29
|
];
|
30
30
|
this.state = { searchList: this.dropDownItems[0] };
|
31
31
|
this.onSearch = this.onSearch.bind(this);
|
32
|
-
this.getAutoCompleteParams = this.getAutoCompleteParams.bind(this);
|
33
32
|
}
|
34
33
|
|
35
34
|
onSearch(search) {
|
@@ -41,23 +40,24 @@ class RepositorySearch extends Component {
|
|
41
40
|
this.props.onSelectSearchList(searchList.key);
|
42
41
|
}
|
43
42
|
|
44
|
-
|
45
|
-
const params = {
|
46
|
-
organization_id: orgId(),
|
47
|
-
search,
|
48
|
-
};
|
43
|
+
getAutoCompleteEndpoint() {
|
49
44
|
let endpoint = '';
|
50
45
|
if (this.state.searchList.key === 'enabled') {
|
51
|
-
|
52
|
-
endpoint = '/repositories/auto_complete_search';
|
46
|
+
endpoint = '/katello/api/v2/repositories/auto_complete_search';
|
53
47
|
} else if (this.state.searchList.key === 'available') {
|
54
|
-
endpoint = '/repository_sets/auto_complete_search';
|
48
|
+
endpoint = '/katello/api/v2/repository_sets/auto_complete_search';
|
49
|
+
}
|
50
|
+
|
51
|
+
return endpoint;
|
52
|
+
}
|
53
|
+
|
54
|
+
autocompleteQueryParams() {
|
55
|
+
const params = { organization_id: orgId() };
|
56
|
+
if (this.state.searchList.key === 'enabled') {
|
57
|
+
params.enabled = true;
|
55
58
|
}
|
56
59
|
|
57
|
-
return
|
58
|
-
endpoint,
|
59
|
-
params,
|
60
|
-
};
|
60
|
+
return params;
|
61
61
|
}
|
62
62
|
|
63
63
|
render() {
|
@@ -77,9 +77,15 @@ class RepositorySearch extends Component {
|
|
77
77
|
</MenuItem>
|
78
78
|
))}
|
79
79
|
</DropdownButton>
|
80
|
-
<
|
80
|
+
<SearchBar
|
81
|
+
data={{
|
82
|
+
autocomplete: {
|
83
|
+
url: this.getAutoCompleteEndpoint(),
|
84
|
+
apiParams: this.autocompleteQueryParams(),
|
85
|
+
},
|
86
|
+
bookmarks: {},
|
87
|
+
}}
|
81
88
|
onSearch={this.onSearch}
|
82
|
-
getAutoCompleteParams={this.getAutoCompleteParams}
|
83
89
|
/>
|
84
90
|
</div>
|
85
91
|
);
|
@@ -21,16 +21,35 @@
|
|
21
21
|
}
|
22
22
|
.search-bar-row {
|
23
23
|
min-height: 26px;
|
24
|
-
margin-bottom:
|
24
|
+
margin-bottom: 20px;
|
25
25
|
|
26
26
|
.form-group {
|
27
27
|
box-sizing: border-box;
|
28
|
+
width: 50%;
|
29
|
+
|
30
|
+
div:first-child {
|
31
|
+
display: flex;
|
32
|
+
justify-content: space-between;
|
33
|
+
.foreman-search-bar {
|
34
|
+
flex-grow: 1;
|
35
|
+
margin-left: 0.7rem;
|
36
|
+
.pf-c-search-input {
|
37
|
+
width: 100%;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
28
41
|
|
29
42
|
&:first-child {
|
30
43
|
padding-left: 0;
|
31
44
|
}
|
32
45
|
}
|
46
|
+
|
47
|
+
.dropdown.btn-group {
|
48
|
+
margin-right: 0.6rem;
|
49
|
+
}
|
50
|
+
|
33
51
|
&.search-bar-selects-row {
|
52
|
+
width: 50%;
|
34
53
|
.form-group {
|
35
54
|
border: none;
|
36
55
|
|
@@ -138,7 +138,18 @@ const SmartProxyContentTable = ({ smartProxyId }) => {
|
|
138
138
|
|
139
139
|
|
140
140
|
return (
|
141
|
-
<MainTable
|
141
|
+
<MainTable
|
142
|
+
onCollapse={onCollapse(rows, setRows)}
|
143
|
+
ouiaId="smart-proxy-content-table"
|
144
|
+
status={status}
|
145
|
+
cells={columnHeaders}
|
146
|
+
rows={rows}
|
147
|
+
error={error}
|
148
|
+
emptyContentTitle="No content synced"
|
149
|
+
emptyContentBody="No content synced to smart proxy"
|
150
|
+
emptySearchTitle="Empty"
|
151
|
+
emptySearchBody="Empty"
|
152
|
+
/>
|
142
153
|
);
|
143
154
|
};
|
144
155
|
|
@@ -34,7 +34,7 @@ const CdnTypeForm = ({ typeChangeInProgress, onUpdate }) => {
|
|
34
34
|
return (
|
35
35
|
<Form isHorizontal>
|
36
36
|
<div id="update-hint-cdn" className="margin-top-16">
|
37
|
-
<Text>
|
37
|
+
<Text ouiaId="update-hint-cdn-text">
|
38
38
|
<FormattedMessage
|
39
39
|
id="cdn-configuration-type"
|
40
40
|
defaultMessage={__('Red Hat content will be consumed from the {type}.')}
|
@@ -62,7 +62,7 @@ const CustomCdnTypeForm = ({
|
|
62
62
|
return (
|
63
63
|
<Form isHorizontal>
|
64
64
|
<div id="update-hint-cdn" className="margin-top-16">
|
65
|
-
<Text>
|
65
|
+
<Text ouiaId="cdn-configuration-type-text">
|
66
66
|
<FormattedMessage
|
67
67
|
id="cdn-configuration-type"
|
68
68
|
defaultMessage={__('Red Hat content will be consumed from {type}.')}
|
@@ -162,14 +162,6 @@ class SubscriptionsPage extends Component {
|
|
162
162
|
this.props.loadSubscriptions({ search });
|
163
163
|
};
|
164
164
|
|
165
|
-
const getAutoCompleteParams = search => ({
|
166
|
-
endpoint: '/subscriptions/auto_complete_search',
|
167
|
-
params: {
|
168
|
-
organization_id: currentOrg,
|
169
|
-
search,
|
170
|
-
},
|
171
|
-
});
|
172
|
-
|
173
165
|
const onDeleteSubscriptions = (selectedRows) => {
|
174
166
|
this.props.deleteSubscriptions(selectedRows);
|
175
167
|
this.handleSelectedRowsChange([]);
|
@@ -209,14 +201,23 @@ class SubscriptionsPage extends Component {
|
|
209
201
|
loadTableColumns({ columns: getEnabledColumns(columns) });
|
210
202
|
};
|
211
203
|
const columns = subscriptions.selectedTableColumns;
|
212
|
-
const emptyStateData =
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
204
|
+
const emptyStateData = isManifestImported
|
205
|
+
? {
|
206
|
+
header: __('There are no Subscriptions to display'),
|
207
|
+
description: __('Add Subscriptions using the Add Subscriptions button.'),
|
208
|
+
action: {
|
209
|
+
title: __('Add subscriptions'),
|
210
|
+
url: 'subscriptions/add',
|
211
|
+
},
|
212
|
+
}
|
213
|
+
: {
|
214
|
+
header: __('There are no Subscriptions to display'),
|
215
|
+
description: __('Import a Manifest to manage your Entitlements.'),
|
216
|
+
action: {
|
217
|
+
onClick: () => openManageManifestModal(),
|
218
|
+
title: __('Import a Manifest'),
|
219
|
+
},
|
220
|
+
};
|
220
221
|
|
221
222
|
const SCAAlert = (
|
222
223
|
<Alert type={simpleContentAccess ? 'info' : 'warning'}>
|
@@ -230,7 +231,7 @@ class SubscriptionsPage extends Component {
|
|
230
231
|
defaultMessage={simpleContentAccess ? __(`This organization has Simple Content Access enabled.
|
231
232
|
Hosts are not required to have subscriptions attached to access repositories.
|
232
233
|
{br}
|
233
|
-
Learn more about your overall subscription usage with the {subscriptionsService}.`) : __('This organization is not using {scaLink}.
|
234
|
+
Learn more about your overall subscription usage with the {subscriptionsService}.`) : __('This organization is not using {scaLink}. Entitlement-based subscription management is deprecated and will be removed in a future version.')}
|
234
235
|
/>
|
235
236
|
</Alert>
|
236
237
|
);
|
@@ -248,7 +249,7 @@ class SubscriptionsPage extends Component {
|
|
248
249
|
disableDeleteButton={deleteButtonDisabled}
|
249
250
|
disableDeleteReason={this.getDisabledReason(true)}
|
250
251
|
disableAddButton={disableManifestActions}
|
251
|
-
|
252
|
+
autocompleteQueryParams={{ organization_id: currentOrg }}
|
252
253
|
updateSearchQuery={updateSearchQuery}
|
253
254
|
onDeleteButtonClick={openDeleteModal}
|
254
255
|
onSearch={onSearch}
|
@@ -272,7 +273,7 @@ class SubscriptionsPage extends Component {
|
|
272
273
|
/>
|
273
274
|
|
274
275
|
<div id="subscriptions-table" className="modal-container">
|
275
|
-
{
|
276
|
+
{!this.props.organization?.loading && SCAAlert}
|
276
277
|
<SubscriptionsTable
|
277
278
|
canManageSubscriptionAllocations={canManageSubscriptionAllocations}
|
278
279
|
loadSubscriptions={this.props.loadSubscriptions}
|
@@ -330,6 +331,7 @@ SubscriptionsPage.propTypes = {
|
|
330
331
|
}),
|
331
332
|
organization: PropTypes.shape({
|
332
333
|
id: PropTypes.number,
|
334
|
+
loading: PropTypes.bool,
|
333
335
|
owner_details: PropTypes.shape({
|
334
336
|
upstreamConsumer: PropTypes.shape({
|
335
337
|
name: PropTypes.string,
|