katello 4.6.2.1 → 4.7.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/assets/javascripts/katello/common/vendor.js +0 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +4 -4
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +5 -0
- data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +78 -12
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +7 -1
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -9
- data/app/helpers/katello/content_source_helper.rb +9 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +31 -0
- data/app/lib/actions/katello/activation_key/destroy.rb +1 -0
- data/app/lib/actions/katello/agent_action.rb +1 -0
- data/app/lib/actions/katello/alternate_content_source/create.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +2 -2
- data/app/lib/actions/katello/capsule_content/sync.rb +10 -2
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/promote.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +5 -2
- data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +7 -3
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +4 -2
- data/app/lib/actions/katello/content_view_version/import.rb +22 -10
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/errata_mail.rb +9 -6
- data/app/lib/actions/katello/repository/refresh_repository.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +13 -6
- data/app/lib/actions/katello/repository_set/enable_repository.rb +6 -2
- data/app/lib/actions/pulp3/alternate_content_source/refresh_remote.rb +16 -0
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +1 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +10 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
- data/app/lib/katello/errors.rb +2 -2
- data/app/lib/katello/resources/candlepin.rb +7 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -13
- data/app/lib/katello/resources/cdn.rb +14 -9
- data/app/lib/katello/util/candlepin_repository_checker.rb +73 -0
- data/app/models/katello/activation_key.rb +12 -1
- data/app/models/katello/alternate_content_source.rb +15 -4
- data/app/models/katello/alternate_content_source_product.rb +1 -1
- data/app/models/katello/authorization/repository.rb +2 -2
- data/app/models/katello/cdn_configuration.rb +12 -3
- data/app/models/katello/concerns/host_managed_extensions.rb +15 -2
- data/app/models/katello/concerns/http_proxy_extensions.rb +5 -10
- data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -15
- data/app/models/katello/content.rb +15 -0
- data/app/models/katello/content_credential.rb +8 -9
- data/app/models/katello/content_view.rb +7 -3
- data/app/models/katello/content_view_component.rb +4 -0
- data/app/models/katello/content_view_version.rb +1 -1
- data/app/models/katello/erratum.rb +6 -2
- data/app/models/katello/host/content_facet.rb +13 -3
- data/app/models/katello/repository.rb +15 -1
- data/app/models/katello/root_repository.rb +0 -2
- data/app/overrides/add_smart_proxy_form.rb +5 -0
- data/app/presenters/katello/content_view_version_compare_presenter.rb +5 -0
- data/app/presenters/katello/host_package_presenter.rb +4 -4
- data/app/services/katello/pulp3/alternate_content_source.rb +23 -15
- data/app/services/katello/pulp3/ansible_collection.rb +7 -10
- data/app/services/katello/pulp3/content_view_version/export.rb +19 -6
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +21 -5
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +11 -1
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +38 -9
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +12 -5
- data/app/services/katello/pulp3/content_view_version/metadata_map.rb +13 -2
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +5 -1
- data/app/services/katello/pulp3/pulp_content_unit.rb +3 -0
- data/app/services/katello/pulp3/repository.rb +18 -6
- data/app/services/katello/pulp3/repository_mirror.rb +0 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
- data/app/services/katello/pulp3/task_group.rb +18 -1
- data/app/services/katello/repository_type.rb +5 -2
- data/app/services/katello/repository_type_manager.rb +4 -3
- data/app/views/dashboard/_content_views_widget.html.erb +1 -1
- data/app/views/foreman/job_templates/change_content_source.erb +6 -0
- data/app/views/foreman/job_templates/update_packages_by_search_query.erb +7 -1
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +4 -4
- data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +1 -0
- data/app/views/katello/api/v2/alternate_content_sources/permissions.rabl +11 -0
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +12 -0
- data/app/views/katello/api/v2/content_views/permissions.rabl +1 -0
- data/app/views/katello/api/v2/host_packages/base.json.rabl +1 -1
- data/app/views/katello/api/v2/module_streams/show.json.rabl +7 -0
- data/app/views/katello/api/v2/repositories/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
- data/app/views/katello/hosts/_errata_counts.html.erb +46 -0
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
- data/app/views/overrides/smart_proxies/_acs_http_proxy.html.erb +6 -0
- data/config/initializers/monkeys.rb +1 -0
- data/config/routes/api/v2.rb +2 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20220730033504_update_custom_cdn.rb +13 -0
- data/db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb +7 -0
- data/db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb +6 -0
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-acs.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +14 -1392
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
- data/lib/katello/permission_creator.rb +1 -0
- data/lib/katello/plugin.rb +34 -11
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/python.rb +3 -3
- data/lib/katello/tasks/check_candlepin_content.rake +16 -0
- data/lib/katello/tasks/reset.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/try_pulp_container_path.rb +35 -0
- data/locale/action_names.rb +7 -7
- data/locale/bn/katello.po +395 -63
- data/locale/cs/katello.po +396 -64
- data/locale/de/katello.po +399 -67
- data/locale/en/katello.po +395 -63
- data/locale/es/katello.po +399 -67
- data/locale/fr/katello.po +400 -68
- data/locale/gu/katello.po +395 -63
- data/locale/hi/katello.po +395 -63
- data/locale/it/katello.po +396 -64
- data/locale/ja/katello.po +400 -68
- data/locale/katello.pot +1916 -1213
- data/locale/kn/katello.po +395 -63
- data/locale/ko/katello.po +396 -64
- data/locale/mr/katello.po +395 -63
- data/locale/or/katello.po +395 -63
- data/locale/pa/katello.po +395 -63
- data/locale/pt/katello.po +395 -63
- data/locale/pt_BR/katello.po +399 -67
- data/locale/ru/katello.po +396 -64
- data/locale/ta/katello.po +395 -63
- data/locale/te/katello.po +395 -63
- data/locale/zh_CN/katello.po +400 -68
- data/locale/zh_TW/katello.po +396 -64
- data/webpack/components/Bookmark/index.js +5 -1
- data/webpack/components/Content/Details/ContentDetails.js +1 -1
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +6 -0
- data/webpack/components/EditableSwitch.js +1 -0
- data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
- data/webpack/components/Errata/errataHelpers.js +33 -0
- data/webpack/components/Errata/index.js +45 -12
- data/webpack/components/Loading.js +18 -8
- data/webpack/components/Packages/index.js +8 -24
- data/webpack/components/RoutedTabs/index.js +1 -0
- data/webpack/components/Search/Search.js +20 -2
- data/webpack/components/Search/__tests__/search.test.js +3 -3
- data/webpack/components/Table/EmptyStateMessage.js +1 -1
- data/webpack/components/Table/PageControls.js +1 -0
- data/webpack/components/Table/TableHooks.js +4 -0
- data/webpack/components/Table/TableWrapper.js +7 -7
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +2 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +3 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +2 -1
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +124 -68
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +5 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +30 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.scss +23 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +5 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +25 -10
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -3
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +145 -32
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +3 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +78 -26
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -10
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +9 -4
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +141 -23
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.scss +6 -1
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +9 -8
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +24 -3
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +20 -4
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +56 -38
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +3 -3
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +5 -4
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +3 -3
- data/webpack/containers/Application/config.js +2 -2
- data/webpack/containers/Application/overrides.scss +12 -0
- data/webpack/global_test_setup.js +19 -1
- data/webpack/ouia_id_check.js +0 -2
- data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -8
- data/webpack/scenes/AlternateContentSources/ACSActions.js +37 -6
- data/webpack/scenes/AlternateContentSources/ACSConstants.js +2 -0
- data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +1 -1
- data/webpack/scenes/AlternateContentSources/ACSSelectors.js +6 -6
- data/webpack/scenes/AlternateContentSources/Acs.scss +3 -0
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +24 -3
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +10 -8
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +25 -4
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +22 -11
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +27 -2
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +49 -17
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +76 -23
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +159 -11
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +83 -29
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -8
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +39 -7
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +27 -11
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +58 -55
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +35 -32
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +323 -150
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +5 -1
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +10 -11
- data/webpack/scenes/AlternateContentSources/helpers.js +26 -0
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +1 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +1 -1
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -5
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +30 -7
- data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +21 -6
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +3 -3
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/__tests__/CvData.fixtures.json +2 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +14 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +11 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +5 -0
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositorySelection.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +22 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +19 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -2
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +9 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +83 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +32 -8
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +56 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/cvCompareRepositories.fixtures.json +175 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +6 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +4 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +5 -4
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +5 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -3
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +10 -5
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +2 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +81 -19
- data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +1 -1
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
- data/webpack/scenes/ContentViews/components/InactiveText.js +9 -1
- data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +4 -2
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +3 -2
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +18 -11
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +15 -8
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -4
- data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +55 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +59 -0
- data/webpack/scenes/Hosts/ChangeContentSource/constants.js +1 -0
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -5
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +46 -41
- data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +5 -5
- data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +10 -1
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -1
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +97 -2
- data/webpack/scenes/Organizations/OrganizationSelectors.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +2 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +10 -25
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +154 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/ExportSyncForm.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +59 -44
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js +3 -28
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js +97 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +23 -10
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +5 -5
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +3 -3
- data/webpack/scenes/Tasks/helpers.js +14 -7
- metadata +54 -35
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +0 -18
- data/db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb +0 -5
- data/vendor/assets/javascripts/katello/jquery.trunk8.js +0 -203
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState
|
1
|
+
import React, { useState } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
@@ -16,12 +16,13 @@ import {
|
|
16
16
|
} from '@patternfly/react-core';
|
17
17
|
|
18
18
|
import { translate as __ } from 'foremanReact/common/I18n';
|
19
|
-
import { noop } from 'foremanReact/common/helpers';
|
19
|
+
import { noop, propsToCamelCase } from 'foremanReact/common/helpers';
|
20
20
|
|
21
21
|
import { NETWORK_SYNC, DEFAULT_CONTENT_VIEW_LABEL, DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL, DEFAULT_ORGANIZATION_LABEL } from './CdnConfigurationConstants';
|
22
22
|
import EditableTextInput from '../../../../components/EditableTextInput';
|
23
23
|
|
24
24
|
import {
|
25
|
+
selectOrgLoading,
|
25
26
|
selectUpdatingCdnConfiguration,
|
26
27
|
} from '../../../Organizations/OrganizationSelectors';
|
27
28
|
|
@@ -29,39 +30,30 @@ import { updateCdnConfiguration } from '../../../Organizations/OrganizationActio
|
|
29
30
|
import './CdnConfigurationForm.scss';
|
30
31
|
|
31
32
|
const NetworkSyncForm = ({
|
32
|
-
|
33
|
+
typeChangeInProgress, contentCredentials, cdnConfiguration, onUpdate,
|
33
34
|
}) => {
|
34
35
|
const dispatch = useDispatch();
|
35
|
-
const
|
36
|
+
const cdnConfigurationObject = propsToCamelCase(cdnConfiguration);
|
37
|
+
const urlValue = cdnConfigurationObject.type === NETWORK_SYNC ? cdnConfigurationObject.url : '';
|
36
38
|
const [url, setUrl] = useState(urlValue);
|
37
|
-
const [username, setUsername] = useState(
|
39
|
+
const [username, setUsername] = useState(cdnConfigurationObject.username);
|
38
40
|
const [password, setPassword] = useState(null);
|
39
|
-
const [
|
40
|
-
useState(
|
41
|
-
const [sslCaCredentialId, setSslCaCredentialId] =
|
42
|
-
|
41
|
+
const [upstreamOrganizationLabel, setUpstreamOrganizationLabel] =
|
42
|
+
useState(cdnConfigurationObject.upstreamOrganizationLabel || DEFAULT_ORGANIZATION_LABEL);
|
43
|
+
const [sslCaCredentialId, setSslCaCredentialId] =
|
44
|
+
useState(cdnConfigurationObject.sslCaCredentialId);
|
45
|
+
const updatingCdnConfiguration =
|
46
|
+
useSelector(state => selectUpdatingCdnConfiguration(state));
|
47
|
+
const orgIsLoading = useSelector(state => selectOrgLoading(state));
|
43
48
|
|
44
|
-
const [
|
45
|
-
useState(
|
49
|
+
const [upstreamContentViewLabel, setUpstreamContentViewLabel] =
|
50
|
+
useState(cdnConfigurationObject.upstreamContentViewLabel ||
|
46
51
|
DEFAULT_CONTENT_VIEW_LABEL);
|
47
52
|
|
48
|
-
const [
|
49
|
-
useState(
|
53
|
+
const [upstreamLifecycleEnvironmentLabel, setUpstreamLifecycleEnvironmentLabel] =
|
54
|
+
useState(cdnConfigurationObject.upstreamLifecycleEnvironmentLabel ||
|
50
55
|
DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL);
|
51
56
|
|
52
|
-
const [updateEnabled, setUpdateEnabled] = useState(false);
|
53
|
-
|
54
|
-
const firstUpdate = useRef(true);
|
55
|
-
useEffect(() => {
|
56
|
-
if (firstUpdate.current) {
|
57
|
-
firstUpdate.current = false;
|
58
|
-
return;
|
59
|
-
}
|
60
|
-
setUpdateEnabled(true);
|
61
|
-
}, [url, username, password, organizationLabel,
|
62
|
-
contentViewLabel, lifecycleEnvironmentLabel,
|
63
|
-
sslCaCredentialId, cdnConfiguration]);
|
64
|
-
|
65
57
|
const editPassword = (value) => {
|
66
58
|
if (value === null) {
|
67
59
|
setPassword('');
|
@@ -69,31 +61,54 @@ const NetworkSyncForm = ({
|
|
69
61
|
setPassword(value);
|
70
62
|
}
|
71
63
|
};
|
72
|
-
|
64
|
+
|
65
|
+
const hasPassword = (cdnConfigurationObject.passwordExists && !password)
|
73
66
|
|| password?.length > 0;
|
74
67
|
|
75
|
-
const requiredFields = [username,
|
68
|
+
const requiredFields = [username, upstreamOrganizationLabel, sslCaCredentialId, url];
|
76
69
|
|
77
70
|
if (!hasPassword) {
|
78
71
|
requiredFields.push(password);
|
79
72
|
}
|
80
73
|
|
81
74
|
const validated = !requiredFields.some(field => !field);
|
82
|
-
const
|
75
|
+
const disableUpdate = () => {
|
76
|
+
if (updatingCdnConfiguration || orgIsLoading || !validated) {
|
77
|
+
return true;
|
78
|
+
}
|
79
|
+
const needsUpdate = Object.entries({
|
80
|
+
url,
|
81
|
+
username,
|
82
|
+
upstreamOrganizationLabel,
|
83
|
+
upstreamContentViewLabel,
|
84
|
+
upstreamLifecycleEnvironmentLabel,
|
85
|
+
}).some(([key, value]) => value?.toString() !== cdnConfigurationObject[key]?.toString());
|
86
|
+
|
87
|
+
if (needsUpdate || password?.length > 0) {
|
88
|
+
return false;
|
89
|
+
}
|
90
|
+
|
91
|
+
const sslCaCredentialIdOrNull = sslCaCredentialId === '' ? null : sslCaCredentialId;
|
92
|
+
return sslCaCredentialIdOrNull?.toString() ===
|
93
|
+
cdnConfigurationObject.sslCaCredentialId?.toString();
|
94
|
+
};
|
95
|
+
|
96
|
+
const sslCaCredentialValue =
|
97
|
+
cdnConfigurationObject.type === NETWORK_SYNC || typeChangeInProgress ?
|
98
|
+
sslCaCredentialId : null;
|
83
99
|
|
84
100
|
const performUpdate = () => {
|
85
|
-
setUpdateEnabled(false);
|
86
101
|
dispatch(updateCdnConfiguration({
|
87
102
|
url,
|
88
103
|
username,
|
89
104
|
password,
|
90
|
-
upstream_organization_label:
|
105
|
+
upstream_organization_label: upstreamOrganizationLabel || DEFAULT_ORGANIZATION_LABEL,
|
91
106
|
ssl_ca_credential_id: sslCaCredentialId,
|
92
|
-
upstream_content_view_label:
|
93
|
-
upstream_lifecycle_environment_label:
|
107
|
+
upstream_content_view_label: upstreamContentViewLabel || DEFAULT_CONTENT_VIEW_LABEL,
|
108
|
+
upstream_lifecycle_environment_label: upstreamLifecycleEnvironmentLabel ||
|
94
109
|
DEFAULT_LIFECYCLE_ENVIRONMENT_LABEL,
|
95
110
|
type: NETWORK_SYNC,
|
96
|
-
}, onUpdate
|
111
|
+
}, onUpdate));
|
97
112
|
};
|
98
113
|
|
99
114
|
return (
|
@@ -120,7 +135,7 @@ const NetworkSyncForm = ({
|
|
120
135
|
}}
|
121
136
|
/>
|
122
137
|
<br />
|
123
|
-
{
|
138
|
+
{typeChangeInProgress &&
|
124
139
|
<FormattedMessage
|
125
140
|
id="cdn-configuration-type-upstream-server"
|
126
141
|
defaultMessage={__('Provide the required information and click {update} below to save changes.')}
|
@@ -179,9 +194,9 @@ const NetworkSyncForm = ({
|
|
179
194
|
ouiaId="network-sync-organization-input"
|
180
195
|
aria-label="cdn-organization-label"
|
181
196
|
type="text"
|
182
|
-
value={
|
197
|
+
value={upstreamOrganizationLabel || ''}
|
183
198
|
isDisabled={updatingCdnConfiguration}
|
184
|
-
onChange={
|
199
|
+
onChange={setUpstreamOrganizationLabel}
|
185
200
|
/>
|
186
201
|
</FormGroup>
|
187
202
|
<FormGroup
|
@@ -191,9 +206,9 @@ const NetworkSyncForm = ({
|
|
191
206
|
ouiaId="network-sync-lifecycle-environment-input"
|
192
207
|
aria-label="cdn-lifecycle-environment-label"
|
193
208
|
type="text"
|
194
|
-
value={
|
209
|
+
value={upstreamLifecycleEnvironmentLabel || ''}
|
195
210
|
isDisabled={updatingCdnConfiguration}
|
196
|
-
onChange={
|
211
|
+
onChange={setUpstreamLifecycleEnvironmentLabel}
|
197
212
|
/>
|
198
213
|
</FormGroup>
|
199
214
|
<FormGroup
|
@@ -203,9 +218,9 @@ const NetworkSyncForm = ({
|
|
203
218
|
ouiaId="network-sync-content-view-input"
|
204
219
|
aria-label="cdn-content-view-label"
|
205
220
|
type="text"
|
206
|
-
value={
|
221
|
+
value={upstreamContentViewLabel || ''}
|
207
222
|
isDisabled={updatingCdnConfiguration}
|
208
|
-
onChange={
|
223
|
+
onChange={setUpstreamContentViewLabel}
|
209
224
|
/>
|
210
225
|
</FormGroup>
|
211
226
|
<FormGroup
|
@@ -215,7 +230,7 @@ const NetworkSyncForm = ({
|
|
215
230
|
<FormSelect
|
216
231
|
ouiaId="network-sync-ca-content-credential-input"
|
217
232
|
aria-label="cdn-ssl-ca-content-credential"
|
218
|
-
value={
|
233
|
+
value={sslCaCredentialValue || ''}
|
219
234
|
isDisabled={updatingCdnConfiguration}
|
220
235
|
onChange={value => setSslCaCredentialId(value)}
|
221
236
|
>
|
@@ -231,7 +246,7 @@ const NetworkSyncForm = ({
|
|
231
246
|
aria-label="update-upstream-configuration"
|
232
247
|
variant="secondary"
|
233
248
|
onClick={performUpdate}
|
234
|
-
isDisabled={
|
249
|
+
isDisabled={disableUpdate()}
|
235
250
|
isLoading={updatingCdnConfiguration}
|
236
251
|
>
|
237
252
|
{__('Update')}
|
@@ -243,7 +258,7 @@ const NetworkSyncForm = ({
|
|
243
258
|
};
|
244
259
|
|
245
260
|
NetworkSyncForm.propTypes = {
|
246
|
-
|
261
|
+
typeChangeInProgress: PropTypes.bool.isRequired,
|
247
262
|
contentCredentials: PropTypes.arrayOf(PropTypes.shape({
|
248
263
|
id: PropTypes.number,
|
249
264
|
name: PropTypes.string,
|
data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js
CHANGED
@@ -4,7 +4,7 @@ import { renderWithRedux, fireEvent } from 'react-testing-lib-wrapper';
|
|
4
4
|
import CdnTypeForm from '../CdnTypeForm';
|
5
5
|
import { nockInstance, assertNockRequest } from '../../../../../test-utils/nockWrapper';
|
6
6
|
import { updateCdnConfigurationSuccessResponse } from '../../../../Organizations/__tests__/organizations.fixtures';
|
7
|
-
import { CDN
|
7
|
+
import { CDN } from '../CdnConfigurationConstants';
|
8
8
|
|
9
9
|
import api from '../../../../../services/api';
|
10
10
|
|
@@ -24,44 +24,19 @@ const initialState = {
|
|
24
24
|
|
25
25
|
test('Can update to cdn type', async (done) => {
|
26
26
|
const { getByLabelText } = renderWithRedux(<CdnTypeForm
|
27
|
-
|
28
|
-
url={CDN_URL}
|
27
|
+
typeChangeInProgress
|
29
28
|
/>, { initialState });
|
30
29
|
|
31
30
|
const updateCdnConfigurationRequest = nockInstance
|
32
31
|
.put(updateCdnConfigurationPath, {
|
33
|
-
url: CDN_URL,
|
34
32
|
type: CDN,
|
35
33
|
})
|
36
34
|
.reply(200, updateCdnConfigurationSuccessResponse);
|
37
35
|
|
38
36
|
expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'false');
|
37
|
+
expect(getByLabelText('redhat-cdn-url')).toHaveAttribute('disabled');
|
39
38
|
|
40
39
|
const updateButton = getByLabelText(updateButtonName);
|
41
40
|
fireEvent.click(updateButton);
|
42
41
|
assertNockRequest(updateCdnConfigurationRequest, done);
|
43
42
|
});
|
44
|
-
|
45
|
-
test('Can update the cdn url', async (done) => {
|
46
|
-
const { getByLabelText } = renderWithRedux(<CdnTypeForm
|
47
|
-
showUpdate={false}
|
48
|
-
url={CDN_URL}
|
49
|
-
/>, { initialState });
|
50
|
-
|
51
|
-
const updateCdnConfigurationRequest = nockInstance
|
52
|
-
.put(updateCdnConfigurationPath, {
|
53
|
-
url: 'http://cdn.example.com',
|
54
|
-
type: CDN,
|
55
|
-
})
|
56
|
-
.reply(200, updateCdnConfigurationSuccessResponse);
|
57
|
-
|
58
|
-
expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'true');
|
59
|
-
|
60
|
-
const url = getByLabelText('cdn-url');
|
61
|
-
fireEvent.change(url, { target: { value: 'http://cdn.example.com' } });
|
62
|
-
|
63
|
-
const updateButton = getByLabelText(updateButtonName);
|
64
|
-
expect(updateButton).toHaveAttribute('aria-disabled', 'false');
|
65
|
-
fireEvent.click(updateButton);
|
66
|
-
assertNockRequest(updateCdnConfigurationRequest, done);
|
67
|
-
});
|
data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { cleanup } from '@testing-library/react';
|
3
|
+
import { renderWithRedux, fireEvent } from 'react-testing-lib-wrapper';
|
4
|
+
import userEvent from '@testing-library/user-event';
|
5
|
+
import CustomCdnTypeForm from '../CustomCdnTypeForm';
|
6
|
+
import { nockInstance, assertNockRequest } from '../../../../../test-utils/nockWrapper';
|
7
|
+
import { updateCdnConfigurationSuccessResponse } from '../../../../Organizations/__tests__/organizations.fixtures';
|
8
|
+
import { CUSTOM_CDN } from '../CdnConfigurationConstants';
|
9
|
+
|
10
|
+
import api from '../../../../../services/api';
|
11
|
+
|
12
|
+
afterEach(cleanup);
|
13
|
+
const updateCdnConfigurationPath = api.getApiUrl('/organizations/1/cdn_configuration');
|
14
|
+
|
15
|
+
const updateButtonName = 'update-custom-cdn-configuration';
|
16
|
+
const organization = {
|
17
|
+
id: 1,
|
18
|
+
};
|
19
|
+
|
20
|
+
const initialState = {
|
21
|
+
katello: {
|
22
|
+
organization,
|
23
|
+
},
|
24
|
+
};
|
25
|
+
|
26
|
+
const cdnConfiguration = {
|
27
|
+
url: 'http://currentcdn.example.com',
|
28
|
+
ssl_ca_credential_id: 2,
|
29
|
+
type: CUSTOM_CDN,
|
30
|
+
};
|
31
|
+
|
32
|
+
const contentCredentials = [
|
33
|
+
{
|
34
|
+
name: 'Credential1',
|
35
|
+
id: 1,
|
36
|
+
},
|
37
|
+
{
|
38
|
+
name: 'Credential2',
|
39
|
+
id: 2,
|
40
|
+
},
|
41
|
+
];
|
42
|
+
|
43
|
+
test('Can update the custom cdn server configuration', async (done) => {
|
44
|
+
const { getByLabelText } = renderWithRedux(<CustomCdnTypeForm
|
45
|
+
typeChangeInProgress
|
46
|
+
cdnConfiguration={cdnConfiguration}
|
47
|
+
contentCredentials={contentCredentials}
|
48
|
+
/>, { initialState });
|
49
|
+
|
50
|
+
const updateCdnConfigurationRequest = nockInstance
|
51
|
+
.put(updateCdnConfigurationPath, {
|
52
|
+
url: 'http://cdn.example.com',
|
53
|
+
ssl_ca_credential_id: '1',
|
54
|
+
type: CUSTOM_CDN,
|
55
|
+
})
|
56
|
+
.reply(200, updateCdnConfigurationSuccessResponse);
|
57
|
+
|
58
|
+
const url = getByLabelText('cdn-url');
|
59
|
+
fireEvent.change(url, { target: { value: 'http://cdn.example.com' } });
|
60
|
+
|
61
|
+
userEvent.selectOptions(
|
62
|
+
getByLabelText('cdn-ssl-ca-content-credential'),
|
63
|
+
'1',
|
64
|
+
);
|
65
|
+
|
66
|
+
const updateButton = getByLabelText(updateButtonName);
|
67
|
+
fireEvent.click(updateButton);
|
68
|
+
|
69
|
+
assertNockRequest(updateCdnConfigurationRequest, done);
|
70
|
+
});
|
71
|
+
|
72
|
+
test('the form shall reflect the given cdnConfiguration', () => {
|
73
|
+
const { getAllByTestId } = renderWithRedux(<CustomCdnTypeForm
|
74
|
+
typeChangeInProgress
|
75
|
+
cdnConfiguration={cdnConfiguration}
|
76
|
+
contentCredentials={contentCredentials}
|
77
|
+
/>, { initialState });
|
78
|
+
|
79
|
+
const options = getAllByTestId('ssl-ca-content-credential-option');
|
80
|
+
|
81
|
+
expect(options).toHaveLength(contentCredentials.length);
|
82
|
+
expect(options[0].selected).toBeFalsy();
|
83
|
+
expect(options[1].selected).toBeTruthy();
|
84
|
+
});
|
85
|
+
|
86
|
+
test('update button disabled on incomplete information', async (done) => {
|
87
|
+
const { getByLabelText } = renderWithRedux(<CustomCdnTypeForm
|
88
|
+
typeChangeInProgress
|
89
|
+
cdnConfiguration={{ ...cdnConfiguration, url: '' }}
|
90
|
+
contentCredentials={contentCredentials}
|
91
|
+
/>, { initialState });
|
92
|
+
|
93
|
+
expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'true');
|
94
|
+
fireEvent.change(getByLabelText('cdn-url'), { target: { value: 'http://example.com' } });
|
95
|
+
expect(getByLabelText(updateButtonName)).toHaveAttribute('aria-disabled', 'false');
|
96
|
+
done();
|
97
|
+
});
|
data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js
CHANGED
@@ -26,7 +26,7 @@ const initialState = {
|
|
26
26
|
|
27
27
|
test('Can update to Airgapped type', async (done) => {
|
28
28
|
const { getByLabelText } = renderWithRedux(<ExportSyncForm
|
29
|
-
|
29
|
+
typeChangeInProgress
|
30
30
|
/>, { initialState });
|
31
31
|
|
32
32
|
const updateCdnConfigurationRequest = nockInstance
|
data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js
CHANGED
@@ -48,7 +48,7 @@ const contentCredentials = [
|
|
48
48
|
|
49
49
|
test('Can update the upstream server configuration', async (done) => {
|
50
50
|
const { getByLabelText } = renderWithRedux(<NetworkSyncForm
|
51
|
-
|
51
|
+
typeChangeInProgress
|
52
52
|
cdnConfiguration={cdnConfiguration}
|
53
53
|
contentCredentials={contentCredentials}
|
54
54
|
/>, { initialState });
|
@@ -93,7 +93,7 @@ test('Can update the upstream server configuration', async (done) => {
|
|
93
93
|
|
94
94
|
test('the form shall reflect the given cdnConfiguration', () => {
|
95
95
|
const { getAllByTestId, getByLabelText } = renderWithRedux(<NetworkSyncForm
|
96
|
-
|
96
|
+
typeChangeInProgress
|
97
97
|
cdnConfiguration={cdnConfiguration}
|
98
98
|
contentCredentials={contentCredentials}
|
99
99
|
/>, { initialState });
|
@@ -110,7 +110,7 @@ test('the form shall reflect the given cdnConfiguration', () => {
|
|
110
110
|
|
111
111
|
test('resetting the password enables/disables appropriately', async (done) => {
|
112
112
|
const { getByLabelText } = renderWithRedux(<NetworkSyncForm
|
113
|
-
|
113
|
+
typeChangeInProgress
|
114
114
|
cdnConfiguration={{ ...cdnConfiguration, password_exists: true }}
|
115
115
|
/>, { initialState });
|
116
116
|
|
@@ -131,7 +131,7 @@ test('resetting the password enables/disables appropriately', async (done) => {
|
|
131
131
|
|
132
132
|
test('update button disabled on incomplete information', async (done) => {
|
133
133
|
const { getByLabelText } = renderWithRedux(<NetworkSyncForm
|
134
|
-
|
134
|
+
typeChangeInProgress
|
135
135
|
cdnConfiguration={{ ...cdnConfiguration, password_exists: true }}
|
136
136
|
contentCredentials={contentCredentials}
|
137
137
|
/>, { initialState });
|
@@ -9,9 +9,9 @@ import { noop } from 'foremanReact/common/helpers';
|
|
9
9
|
import CdnTypeForm from './CdnTypeForm';
|
10
10
|
import ExportSyncForm from './ExportSyncForm';
|
11
11
|
import NetworkSyncForm from './NetworkSyncForm';
|
12
|
-
|
12
|
+
import CustomCdnTypeForm from './CustomCdnTypeForm';
|
13
13
|
import './CdnConfigurationForm.scss';
|
14
|
-
import {
|
14
|
+
import { CDN, EXPORT_SYNC, CUSTOM_CDN, NETWORK_SYNC, CDN_CONFIGURATION_TYPES } from './CdnConfigurationConstants';
|
15
15
|
|
16
16
|
const CdnConfigurationForm = (props) => {
|
17
17
|
const {
|
@@ -28,20 +28,25 @@ const CdnConfigurationForm = (props) => {
|
|
28
28
|
}
|
29
29
|
};
|
30
30
|
|
31
|
-
const cdnUrl = type !== cdnConfiguration.type ? CDN_URL : cdnConfiguration.url;
|
32
|
-
|
33
31
|
return (
|
34
32
|
<div id="cdn-configuration">
|
35
33
|
<ToggleGroup aria-label="Default with multiple selectable">
|
36
34
|
<ToggleGroupItem text={CDN_CONFIGURATION_TYPES[CDN]} key={0} buttonId="cdn" isSelected={type === CDN} onChange={() => updateType(CDN)} />
|
37
35
|
<ToggleGroupItem
|
38
|
-
text={CDN_CONFIGURATION_TYPES[
|
36
|
+
text={CDN_CONFIGURATION_TYPES[CUSTOM_CDN]}
|
39
37
|
key={1}
|
38
|
+
buttonId="customCdn"
|
39
|
+
isSelected={type === CUSTOM_CDN}
|
40
|
+
onChange={() => updateType(CUSTOM_CDN)}
|
41
|
+
/>
|
42
|
+
<ToggleGroupItem
|
43
|
+
text={CDN_CONFIGURATION_TYPES[NETWORK_SYNC]}
|
44
|
+
key={2}
|
40
45
|
buttonId="usptream_server"
|
41
46
|
isSelected={type === NETWORK_SYNC}
|
42
47
|
onChange={() => updateType(NETWORK_SYNC)}
|
43
48
|
/>
|
44
|
-
<ToggleGroupItem text={CDN_CONFIGURATION_TYPES[EXPORT_SYNC]} key={
|
49
|
+
<ToggleGroupItem text={CDN_CONFIGURATION_TYPES[EXPORT_SYNC]} key={3} buttonId="airgapped" isSelected={type === EXPORT_SYNC} onChange={() => updateType(EXPORT_SYNC)} />
|
45
50
|
</ToggleGroup>
|
46
51
|
|
47
52
|
{ type === NETWORK_SYNC &&
|
@@ -49,20 +54,28 @@ const CdnConfigurationForm = (props) => {
|
|
49
54
|
cdnConfiguration={cdnConfiguration}
|
50
55
|
contentCredentials={contentCredentials}
|
51
56
|
onUpdate={onUpdate}
|
52
|
-
|
57
|
+
typeChangeInProgress={type !== cdnConfiguration.type}
|
53
58
|
/>
|
54
59
|
}
|
55
60
|
|
56
61
|
{ type === CDN &&
|
57
62
|
<CdnTypeForm
|
58
|
-
|
63
|
+
typeChangeInProgress={type !== cdnConfiguration.type}
|
59
64
|
onUpdate={onUpdate}
|
60
|
-
url={cdnUrl}
|
61
65
|
/>
|
62
66
|
}
|
67
|
+
{ type === CUSTOM_CDN &&
|
68
|
+
<CustomCdnTypeForm
|
69
|
+
cdnConfiguration={cdnConfiguration}
|
70
|
+
contentCredentials={contentCredentials}
|
71
|
+
typeChangeInProgress={type !== cdnConfiguration.type}
|
72
|
+
onUpdate={onUpdate}
|
73
|
+
/>
|
74
|
+
}
|
75
|
+
|
63
76
|
{ type === EXPORT_SYNC &&
|
64
77
|
<ExportSyncForm
|
65
|
-
|
78
|
+
typeChangeInProgress={type !== cdnConfiguration.type}
|
66
79
|
onUpdate={onUpdate}
|
67
80
|
/>
|
68
81
|
}
|
@@ -37,7 +37,8 @@ export const SUBSCRIPTIONS_CLOSE_DELETE_MODAL = 'SUBSCRIPTIONS_CLOSE_DELETE_MODA
|
|
37
37
|
export const SUBSCRIPTIONS_DISABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_DISABLE_DELETE_BUTTON';
|
38
38
|
export const SUBSCRIPTIONS_ENABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_ENABLE_DELETE_BUTTON';
|
39
39
|
|
40
|
-
export const
|
40
|
+
export const SUBSCRIPTIONS_SERVICE_DOC_URL = 'https://access.redhat.com/documentation/en-us/subscription_central/2021/html-single/getting_started_with_the_subscriptions_service/index';
|
41
|
+
export const SUBSCRIPTIONS_SERVICE_URL = 'https://console.redhat.com/subscriptions';
|
41
42
|
export const SCA_URL = 'https://access.redhat.com/articles/simple-content-access';
|
42
43
|
|
43
44
|
export const MANIFEST_DELETE_TASK_LABEL = 'Actions::Katello::Organization::ManifestDelete';
|
@@ -16,7 +16,7 @@ import { filterRHSubscriptions } from './SubscriptionHelpers';
|
|
16
16
|
import api, { orgId } from '../../services/api';
|
17
17
|
|
18
18
|
import { createSubscriptionParams } from './SubscriptionActions.js';
|
19
|
-
import { SUBSCRIPTION_TABLE_NAME,
|
19
|
+
import { SUBSCRIPTION_TABLE_NAME, SUBSCRIPTIONS_SERVICE_DOC_URL, SCA_URL } from './SubscriptionConstants';
|
20
20
|
import './SubscriptionsPage.scss';
|
21
21
|
|
22
22
|
class SubscriptionsPage extends Component {
|
@@ -102,9 +102,9 @@ class SubscriptionsPage extends Component {
|
|
102
102
|
let disabledReason = null;
|
103
103
|
|
104
104
|
if (!hasUpstreamConnection) {
|
105
|
-
disabledReason = __('This is disabled because no connection could be made to the upstream
|
105
|
+
disabledReason = __('This is disabled because no connection could be made to the upstream Manifest.');
|
106
106
|
} else if (task) {
|
107
|
-
disabledReason = __('This is disabled because a manifest
|
107
|
+
disabledReason = __('This is disabled because a manifest-related task is in progress.');
|
108
108
|
} else if (deleteButton && !disabledReason) {
|
109
109
|
disabledReason = __('This is disabled because no subscriptions are selected.');
|
110
110
|
} else if (!isManifestImported) {
|
@@ -223,14 +223,14 @@ class SubscriptionsPage extends Component {
|
|
223
223
|
<FormattedMessage
|
224
224
|
id="sca-alert"
|
225
225
|
values={{
|
226
|
-
|
226
|
+
subscriptionsService: <a href={SUBSCRIPTIONS_SERVICE_DOC_URL} target="_blank" rel="noreferrer">{__('Subscriptions service')}</a>,
|
227
227
|
br: <br />,
|
228
228
|
scaLink: <a href={SCA_URL} target="_blank" rel="noreferrer">{__('Simple Content Access')}</a>,
|
229
229
|
}}
|
230
230
|
defaultMessage={simpleContentAccess ? __(`This organization has Simple Content Access enabled.
|
231
231
|
Hosts are not required to have subscriptions attached to access repositories.
|
232
232
|
{br}
|
233
|
-
Learn more about your overall subscription usage
|
233
|
+
Learn more about your overall subscription usage with the {subscriptionsService}.`) : __('This organization is not using {scaLink}. Legacy subscription management is deprecated and will be removed in a future version.')}
|
234
234
|
/>
|
235
235
|
</Alert>
|
236
236
|
);
|
@@ -181,9 +181,9 @@ class UpstreamSubscriptionsPage extends Component {
|
|
181
181
|
};
|
182
182
|
|
183
183
|
const emptyStateData = () => ({
|
184
|
-
header: __('There are no
|
185
|
-
description: __('
|
186
|
-
'
|
184
|
+
header: __('There are no Manifests to display'),
|
185
|
+
description: __('Manifests allow you to find, access, synchronize, and download content ' +
|
186
|
+
'from upstream Red Hat repositories for use in Red Hat Satellite.'),
|
187
187
|
action: {
|
188
188
|
title: __('Import a Manifest to Begin'),
|
189
189
|
url: '/subscriptions',
|
@@ -131,8 +131,8 @@ exports[`upstream subscriptions page should render 1`] = `
|
|
131
131
|
"title": "Import a Manifest to Begin",
|
132
132
|
"url": "/subscriptions",
|
133
133
|
},
|
134
|
-
"description": "
|
135
|
-
"header": "There are no
|
134
|
+
"description": "Manifests allow you to find, access, synchronize, and download content from upstream Red Hat repositories for use in Red Hat Satellite.",
|
135
|
+
"header": "There are no Manifests to display",
|
136
136
|
}
|
137
137
|
}
|
138
138
|
itemCount={2}
|
@@ -40,9 +40,9 @@ exports[`subscriptions page should render 1`] = `
|
|
40
40
|
canManageSubscriptionAllocations={false}
|
41
41
|
disableAddButton={true}
|
42
42
|
disableDeleteButton={true}
|
43
|
-
disableDeleteReason="This is disabled because no connection could be made to the upstream
|
43
|
+
disableDeleteReason="This is disabled because no connection could be made to the upstream Manifest."
|
44
44
|
disableManifestActions={true}
|
45
|
-
disableManifestReason="This is disabled because no connection could be made to the upstream
|
45
|
+
disableManifestReason="This is disabled because no connection could be made to the upstream Manifest."
|
46
46
|
getAutoCompleteParams={[Function]}
|
47
47
|
isManifestImported={false}
|
48
48
|
onDeleteButtonClick={[Function]}
|
@@ -58,7 +58,7 @@ exports[`subscriptions page should render 1`] = `
|
|
58
58
|
canImportManifest={false}
|
59
59
|
delete={[Function]}
|
60
60
|
disableManifestActions={true}
|
61
|
-
disabledReason="This is disabled because no connection could be made to the upstream
|
61
|
+
disabledReason="This is disabled because no connection could be made to the upstream Manifest."
|
62
62
|
refresh={[Function]}
|
63
63
|
taskInProgress={false}
|
64
64
|
upload={[Function]}
|
@@ -4,7 +4,7 @@ import { Row, Col, Form, FormGroup, Button } from 'patternfly-react';
|
|
4
4
|
import { LinkContainer } from 'react-router-bootstrap';
|
5
5
|
import { noop } from 'foremanReact/common/helpers';
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
7
|
-
import {
|
7
|
+
import { SUBSCRIPTIONS_SERVICE_URL } from '../../SubscriptionConstants';
|
8
8
|
|
9
9
|
import Search from '../../../../components/Search/index';
|
10
10
|
import TooltipButton from '../../../../components/TooltipButton';
|
@@ -61,12 +61,12 @@ const SubscriptionsToolbar = ({
|
|
61
61
|
|
62
62
|
{isManifestImported &&
|
63
63
|
<a
|
64
|
-
href={
|
64
|
+
href={SUBSCRIPTIONS_SERVICE_URL}
|
65
65
|
className="btn btn-default"
|
66
66
|
target="_blank"
|
67
67
|
rel="noreferrer"
|
68
68
|
>
|
69
|
-
{__('Subscription
|
69
|
+
{__('View Subscription Usage')}
|
70
70
|
</a>
|
71
71
|
}
|
72
72
|
|
@@ -33,17 +33,24 @@ const rexJobLink = id => link({
|
|
33
33
|
baseUrl: 'job_invocations',
|
34
34
|
});
|
35
35
|
|
36
|
-
export const renderTaskStartedToast = (task) => {
|
36
|
+
export const renderTaskStartedToast = (task, override = '') => {
|
37
37
|
if (!task) return;
|
38
38
|
|
39
39
|
const message = (__(`Task ${task.humanized.action} has started.`));
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
if (override) {
|
42
|
+
window.tfm.toastNotifications.notify({
|
43
|
+
message: override,
|
44
|
+
type: 'info',
|
45
|
+
link: foremanTasksLink(task.id),
|
46
|
+
});
|
47
|
+
} else {
|
48
|
+
window.tfm.toastNotifications.notify({
|
49
|
+
message,
|
50
|
+
type: 'info',
|
51
|
+
link: foremanTasksLink(task.id),
|
52
|
+
});
|
53
|
+
}
|
47
54
|
};
|
48
55
|
|
49
56
|
export const renderRexJobStartedToast = ({ id, description, key }) => {
|