katello 4.7.6 → 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/api/v2/simple_content_access_controller.rb +1 -3
- 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/organization/simple_content_access/enable.rb +0 -10
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +2 -12
- 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/base_template_scope_extensions.rb +1 -1
- 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/product_content.rb +0 -4
- data/app/models/katello/repository.rb +11 -11
- data/app/models/katello/root_repository.rb +4 -3
- 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 -12
- 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/20220110223754_update_disconnected_settings.rb +4 -8
- 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/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +1 -1
- 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 +49 -146
- data/app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb +0 -36
- 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/content_overrides_migrator.rb +0 -98
- 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/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zanata.xml +0 -30
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentSearch.fixtures.json +0 -33
@@ -15,6 +15,7 @@ import {
|
|
15
15
|
useDispatch,
|
16
16
|
useSelector,
|
17
17
|
} from 'react-redux';
|
18
|
+
import { isEqual } from 'lodash';
|
18
19
|
|
19
20
|
import {
|
20
21
|
ActionList,
|
@@ -169,12 +170,12 @@ const RepositorySetsTab = () => {
|
|
169
170
|
organization_id: orgId,
|
170
171
|
} = hostDetails;
|
171
172
|
|
172
|
-
const organizationDetails = useSelector(state => selectOrganization(state, orgId));
|
173
|
-
const orgStatus = useSelector(state => selectOrganizationStatus(state, orgId));
|
174
|
-
|
175
173
|
const {
|
176
174
|
simple_content_access: simpleContentAccess,
|
177
|
-
} =
|
175
|
+
} = useSelector(state => selectOrganization(state, orgId));
|
176
|
+
const orgStatus = useSelector(state => selectOrganizationStatus(state, orgId));
|
177
|
+
const orgNotLoaded = orgStatus !== STATUS.RESOLVED;
|
178
|
+
|
178
179
|
const canDoContentOverrides = can(
|
179
180
|
editHosts,
|
180
181
|
userPermissionsFromHostDetails({ hostDetails }),
|
@@ -185,9 +186,11 @@ const RepositorySetsTab = () => {
|
|
185
186
|
const {
|
186
187
|
contentViewDefault,
|
187
188
|
lifecycleEnvironmentLibrary,
|
188
|
-
|
189
|
-
|
189
|
+
contentView,
|
190
|
+
lifecycleEnvironment,
|
190
191
|
} = contentFacet;
|
192
|
+
const { name: contentViewName } = contentView ?? {};
|
193
|
+
const { name: lifecycleEnvironmentName } = lifecycleEnvironment ?? {};
|
191
194
|
const nonLibraryHost = contentViewDefault === false ||
|
192
195
|
lifecycleEnvironmentLibrary === false;
|
193
196
|
const [isBulkActionOpen, setIsBulkActionOpen] = useState(false);
|
@@ -196,22 +199,24 @@ const RepositorySetsTab = () => {
|
|
196
199
|
const { searchParam, show, status: initialStatus } = useUrlParams();
|
197
200
|
|
198
201
|
const toggleGroupStates = ['noLimit', 'limitToEnvironment'];
|
199
|
-
const [
|
200
|
-
const defaultToggleGroupState = nonLibraryHost ?
|
202
|
+
const [SHOW_ALL, LIMIT_TO_ENVIRONMENT] = toggleGroupStates;
|
203
|
+
const defaultToggleGroupState = nonLibraryHost ? LIMIT_TO_ENVIRONMENT : SHOW_ALL;
|
204
|
+
const unfilteredToggleGroupState = SHOW_ALL;
|
201
205
|
const [toggleGroupState, setToggleGroupState] =
|
202
206
|
useState(show ?? defaultToggleGroupState);
|
203
207
|
const [statusSelected, setStatusSelected]
|
204
208
|
= useState(PARAM_TO_FRIENDLY_NAME[initialStatus] ?? STATUS_LABEL);
|
205
|
-
const activeFilters = [statusSelected
|
206
|
-
const defaultFilters = [STATUS_LABEL
|
209
|
+
const activeFilters = [statusSelected];
|
210
|
+
const defaultFilters = [STATUS_LABEL];
|
207
211
|
|
208
212
|
const [alertShowing, setAlertShowing] = useState(false);
|
213
|
+
|
209
214
|
const emptyContentTitle = __('No repository sets to show.');
|
210
|
-
const emptyContentBody =
|
215
|
+
const emptyContentBody = toggleGroupState === SHOW_ALL ?
|
216
|
+
__('Repository sets will appear here after enabling Red Hat repositories or creating custom products.') :
|
217
|
+
__('Repository sets will appear here when the host\'s content view and environment has available content.');
|
211
218
|
const emptySearchTitle = __('No matching repository sets found');
|
212
219
|
const emptySearchBody = __('Try changing your search query.');
|
213
|
-
const showPrimaryAction = true;
|
214
|
-
const showSecondaryAction = true;
|
215
220
|
const primaryActionTitle = __('Enable Red Hat repositories');
|
216
221
|
const secondaryActionTitle = __('Create a custom product');
|
217
222
|
const primaryActionLink = '/redhat_repositories';
|
@@ -246,26 +251,27 @@ const RepositorySetsTab = () => {
|
|
246
251
|
modifiedParams.status = STATUS_TO_PARAM[statusSelected];
|
247
252
|
}
|
248
253
|
return getHostRepositorySets({
|
249
|
-
content_access_mode_env: toggleGroupState ===
|
254
|
+
content_access_mode_env: toggleGroupState === LIMIT_TO_ENVIRONMENT,
|
250
255
|
content_access_mode_all: simpleContentAccess,
|
251
256
|
host_id: hostId,
|
252
257
|
...apiSortParams,
|
253
258
|
...modifiedParams,
|
254
259
|
});
|
255
260
|
},
|
256
|
-
[hostId, toggleGroupState,
|
261
|
+
[hostId, toggleGroupState, LIMIT_TO_ENVIRONMENT,
|
257
262
|
simpleContentAccess, apiSortParams, statusSelected, STATUS_LABEL],
|
258
263
|
);
|
259
264
|
|
260
265
|
useEffect(() => {
|
261
|
-
if (orgId &&
|
266
|
+
if (orgId && orgNotLoaded) {
|
262
267
|
dispatch(getOrganization({ orgId }));
|
263
268
|
}
|
264
|
-
}, [orgId,
|
269
|
+
}, [orgId, orgNotLoaded, dispatch]);
|
265
270
|
|
271
|
+
const status = useSelector(state => selectRepositorySetsStatus(state));
|
266
272
|
const response = useSelector(state => selectAPIResponse(state, REPOSITORY_SETS_KEY));
|
267
273
|
const { results, error: errorSearchBody, ...metadata } = response;
|
268
|
-
|
274
|
+
|
269
275
|
const repoSetSearchQuery = label => `cp_content_id = ${label}`;
|
270
276
|
const {
|
271
277
|
selectOne, isSelected, searchQuery, selectedCount, isSelectable,
|
@@ -278,9 +284,17 @@ const RepositorySetsTab = () => {
|
|
278
284
|
|
279
285
|
const hostDetailsStatus = useSelector(state => selectHostDetailsStatus(state));
|
280
286
|
|
287
|
+
// Ignore the toggle group when deciding if there is emptyContent. This will
|
288
|
+
// ensure the correct EmptyStateMessage
|
289
|
+
const isFiltering = activeFilters?.length &&
|
290
|
+
!isEqual(new Set(activeFilters), new Set(defaultFilters));
|
291
|
+
const emptyContent = (results && results.length === 0) && !searchQuery && !isFiltering;
|
292
|
+
const showPrimaryAction = (toggleGroupState === SHOW_ALL) && emptyContent;
|
293
|
+
const showSecondaryAction = showPrimaryAction;
|
294
|
+
|
281
295
|
const resetFilters = () => {
|
282
296
|
setStatusSelected(STATUS_LABEL);
|
283
|
-
setToggleGroupState(
|
297
|
+
if (emptyContent) setToggleGroupState(SHOW_ALL);
|
284
298
|
};
|
285
299
|
useEffect(() => {
|
286
300
|
// wait until host details are loaded to set alertShowing
|
@@ -289,7 +303,7 @@ const RepositorySetsTab = () => {
|
|
289
303
|
}
|
290
304
|
}, [hostDetailsStatus, nonLibraryHost]);
|
291
305
|
|
292
|
-
if (!hostId) return <Skeleton />;
|
306
|
+
if (!hostId || orgNotLoaded) return <Skeleton />;
|
293
307
|
const updateResults = newResponse => dispatch({
|
294
308
|
type: `${REPOSITORY_SETS_KEY}_SUCCESS`,
|
295
309
|
key: REPOSITORY_SETS_KEY,
|
@@ -396,15 +410,15 @@ const RepositorySetsTab = () => {
|
|
396
410
|
text={__('Show all')}
|
397
411
|
buttonId="no-limit-toggle"
|
398
412
|
aria-label="No limit"
|
399
|
-
isSelected={toggleGroupState ===
|
400
|
-
onChange={() => setToggleGroupState(
|
413
|
+
isSelected={toggleGroupState === SHOW_ALL}
|
414
|
+
onChange={() => setToggleGroupState(SHOW_ALL)}
|
401
415
|
/>
|
402
416
|
<ToggleGroupItem
|
403
417
|
text={__('Limit to environment')}
|
404
418
|
buttonId="limit-to-env-toggle"
|
405
419
|
aria-label="Limit to environment"
|
406
|
-
isSelected={toggleGroupState ===
|
407
|
-
onChange={() => setToggleGroupState(
|
420
|
+
isSelected={toggleGroupState === LIMIT_TO_ENVIRONMENT}
|
421
|
+
onChange={() => setToggleGroupState(LIMIT_TO_ENVIRONMENT)}
|
408
422
|
/>
|
409
423
|
</ToggleGroup>
|
410
424
|
</SplitItem>
|
@@ -443,11 +457,11 @@ const RepositorySetsTab = () => {
|
|
443
457
|
|
444
458
|
const hostEnvText = 'the "{contentViewName}" content view and "{lifecycleEnvironmentName}" environment';
|
445
459
|
|
446
|
-
const scaAlert = (toggleGroupState ===
|
460
|
+
const scaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
|
447
461
|
`Showing only repositories in ${hostEnvText}.` :
|
448
462
|
'Showing all available repositories.');
|
449
463
|
|
450
|
-
const nonScaAlert = (toggleGroupState ===
|
464
|
+
const nonScaAlert = (toggleGroupState === LIMIT_TO_ENVIRONMENT ?
|
451
465
|
`Showing repositories in ${hostEnvText} that are available through subscriptions.` :
|
452
466
|
'Showing all repositories available through subscriptions.');
|
453
467
|
|
@@ -518,13 +532,19 @@ const RepositorySetsTab = () => {
|
|
518
532
|
resetFilters,
|
519
533
|
}
|
520
534
|
}
|
535
|
+
alwaysHideToolbar={showPrimaryAction}
|
536
|
+
activeToggleState={toggleGroupState}
|
537
|
+
unfilteredToggleState={unfilteredToggleGroupState}
|
538
|
+
showSecondaryActionButton={toggleGroupState === LIMIT_TO_ENVIRONMENT}
|
539
|
+
secondaryActionTextOverride={__('Show all repository sets')}
|
540
|
+
emptyContentOverride={emptyContent}
|
521
541
|
ouiaId="host-repository-sets-table"
|
522
542
|
errorSearchTitle={errorSearchTitle}
|
523
543
|
errorSearchBody={errorSearchBody}
|
524
544
|
additionalListeners={[hostId, toggleGroupState, statusSelected,
|
525
545
|
activeSortColumn, activeSortDirection]}
|
526
546
|
fetchItems={fetchItems}
|
527
|
-
autocompleteEndpoint="/repository_sets
|
547
|
+
autocompleteEndpoint="/katello/api/v2/repository_sets"
|
528
548
|
bookmarkController="katello_product_contents" // Katello::ProductContent.table_name
|
529
549
|
readOnlyBookmarks={readOnlyBookmarks}
|
530
550
|
rowsCount={results?.length}
|
@@ -210,8 +210,7 @@ const TracesTab = () => {
|
|
210
210
|
metadata={meta}
|
211
211
|
bookmarkController="katello_host_tracers"
|
212
212
|
readOnlyBookmarks={readOnlyBookmarks}
|
213
|
-
autocompleteEndpoint={`/hosts/${hostId}/traces
|
214
|
-
foremanApiAutoComplete
|
213
|
+
autocompleteEndpoint={`/api/v2/hosts/${hostId}/traces`}
|
215
214
|
rowsCount={results?.length}
|
216
215
|
variant={TableVariant.compact}
|
217
216
|
additionalListeners={[activeSortColumn, activeSortDirection,
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { isEqual } from 'lodash';
|
3
3
|
import { renderWithRedux, patientlyWaitFor, within, fireEvent } from 'react-testing-lib-wrapper';
|
4
|
-
import { nockInstance, assertNockRequest, mockForemanAutocomplete
|
4
|
+
import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
|
5
5
|
import { foremanApi } from '../../../../../services/api';
|
6
6
|
import { HOST_ERRATA_KEY, ERRATA_SEARCH_QUERY } from '../ErrataTab/HostErrataConstants';
|
7
7
|
import { REX_FEATURES } from '../RemoteExecutionConstants';
|
8
8
|
import { ErrataTab } from '../ErrataTab/ErrataTab.js';
|
9
9
|
import mockErrataData from './errata.fixtures.json';
|
10
10
|
import mockResolveErrataTask from './resolveErrata.fixtures.json';
|
11
|
-
import mockBookmarkData from './bookmarks.fixtures.json';
|
12
11
|
|
13
12
|
jest.mock('../../hostDetailsHelpers', () => ({
|
14
13
|
...jest.requireActual('../../hostDetailsHelpers'),
|
@@ -39,8 +38,6 @@ const cfNoErrata = cfWithErrataTotal(0);
|
|
39
38
|
|
40
39
|
const hostName = 'foo.example.com';
|
41
40
|
|
42
|
-
const errataBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_errata');
|
43
|
-
|
44
41
|
const renderOptions = (facetAttributes = contentFacetAttributes) => ({
|
45
42
|
apiNamespace: HOST_ERRATA_KEY,
|
46
43
|
initialState: {
|
@@ -108,22 +105,10 @@ const applyByKatelloAgentUrl = foremanApi.getApiUrl('/hosts/1/errata/apply');
|
|
108
105
|
|
109
106
|
let firstErrata;
|
110
107
|
let thirdErrata;
|
111
|
-
let searchDelayScope;
|
112
|
-
let autoSearchScope;
|
113
|
-
let bookmarkScope;
|
114
108
|
|
115
109
|
beforeEach(() => {
|
116
110
|
const { results } = mockErrataData;
|
117
111
|
[firstErrata, , thirdErrata] = results;
|
118
|
-
bookmarkScope = nockInstance.get(errataBookmarks).reply(200, mockBookmarkData);
|
119
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
120
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
121
|
-
});
|
122
|
-
|
123
|
-
afterEach(() => {
|
124
|
-
assertNockRequest(searchDelayScope);
|
125
|
-
assertNockRequest(autoSearchScope);
|
126
|
-
assertNockRequest(bookmarkScope);
|
127
112
|
});
|
128
113
|
|
129
114
|
test('Can call API for errata and show on screen on page load', async (done) => {
|
@@ -163,7 +148,7 @@ test('Can handle no errata being present', async (done) => {
|
|
163
148
|
const { queryByText } = renderWithRedux(<ErrataTab />, renderOptions(cfNoErrata));
|
164
149
|
|
165
150
|
// Assert that there are not any errata showing on the screen.
|
166
|
-
await patientlyWaitFor(() => expect(queryByText('This host has errata that are applicable, but not installable.')).toBeInTheDocument());
|
151
|
+
await patientlyWaitFor(() => expect(queryByText('This host has errata that are applicable, but not installable. Adjust your filters and try again.')).toBeInTheDocument());
|
167
152
|
// Assert request was made and completed, see helper function
|
168
153
|
assertNockRequest(autocompleteScope);
|
169
154
|
assertNockRequest(scope, done); // Pass jest callback to confirm test is done
|
@@ -805,8 +790,6 @@ test('Can filter by errata type', async (done) => {
|
|
805
790
|
|
806
791
|
assertNockRequest(autocompleteScope);
|
807
792
|
assertNockRequest(scope);
|
808
|
-
assertNockRequest(searchDelayScope);
|
809
|
-
assertNockRequest(autoSearchScope);
|
810
793
|
assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
|
811
794
|
});
|
812
795
|
|
@@ -853,8 +836,6 @@ test('Can filter by severity', async (done) => {
|
|
853
836
|
|
854
837
|
assertNockRequest(autocompleteScope);
|
855
838
|
assertNockRequest(scope);
|
856
|
-
assertNockRequest(searchDelayScope);
|
857
|
-
assertNockRequest(autoSearchScope);
|
858
839
|
assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
|
859
840
|
});
|
860
841
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { act } from 'react-test-renderer';
|
3
3
|
import { renderWithRedux, patientlyWaitFor, within, fireEvent } from 'react-testing-lib-wrapper';
|
4
|
-
import { nockInstance, assertNockRequest, mockForemanAutocomplete
|
4
|
+
import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
|
5
5
|
import { ModuleStreamsTab } from '../ModuleStreamsTab/ModuleStreamsTab.js';
|
6
6
|
import mockModuleStreams from './moduleStreams.fixtures.json';
|
7
|
-
import mockBookmarkData from './bookmarks.fixtures.json';
|
8
7
|
import { MODULE_STREAMS_KEY } from '../../../../../scenes/ModuleStreams/ModuleStreamsConstants';
|
9
8
|
import { foremanApi } from '../../../../../services/api';
|
10
9
|
|
@@ -15,8 +14,6 @@ jest.mock('../../hostDetailsHelpers', () => ({
|
|
15
14
|
}),
|
16
15
|
}));
|
17
16
|
|
18
|
-
const moduleBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_available_module_streams');
|
19
|
-
|
20
17
|
const contentFacetAttributes = {
|
21
18
|
id: 11,
|
22
19
|
uuid: 'e5761ea3-4117-4ecf-83d0-b694f99b389e',
|
@@ -44,34 +41,10 @@ const hostModuleStreams = foremanApi.getApiUrl('/hosts/1/module_streams');
|
|
44
41
|
const autocompleteUrl = '/hosts/1/module_streams/auto_complete_search';
|
45
42
|
|
46
43
|
let firstModuleStreams;
|
47
|
-
let searchDelayScope;
|
48
|
-
let autoSearchScope;
|
49
|
-
let bookmarkScope;
|
50
|
-
|
51
|
-
beforeEach(() => {
|
52
|
-
const { results } = mockModuleStreams;
|
53
|
-
[firstModuleStreams] = results;
|
54
|
-
bookmarkScope = nockInstance.get(moduleBookmarks).reply(200, mockBookmarkData);
|
55
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
56
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
57
|
-
});
|
58
|
-
|
59
|
-
afterEach(() => {
|
60
|
-
assertNockRequest(searchDelayScope);
|
61
|
-
assertNockRequest(autoSearchScope);
|
62
|
-
assertNockRequest(bookmarkScope);
|
63
|
-
});
|
64
44
|
|
65
45
|
beforeEach(() => {
|
66
46
|
const { results } = mockModuleStreams;
|
67
47
|
[firstModuleStreams] = results;
|
68
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
69
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
70
|
-
});
|
71
|
-
|
72
|
-
afterEach(() => {
|
73
|
-
assertNockRequest(searchDelayScope);
|
74
|
-
assertNockRequest(autoSearchScope);
|
75
48
|
});
|
76
49
|
|
77
50
|
test('Can call API for Module streams and show on screen on page load', async (done) => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent, within } from 'react-testing-lib-wrapper';
|
3
|
-
import { nockInstance, assertNockRequest, mockForemanAutocomplete
|
3
|
+
import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
|
4
4
|
import katelloApi, { foremanApi } from '../../../../../services/api';
|
5
5
|
import mockPackagesData from './yumInstallablePackages.fixtures.json';
|
6
6
|
import PackageInstallModal from '../PackagesTab/PackageInstallModal';
|
@@ -54,19 +54,10 @@ const defaultQuery = {
|
|
54
54
|
|
55
55
|
let firstPackages;
|
56
56
|
let secondPackages;
|
57
|
-
let searchDelayScope;
|
58
|
-
let autoSearchScope;
|
59
57
|
|
60
58
|
beforeEach(() => {
|
61
59
|
const { results } = mockPackagesData;
|
62
60
|
[firstPackages, secondPackages] = results;
|
63
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 500);
|
64
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing', true);
|
65
|
-
});
|
66
|
-
|
67
|
-
afterEach(() => {
|
68
|
-
assertNockRequest(searchDelayScope);
|
69
|
-
assertNockRequest(autoSearchScope);
|
70
61
|
});
|
71
62
|
|
72
63
|
test('Can call API for installable packages and show on screen on page load', async (done) => {
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
3
|
-
import { nockInstance, assertNockRequest, mockForemanAutocomplete
|
3
|
+
import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
|
4
4
|
import { foremanApi } from '../../../../../services/api';
|
5
5
|
import { HOST_PACKAGES_KEY, PACKAGES_SEARCH_QUERY, SELECTED_UPDATE_VERSIONS } from '../PackagesTab/HostPackagesConstants';
|
6
6
|
import { PackagesTab } from '../PackagesTab/PackagesTab.js';
|
7
7
|
import mockPackagesData from './packages.fixtures.json';
|
8
8
|
import { REX_FEATURES } from '../RemoteExecutionConstants';
|
9
9
|
import * as hooks from '../../../../Table/TableHooks';
|
10
|
-
import mockBookmarkData from './bookmarks.fixtures.json';
|
11
10
|
|
12
11
|
jest.mock('../../hostDetailsHelpers', () => ({
|
13
12
|
...jest.requireActual('../../hostDetailsHelpers'),
|
@@ -25,8 +24,6 @@ const contentFacetAttributes = {
|
|
25
24
|
};
|
26
25
|
|
27
26
|
const hostname = 'test-host.example.com';
|
28
|
-
const packageBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_installed_packages');
|
29
|
-
|
30
27
|
const renderOptions = (facetAttributes = contentFacetAttributes) => ({
|
31
28
|
apiNamespace: HOST_PACKAGES_KEY,
|
32
29
|
initialState: {
|
@@ -61,22 +58,10 @@ const defaultQuery = { ...defaultQueryWithoutSearch, search: '' };
|
|
61
58
|
|
62
59
|
let firstPackage;
|
63
60
|
let secondPackage;
|
64
|
-
let searchDelayScope;
|
65
|
-
let autoSearchScope;
|
66
|
-
let bookmarkScope;
|
67
61
|
|
68
62
|
beforeEach(() => {
|
69
63
|
const { results } = mockPackagesData;
|
70
64
|
[firstPackage, secondPackage] = results;
|
71
|
-
bookmarkScope = nockInstance.get(packageBookmarks).reply(200, mockBookmarkData);
|
72
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
73
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
74
|
-
});
|
75
|
-
|
76
|
-
afterEach(() => {
|
77
|
-
assertNockRequest(searchDelayScope);
|
78
|
-
assertNockRequest(autoSearchScope);
|
79
|
-
assertNockRequest(bookmarkScope);
|
80
65
|
});
|
81
66
|
|
82
67
|
test('Can call API for packages and show on screen on page load', async (done) => {
|
@@ -159,8 +144,6 @@ test('Can filter by package status', async (done) => {
|
|
159
144
|
|
160
145
|
assertNockRequest(autocompleteScope);
|
161
146
|
assertNockRequest(scope);
|
162
|
-
assertNockRequest(searchDelayScope);
|
163
|
-
assertNockRequest(autoSearchScope);
|
164
147
|
assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
|
165
148
|
});
|
166
149
|
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, within, fireEvent } from 'react-testing-lib-wrapper';
|
3
|
-
import { nockInstance, assertNockRequest, mockAutocomplete
|
3
|
+
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../test-utils/nockWrapper';
|
4
4
|
import katelloApi, { foremanApi } from '../../../../../services/api';
|
5
5
|
import { REPOSITORY_SETS_KEY } from '../RepositorySetsTab/RepositorySetsConstants';
|
6
6
|
import RepositorySetsTab from '../RepositorySetsTab/RepositorySetsTab';
|
7
7
|
import mockRepoSetData from './repositorySets.fixtures.json';
|
8
|
-
import mockBookmarkData from './bookmarks.fixtures.json';
|
9
8
|
import mockContentOverride from './contentOverrides.fixtures.json';
|
10
9
|
|
11
10
|
jest.mock('../../hostDetailsHelpers', () => ({
|
@@ -50,7 +49,6 @@ const renderOptions = (facetAttributes = contentFacetAttributes) => ({
|
|
50
49
|
|
51
50
|
const hostRepositorySets = katelloApi.getApiUrl('/repository_sets');
|
52
51
|
const autocompleteUrl = '/repository_sets/auto_complete_search';
|
53
|
-
const repositorySetBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_product_contents');
|
54
52
|
const contentOverride = foremanApi.getApiUrl('/hosts/1/subscriptions/content_override');
|
55
53
|
|
56
54
|
const limitToEnvQuery = {
|
@@ -70,23 +68,11 @@ const showAllQuery = {
|
|
70
68
|
|
71
69
|
let firstRepoSet;
|
72
70
|
let secondRepoSet;
|
73
|
-
let searchDelayScope;
|
74
|
-
let autoSearchScope;
|
75
|
-
let bookmarkScope;
|
76
71
|
|
77
72
|
beforeEach(() => {
|
78
73
|
// jest.resetModules();
|
79
74
|
const { results } = mockRepoSetData;
|
80
75
|
[firstRepoSet, secondRepoSet] = results;
|
81
|
-
bookmarkScope = nockInstance.get(repositorySetBookmarks).reply(200, mockBookmarkData);
|
82
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
83
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
84
|
-
});
|
85
|
-
|
86
|
-
afterEach(() => {
|
87
|
-
assertNockRequest(searchDelayScope);
|
88
|
-
assertNockRequest(autoSearchScope);
|
89
|
-
assertNockRequest(bookmarkScope);
|
90
76
|
});
|
91
77
|
|
92
78
|
test('Can call API for repository sets and show basic table', async (done) => {
|
@@ -415,8 +401,6 @@ test('Can filter by status', async (done) => {
|
|
415
401
|
});
|
416
402
|
assertNockRequest(autocompleteScope);
|
417
403
|
assertNockRequest(scope);
|
418
|
-
assertNockRequest(searchDelayScope);
|
419
|
-
assertNockRequest(autoSearchScope);
|
420
404
|
assertNockRequest(scope2, done); // Pass jest callback to confirm test is done
|
421
405
|
});
|
422
406
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, waitFor, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
|
3
|
-
import { nockInstance, assertNockRequest, mockForemanAutocomplete
|
3
|
+
import { nockInstance, assertNockRequest, mockForemanAutocomplete } from '../../../../../test-utils/nockWrapper';
|
4
4
|
import { foremanApi } from '../../../../../services/api';
|
5
5
|
import { REX_FEATURES } from '../RemoteExecutionConstants';
|
6
6
|
import { HOST_TRACES_KEY, TRACES_SEARCH_QUERY } from '../TracesTab/HostTracesConstants';
|
@@ -9,10 +9,8 @@ import mockTraceData from './traces.fixtures.json';
|
|
9
9
|
import mockResolveTraceTask from './resolveTraces.fixtures.json';
|
10
10
|
import emptyTraceResults from './tracerEmptyTraceResults.fixtures.json';
|
11
11
|
import mockJobInvocationStatus from './tracerEnableJobInvocation.fixtures.json';
|
12
|
-
import mockBookmarkData from './bookmarks.fixtures.json';
|
13
12
|
|
14
13
|
const hostName = 'client.example.com';
|
15
|
-
const tracesBookmarks = foremanApi.getApiUrl('/bookmarks?search=controller%3Dkatello_host_tracers');
|
16
14
|
|
17
15
|
jest.mock('../../hostDetailsHelpers', () => ({
|
18
16
|
...jest.requireActual('../../hostDetailsHelpers'),
|
@@ -57,23 +55,11 @@ const autocompleteUrl = '/hosts/1/traces/auto_complete_search';
|
|
57
55
|
const jobInvocations = foremanApi.getApiUrl('/job_invocations');
|
58
56
|
|
59
57
|
let firstTrace;
|
60
|
-
let searchDelayScope;
|
61
|
-
let autoSearchScope;
|
62
|
-
let bookmarkScope;
|
63
58
|
|
64
59
|
describe('With tracer installed', () => {
|
65
60
|
beforeEach(() => {
|
66
61
|
const { results } = mockTraceData;
|
67
62
|
[firstTrace] = results;
|
68
|
-
bookmarkScope = nockInstance.get(tracesBookmarks).reply(200, mockBookmarkData);
|
69
|
-
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 0);
|
70
|
-
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing');
|
71
|
-
});
|
72
|
-
|
73
|
-
afterEach(() => {
|
74
|
-
assertNockRequest(searchDelayScope);
|
75
|
-
assertNockRequest(autoSearchScope);
|
76
|
-
assertNockRequest(bookmarkScope);
|
77
63
|
});
|
78
64
|
|
79
65
|
test('Can call API for traces and show on screen on page load', async (done) => {
|
@@ -16,7 +16,7 @@ global.console.error = (error, stack) => {
|
|
16
16
|
// 'The prop `ouiaId` is marked as required in `Modal`, but its value is `undefined`',
|
17
17
|
// 'created by WizardHeader', 'created by Navigation',
|
18
18
|
// 'created by ActionsColumn', 'created by InactiveText', 'created by Select',
|
19
|
-
// 'created by Context.Consumer'];
|
19
|
+
// 'created by Context.Consumer', 'created by DualListSelector'];
|
20
20
|
|
21
21
|
/* eslint-disable-next-line no-console */
|
22
22
|
if (stack) console.log(stack); // Prints out original stack trace
|
@@ -51,6 +51,11 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
51
51
|
[dispatch],
|
52
52
|
);
|
53
53
|
|
54
|
+
const subPathValidated = areSubPathsValid(subpaths) ? 'default' : 'error';
|
55
|
+
const urlValidated = (url === '' || isValidUrl(url, acsType)) ? 'default' : 'error';
|
56
|
+
|
57
|
+
const urlAndPathsValid = () => url !== '' && urlValidated !== 'error' && subPathValidated !== 'error';
|
58
|
+
|
54
59
|
const credentialsFilled = () => {
|
55
60
|
if (authentication === 'manual') {
|
56
61
|
return username !== '';
|
@@ -58,9 +63,6 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
58
63
|
return true;
|
59
64
|
};
|
60
65
|
|
61
|
-
const subPathValidated = areSubPathsValid(subpaths) ? 'default' : 'error';
|
62
|
-
const urlValidated = (url === '' || isValidUrl(url)) ? 'default' : 'error';
|
63
|
-
|
64
66
|
const sourceTypeStep = {
|
65
67
|
id: 1,
|
66
68
|
name: __('Select source type'),
|
@@ -88,7 +90,7 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
88
90
|
id: 4,
|
89
91
|
name: __('Select products'),
|
90
92
|
component: <ACSProducts />,
|
91
|
-
canJumpTo: smartProxies.length,
|
93
|
+
canJumpTo: smartProxies.length && name !== '',
|
92
94
|
enableNext: productIds.length,
|
93
95
|
};
|
94
96
|
|
@@ -96,16 +98,16 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
96
98
|
id: 5,
|
97
99
|
name: __('URL and paths'),
|
98
100
|
component: <AcsUrlPaths />,
|
99
|
-
canJumpTo: (acsType === 'custom' || acsType === 'rhui') && (smartProxies.length),
|
100
|
-
enableNext:
|
101
|
+
canJumpTo: (acsType === 'custom' || acsType === 'rhui') && (smartProxies.length) && name !== '',
|
102
|
+
enableNext: urlAndPathsValid(),
|
101
103
|
};
|
102
104
|
|
103
105
|
const credentialsStep = {
|
104
106
|
id: 6,
|
105
107
|
name: __('Credentials'),
|
106
108
|
component: <ACSCredentials />,
|
107
|
-
canJumpTo:
|
108
|
-
enableNext: (
|
109
|
+
canJumpTo: urlAndPathsValid() && (smartProxies.length) && name !== '',
|
110
|
+
enableNext: (urlAndPathsValid() || productIds.length) && smartProxies.length && name !== '' && acsType && contentType && credentialsFilled(),
|
109
111
|
};
|
110
112
|
|
111
113
|
const reviewStep = {
|
@@ -113,8 +115,8 @@ const ACSCreateWizard = ({ show, setIsOpen }) => {
|
|
113
115
|
name: __('Review details'),
|
114
116
|
component: <ACSReview />,
|
115
117
|
nextButtonText: __('Add'),
|
116
|
-
canJumpTo: (
|
117
|
-
enableNext: (
|
118
|
+
canJumpTo: (urlAndPathsValid() || productIds.length) && smartProxies.length && name !== '' && acsType && contentType && credentialsFilled(),
|
119
|
+
enableNext: (urlAndPathsValid() || productIds.length) && smartProxies.length && name !== '' && acsType && contentType,
|
118
120
|
};
|
119
121
|
|
120
122
|
const finishStep = {
|
@@ -47,6 +47,7 @@ const ACSCredentials = () => {
|
|
47
47
|
<Radio
|
48
48
|
label={__('Manual authentication')}
|
49
49
|
id="manual_auth"
|
50
|
+
ouiaId="manual_auth"
|
50
51
|
name="manual_auth"
|
51
52
|
aria-label="manual_auth"
|
52
53
|
isChecked={authentication === 'manual'}
|
@@ -71,6 +72,7 @@ const ACSCredentials = () => {
|
|
71
72
|
isRequired
|
72
73
|
type="text"
|
73
74
|
id="acs_username_field"
|
75
|
+
ouiaId="acs_username_field"
|
74
76
|
name="acs_username_field"
|
75
77
|
aria-label="acs_username_field"
|
76
78
|
value={username}
|
@@ -87,6 +89,7 @@ const ACSCredentials = () => {
|
|
87
89
|
isRequired
|
88
90
|
type="password"
|
89
91
|
id="acs_password_field"
|
92
|
+
ouiaId="acs_password_field"
|
90
93
|
name="acs_password_field"
|
91
94
|
aria-label="acs_password_field"
|
92
95
|
value={password}
|
@@ -98,6 +101,7 @@ const ACSCredentials = () => {
|
|
98
101
|
<Radio
|
99
102
|
label={__('Content credentials')}
|
100
103
|
id="content_credentials"
|
104
|
+
ouiaId="content_credentials"
|
101
105
|
aria-label="content_credentials"
|
102
106
|
name="content_cred_auth"
|
103
107
|
isChecked={authentication === 'content_credentials'}
|
@@ -163,6 +167,7 @@ const ACSCredentials = () => {
|
|
163
167
|
label={__('None')}
|
164
168
|
id="none"
|
165
169
|
name="none"
|
170
|
+
ouiaId="none"
|
166
171
|
aria-label="none"
|
167
172
|
isChecked={authentication === ''}
|
168
173
|
onChange={() => {
|
@@ -178,6 +183,7 @@ const ACSCredentials = () => {
|
|
178
183
|
<FormGroup label={__('Verify SSL')} fieldId="verify_ssl">
|
179
184
|
<Switch
|
180
185
|
id="verify-ssl-switch"
|
186
|
+
ouiaId="verify-ssl-switch"
|
181
187
|
aria-label="verify-ssl-switch"
|
182
188
|
isChecked={verifySSL}
|
183
189
|
onChange={checked => setVerifySSL(checked)}
|