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,5 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
2
3
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
3
4
|
import { useDispatch, useSelector } from 'react-redux';
|
4
5
|
import { useParams } from 'react-router-dom';
|
@@ -18,13 +19,15 @@ import {
|
|
18
19
|
TextListItem,
|
19
20
|
TextListItemVariants,
|
20
21
|
TextListVariants,
|
22
|
+
Flex,
|
23
|
+
FlexItem,
|
21
24
|
} from '@patternfly/react-core';
|
22
25
|
import { PencilAltIcon } from '@patternfly/react-icons';
|
23
26
|
import { STATUS } from 'foremanReact/constants';
|
24
27
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
25
28
|
import { translate as __ } from 'foremanReact/common/I18n';
|
26
29
|
import { getACSDetails } from '../ACSActions';
|
27
|
-
import { selectACSDetails, selectACSDetailsStatus } from '../ACSSelectors';
|
30
|
+
import { selectACSDetails, selectACSDetailsError, selectACSDetailsStatus } from '../ACSSelectors';
|
28
31
|
import Loading from '../../../components/Loading';
|
29
32
|
import InactiveText from '../../ContentViews/components/InactiveText';
|
30
33
|
import ACSEditDetails from './EditModals/ACSEditDetails';
|
@@ -32,12 +35,17 @@ import ACSEditURLPaths from './EditModals/ACSEditURLPaths';
|
|
32
35
|
import ACSEditSmartProxies from './EditModals/ACSEditSmartProxies';
|
33
36
|
import ACSEditCredentials from './EditModals/ACSEditCredentials';
|
34
37
|
import ACSEditProducts from './EditModals/ACSEditProducts';
|
38
|
+
import EmptyStateMessage from '../../../components/Table/EmptyStateMessage';
|
39
|
+
import '../Acs.scss';
|
40
|
+
import { hasPermission } from '../../ContentViews/helpers';
|
41
|
+
import { HelpToolTip } from '../../ContentViews/Create/ContentViewFormComponents';
|
35
42
|
|
36
|
-
const ACSExpandableDetails = () => {
|
43
|
+
const ACSExpandableDetails = ({ expandedId }) => {
|
37
44
|
const { id } = useParams();
|
38
|
-
const acsId = Number(id);
|
45
|
+
const acsId = Number(expandedId) || Number(id);
|
39
46
|
const details = useSelector(state => selectACSDetails(state, acsId));
|
40
47
|
const status = useSelector(state => selectACSDetailsStatus(state, acsId));
|
48
|
+
const error = useSelector(state => selectACSDetailsError(state, acsId));
|
41
49
|
const dispatch = useDispatch();
|
42
50
|
const [showDetails, setShowDetails] = useState(true);
|
43
51
|
const [showSmartProxies, setShowSmartProxies] = useState(false);
|
@@ -56,7 +64,7 @@ const ACSExpandableDetails = () => {
|
|
56
64
|
}
|
57
65
|
}, [acsId, details, dispatch]);
|
58
66
|
|
59
|
-
if (status === STATUS.PENDING) return <Loading />;
|
67
|
+
if (status === STATUS.PENDING) return <Loading skeleton />;
|
60
68
|
|
61
69
|
const {
|
62
70
|
name,
|
@@ -66,17 +74,23 @@ const ACSExpandableDetails = () => {
|
|
66
74
|
description,
|
67
75
|
base_url: url,
|
68
76
|
smart_proxies: smartProxies,
|
77
|
+
use_http_proxies: useHttpProxies,
|
69
78
|
verify_ssl: verifySsl,
|
70
79
|
ssl_ca_cert: sslCaCert,
|
71
80
|
ssl_client_cert: sslClientCert,
|
72
81
|
ssl_client_key: sslClientKey,
|
73
82
|
upstream_username: username,
|
74
83
|
products,
|
84
|
+
permissions,
|
75
85
|
} = details;
|
86
|
+
if (error) {
|
87
|
+
return <EmptyStateMessage error={error} />;
|
88
|
+
}
|
89
|
+
const canEdit = hasPermission(permissions, 'edit_alternate_content_sources');
|
76
90
|
return (
|
77
91
|
<>
|
78
92
|
<Stack>
|
79
|
-
<StackItem>
|
93
|
+
<StackItem className="primary-detail-stack-items-border">
|
80
94
|
<Split>
|
81
95
|
<SplitItem isFilled>
|
82
96
|
<ExpandableSectionToggle
|
@@ -90,9 +104,10 @@ const ACSExpandableDetails = () => {
|
|
90
104
|
}}
|
91
105
|
contentId="showDetails"
|
92
106
|
>
|
93
|
-
{
|
107
|
+
{__('Details')}
|
94
108
|
</ExpandableSectionToggle>
|
95
109
|
</SplitItem>
|
110
|
+
{canEdit &&
|
96
111
|
<SplitItem>
|
97
112
|
<Button
|
98
113
|
ouiaId="edit-details-pencil-edit"
|
@@ -101,18 +116,19 @@ const ACSExpandableDetails = () => {
|
|
101
116
|
isSmall
|
102
117
|
icon={<PencilAltIcon />}
|
103
118
|
onClick={() => setEditDetailsModalOpen(true)}
|
104
|
-
>{__('Edit
|
119
|
+
>{__('Edit')}
|
105
120
|
</Button>
|
106
121
|
</SplitItem>
|
122
|
+
}
|
107
123
|
</Split>
|
108
124
|
</StackItem>
|
109
|
-
<StackItem>
|
125
|
+
<StackItem className="primary-detail-stack-items-border">
|
110
126
|
<ExpandableSection
|
111
127
|
isExpanded={showDetails}
|
112
128
|
isDetached
|
113
129
|
contentId="showDetails"
|
114
130
|
>
|
115
|
-
<TextContent className="margin-0-24">
|
131
|
+
<TextContent className="margin-0-24 expandable-section-text">
|
116
132
|
<TextList component={TextListVariants.dl}>
|
117
133
|
<TextListItem component={TextListItemVariants.dt}>
|
118
134
|
{__('Name')}
|
@@ -130,7 +146,7 @@ const ACSExpandableDetails = () => {
|
|
130
146
|
aria-label="name_text_value"
|
131
147
|
component={TextListItemVariants.dd}
|
132
148
|
>
|
133
|
-
{description}
|
149
|
+
{description || <InactiveText text="N/A" />}
|
134
150
|
</TextListItem>
|
135
151
|
<TextListItem component={TextListItemVariants.dt}>
|
136
152
|
{__('Type')}
|
@@ -154,7 +170,7 @@ const ACSExpandableDetails = () => {
|
|
154
170
|
</TextContent>
|
155
171
|
</ExpandableSection>
|
156
172
|
</StackItem>
|
157
|
-
<StackItem>
|
173
|
+
<StackItem className="primary-detail-stack-items-border">
|
158
174
|
<Split>
|
159
175
|
<SplitItem isFilled>
|
160
176
|
<ExpandableSectionToggle
|
@@ -164,12 +180,14 @@ const ACSExpandableDetails = () => {
|
|
164
180
|
setShowSmartProxies(expanded);
|
165
181
|
setShowUrlPaths(false);
|
166
182
|
setShowCredentials(false);
|
183
|
+
setShowProducts(false);
|
167
184
|
}}
|
168
185
|
contentId="showSmartProxies"
|
169
186
|
>
|
170
|
-
{
|
187
|
+
{__('Smart proxies')}
|
171
188
|
</ExpandableSectionToggle>
|
172
189
|
</SplitItem>
|
190
|
+
{canEdit &&
|
173
191
|
<SplitItem>
|
174
192
|
<Button
|
175
193
|
ouiaId="edit-smart-proxies-pencil-edit"
|
@@ -178,18 +196,19 @@ const ACSExpandableDetails = () => {
|
|
178
196
|
isSmall
|
179
197
|
icon={<PencilAltIcon />}
|
180
198
|
onClick={() => setEditSmartProxiesModalOpen(true)}
|
181
|
-
>{__('Edit
|
199
|
+
>{__('Edit')}
|
182
200
|
</Button>
|
183
201
|
</SplitItem>
|
202
|
+
}
|
184
203
|
</Split>
|
185
204
|
</StackItem>
|
186
|
-
<StackItem>
|
205
|
+
<StackItem className="primary-detail-stack-items-border">
|
187
206
|
<ExpandableSection
|
188
207
|
isDetached
|
189
208
|
contentId="showSmartProxies"
|
190
209
|
isExpanded={showSmartProxies}
|
191
210
|
>
|
192
|
-
<List className="margin-0-24" isPlain isBordered>
|
211
|
+
<List className="margin-0-24 expandable-section-text" isPlain isBordered>
|
193
212
|
{smartProxies?.length > 0 && smartProxies.map(sp =>
|
194
213
|
(
|
195
214
|
<ListItem key={sp?.id} aria-label="smartproxy_value">
|
@@ -200,6 +219,24 @@ const ACSExpandableDetails = () => {
|
|
200
219
|
<InactiveText text="N/A" />
|
201
220
|
}
|
202
221
|
</List>
|
222
|
+
<TextContent className="margin-0-24 expandable-section-text" style={{ marginTop: '24px' }}>
|
223
|
+
<TextList component={TextListVariants.dl}>
|
224
|
+
<TextListItem component={TextListItemVariants.dt}>
|
225
|
+
<Flex spaceItems={{ default: 'spaceItemsNone' }}>
|
226
|
+
<FlexItem aria-label="httpProxyTitle">{__('Use HTTP proxies')}</FlexItem>
|
227
|
+
<FlexItem>
|
228
|
+
<HelpToolTip tooltip={__('Alternate content sources use the HTTP proxy of their assigned smart proxy for communication.')} />
|
229
|
+
</FlexItem>
|
230
|
+
</Flex>
|
231
|
+
</TextListItem>
|
232
|
+
<TextListItem
|
233
|
+
aria-label="useHttpProxies_value"
|
234
|
+
component={TextListItemVariants.dd}
|
235
|
+
>
|
236
|
+
{useHttpProxies ? 'true' : 'false'}
|
237
|
+
</TextListItem>
|
238
|
+
</TextList>
|
239
|
+
</TextContent>
|
203
240
|
</ExpandableSection>
|
204
241
|
</StackItem>
|
205
242
|
{acsType === 'simplified' &&
|
@@ -218,9 +255,10 @@ const ACSExpandableDetails = () => {
|
|
218
255
|
isExpanded={showProducts}
|
219
256
|
contentId="showProducts"
|
220
257
|
>
|
221
|
-
{
|
258
|
+
{__('Products')}
|
222
259
|
</ExpandableSectionToggle>
|
223
260
|
</SplitItem>
|
261
|
+
{canEdit &&
|
224
262
|
<SplitItem>
|
225
263
|
<Button
|
226
264
|
ouiaId="edit-products-pencil-edit"
|
@@ -229,9 +267,10 @@ const ACSExpandableDetails = () => {
|
|
229
267
|
isSmall
|
230
268
|
icon={<PencilAltIcon />}
|
231
269
|
onClick={() => setEditProductsModalOpen(true)}
|
232
|
-
>{__('Edit
|
270
|
+
>{__('Edit')}
|
233
271
|
</Button>
|
234
272
|
</SplitItem>
|
273
|
+
}
|
235
274
|
</Split>
|
236
275
|
</StackItem>
|
237
276
|
<StackItem>
|
@@ -240,7 +279,7 @@ const ACSExpandableDetails = () => {
|
|
240
279
|
contentId="showProducts"
|
241
280
|
isExpanded={showProducts}
|
242
281
|
>
|
243
|
-
<List className="margin-0-24" isPlain isBordered>
|
282
|
+
<List className="margin-0-24 expandable-section-text" isPlain isBordered>
|
244
283
|
{products.map(product =>
|
245
284
|
(
|
246
285
|
<ListItem key={product?.id} aria-label="product_value">
|
@@ -252,9 +291,9 @@ const ACSExpandableDetails = () => {
|
|
252
291
|
</StackItem>
|
253
292
|
</>
|
254
293
|
}
|
255
|
-
{acsType === 'custom' &&
|
294
|
+
{(acsType === 'custom' || acsType === 'rhui') &&
|
256
295
|
<>
|
257
|
-
<StackItem>
|
296
|
+
<StackItem className="primary-detail-stack-items-border">
|
258
297
|
<Split>
|
259
298
|
<SplitItem isFilled>
|
260
299
|
<ExpandableSectionToggle
|
@@ -267,9 +306,10 @@ const ACSExpandableDetails = () => {
|
|
267
306
|
isExpanded={showUrlPaths}
|
268
307
|
contentId="showUrlPaths"
|
269
308
|
>
|
270
|
-
{
|
309
|
+
{__('URL and subpaths')}
|
271
310
|
</ExpandableSectionToggle>
|
272
311
|
</SplitItem>
|
312
|
+
{canEdit &&
|
273
313
|
<SplitItem>
|
274
314
|
<Button
|
275
315
|
ouiaId="edit-urls-pencil-edit"
|
@@ -278,18 +318,19 @@ const ACSExpandableDetails = () => {
|
|
278
318
|
isSmall
|
279
319
|
icon={<PencilAltIcon />}
|
280
320
|
onClick={() => setEditUrlModalOpen(true)}
|
281
|
-
>{__('Edit
|
321
|
+
>{__('Edit')}
|
282
322
|
</Button>
|
283
323
|
</SplitItem>
|
324
|
+
}
|
284
325
|
</Split>
|
285
326
|
</StackItem>
|
286
|
-
<StackItem>
|
327
|
+
<StackItem className="primary-detail-stack-items-border">
|
287
328
|
<ExpandableSection
|
288
329
|
contentId="showUrlPaths"
|
289
330
|
isDetached
|
290
331
|
isExpanded={showUrlPaths}
|
291
332
|
>
|
292
|
-
<TextContent className="margin-0-24">
|
333
|
+
<TextContent className="margin-0-24 expandable-section-text">
|
293
334
|
<TextList component={TextListVariants.dl}>
|
294
335
|
<TextListItem component={TextListItemVariants.dt}>
|
295
336
|
{__('URL')}
|
@@ -313,7 +354,7 @@ const ACSExpandableDetails = () => {
|
|
313
354
|
</TextContent>
|
314
355
|
</ExpandableSection>
|
315
356
|
</StackItem>
|
316
|
-
<StackItem>
|
357
|
+
<StackItem className="primary-detail-stack-items-border">
|
317
358
|
<Split>
|
318
359
|
<SplitItem isFilled>
|
319
360
|
<ExpandableSectionToggle
|
@@ -326,9 +367,10 @@ const ACSExpandableDetails = () => {
|
|
326
367
|
isExpanded={showCredentials}
|
327
368
|
contentId="showCredentials"
|
328
369
|
>
|
329
|
-
{
|
370
|
+
{__('Credentials')}
|
330
371
|
</ExpandableSectionToggle>
|
331
372
|
</SplitItem>
|
373
|
+
{canEdit &&
|
332
374
|
<SplitItem>
|
333
375
|
<Button
|
334
376
|
ouiaId="edit-credentials-pencil-edit"
|
@@ -337,18 +379,19 @@ const ACSExpandableDetails = () => {
|
|
337
379
|
isSmall
|
338
380
|
icon={<PencilAltIcon />}
|
339
381
|
onClick={() => setEditCredentialsModalOpen(true)}
|
340
|
-
>{__('Edit
|
382
|
+
>{__('Edit')}
|
341
383
|
</Button>
|
342
384
|
</SplitItem>
|
385
|
+
}
|
343
386
|
</Split>
|
344
387
|
</StackItem>
|
345
|
-
<StackItem>
|
388
|
+
<StackItem className="primary-detail-stack-items-border">
|
346
389
|
<ExpandableSection
|
347
390
|
isExpanded={showCredentials}
|
348
391
|
contentId="showCredentials"
|
349
392
|
isDetached
|
350
393
|
>
|
351
|
-
<TextContent className="margin-0-24">
|
394
|
+
<TextContent className="margin-0-24 expandable-section-text">
|
352
395
|
<TextList component={TextListVariants.dl}>
|
353
396
|
<TextListItem component={TextListItemVariants.dt}>
|
354
397
|
{__('Verify SSL')}
|
@@ -456,4 +499,15 @@ const ACSExpandableDetails = () => {
|
|
456
499
|
);
|
457
500
|
};
|
458
501
|
|
502
|
+
ACSExpandableDetails.propTypes = {
|
503
|
+
expandedId: PropTypes.oneOfType([
|
504
|
+
PropTypes.number,
|
505
|
+
PropTypes.string,
|
506
|
+
]),
|
507
|
+
};
|
508
|
+
|
509
|
+
ACSExpandableDetails.defaultProps = {
|
510
|
+
expandedId: null,
|
511
|
+
};
|
512
|
+
|
459
513
|
export default ACSExpandableDetails;
|
@@ -13,8 +13,8 @@ import {
|
|
13
13
|
Modal,
|
14
14
|
ModalVariant,
|
15
15
|
Radio,
|
16
|
-
Switch,
|
17
16
|
TextInput,
|
17
|
+
Switch,
|
18
18
|
} from '@patternfly/react-core';
|
19
19
|
import { editACS, getACSDetails } from '../../ACSActions';
|
20
20
|
import {
|
@@ -27,22 +27,22 @@ import { CONTENT_CREDENTIAL_CERT_TYPE } from '../../../ContentCredentials/Conten
|
|
27
27
|
|
28
28
|
const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
|
29
29
|
const {
|
30
|
-
verify_ssl: verifySsl,
|
31
30
|
ssl_ca_cert: sslCACert,
|
32
31
|
ssl_client_cert: sslClientCert,
|
33
32
|
ssl_client_key: sslClientKey,
|
34
33
|
upstream_username: username,
|
35
34
|
upstream_password_exists: passwordExists,
|
35
|
+
verify_ssl: verifySsl,
|
36
36
|
} = acsDetails;
|
37
37
|
const dispatch = useDispatch();
|
38
38
|
const contentCredentials = useSelector(selectContentCredentials);
|
39
39
|
const contentCredentialsStatus = useSelector(selectContentCredentialsStatus);
|
40
|
-
const [acsVerifySSL, setAcsVerifySSL] = useState(verifySsl);
|
41
40
|
const [acsUsername, setAcsUsername] = useState(username);
|
42
41
|
const [acsPassword, setAcsPassword] = useState(passwordExists ? '*****' : '');
|
43
42
|
const [acsCAcert, setAcsCAcert] = useState(sslCACert?.id);
|
44
43
|
const [acsSslClientCert, setAcsSslClientCert] = useState(sslClientCert?.id);
|
45
44
|
const [acsSslClientKey, setAcsSslClientKey] = useState(sslClientKey?.id);
|
45
|
+
const [acsVerifySSL, setAcsVerifySSL] = useState(verifySsl);
|
46
46
|
const getAuthenticationState = () => {
|
47
47
|
if (username) {
|
48
48
|
return 'manual';
|
@@ -64,8 +64,8 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
|
|
64
64
|
const onSubmit = () => {
|
65
65
|
setSaving(true);
|
66
66
|
let params = {
|
67
|
-
verify_ssl: acsVerifySSL,
|
68
67
|
ssl_ca_cert_id: acsCAcert,
|
68
|
+
verify_ssl: acsVerifySSL,
|
69
69
|
};
|
70
70
|
|
71
71
|
if (authentication === 'credentials') {
|
@@ -117,7 +117,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
|
|
117
117
|
|
118
118
|
return (
|
119
119
|
<Modal
|
120
|
-
title={__('Edit
|
120
|
+
title={__('Edit credentials')}
|
121
121
|
variant={ModalVariant.large}
|
122
122
|
isOpen
|
123
123
|
onClose={onClose}
|
@@ -143,6 +143,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
|
|
143
143
|
>
|
144
144
|
<FormSelect
|
145
145
|
isRequired
|
146
|
+
isDisabled={!acsVerifySSL}
|
146
147
|
value={acsCAcert}
|
147
148
|
onChange={value => setAcsCAcert(value)}
|
148
149
|
aria-label="sslCAcert_select"
|
@@ -310,7 +311,7 @@ const ACSEditCredentials = ({ onClose, acsId, acsDetails }) => {
|
|
310
311
|
isLoading={saving}
|
311
312
|
type="submit"
|
312
313
|
>
|
313
|
-
{__('
|
314
|
+
{__('Edit')}
|
314
315
|
</Button>
|
315
316
|
<Button ouiaId="edit-acs-details-cancel" variant="link" onClick={onClose}>
|
316
317
|
{__('Cancel')}
|
@@ -328,12 +329,12 @@ ACSEditCredentials.propTypes = {
|
|
328
329
|
name: PropTypes.string,
|
329
330
|
description: PropTypes.string,
|
330
331
|
id: PropTypes.number,
|
331
|
-
verify_ssl: PropTypes.bool,
|
332
332
|
ssl_ca_cert: PropTypes.shape({ id: PropTypes.number }),
|
333
333
|
ssl_client_cert: PropTypes.shape({ id: PropTypes.number }),
|
334
334
|
ssl_client_key: PropTypes.shape({ id: PropTypes.number }),
|
335
335
|
upstream_username: PropTypes.string,
|
336
336
|
upstream_password_exists: PropTypes.bool,
|
337
|
+
verify_ssl: PropTypes.bool,
|
337
338
|
}),
|
338
339
|
};
|
339
340
|
|
@@ -342,12 +343,12 @@ ACSEditCredentials.defaultProps = {
|
|
342
343
|
name: '',
|
343
344
|
description: '',
|
344
345
|
id: undefined,
|
345
|
-
verify_ssl: false,
|
346
346
|
ssl_ca_cert: { id: undefined },
|
347
347
|
ssl_client_cert: { id: undefined },
|
348
348
|
ssl_client_key: { id: undefined },
|
349
349
|
upstream_username: undefined,
|
350
350
|
upstream_password_exists: false,
|
351
|
+
verify_ssl: false,
|
351
352
|
},
|
352
353
|
};
|
353
354
|
|
@@ -29,7 +29,7 @@ const ACSEditDetails = ({ onClose, acsId, acsDetails }) => {
|
|
29
29
|
|
30
30
|
return (
|
31
31
|
<Modal
|
32
|
-
title={__('Edit
|
32
|
+
title={__('Edit details')}
|
33
33
|
variant={ModalVariant.small}
|
34
34
|
isOpen
|
35
35
|
onClose={onClose}
|
@@ -76,7 +76,7 @@ const ACSEditDetails = ({ onClose, acsId, acsDetails }) => {
|
|
76
76
|
isLoading={saving}
|
77
77
|
type="submit"
|
78
78
|
>
|
79
|
-
{__('Edit
|
79
|
+
{__('Edit')}
|
80
80
|
</Button>
|
81
81
|
<Button ouiaId="edit-acs-details-cancel" variant="link" onClick={onClose}>
|
82
82
|
{__('Cancel')}
|
@@ -64,7 +64,7 @@ const ACSEditProducts = ({ onClose, acsId, acsDetails }) => {
|
|
64
64
|
|
65
65
|
return (
|
66
66
|
<Modal
|
67
|
-
title={__('Edit
|
67
|
+
title={__('Edit products')}
|
68
68
|
variant={ModalVariant.small}
|
69
69
|
isOpen
|
70
70
|
onClose={onClose}
|
@@ -94,7 +94,7 @@ const ACSEditProducts = ({ onClose, acsId, acsDetails }) => {
|
|
94
94
|
isLoading={saving}
|
95
95
|
type="submit"
|
96
96
|
>
|
97
|
-
{__('Edit
|
97
|
+
{__('Edit')}
|
98
98
|
</Button>
|
99
99
|
<Button ouiaId="edit-acs-smart-proxies-cancel" variant="link" onClick={onClose}>
|
100
100
|
{__('Cancel')}
|
@@ -4,15 +4,28 @@ import PropTypes from 'prop-types';
|
|
4
4
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
5
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
6
6
|
import { STATUS } from 'foremanReact/constants';
|
7
|
-
import {
|
7
|
+
import {
|
8
|
+
ActionGroup,
|
9
|
+
Button,
|
10
|
+
DualListSelector,
|
11
|
+
Form,
|
12
|
+
FormGroup,
|
13
|
+
Modal,
|
14
|
+
ModalVariant,
|
15
|
+
Switch,
|
16
|
+
Flex,
|
17
|
+
FlexItem,
|
18
|
+
} from '@patternfly/react-core';
|
8
19
|
import { editACS, getACSDetails } from '../../ACSActions';
|
9
20
|
import { selectSmartProxy, selectSmartProxyStatus } from '../../../SmartProxy/SmartProxyContentSelectors';
|
10
21
|
import { getSmartProxies } from '../../../SmartProxy/SmartProxyContentActions';
|
11
22
|
import Loading from '../../../../components/Loading';
|
23
|
+
import { HelpToolTip } from '../../../ContentViews/Create/ContentViewFormComponents';
|
12
24
|
|
13
25
|
const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
|
14
|
-
const { smart_proxies: smartProxies } = acsDetails;
|
26
|
+
const { smart_proxies: smartProxies, use_http_proxies: useHttpProxies } = acsDetails;
|
15
27
|
const dispatch = useDispatch();
|
28
|
+
const [acsUseHttpProxies, setAcsUseHttpProxies] = useState(useHttpProxies);
|
16
29
|
const [saving, setSaving] = useState(false);
|
17
30
|
const [
|
18
31
|
acsSmartProxies, setAcsSmartProxies,
|
@@ -45,7 +58,7 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
|
|
45
58
|
setSaving(true);
|
46
59
|
dispatch(editACS(
|
47
60
|
acsId,
|
48
|
-
{ acsId, smart_proxy_names: acsSmartProxies },
|
61
|
+
{ acsId, smart_proxy_names: acsSmartProxies, use_http_proxies: acsUseHttpProxies },
|
49
62
|
() => {
|
50
63
|
dispatch(getACSDetails(acsId));
|
51
64
|
onClose();
|
@@ -62,8 +75,8 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
|
|
62
75
|
|
63
76
|
return (
|
64
77
|
<Modal
|
65
|
-
title={__('Edit
|
66
|
-
variant={ModalVariant.
|
78
|
+
title={__('Edit smart proxies')}
|
79
|
+
variant={ModalVariant.medium}
|
67
80
|
isOpen
|
68
81
|
onClose={onClose}
|
69
82
|
appendTo={document.body}
|
@@ -83,6 +96,24 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
|
|
83
96
|
removeSelected={onListChange}
|
84
97
|
id="selector"
|
85
98
|
/>
|
99
|
+
<FormGroup
|
100
|
+
label={
|
101
|
+
<Flex spaceItems={{ default: 'spaceItemsNone' }}>
|
102
|
+
<FlexItem>{__('Use HTTP proxies')}</FlexItem>
|
103
|
+
<FlexItem>
|
104
|
+
<HelpToolTip tooltip={__('Alternate content sources use the HTTP proxy of their assigned smart proxy for communication.')} />
|
105
|
+
</FlexItem>
|
106
|
+
</Flex>
|
107
|
+
}
|
108
|
+
fieldId="use_http_proxies"
|
109
|
+
>
|
110
|
+
<Switch
|
111
|
+
id="use-http-proxies-switch"
|
112
|
+
aria-label="use-http-proxies-switch"
|
113
|
+
isChecked={acsUseHttpProxies}
|
114
|
+
onChange={checked => setAcsUseHttpProxies(checked)}
|
115
|
+
/>
|
116
|
+
</FormGroup>
|
86
117
|
<ActionGroup>
|
87
118
|
<Button
|
88
119
|
ouiaId="edit-acs-details-submit"
|
@@ -92,7 +123,7 @@ const ACSEditSmartProxies = ({ onClose, acsId, acsDetails }) => {
|
|
92
123
|
isLoading={saving}
|
93
124
|
type="submit"
|
94
125
|
>
|
95
|
-
{__('Edit
|
126
|
+
{__('Edit')}
|
96
127
|
</Button>
|
97
128
|
<Button ouiaId="edit-acs-smart-proxies-cancel" variant="link" onClick={onClose}>
|
98
129
|
{__('Cancel')}
|
@@ -108,11 +139,12 @@ ACSEditSmartProxies.propTypes = {
|
|
108
139
|
onClose: PropTypes.func.isRequired,
|
109
140
|
acsDetails: PropTypes.shape({
|
110
141
|
smart_proxies: PropTypes.arrayOf(PropTypes.shape({})),
|
142
|
+
use_http_proxies: PropTypes.bool,
|
111
143
|
}),
|
112
144
|
};
|
113
145
|
|
114
146
|
ACSEditSmartProxies.defaultProps = {
|
115
|
-
acsDetails: { smart_proxies: [], id: undefined },
|
147
|
+
acsDetails: { smart_proxies: [], id: undefined, use_http_proxies: false },
|
116
148
|
};
|
117
149
|
|
118
150
|
export default ACSEditSmartProxies;
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import { ActionGroup, Button, Form, FormGroup, Modal, ModalVariant, TextArea, TextInput } from '@patternfly/react-core';
|
6
6
|
import { editACS, getACSDetails } from '../../ACSActions';
|
7
|
+
import { areSubPathsValid, isValidUrl } from '../../helpers';
|
7
8
|
|
8
9
|
const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
9
10
|
const { subpaths, base_url: url } = acsDetails;
|
@@ -11,10 +12,15 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
|
11
12
|
const [acsUrl, setAcsUrl] = useState(url);
|
12
13
|
const [acsSubpath, setAcsSubpath] = useState(subpaths.join() || '');
|
13
14
|
const [saving, setSaving] = useState(false);
|
15
|
+
const subPathValidated = areSubPathsValid(acsSubpath) ? 'default' : 'error';
|
16
|
+
const urlValidated = (acsUrl === '' || isValidUrl(acsUrl)) ? 'default' : 'error';
|
14
17
|
|
15
18
|
const onSubmit = () => {
|
16
19
|
setSaving(true);
|
17
|
-
let params = {
|
20
|
+
let params = {
|
21
|
+
id: acsId,
|
22
|
+
base_url: acsUrl,
|
23
|
+
};
|
18
24
|
if (acsSubpath !== '') {
|
19
25
|
params = { subpaths: acsSubpath.split(','), ...params };
|
20
26
|
} else {
|
@@ -35,7 +41,7 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
|
35
41
|
|
36
42
|
return (
|
37
43
|
<Modal
|
38
|
-
title={__('Edit
|
44
|
+
title={__('Edit URL and subpaths')}
|
39
45
|
variant={ModalVariant.small}
|
40
46
|
isOpen
|
41
47
|
onClose={onClose}
|
@@ -50,6 +56,8 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
|
50
56
|
label={__('Base URL')}
|
51
57
|
type="string"
|
52
58
|
fieldId="acs_base_url"
|
59
|
+
helperTextInvalid="http://, https:// or file://"
|
60
|
+
validated={urlValidated}
|
53
61
|
isRequired
|
54
62
|
>
|
55
63
|
<TextInput
|
@@ -60,22 +68,22 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
|
60
68
|
aria-label="acs_base_url_field"
|
61
69
|
placeholder="https:// or file://"
|
62
70
|
value={acsUrl}
|
63
|
-
|
64
|
-
|
65
|
-
}}
|
71
|
+
validated={urlValidated}
|
72
|
+
onChange={value => setAcsUrl(value)}
|
66
73
|
/>
|
67
74
|
</FormGroup>
|
68
75
|
<FormGroup
|
69
76
|
label={__('Subpaths')}
|
70
77
|
type="string"
|
71
78
|
fieldId="acs_subpaths"
|
79
|
+
helperTextInvalid={__('Comma-separated list of subpaths. All subpaths must have a slash at the end and none at the front.')}
|
80
|
+
validated={subPathValidated}
|
72
81
|
>
|
73
82
|
<TextArea
|
74
83
|
placeholder="test/repo1/, test/repo2/,"
|
75
84
|
value={acsSubpath}
|
76
|
-
|
77
|
-
|
78
|
-
}}
|
85
|
+
validated={subPathValidated}
|
86
|
+
onChange={value => setAcsSubpath(value)}
|
79
87
|
name="acs_subpath_field"
|
80
88
|
id="acs_subpath_field"
|
81
89
|
aria-label="acs_subpath_field"
|
@@ -86,11 +94,15 @@ const ACSEditURLPaths = ({ onClose, acsId, acsDetails }) => {
|
|
86
94
|
ouiaId="edit-acs-url-submit"
|
87
95
|
aria-label="edit_acs_url"
|
88
96
|
variant="primary"
|
89
|
-
isDisabled={saving ||
|
97
|
+
isDisabled={saving ||
|
98
|
+
acsUrl.length === 0 ||
|
99
|
+
subPathValidated === 'error' ||
|
100
|
+
urlValidated === 'error'
|
101
|
+
}
|
90
102
|
isLoading={saving}
|
91
103
|
type="submit"
|
92
104
|
>
|
93
|
-
{__('Edit
|
105
|
+
{__('Edit')}
|
94
106
|
</Button>
|
95
107
|
<Button ouiaId="edit-acs-url-cancel" variant="link" onClick={onClose}>
|
96
108
|
{__('Cancel')}
|
@@ -112,7 +124,11 @@ ACSEditURLPaths.propTypes = {
|
|
112
124
|
};
|
113
125
|
|
114
126
|
ACSEditURLPaths.defaultProps = {
|
115
|
-
acsDetails: {
|
127
|
+
acsDetails: {
|
128
|
+
base_url: '',
|
129
|
+
subpaths: '',
|
130
|
+
id: undefined,
|
131
|
+
},
|
116
132
|
};
|
117
133
|
|
118
134
|
export default ACSEditURLPaths;
|