katello 4.9.1 → 4.10.0.rc2
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/host_subscriptions_controller.rb +1 -1
- 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/products_controller.rb +4 -4
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +12 -5
- data/app/controllers/katello/api/v2/repositories_controller.rb +16 -17
- 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/content_facet_hosts_controller_extensions.rb +7 -9
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +14 -2
- 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_environment/destroy.rb +5 -3
- data/app/lib/actions/katello/content_view_version/destroy.rb +5 -1
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +8 -2
- data/app/lib/actions/katello/host/update_content_view.rb +4 -2
- data/app/lib/actions/katello/product/destroy.rb +15 -11
- data/app/lib/actions/katello/repository/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +10 -2
- data/app/lib/actions/katello/repository/index_content.rb +0 -1
- data/app/lib/actions/katello/repository/sync.rb +1 -3
- data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
- data/app/lib/actions/katello/repository/verify_checksum.rb +2 -10
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +12 -5
- 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/candlepin/repository_mapper.rb +1 -0
- data/app/models/katello/cdn_configuration.rb +4 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +57 -4
- data/app/models/katello/content_view.rb +21 -3
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_version.rb +4 -0
- data/app/models/katello/docker_meta_tag.rb +3 -1
- data/app/models/katello/host/content_facet.rb +10 -8
- data/app/models/katello/kt_environment.rb +1 -1
- data/app/models/katello/ping.rb +1 -12
- data/app/models/katello/product_content.rb +14 -1
- data/app/models/katello/repository.rb +6 -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/products/show.json.rabl +3 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +18 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +0 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +2 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +4 -5
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +11 -3
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +15 -7
- 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/20220228173251_remove_drpm_from_ignorable_content.rb +1 -0
- 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 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +4 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -3
- 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/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/product-details.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +17 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +55 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +13 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +5 -0
- 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 -54
- 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 -61
- 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/Create/Steps/AcsUrlPaths.js +1 -1
- 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/EditModals/ACSEditURLPaths.js +1 -1
- 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/Compare/CVVersionCompareConfig.js +1 -1
- 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/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +0 -8
- data/webpack/scenes/RedHatRepositories/index.scss +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -8
- metadata +85 -80
- data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +0 -64
- data/app/lib/actions/katello/agent_action.rb +0 -119
- data/app/lib/actions/katello/bulk_agent_action.rb +0 -34
- 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
@@ -54,6 +54,7 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
54
54
|
const [componentCvEditing, setComponentCvEditing] = useState(null);
|
55
55
|
const [componentLatest, setComponentLatest] = useState(false);
|
56
56
|
const [componentId, setComponentId] = useState(null);
|
57
|
+
const [componentVersionId, setComponentVersionId] = useState(null);
|
57
58
|
const [selectedComponentsToAdd, setSelectedComponentsToAdd] = useState(null);
|
58
59
|
const [bulkAdding, setBulkAdding] = useState(false);
|
59
60
|
const [bulkActionOpen, setBulkActionOpen] = useState(false);
|
@@ -86,6 +87,11 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
86
87
|
setVersionEditing(true);
|
87
88
|
setCompositeCvEditing(cvId);
|
88
89
|
setComponentCvEditing(componentCvId);
|
90
|
+
if (added) {
|
91
|
+
setComponentVersionId(published?.id);
|
92
|
+
} else {
|
93
|
+
setComponentVersionId(null);
|
94
|
+
}
|
89
95
|
setComponentLatest(latest);
|
90
96
|
setComponentId(added);
|
91
97
|
} else { // if no versions are present, default to always latest and add cv without modal
|
@@ -297,6 +303,7 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
297
303
|
componentCvId={componentCvEditing}
|
298
304
|
componentId={componentId}
|
299
305
|
latest={componentLatest}
|
306
|
+
componentVersionId={componentVersionId}
|
300
307
|
show={versionEditing}
|
301
308
|
setIsOpen={setVersionEditing}
|
302
309
|
aria-label="edit_component_modal"
|
@@ -13,6 +13,7 @@
|
|
13
13
|
{
|
14
14
|
"latest": true,
|
15
15
|
"id": 28,
|
16
|
+
"description": "Description_28",
|
16
17
|
"created_at": "2021-06-29 11:11:23 -0400",
|
17
18
|
"updated_at": "2021-06-29 11:11:23 -0400",
|
18
19
|
"composite_content_view": {
|
@@ -38,6 +39,7 @@
|
|
38
39
|
{
|
39
40
|
"latest": true,
|
40
41
|
"id": 23,
|
42
|
+
"description": "Description_23",
|
41
43
|
"created_at": "2021-06-29 10:25:52 -0400",
|
42
44
|
"updated_at": "2021-06-29 10:25:52 -0400",
|
43
45
|
"composite_content_view": {
|
@@ -61,8 +63,9 @@
|
|
61
63
|
"content_view_version": null
|
62
64
|
},
|
63
65
|
{
|
64
|
-
"latest":
|
66
|
+
"latest": false,
|
65
67
|
"id": null,
|
68
|
+
"description": "Description_no_version",
|
66
69
|
"created_at": null,
|
67
70
|
"updated_at": null,
|
68
71
|
"composite_content_view": {
|
@@ -125,16 +128,22 @@
|
|
125
128
|
},
|
126
129
|
"component_content_view_versions": [
|
127
130
|
{
|
128
|
-
"id":
|
129
|
-
"version": "
|
131
|
+
"id": 44,
|
132
|
+
"version": "4.0",
|
133
|
+
"description": "Version 4.0",
|
134
|
+
"published_at_words": "3 days"
|
130
135
|
},
|
131
136
|
{
|
132
137
|
"id": 42,
|
133
|
-
"version": "3.0"
|
138
|
+
"version": "3.0",
|
139
|
+
"description": "Version 3.0",
|
140
|
+
"published_at_words": "4 days"
|
134
141
|
},
|
135
142
|
{
|
136
|
-
"id":
|
137
|
-
"version": "
|
143
|
+
"id": 36,
|
144
|
+
"version": "1.0",
|
145
|
+
"description": "Version 1.0",
|
146
|
+
"published_at_words": "5 days"
|
138
147
|
}
|
139
148
|
]
|
140
149
|
},
|
@@ -201,7 +201,7 @@ test('Can add published component views to content view with modal', async (done
|
|
201
201
|
|
202
202
|
const addComponentParams = {
|
203
203
|
compositeContentViewId: 4,
|
204
|
-
components: [{ content_view_version_id:
|
204
|
+
components: [{ content_view_version_id: 13 }],
|
205
205
|
};
|
206
206
|
|
207
207
|
const addComponentScope = nockInstance
|
@@ -321,7 +321,7 @@ test('Can bulk add component views to content view with modal', async (done) =>
|
|
321
321
|
|
322
322
|
const addComponentParams = {
|
323
323
|
compositeContentViewId: 4,
|
324
|
-
components: [{ content_view_version_id:
|
324
|
+
components: [{ content_view_version_id: 42 }, { latest: true, content_view_id: 9 }],
|
325
325
|
};
|
326
326
|
|
327
327
|
const addComponentScope = nockInstance
|
@@ -329,7 +329,7 @@ test('Can bulk add component views to content view with modal', async (done) =>
|
|
329
329
|
.reply(200, {});
|
330
330
|
|
331
331
|
const {
|
332
|
-
getAllByText, getByLabelText, queryByText,
|
332
|
+
getAllByText, getByLabelText, queryByText, getAllByRole,
|
333
333
|
} = renderWithRedux(
|
334
334
|
<ContentViewComponents cvId={4} details={cvDetails} />,
|
335
335
|
renderOptions,
|
@@ -346,9 +346,10 @@ test('Can bulk add component views to content view with modal', async (done) =>
|
|
346
346
|
fireEvent.click(getByLabelText('bulk_add_components'));
|
347
347
|
await patientlyWaitFor(() => {
|
348
348
|
expect(getAllByText('Add content views')[1]).toBeInTheDocument();
|
349
|
+
expect(getAllByRole('textbox')[0]).toHaveValue('Version 4.0 (3 days ago)');
|
349
350
|
});
|
350
|
-
fireEvent.click(
|
351
|
-
fireEvent.click(
|
351
|
+
fireEvent.click(getAllByRole('textbox')[0]);
|
352
|
+
fireEvent.click(queryByText('Version 3.0'));
|
352
353
|
|
353
354
|
fireEvent.click(getByLabelText('add_components'));
|
354
355
|
await patientlyWaitFor(() => {
|
@@ -139,214 +139,60 @@
|
|
139
139
|
"repositories": [],
|
140
140
|
"versions": [
|
141
141
|
{
|
142
|
-
"id":
|
143
|
-
"version": "1.0",
|
144
|
-
"published": "2021-06-22 06:07:43 -1000",
|
145
|
-
"environment_ids": []
|
146
|
-
},
|
147
|
-
{
|
148
|
-
"id": 53,
|
149
|
-
"version": "2.0",
|
150
|
-
"published": "2021-06-22 06:09:02 -1000",
|
151
|
-
"environment_ids": []
|
152
|
-
},
|
153
|
-
{
|
154
|
-
"id": 54,
|
155
|
-
"version": "3.0",
|
156
|
-
"published": "2021-06-22 06:09:33 -1000",
|
157
|
-
"environment_ids": []
|
158
|
-
},
|
159
|
-
{
|
160
|
-
"id": 55,
|
161
|
-
"version": "4.0",
|
162
|
-
"published": "2021-06-22 06:29:29 -1000",
|
163
|
-
"environment_ids": []
|
164
|
-
},
|
165
|
-
{
|
166
|
-
"id": 56,
|
167
|
-
"version": "5.0",
|
168
|
-
"published": "2021-06-22 06:29:56 -1000",
|
169
|
-
"environment_ids": []
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"id": 57,
|
142
|
+
"id": 13,
|
173
143
|
"version": "6.0",
|
174
|
-
"published": "
|
175
|
-
"
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
"
|
180
|
-
"
|
181
|
-
"environment_ids": []
|
182
|
-
},
|
183
|
-
{
|
184
|
-
"id": 59,
|
185
|
-
"version": "8.0",
|
186
|
-
"published": "2021-06-22 06:38:01 -1000",
|
187
|
-
"environment_ids": []
|
188
|
-
},
|
189
|
-
{
|
190
|
-
"id": 60,
|
191
|
-
"version": "9.0",
|
192
|
-
"published": "2021-06-22 06:41:03 -1000",
|
193
|
-
"environment_ids": []
|
194
|
-
},
|
195
|
-
{
|
196
|
-
"id": 61,
|
197
|
-
"version": "10.0",
|
198
|
-
"published": "2021-06-22 06:53:06 -1000",
|
199
|
-
"environment_ids": []
|
200
|
-
},
|
201
|
-
{
|
202
|
-
"id": 62,
|
203
|
-
"version": "11.0",
|
204
|
-
"published": "2021-06-22 06:55:03 -1000",
|
205
|
-
"environment_ids": []
|
206
|
-
},
|
207
|
-
{
|
208
|
-
"id": 63,
|
209
|
-
"version": "12.0",
|
210
|
-
"published": "2021-06-22 06:57:47 -1000",
|
211
|
-
"environment_ids": []
|
212
|
-
},
|
213
|
-
{
|
214
|
-
"id": 64,
|
215
|
-
"version": "13.0",
|
216
|
-
"published": "2021-06-22 06:58:13 -1000",
|
217
|
-
"environment_ids": []
|
218
|
-
},
|
219
|
-
{
|
220
|
-
"id": 65,
|
221
|
-
"version": "14.0",
|
222
|
-
"published": "2021-06-22 06:58:44 -1000",
|
223
|
-
"environment_ids": []
|
224
|
-
},
|
225
|
-
{
|
226
|
-
"id": 66,
|
227
|
-
"version": "15.0",
|
228
|
-
"published": "2021-06-22 07:00:51 -1000",
|
229
|
-
"environment_ids": []
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"id": 67,
|
233
|
-
"version": "16.0",
|
234
|
-
"published": "2021-06-22 07:02:35 -1000",
|
235
|
-
"environment_ids": []
|
236
|
-
},
|
237
|
-
{
|
238
|
-
"id": 68,
|
239
|
-
"version": "17.0",
|
240
|
-
"published": "2021-06-22 07:03:15 -1000",
|
241
|
-
"environment_ids": []
|
242
|
-
},
|
243
|
-
{
|
244
|
-
"id": 69,
|
245
|
-
"version": "18.0",
|
246
|
-
"published": "2021-06-22 07:12:38 -1000",
|
247
|
-
"environment_ids": []
|
248
|
-
},
|
249
|
-
{
|
250
|
-
"id": 70,
|
251
|
-
"version": "19.0",
|
252
|
-
"published": "2021-06-22 07:38:55 -1000",
|
253
|
-
"environment_ids": []
|
254
|
-
},
|
255
|
-
{
|
256
|
-
"id": 71,
|
257
|
-
"version": "20.0",
|
258
|
-
"published": "2021-06-22 07:39:27 -1000",
|
259
|
-
"environment_ids": []
|
260
|
-
},
|
261
|
-
{
|
262
|
-
"id": 72,
|
263
|
-
"version": "21.0",
|
264
|
-
"published": "2021-06-22 08:09:53 -1000",
|
265
|
-
"environment_ids": []
|
266
|
-
},
|
267
|
-
{
|
268
|
-
"id": 73,
|
269
|
-
"version": "22.0",
|
270
|
-
"published": "2021-06-22 08:10:23 -1000",
|
271
|
-
"environment_ids": []
|
272
|
-
},
|
273
|
-
{
|
274
|
-
"id": 74,
|
275
|
-
"version": "23.0",
|
276
|
-
"published": "2021-06-22 09:24:48 -1000",
|
277
|
-
"environment_ids": []
|
278
|
-
},
|
279
|
-
{
|
280
|
-
"id": 75,
|
281
|
-
"version": "24.0",
|
282
|
-
"published": "2021-06-22 09:28:09 -1000",
|
283
|
-
"environment_ids": []
|
284
|
-
},
|
285
|
-
{
|
286
|
-
"id": 76,
|
287
|
-
"version": "25.0",
|
288
|
-
"published": "2021-06-22 09:31:50 -1000",
|
289
|
-
"environment_ids": []
|
290
|
-
},
|
291
|
-
{
|
292
|
-
"id": 77,
|
293
|
-
"version": "26.0",
|
294
|
-
"published": "2021-06-22 09:33:03 -1000",
|
295
|
-
"environment_ids": []
|
296
|
-
},
|
297
|
-
{
|
298
|
-
"id": 78,
|
299
|
-
"version": "27.0",
|
300
|
-
"published": "2021-06-22 09:34:31 -1000",
|
301
|
-
"environment_ids": []
|
302
|
-
},
|
303
|
-
{
|
304
|
-
"id": 79,
|
305
|
-
"version": "28.0",
|
306
|
-
"published": "2021-06-22 09:35:00 -1000",
|
307
|
-
"environment_ids": []
|
144
|
+
"published": "2023-08-11 10:32:48 -0400",
|
145
|
+
"description": "aaa",
|
146
|
+
"environment_ids": [
|
147
|
+
1
|
148
|
+
],
|
149
|
+
"filters_applied": false,
|
150
|
+
"published_at_words": "3 days"
|
308
151
|
},
|
309
152
|
{
|
310
|
-
"id":
|
311
|
-
"version": "
|
312
|
-
"published": "
|
313
|
-
"
|
153
|
+
"id": 12,
|
154
|
+
"version": "5.0",
|
155
|
+
"published": "2023-08-11 10:32:22 -0400",
|
156
|
+
"description": "aa",
|
157
|
+
"environment_ids": [],
|
158
|
+
"filters_applied": false,
|
159
|
+
"published_at_words": "3 days"
|
314
160
|
},
|
315
161
|
{
|
316
|
-
"id":
|
317
|
-
"version": "
|
318
|
-
"published": "
|
319
|
-
"
|
162
|
+
"id": 11,
|
163
|
+
"version": "4.0",
|
164
|
+
"published": "2023-08-11 10:31:12 -0400",
|
165
|
+
"description": "aa",
|
166
|
+
"environment_ids": [],
|
167
|
+
"filters_applied": false,
|
168
|
+
"published_at_words": "3 days"
|
320
169
|
},
|
321
170
|
{
|
322
|
-
"id":
|
323
|
-
"version": "
|
324
|
-
"published": "
|
325
|
-
"
|
171
|
+
"id": 9,
|
172
|
+
"version": "3.0",
|
173
|
+
"published": "2023-08-10 13:47:47 -0400",
|
174
|
+
"description": "ab",
|
175
|
+
"environment_ids": [],
|
176
|
+
"filters_applied": false,
|
177
|
+
"published_at_words": "4 days"
|
326
178
|
},
|
327
179
|
{
|
328
|
-
"id":
|
329
|
-
"version": "
|
330
|
-
"published": "
|
331
|
-
"
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
12,
|
336
|
-
13
|
337
|
-
]
|
180
|
+
"id": 8,
|
181
|
+
"version": "2.0",
|
182
|
+
"published": "2023-08-10 13:47:09 -0400",
|
183
|
+
"description": "",
|
184
|
+
"environment_ids": [],
|
185
|
+
"filters_applied": false,
|
186
|
+
"published_at_words": "4 days"
|
338
187
|
},
|
339
188
|
{
|
340
|
-
"id":
|
341
|
-
"version": "
|
342
|
-
"published": "
|
343
|
-
"
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
7,
|
348
|
-
9
|
349
|
-
]
|
189
|
+
"id": 7,
|
190
|
+
"version": "1.0",
|
191
|
+
"published": "2023-08-10 13:46:58 -0400",
|
192
|
+
"description": "",
|
193
|
+
"environment_ids": [],
|
194
|
+
"filters_applied": false,
|
195
|
+
"published_at_words": "4 days"
|
350
196
|
}
|
351
197
|
],
|
352
198
|
"components": [],
|
@@ -300,7 +300,7 @@ const CVErrataDateFilterContent = ({
|
|
300
300
|
isDisabled={saveDisabled}
|
301
301
|
type="submit"
|
302
302
|
>
|
303
|
-
{__('
|
303
|
+
{__('Save')}
|
304
304
|
</Button>
|
305
305
|
<Link to={`/content_views/${cvId}#/filters`}>
|
306
306
|
<Button ouiaId="cancel-save-filter-rule-button" variant="link">
|
@@ -222,7 +222,7 @@ const AddEditPackageRuleModal = ({
|
|
222
222
|
isDisabled={saving || submitDisabled}
|
223
223
|
type="submit"
|
224
224
|
>
|
225
|
-
{selectedFilterRuleData ? __('
|
225
|
+
{selectedFilterRuleData ? __('Save') : __('Add rule')}
|
226
226
|
</Button>
|
227
227
|
<Button ouiaId="add-edit-package-modal-cancel" variant="link" onClick={onClose}>
|
228
228
|
{__('Cancel')}
|
@@ -92,10 +92,10 @@ const ContentViewVersionPromote = ({
|
|
92
92
|
);
|
93
93
|
|
94
94
|
const isValid = useCallback((env) => {
|
95
|
-
if (!env.prior) return true;
|
95
|
+
if (!env.prior || versionEnvironments.some(item => item.id === env.prior.id)) return true;
|
96
96
|
if (!isChecked(prior(env))) return false;
|
97
97
|
return isValid(prior(env));
|
98
|
-
}, [prior, isChecked]);
|
98
|
+
}, [prior, isChecked, versionEnvironments]);
|
99
99
|
|
100
100
|
useDeepCompareEffect(() => {
|
101
101
|
setForcePromote(userCheckedItems.filter(item => !isValid(item)));
|
@@ -137,7 +137,7 @@ export default ({
|
|
137
137
|
selectRPMPackagesComparison(state, versionOneId, versionTwoId, viewBy),
|
138
138
|
statusSelector: state =>
|
139
139
|
selectRPMPackagesComparisonStatus(state, versionOneId, versionTwoId, viewBy),
|
140
|
-
autocompleteEndpoint: 'katello/api/v2/packages',
|
140
|
+
autocompleteEndpoint: '/katello/api/v2/packages',
|
141
141
|
bookmarkController: 'katello_content_view_components',
|
142
142
|
fetchItems: params => getRPMPackagesComparison(
|
143
143
|
versionOneId,
|
data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json
CHANGED
@@ -56,20 +56,6 @@
|
|
56
56
|
},
|
57
57
|
{
|
58
58
|
"id": 2,
|
59
|
-
"name": "dev",
|
60
|
-
"label": "dev",
|
61
|
-
"publish_date": "4 days",
|
62
|
-
"permissions": {
|
63
|
-
"readable": true,
|
64
|
-
"promotable_or_removable": true,
|
65
|
-
"all_hosts_editable": true,
|
66
|
-
"all_keys_editable": true
|
67
|
-
},
|
68
|
-
"host_count": 0,
|
69
|
-
"activation_key_count": 0
|
70
|
-
},
|
71
|
-
{
|
72
|
-
"id": 3,
|
73
59
|
"name": "dev1",
|
74
60
|
"label": "dev1",
|
75
61
|
"publish_date": "4 days",
|
@@ -81,90 +67,6 @@
|
|
81
67
|
},
|
82
68
|
"host_count": 0,
|
83
69
|
"activation_key_count": 0
|
84
|
-
},
|
85
|
-
{
|
86
|
-
"id": 4,
|
87
|
-
"name": "dev2",
|
88
|
-
"label": "dev2",
|
89
|
-
"publish_date": "4 days",
|
90
|
-
"permissions": {
|
91
|
-
"readable": true,
|
92
|
-
"promotable_or_removable": true,
|
93
|
-
"all_hosts_editable": true,
|
94
|
-
"all_keys_editable": true
|
95
|
-
},
|
96
|
-
"host_count": 0,
|
97
|
-
"activation_key_count": 0
|
98
|
-
},
|
99
|
-
{
|
100
|
-
"id": 5,
|
101
|
-
"name": "dev3",
|
102
|
-
"label": "dev3",
|
103
|
-
"publish_date": "4 days",
|
104
|
-
"permissions": {
|
105
|
-
"readable": true,
|
106
|
-
"promotable_or_removable": true,
|
107
|
-
"all_hosts_editable": true,
|
108
|
-
"all_keys_editable": true
|
109
|
-
},
|
110
|
-
"host_count": 0,
|
111
|
-
"activation_key_count": 0
|
112
|
-
},
|
113
|
-
{
|
114
|
-
"id": 6,
|
115
|
-
"name": "test",
|
116
|
-
"label": "test",
|
117
|
-
"publish_date": "4 days",
|
118
|
-
"permissions": {
|
119
|
-
"readable": true,
|
120
|
-
"promotable_or_removable": true,
|
121
|
-
"all_hosts_editable": true,
|
122
|
-
"all_keys_editable": true
|
123
|
-
},
|
124
|
-
"host_count": 0,
|
125
|
-
"activation_key_count": 0
|
126
|
-
},
|
127
|
-
{
|
128
|
-
"id": 7,
|
129
|
-
"name": "test1",
|
130
|
-
"label": "test1",
|
131
|
-
"publish_date": "4 days",
|
132
|
-
"permissions": {
|
133
|
-
"readable": true,
|
134
|
-
"promotable_or_removable": true,
|
135
|
-
"all_hosts_editable": true,
|
136
|
-
"all_keys_editable": true
|
137
|
-
},
|
138
|
-
"host_count": 0,
|
139
|
-
"activation_key_count": 0
|
140
|
-
},
|
141
|
-
{
|
142
|
-
"id": 9,
|
143
|
-
"name": "test2",
|
144
|
-
"label": "test2",
|
145
|
-
"publish_date": "4 days",
|
146
|
-
"permissions": {
|
147
|
-
"readable": true,
|
148
|
-
"promotable_or_removable": true,
|
149
|
-
"all_hosts_editable": true,
|
150
|
-
"all_keys_editable": true
|
151
|
-
},
|
152
|
-
"host_count": 0,
|
153
|
-
"activation_key_count": 0
|
154
|
-
},
|
155
|
-
{
|
156
|
-
"id": 8,
|
157
|
-
"name": "test3",
|
158
|
-
"label": "test3",
|
159
|
-
"publish_date": "4 days",
|
160
|
-
"permissions": {
|
161
|
-
"readable": true,
|
162
|
-
"promotable_or_removable": true,
|
163
|
-
"all_hosts_editable": true,
|
164
|
-
"all_keys_editable": true
|
165
|
-
},
|
166
|
-
"host_count": 0,
|
167
|
-
"activation_key_count": 0
|
168
70
|
}
|
169
71
|
],
|
170
72
|
"repositories": [
|
@@ -6,6 +6,7 @@ import api from '../../../../../services/api';
|
|
6
6
|
import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
|
7
7
|
import ContentViewVersions from '../ContentViewVersions';
|
8
8
|
import cvVersionsData from './contentViewVersions.fixtures.json';
|
9
|
+
import cvVersionsOutOfEnvData from './contentViewVersionsLatestEnvironment.fixtures.json';
|
9
10
|
import emptyCVVersionData from './emptyCVVersion.fixtures.json';
|
10
11
|
import cvVersionsTasksData from './contentViewVersionsWithTask.fixtures.json';
|
11
12
|
import contentViewTaskInProgressResponseData from './contentViewTaskInProgressResponse.fixtures.json';
|
@@ -16,6 +17,7 @@ import cvIndexData from '../../../__tests__/contentViewList.fixtures.json';
|
|
16
17
|
import contentViewFilterData from '../../Filters/__tests__/contentViewFilters.fixtures.json';
|
17
18
|
|
18
19
|
const cvPromotePath = api.getApiUrl('/content_view_versions/10/promote');
|
20
|
+
const cvPromotePath2 = api.getApiUrl('/content_view_versions/11/promote');
|
19
21
|
const cvIndexPath = api.getApiUrl('/content_views');
|
20
22
|
const promoteResponseData = contentViewTaskInProgressResponseData;
|
21
23
|
|
@@ -93,7 +95,7 @@ test('Can link to view environment and see publish time', async (done) => {
|
|
93
95
|
expect(getAllByText('Library')[0].closest('a'))
|
94
96
|
.toHaveAttribute('href', '/lifecycle_environments/1');
|
95
97
|
expect(getByText('5 days ago')).toBeTruthy();
|
96
|
-
expect(getAllByText('
|
98
|
+
expect(getAllByText('dev1')[0].closest('a'))
|
97
99
|
.toHaveAttribute('href', '/lifecycle_environments/2');
|
98
100
|
expect(getAllByText('4 days ago')[0]).toBeTruthy();
|
99
101
|
|
@@ -273,6 +275,106 @@ test('Can open Promote Modal', async (done) => {
|
|
273
275
|
act(done);
|
274
276
|
});
|
275
277
|
|
278
|
+
test('Can open Promote Modal and show out of path warnings', async (done) => {
|
279
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
280
|
+
const cvScope = nockInstance
|
281
|
+
.get(cvIndexPath)
|
282
|
+
.query(true)
|
283
|
+
.reply(200, cvIndexData);
|
284
|
+
|
285
|
+
const scope = nockInstance
|
286
|
+
.get(cvVersions)
|
287
|
+
.query(true)
|
288
|
+
.reply(200, cvVersionsOutOfEnvData);
|
289
|
+
|
290
|
+
const cvPromoteParams = {
|
291
|
+
id: 11,
|
292
|
+
versionEnvironments: [
|
293
|
+
{
|
294
|
+
id: 1,
|
295
|
+
name: 'Library',
|
296
|
+
label: 'Library',
|
297
|
+
publish_date: '5 days',
|
298
|
+
permissions: {
|
299
|
+
readable: true,
|
300
|
+
promotable_or_removable: true,
|
301
|
+
all_hosts_editable: true,
|
302
|
+
all_keys_editable: true,
|
303
|
+
},
|
304
|
+
host_count: 0,
|
305
|
+
activation_key_count: 0,
|
306
|
+
},
|
307
|
+
{
|
308
|
+
id: 3,
|
309
|
+
name: 'test',
|
310
|
+
label: 'test',
|
311
|
+
publish_date: '4 days',
|
312
|
+
permissions: {
|
313
|
+
readable: true,
|
314
|
+
promotable_or_removable: true,
|
315
|
+
all_hosts_editable: true,
|
316
|
+
all_keys_editable: true,
|
317
|
+
},
|
318
|
+
host_count: 0,
|
319
|
+
activation_key_count: 0,
|
320
|
+
},
|
321
|
+
],
|
322
|
+
description: '',
|
323
|
+
environment_ids: [5, 4],
|
324
|
+
force: true,
|
325
|
+
};
|
326
|
+
|
327
|
+
const promoteScope = nockInstance
|
328
|
+
.post(cvPromotePath2, cvPromoteParams)
|
329
|
+
.reply(202, promoteResponseData);
|
330
|
+
|
331
|
+
const {
|
332
|
+
getByText, queryByText, getByLabelText, getAllByLabelText,
|
333
|
+
} = renderWithRedux(
|
334
|
+
withCVRoute(<ContentViewVersions cvId={5} details={cvDetailData} />),
|
335
|
+
renderOptions,
|
336
|
+
);
|
337
|
+
|
338
|
+
expect(queryByText(`Version ${firstVersion.version}`)).toBeNull();
|
339
|
+
await patientlyWaitFor(() => {
|
340
|
+
expect(getByText(`Version ${firstVersion.version}`)).toBeInTheDocument();
|
341
|
+
});
|
342
|
+
// Expand Row Action
|
343
|
+
expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'false');
|
344
|
+
fireEvent.click(getAllByLabelText('Actions')[0]);
|
345
|
+
expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true');
|
346
|
+
fireEvent.click(getByText('Promote'));
|
347
|
+
await patientlyWaitFor(() => {
|
348
|
+
expect(getByText('Select a lifecycle environment from the available promotion paths to promote new version.')).toBeInTheDocument();
|
349
|
+
expect(getByLabelText('prod')).toBeInTheDocument();
|
350
|
+
});
|
351
|
+
// Select env prod out of Env path: Library, dev1, test, test2, prod
|
352
|
+
fireEvent.click(getByLabelText('prod'));
|
353
|
+
await patientlyWaitFor(() => {
|
354
|
+
// Force promotion info is shown because test -> prod is out of order
|
355
|
+
expect(getByText('Force promotion')).toBeInTheDocument();
|
356
|
+
});
|
357
|
+
fireEvent.click(getByLabelText('test2'));
|
358
|
+
await patientlyWaitFor(() => {
|
359
|
+
// Force promotion info is shown because test -> test2 -> prod is out of order
|
360
|
+
expect(queryByText('Force promotion')).toBeNull();
|
361
|
+
});
|
362
|
+
|
363
|
+
fireEvent.click(getByLabelText('promote_content_view'));
|
364
|
+
// Modal closes itself
|
365
|
+
await patientlyWaitFor(() => {
|
366
|
+
expect(queryByText('Select a lifecycle environment from the available promotion paths to promote new version.')).toBeNull();
|
367
|
+
expect(getByText(`Version ${firstVersion.version}`)).toBeInTheDocument();
|
368
|
+
});
|
369
|
+
assertNockRequest(autocompleteScope);
|
370
|
+
assertNockRequest(scope);
|
371
|
+
assertNockRequest(promoteScope);
|
372
|
+
// Page is refreshed
|
373
|
+
assertNockRequest(scope);
|
374
|
+
assertNockRequest(cvScope);
|
375
|
+
act(done);
|
376
|
+
});
|
377
|
+
|
276
378
|
test('Can reload versions upon task completion', async (done) => {
|
277
379
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
278
380
|
const { results: withTaskResults } = cvVersionsTasksData;
|