katello 4.9.2 → 4.10.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/README.md +4 -7
- data/app/assets/javascripts/katello/locale/bn/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/ca/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/cs/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +8969 -0
- data/app/assets/javascripts/katello/locale/de/katello.js +8991 -1
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/el/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/en/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/en_US/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/es/katello.js +8984 -1
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/fr/katello.js +9008 -1
- data/app/assets/javascripts/katello/locale/gl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/gu/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/hi/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/id/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/it/katello.js +8974 -1
- data/app/assets/javascripts/katello/locale/ja/katello.js +9004 -1
- data/app/assets/javascripts/katello/locale/ka/katello.js +8976 -1
- data/app/assets/javascripts/katello/locale/kn/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/ko/katello.js +8972 -1
- data/app/assets/javascripts/katello/locale/locale/katello.js +3070 -1
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/mr/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/or/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pa/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/pt/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +8984 -1
- data/app/assets/javascripts/katello/locale/ro/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/ru/katello.js +8973 -1
- data/app/assets/javascripts/katello/locale/sl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/ta/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/te/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/tr/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/vi/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/zh/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +9004 -1
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +8972 -1
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/alternate_content_sources_bulk_actions_controller.rb +22 -1
- data/app/controllers/katello/api/v2/api_controller.rb +0 -15
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +13 -4
- data/app/controllers/katello/api/v2/host_errata_controller.rb +0 -12
- data/app/controllers/katello/api/v2/host_packages_controller.rb +0 -55
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +0 -77
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -10
- data/app/controllers/katello/api/v2/sync_controller.rb +0 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +0 -10
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +1 -1
- data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -9
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +8 -2
- data/app/lib/actions/katello/repository/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +4 -9
- data/app/lib/katello/resources/cdn.rb +4 -0
- data/app/lib/katello/validators/alternate_content_source_products_validator.rb +1 -1
- data/app/models/katello/cdn_configuration.rb +4 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +2 -1
- data/app/models/katello/content_view.rb +5 -1
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_version.rb +4 -0
- data/app/models/katello/host/content_facet.rb +4 -5
- data/app/models/katello/ping.rb +0 -19
- data/app/models/katello/repository.rb +5 -1
- data/app/models/katello/root_repository.rb +2 -8
- data/app/services/katello/applicability/applicable_content_helper.rb +2 -2
- data/app/services/katello/registration_manager.rb +2 -12
- data/app/views/foreman/job_templates/configure_host_for_new_content_source.erb +25 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -12
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +4 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +6 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +0 -1
- data/config/initializers/monkeys.rb +1 -0
- data/config/katello.yaml.example +0 -4
- data/config/routes/api/v2.rb +3 -0
- data/config/routes/overrides.rb +0 -11
- data/db/migrate/20230609155411_add_custom_cdn_auth_enabled_to_katello_cdn_configurations.rb +5 -0
- data/db/migrate/20230710190626_remove_relative_path_limit.rb +5 -0
- data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +20 -0
- data/db/migrate/20230828143236_remove_katello_agent_dispatch_history.rb +15 -0
- data/db/seeds.d/111-upgrade_tasks.rb +1 -2
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/README.md +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +8 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +3 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -65
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-applicable.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +2 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -39
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-applicable.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/views/file-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +235 -521
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +13 -2
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -3
- data/lib/katello/engine.rb +0 -18
- data/lib/katello/permission_creator.rb +1 -1
- data/lib/katello/plugin.rb +0 -25
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/remove_hidden_distribution.rb +383 -0
- data/locale/action_names.rb +3 -1
- data/locale/bn/katello.po +130 -39
- data/locale/bn_IN/katello.po +130 -39
- data/locale/ca/katello.po +130 -39
- data/locale/cs/katello.po +130 -39
- data/locale/cs_CZ/katello.po +130 -39
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +134 -43
- data/locale/de_AT/katello.po +130 -39
- data/locale/de_DE/katello.po +130 -39
- data/locale/el/katello.po +130 -39
- data/locale/en/katello.po +130 -39
- data/locale/en_GB/katello.po +130 -39
- data/locale/en_US/katello.po +130 -39
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +133 -42
- data/locale/et_EE/katello.po +130 -39
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +138 -47
- data/locale/gl/katello.po +130 -39
- data/locale/gu/katello.po +130 -39
- data/locale/he_IL/katello.po +130 -39
- data/locale/hi/katello.po +130 -39
- data/locale/id/katello.po +130 -39
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +131 -40
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +138 -47
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +131 -40
- data/locale/katello.pot +805 -642
- data/locale/kn/katello.po +130 -39
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +131 -40
- data/locale/ml_IN/katello.po +130 -39
- data/locale/mr/katello.po +130 -39
- data/locale/nl_NL/katello.po +130 -39
- data/locale/or/katello.po +130 -39
- data/locale/pa/katello.po +130 -39
- data/locale/pl/katello.po +130 -39
- data/locale/pl_PL/katello.po +130 -39
- data/locale/pt/katello.po +130 -39
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +133 -42
- data/locale/ro/katello.po +130 -39
- data/locale/ro_RO/katello.po +130 -39
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +131 -40
- data/locale/sl/katello.po +130 -39
- data/locale/sv_SE/katello.po +130 -39
- data/locale/ta/katello.po +130 -39
- data/locale/ta_IN/katello.po +130 -39
- data/locale/te/katello.po +130 -39
- data/locale/tr/katello.po +130 -39
- data/locale/vi/katello.po +130 -39
- data/locale/vi_VN/katello.po +130 -39
- data/locale/zh/katello.po +130 -39
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +138 -47
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +131 -40
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +0 -5
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +9 -3
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +7 -58
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +2 -11
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesActions.js +1 -40
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +0 -3
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +5 -40
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +6 -65
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +5 -4
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +0 -212
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +2 -157
- data/webpack/components/extensions/HostDetails/hostDetailsHelpers.js +0 -20
- data/webpack/containers/Application/config.js +5 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyActions.js +31 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyConstants.js +3 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +127 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.scss +37 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetailsSelectors.js +16 -0
- data/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js +117 -0
- data/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js +77 -0
- data/webpack/scenes/ActivationKeys/Details/components/DeleteModal.js +63 -0
- data/webpack/scenes/ActivationKeys/Details/components/EditModal.js +199 -0
- data/webpack/scenes/ActivationKeys/Details/index.js +3 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +10 -5
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +8 -3
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +8 -3
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +2 -2
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +37 -29
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +53 -37
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +7 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +15 -6
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +6 -5
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +43 -197
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +0 -98
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +103 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsLatestEnvironment.fixtures.json +634 -0
- data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +1 -1
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +14 -12
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +45 -6
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +42 -7
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +37 -10
- data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +5 -0
- data/webpack/scenes/RedHatRepositories/index.scss +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -2
- metadata +85 -81
- data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +0 -64
- data/app/lib/actions/katello/agent_action.rb +0 -120
- data/app/lib/actions/katello/bulk_agent_action.rb +0 -37
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +0 -44
- data/app/lib/actions/katello/host/erratum/install.rb +0 -38
- data/app/lib/actions/katello/host/package/install.rb +0 -34
- data/app/lib/actions/katello/host/package/remove.rb +0 -48
- data/app/lib/actions/katello/host/package/update.rb +0 -42
- data/app/lib/actions/katello/host/package_group/install.rb +0 -30
- data/app/lib/actions/katello/host/package_group/remove.rb +0 -30
- data/app/lib/katello/agent/base_message.rb +0 -41
- data/app/lib/katello/agent/client_message_handler.rb +0 -69
- data/app/lib/katello/agent/connection.rb +0 -38
- data/app/lib/katello/agent/install_errata_message.rb +0 -25
- data/app/lib/katello/agent/install_package_group_message.rb +0 -25
- data/app/lib/katello/agent/install_package_message.rb +0 -28
- data/app/lib/katello/agent/remove_package_group_message.rb +0 -25
- data/app/lib/katello/agent/remove_package_message.rb +0 -28
- data/app/lib/katello/agent/update_package_message.rb +0 -33
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +0 -59
- data/app/lib/katello/qpid/connection.rb +0 -149
- data/app/lib/katello/util/default_enablement_migrator.rb +0 -183
- data/app/models/katello/agent/dispatch_history.rb +0 -19
- data/app/models/katello/events/delete_host_agent_queue.rb +0 -19
- data/app/services/katello/agent/dispatcher.rb +0 -60
- data/app/views/foreman/job_templates/change_content_source.erb +0 -18
- data/app/views/katello/api/v2/sync/index.json.rabl +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +0 -8
- data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +0 -13
- data/webpack/components/extensions/HostDetails/common/KatelloAgentDeprecationAlert.js +0 -23
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
2
3
|
import { useSelector } from 'react-redux';
|
3
4
|
import {
|
4
5
|
ActionGroup,
|
@@ -11,6 +12,7 @@ import {
|
|
11
12
|
SelectOption,
|
12
13
|
SelectVariant,
|
13
14
|
TextContent,
|
15
|
+
Text,
|
14
16
|
} from '@patternfly/react-core';
|
15
17
|
import { translate as __ } from 'foremanReact/common/I18n';
|
16
18
|
import PropTypes from 'prop-types';
|
@@ -96,6 +98,7 @@ const ContentSourceForm = ({
|
|
96
98
|
contentHosts,
|
97
99
|
isLoading,
|
98
100
|
hostsUpdated,
|
101
|
+
showTemplate,
|
99
102
|
}) => {
|
100
103
|
const pathsUrl = `/organizations/${orgId()}/environments/paths?permission_type=promotable${contentSourceId ? `&content_source_id=${contentSourceId}` : ''}`;
|
101
104
|
useAPI( // No TableWrapper here, so we can useAPI from Foreman
|
@@ -108,6 +111,7 @@ const ContentSourceForm = ({
|
|
108
111
|
const envList = environmentPathResponse?.results?.map(path => path.environments).flat();
|
109
112
|
const [csSelectOpen, setCSSelectOpen] = useState(false);
|
110
113
|
const [cvSelectOpen, setCVSelectOpen] = useState(false);
|
114
|
+
const hostCount = contentHosts.length;
|
111
115
|
|
112
116
|
const handleCSSelect = (_event, selection) => {
|
113
117
|
handleContentSource(selection);
|
@@ -122,10 +126,10 @@ const ContentSourceForm = ({
|
|
122
126
|
const formIsValid = () => (!!environments &&
|
123
127
|
!!contentViewName &&
|
124
128
|
!!contentSourceId &&
|
125
|
-
|
129
|
+
hostCount !== 0);
|
126
130
|
|
127
131
|
const contentSourcesIsDisabled = (isLoading || contentSources.length === 0 ||
|
128
|
-
|
132
|
+
hostCount === 0);
|
129
133
|
const environmentIsDisabled = (isLoading || environments === [] ||
|
130
134
|
contentSourceId === '');
|
131
135
|
const viewIsDisabled = (isLoading || contentViews.length === 0 ||
|
@@ -152,7 +156,7 @@ const ContentSourceForm = ({
|
|
152
156
|
isHorizontal
|
153
157
|
>
|
154
158
|
<Grid hasGutter className="margin-top-16">
|
155
|
-
{(
|
159
|
+
{(hostCount === 0 && !isLoading) && (
|
156
160
|
|
157
161
|
<GridItem span={7}>
|
158
162
|
<Alert
|
@@ -203,7 +207,7 @@ const ContentSourceForm = ({
|
|
203
207
|
setUserCheckedItems={handleEnvironment}
|
204
208
|
publishing={false}
|
205
209
|
multiSelect={false}
|
206
|
-
headerText={__('
|
210
|
+
headerText={__('Lifecycle environment')}
|
207
211
|
isDisabled={environmentIsDisabled || hostsUpdated}
|
208
212
|
/>
|
209
213
|
<ContentViewSelect
|
@@ -225,17 +229,51 @@ const ContentSourceForm = ({
|
|
225
229
|
env={environments[0]}
|
226
230
|
/>))}
|
227
231
|
</ContentViewSelect>
|
232
|
+
<TextContent>
|
233
|
+
<Text
|
234
|
+
ouiaId="ccs-options-description"
|
235
|
+
>
|
236
|
+
<FormattedMessage
|
237
|
+
defaultMessage={__('After configuring Foreman, configuration must also be updated on {hosts}. Choose one of the following options to update {hosts}:')}
|
238
|
+
values={{
|
239
|
+
hosts: (
|
240
|
+
<FormattedMessage
|
241
|
+
defaultMessage="{count, plural, one {{singular}} other {# {plural}}}"
|
242
|
+
values={{
|
243
|
+
count: hostCount,
|
244
|
+
singular: __('the host'),
|
245
|
+
plural: __('hosts'),
|
246
|
+
}}
|
247
|
+
id="ccs-options-i18n"
|
248
|
+
/>
|
249
|
+
),
|
250
|
+
}}
|
251
|
+
id="ccs-options-description-i18n"
|
252
|
+
/>
|
253
|
+
</Text>
|
254
|
+
</TextContent>
|
228
255
|
<ActionGroup style={{ display: 'block' }}>
|
229
256
|
<Button
|
230
257
|
variant="primary"
|
231
258
|
id="generate_btn"
|
232
259
|
ouiaId="update-source-button"
|
233
|
-
onClick={e => handleSubmit(e)}
|
260
|
+
onClick={e => handleSubmit(e, { shouldRedirect: true })}
|
261
|
+
isDisabled={isLoading || !formIsValid() || hostsUpdated}
|
262
|
+
isLoading={isLoading}
|
263
|
+
>
|
264
|
+
{__('Run job invocation')}
|
265
|
+
</Button>
|
266
|
+
<Button
|
267
|
+
variant="secondary"
|
268
|
+
id="generate_btn"
|
269
|
+
ouiaId="update-source-button"
|
270
|
+
onClick={showTemplate}
|
234
271
|
isDisabled={isLoading || !formIsValid() || hostsUpdated}
|
235
272
|
isLoading={isLoading}
|
236
273
|
>
|
237
|
-
{__('Update')}
|
274
|
+
{__('Update hosts manually')}
|
238
275
|
</Button>
|
276
|
+
|
239
277
|
</ActionGroup>
|
240
278
|
</Form>);
|
241
279
|
};
|
@@ -253,6 +291,7 @@ ContentSourceForm.propTypes = {
|
|
253
291
|
contentHosts: PropTypes.arrayOf(PropTypes.shape({})),
|
254
292
|
isLoading: PropTypes.bool,
|
255
293
|
hostsUpdated: PropTypes.bool,
|
294
|
+
showTemplate: PropTypes.func.isRequired,
|
256
295
|
};
|
257
296
|
|
258
297
|
ContentSourceForm.defaultProps = {
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
16
16
|
|
17
17
|
import { copyToClipboard } from '../helpers';
|
18
18
|
|
19
|
-
const ContentSourceTemplate = ({ template,
|
19
|
+
const ContentSourceTemplate = ({ template, hostCount }) => {
|
20
20
|
const [isExpanded, setIsExpanded] = useState(false);
|
21
21
|
const [isCopied, setCopied] = useState(false);
|
22
22
|
|
@@ -41,19 +41,54 @@ const ContentSourceTemplate = ({ template, jobInvocationPath }) => {
|
|
41
41
|
return (
|
42
42
|
<Grid>
|
43
43
|
<GridItem span={7}>
|
44
|
+
<Alert
|
45
|
+
ouiaId="host-server-content-source-complete"
|
46
|
+
variant="info"
|
47
|
+
title={__('Configuration updated on Foreman')}
|
48
|
+
className="margin-top-20"
|
49
|
+
isInline
|
50
|
+
/>
|
44
51
|
<Alert
|
45
52
|
ouiaId="host-configuration-alert"
|
46
53
|
variant="warning"
|
47
|
-
title={
|
54
|
+
title={
|
55
|
+
<FormattedMessage
|
56
|
+
defaultMessage={__('Configuration still must be updated on {hosts}')}
|
57
|
+
values={{
|
58
|
+
hosts: (
|
59
|
+
<FormattedMessage
|
60
|
+
defaultMessage="{count, plural, one {{singular}} other {# {plural}}}"
|
61
|
+
values={{
|
62
|
+
count: hostCount,
|
63
|
+
singular: __('the host'),
|
64
|
+
plural: __('hosts'),
|
65
|
+
}}
|
66
|
+
id="ccs-status-i18n"
|
67
|
+
/>
|
68
|
+
),
|
69
|
+
}}
|
70
|
+
id="ccs-status-description-i18n"
|
71
|
+
/>
|
72
|
+
}
|
48
73
|
className="margin-top-20"
|
49
74
|
isInline
|
50
75
|
>
|
51
76
|
<FormattedMessage
|
52
|
-
|
77
|
+
defaultMessage={__('To finish the process of changing the content source, run the following script manually on {hosts}.')}
|
53
78
|
values={{
|
54
|
-
|
79
|
+
hosts: (
|
80
|
+
<FormattedMessage
|
81
|
+
defaultMessage="{count, plural, one {{singular}} other {{plural}}}"
|
82
|
+
values={{
|
83
|
+
count: hostCount,
|
84
|
+
singular: __('the host'),
|
85
|
+
plural: __('the hosts'),
|
86
|
+
}}
|
87
|
+
id="ccs-status2-i18n"
|
88
|
+
/>
|
89
|
+
),
|
55
90
|
}}
|
56
|
-
|
91
|
+
id="ccs-status2-description-i18n"
|
57
92
|
/>
|
58
93
|
</Alert>
|
59
94
|
|
@@ -81,12 +116,12 @@ const ContentSourceTemplate = ({ template, jobInvocationPath }) => {
|
|
81
116
|
|
82
117
|
ContentSourceTemplate.propTypes = {
|
83
118
|
template: PropTypes.string,
|
84
|
-
|
119
|
+
hostCount: PropTypes.number,
|
85
120
|
};
|
86
121
|
|
87
122
|
ContentSourceTemplate.defaultProps = {
|
88
123
|
template: '',
|
89
|
-
|
124
|
+
hostCount: 1,
|
90
125
|
};
|
91
126
|
|
92
127
|
export default ContentSourceTemplate;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
1
|
+
import React, { useState, useEffect, useMemo } from 'react';
|
2
2
|
import { useSelector, useDispatch } from 'react-redux';
|
3
3
|
|
4
|
-
import { Alert, Grid, GridItem, PageSection, Title } from '@patternfly/react-core';
|
4
|
+
import { Alert, Grid, GridItem, PageSection, Title, Text, TextContent } from '@patternfly/react-core';
|
5
5
|
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
7
7
|
import { foremanUrl } from 'foremanReact/common/helpers';
|
@@ -53,12 +53,23 @@ const ChangeContentSourcePage = () => {
|
|
53
53
|
const [contentSourceId, setCapsuleId] = useState('');
|
54
54
|
const [selectedEnvironment, setSelectedEnvironment] = useState([]);
|
55
55
|
const [contentViewName, setContentViewName] = useState('');
|
56
|
+
const [shouldShowTemplate, setShouldShowTemplate] = useState(false);
|
57
|
+
const [redirect, setRedirect] = useState(false);
|
56
58
|
|
57
59
|
const contentViewId = contentViews?.find(cv => cv.name === contentViewName)?.id;
|
58
|
-
const
|
60
|
+
const hostIds = useMemo(() => getHostIds(urlParams.host_id), [urlParams.host_id]);
|
61
|
+
const noHostSpecified = (hostIds.length === 0 && urlParams.searchParam === '');
|
59
62
|
const environmentId = selectedEnvironment[0]?.id;
|
60
63
|
|
61
|
-
const
|
64
|
+
const redirectToJobInvocationForm = () => setRedirect(true);
|
65
|
+
|
66
|
+
const handleSuccess = ({ shouldRedirect }) => {
|
67
|
+
if (shouldRedirect) {
|
68
|
+
redirectToJobInvocationForm();
|
69
|
+
}
|
70
|
+
};
|
71
|
+
|
72
|
+
const handleSubmit = (e, { shouldRedirect = false }) => {
|
62
73
|
e.preventDefault();
|
63
74
|
|
64
75
|
dispatch(changeContentSource(
|
@@ -66,7 +77,7 @@ const ChangeContentSourcePage = () => {
|
|
66
77
|
contentViewId,
|
67
78
|
contentSourceId,
|
68
79
|
contentHosts.map(h => h.id),
|
69
|
-
|
80
|
+
() => handleSuccess({ shouldRedirect }),
|
70
81
|
));
|
71
82
|
};
|
72
83
|
|
@@ -80,6 +91,11 @@ const ChangeContentSourcePage = () => {
|
|
80
91
|
}
|
81
92
|
};
|
82
93
|
|
94
|
+
const showTemplate = (e) => {
|
95
|
+
handleSubmit(e, { shouldRedirect: false });
|
96
|
+
setShouldShowTemplate(true);
|
97
|
+
};
|
98
|
+
|
83
99
|
const breadcrumbItems = () => {
|
84
100
|
const linkHosts = { caption: __('Hosts'), url: foremanUrl('/hosts') };
|
85
101
|
const linkContent = { caption: __('Change host content source') };
|
@@ -102,8 +118,12 @@ const ChangeContentSourcePage = () => {
|
|
102
118
|
}
|
103
119
|
};
|
104
120
|
useEffect(() => {
|
105
|
-
dispatch(getFormData(
|
106
|
-
}, [dispatch,
|
121
|
+
dispatch(getFormData(hostIds, urlParams.searchParam));
|
122
|
+
}, [dispatch, hostIds, urlParams.searchParam]);
|
123
|
+
|
124
|
+
if (redirect && jobInvocationPath) {
|
125
|
+
window.location.assign(jobInvocationPath); // redirect to job invocation wizard
|
126
|
+
}
|
107
127
|
|
108
128
|
return (
|
109
129
|
<>
|
@@ -125,9 +145,15 @@ const ChangeContentSourcePage = () => {
|
|
125
145
|
ouiaId="change-cs-title"
|
126
146
|
headingLevel="h5"
|
127
147
|
size="2xl"
|
148
|
+
className="margin-top-20"
|
128
149
|
>
|
129
150
|
{__('Change host content source')}
|
130
151
|
</Title>
|
152
|
+
<TextContent>
|
153
|
+
<Text ouiaId="change-content-source-description" id="ccs-description">
|
154
|
+
{__('Changing a host\'s content source will change the Smart Proxy from which the host gets its content.')}
|
155
|
+
</Text>
|
156
|
+
</TextContent>
|
131
157
|
</GridItem>
|
132
158
|
{noHostSpecified &&
|
133
159
|
<GridItem span={7}>
|
@@ -158,11 +184,12 @@ const ChangeContentSourcePage = () => {
|
|
158
184
|
handleContentSource={handleContentSource}
|
159
185
|
contentHosts={contentHosts}
|
160
186
|
isLoading={isLoading}
|
161
|
-
hostsUpdated={apiChangeStatus === STATUS.RESOLVED}
|
187
|
+
hostsUpdated={apiChangeStatus === STATUS.RESOLVED || shouldShowTemplate}
|
188
|
+
showTemplate={showTemplate}
|
162
189
|
/>
|
163
190
|
</> }
|
164
|
-
{ apiChangeStatus === STATUS.RESOLVED &&
|
165
|
-
<ContentSourceTemplate template={template}
|
191
|
+
{ (apiChangeStatus === STATUS.RESOLVED && shouldShowTemplate) &&
|
192
|
+
<ContentSourceTemplate template={template} hostCount={contentHosts.length} /> }
|
166
193
|
</Grid>
|
167
194
|
</PageSection>
|
168
195
|
</>
|
@@ -101,8 +101,8 @@ class ManageManifestModal extends Component {
|
|
101
101
|
header: __('There is no Manifest History to display.'),
|
102
102
|
description: __('Import a Manifest using the manifest tab above.'),
|
103
103
|
documentation: {
|
104
|
-
label: __('Learn more about adding Subscription Manifests'),
|
105
|
-
url: '
|
104
|
+
label: __('Learn more about adding Subscription Manifests '),
|
105
|
+
url: 'https://access.redhat.com/solutions/3410771',
|
106
106
|
},
|
107
107
|
});
|
108
108
|
|