katello 5.0.0 → 5.1.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +73 -73
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/ca/katello.js +73 -73
- data/app/assets/javascripts/katello/locale/cs/katello.js +73 -73
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +76 -76
- data/app/assets/javascripts/katello/locale/de/katello.js +78 -78
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +74 -74
- data/app/assets/javascripts/katello/locale/el/katello.js +74 -74
- data/app/assets/javascripts/katello/locale/en/katello.js +73 -73
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/en_US/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/es/katello.js +77 -77
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/fr/katello.js +328 -328
- data/app/assets/javascripts/katello/locale/gl/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/gu/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/hi/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/id/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/it/katello.js +75 -75
- data/app/assets/javascripts/katello/locale/ja/katello.js +401 -401
- data/app/assets/javascripts/katello/locale/ka/katello.js +77 -77
- data/app/assets/javascripts/katello/locale/kn/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/ko/katello.js +315 -315
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/mr/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/or/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/pa/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/pl/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/pt/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +78 -78
- data/app/assets/javascripts/katello/locale/ro/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/ru/katello.js +75 -75
- data/app/assets/javascripts/katello/locale/sl/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/ta/katello.js +73 -73
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/te/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/tr/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/vi/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/zh/katello.js +72 -72
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +306 -306
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +75 -75
- data/app/assets/javascripts/katello/organizations/download_certificate.js +65 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +123 -34
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -12
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +4 -8
- data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +6 -0
- data/app/controllers/katello/api/v2/capsules_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +14 -4
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/docker_tags_controller.rb +5 -2
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_contents_controller.rb +2 -3
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +2 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +30 -5
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +2 -2
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +3 -2
- data/app/controllers/katello/api/v2/sync_status_controller.rb +1 -1
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +5 -0
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
- data/app/helpers/katello/katello_urls_helper.rb +1 -3
- data/app/helpers/katello/sync_management_helper.rb +1 -0
- data/app/lib/actions/katello/repository/sync.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -1
- data/app/lib/actions/pulp3/orchestration/repository/delete.rb +2 -2
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +61 -2
- data/app/lib/katello/errors.rb +1 -2
- data/app/lib/katello/http_resource.rb +2 -1
- data/app/lib/katello/resources/candlepin/owner.rb +11 -2
- data/app/lib/katello/resources/candlepin.rb +2 -0
- data/app/lib/katello/resources/registry.rb +11 -3
- data/app/models/katello/activation_key.rb +0 -4
- data/app/models/katello/concerns/hostgroup_extensions.rb +8 -1
- data/app/models/katello/concerns/redhat_extensions.rb +9 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
- data/app/models/katello/content_view_environment_activation_key.rb +7 -5
- data/app/models/katello/glue/candlepin/owner.rb +8 -0
- data/app/models/katello/host/content_facet.rb +0 -4
- data/app/models/katello/ping.rb +1 -0
- data/app/models/katello/repository.rb +4 -1
- data/app/models/katello/rhel_lifecycle_status.rb +3 -3
- data/app/models/katello/root_repository.rb +7 -3
- data/app/models/katello/sync_plan.rb +24 -11
- data/app/overrides/add_organization_attributes.rb +6 -0
- data/app/overrides/add_smart_proxy_form.rb +5 -0
- data/app/presenters/katello/sync_status_presenter.rb +23 -8
- data/app/services/cert/certs.rb +44 -0
- data/app/services/katello/pulp3/api/apt.rb +1 -1
- data/app/services/katello/pulp3/api/core.rb +1 -1
- data/app/services/katello/pulp3/api/docker.rb +3 -2
- data/app/services/katello/pulp3/repository/apt.rb +2 -2
- data/app/services/katello/pulp3/repository/docker.rb +11 -2
- data/app/services/katello/pulp3/repository/file.rb +6 -0
- data/app/services/katello/pulp3/repository/generic.rb +13 -4
- data/app/services/katello/pulp3/repository.rb +5 -4
- data/app/services/katello/registration_manager.rb +22 -22
- data/app/services/katello/repository_type.rb +2 -1
- data/app/services/katello/smart_proxy_helper.rb +2 -1
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +0 -4
- data/app/views/katello/api/v2/products/base.json.rabl +4 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +5 -2
- data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
- data/app/views/overrides/organizations/_edit_override.html.erb +15 -6
- data/app/views/overrides/smart_proxies/_container_registry_auth.html.erb +3 -0
- data/config/initializers/monkeys.rb +2 -1
- data/config/routes/api/v2.rb +1 -0
- data/config/routes/overrides.rb +4 -0
- data/db/migrate/20240924161240_katello_recreate_evr_constructs.rb +141 -141
- data/db/migrate/20260505000000_add_container_registry_auth_to_smart_proxy.katello.rb +5 -0
- data/db/migrate/20260824210645_set_default_download_policy_for_python_repos.rb +11 -0
- data/db/migrate/20260918090000_use_big_int_for_host_installed_packages_id.rb +11 -0
- data/db/migrate/20260918120000_remove_allow_multiple_content_views_setting.rb +9 -0
- data/db/migrate/20260918133000_use_big_int_for_content_facet_applicable_rpms.rb +9 -0
- data/db/migrate/20261021000000_change_manage_subscription_allocations_permission_resource_type.rb +11 -0
- data/db/seeds.d/111-upgrade_tasks.rb +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +10 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.routes.js +2 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +11 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +10 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +10 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +9 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +11 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +33 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +10 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +31 -39
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +9 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +43 -49
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +11 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +10 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +8 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +21 -26
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +10 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +13 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +1 -0
- data/lib/katello/permission_creator.rb +1 -1
- data/lib/katello/permissions/organization_permissions.rb +1 -0
- data/lib/katello/plugin.rb +2 -20
- data/lib/katello/repository_types/deb.rb +1 -0
- data/lib/katello/repository_types/docker.rb +1 -0
- data/lib/katello/repository_types/file.rb +5 -2
- data/lib/katello/repository_types/python.rb +1 -0
- data/lib/katello/repository_types/yum.rb +1 -0
- data/lib/katello/tasks/refresh_repos.rake +2 -2
- data/lib/katello/tasks/upgrades/4.19/populate_repository_version_prns.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/pulp_file_sync_optimize.rb +29 -0
- data/lib/monkeys/remove_unsupported_binding_defaults.rb +67 -0
- data/locale/Makefile +21 -7
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +73 -73
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +72 -72
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +73 -73
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +74 -73
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +77 -77
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +79 -79
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +72 -72
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +75 -75
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +74 -74
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +74 -73
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +72 -72
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +72 -72
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +79 -80
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +72 -72
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +332 -332
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +72 -72
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +72 -72
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +72 -72
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +72 -72
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +72 -72
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +75 -75
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +403 -404
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +77 -77
- data/locale/katello.pot +1019 -1051
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +72 -72
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +317 -317
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +72 -72
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +72 -72
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +72 -72
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +72 -72
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +72 -72
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +72 -72
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +72 -72
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +72 -72
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +80 -80
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +72 -72
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +72 -72
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +75 -75
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +72 -72
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +72 -72
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +73 -73
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +72 -72
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +72 -72
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +72 -72
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +72 -72
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +72 -72
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +72 -72
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +306 -306
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +75 -75
- data/package.json +4 -4
- data/webpack/ForemanColumnExtensions/index.js +0 -22
- data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +18 -0
- data/webpack/components/RoutedTabs/index.js +5 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/AssignHostCVModal.js +11 -20
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +4 -19
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/OrderableAssignments.js +2 -6
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/AssignHostCVModal.test.js +3 -221
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViewDetailsCard.test.js +5 -12
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/orderable.js +149 -0
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +2 -5
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/BulkAssignCVEnvsModal.js +3 -11
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/__tests__/BulkAssignCVEnvsModal.test.js +1 -60
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/index.js +1 -6
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +1 -0
- data/webpack/global_test_setup.js +21 -34
- data/webpack/redux/actions/RedHatRepositories/helpers.js +3 -3
- data/webpack/scenes/ActivationKeys/Details/components/AssignAKCVModal.js +2 -6
- data/webpack/scenes/ActivationKeys/Details/components/AssignmentModalComponents.js +2 -9
- data/webpack/scenes/ActivationKeys/Details/components/CreateAKCVModal.js +2 -6
- data/webpack/scenes/ActivationKeys/Details/components/CvEnvDetailsCard.js +1 -6
- data/webpack/scenes/ActivationKeys/Details/components/CvEnvDetailsCreateCard.js +1 -7
- data/webpack/scenes/ActivationKeys/Details/components/__tests__/AssignAKCVModal.test.js +3 -212
- data/webpack/scenes/ActivationKeys/Details/components/__tests__/CreateAKCVModal.test.js +0 -99
- data/webpack/scenes/ActivationKeys/Details/components/__tests__/CvEnvDetailsCreateCard.test.js +1 -43
- data/webpack/scenes/ActivationKeys/Details/hooks/__tests__/useAssignmentManagement.test.js +11 -45
- data/webpack/scenes/ActivationKeys/Details/hooks/useAssignmentManagement.js +2 -4
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +2 -2
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreateDeb.test.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +20 -0
- data/webpack/scenes/Content/ContentActions.js +13 -1
- data/webpack/scenes/Content/ContentConfig.js +71 -0
- data/webpack/scenes/Content/ContentConstants.js +2 -0
- data/webpack/scenes/Content/ContentSelectors.js +10 -1
- data/webpack/scenes/Content/Details/ContentDetails.js +47 -4
- data/webpack/scenes/Content/Details/ContentDetails.scss +4 -0
- data/webpack/scenes/Content/Details/ContentRepositories.js +21 -6
- data/webpack/scenes/Content/Details/FileContentViewVersions.js +87 -0
- data/webpack/scenes/Content/Details/__tests__/FileContentViewVersions.test.js +68 -0
- data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +102 -2
- data/webpack/scenes/Content/Details/__tests__/fileSearch.test.js +104 -0
- data/webpack/scenes/Content/__tests__/contentTable.test.js +85 -9
- data/webpack/scenes/Content/__tests__/files.fixtures.json +30 -0
- data/webpack/scenes/Content/__tests__/moduleStreams.fixtures.json +34 -0
- data/webpack/scenes/ContentCredentials/Create/CreateContentCredentialForm.js +1 -1
- data/webpack/scenes/ContentCredentials/Create/CreateContentCredentialForm.scss +4 -5
- data/webpack/scenes/ContentCredentials/Details/ContentCredentialsDetails.js +0 -15
- data/webpack/scenes/ContentCredentials/Details/__tests__/ContentCredentialsDetails.test.js +0 -23
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +0 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +0 -23
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +0 -17
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +0 -2
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteModal.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +0 -29
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +2 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +0 -16
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +6 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +0 -53
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +0 -4
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +46 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionContent.test.js +41 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +29 -0
- data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +5 -4
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
- data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +1 -1
- data/webpack/scenes/FlatpakRemotes/Details/Mirror/__tests__/mirrorRepositoryModal.test.js +0 -2
- data/webpack/scenes/FlatpakRemotes/Details/__tests__/flatpakRemoteDetails.test.js +0 -2
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +0 -4
- data/webpack/scenes/Hosts/ChangeContentSource/components/MultiCVEnvForm.js +12 -18
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +1 -5
- data/webpack/scenes/SmartProxy/AdditionalCapsuleContent.js +0 -7
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js +2 -9
- data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.scss +9 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +18 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +3 -2
- data/webpack/scenes/SyncStatus/components/SyncProgressCell.js +19 -7
- data/webpack/scenes/SyncStatus/components/SyncStatusTable.js +6 -2
- data/webpack/scenes/SyncStatus/components/__tests__/SyncProgressCell.test.js +40 -0
- data/webpack/scenes/SyncStatus/components/__tests__/SyncStatusTable.test.js +13 -0
- data/webpack/services/api/testHelpers.js +1 -1
- data/webpack/test-utils/react-testing-lib-wrapper.js +11 -8
- data/webpack/test_setup.js +35 -18
- metadata +57 -127
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/views/files.html +0 -39
- data/lib/monkeys/remove_overwrite_parameter.rb +0 -19
- data/locale/action_names.rb +0 -180
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/webpack/__mocks__/foremanJS/foreman_toast_notifications.js +0 -3
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +0 -11
- data/webpack/__mocks__/foremanReact/common/urlHelpers.js +0 -7
- data/webpack/__mocks__/foremanReact/components/BreadcrumbBar/index.js +0 -2
- data/webpack/__mocks__/foremanReact/components/ToastsList/index.js +0 -9
- data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +0 -8
- data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +0 -5
- data/webpack/__mocks__/foremanReact/redux.js +0 -3
- data/webpack/__mocks__/react-intl/index.js +0 -7
- data/webpack/__mocks__/react-intl/locale-data/en.js +0 -1
- data/webpack/components/pf3Table/components/CollapseSubscriptionGroupButton.js +0 -31
- data/webpack/components/pf3Table/components/CollapseSubscriptionGroupButton.test.js +0 -36
- data/webpack/components/pf3Table/components/Table.js +0 -76
- data/webpack/components/pf3Table/components/Table.test.js +0 -107
- data/webpack/components/pf3Table/components/TableBody.js +0 -27
- data/webpack/components/pf3Table/components/TableBody.test.js +0 -56
- data/webpack/components/pf3Table/components/TableBodyMessage.js +0 -18
- data/webpack/components/pf3Table/components/TableBodyMessage.test.js +0 -17
- data/webpack/components/pf3Table/components/TableFixtures.js +0 -14
- data/webpack/components/pf3Table/components/TableSelectionCell.js +0 -43
- data/webpack/components/pf3Table/components/TableSelectionCell.test.js +0 -70
- data/webpack/components/pf3Table/components/TableSelectionHeaderCell.js +0 -34
- data/webpack/components/pf3Table/components/TableSelectionHeaderCell.test.js +0 -70
- data/webpack/components/pf3Table/components/index.js +0 -6
- data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +0 -110
- data/webpack/components/pf3Table/formatters/__tests__/EntitlementsInlineEditFormatter.test.js +0 -124
- data/webpack/components/pf3Table/formatters/cellFormatter.js +0 -4
- data/webpack/components/pf3Table/formatters/collapseableAndSelectionCellFormatter.js +0 -20
- data/webpack/components/pf3Table/formatters/ellipsisCellFormatter.js +0 -6
- data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +0 -16
- data/webpack/components/pf3Table/formatters/headerFormatter.js +0 -4
- data/webpack/components/pf3Table/formatters/index.js +0 -6
- data/webpack/components/pf3Table/formatters/selectionCellFormatter.js +0 -21
- data/webpack/components/pf3Table/formatters/selectionHeaderCellFormatter.js +0 -11
- data/webpack/components/pf3Table/index.js +0 -2
- data/webpack/scenes/Content/__tests__/contentTypes.fixtures.json +0 -66
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
|
3
|
+
import { nockInstance } from '../../../../test-utils/nockWrapper';
|
|
4
|
+
import api from '../../../../services/api';
|
|
5
|
+
import ContentRepositories from '../ContentRepositories';
|
|
6
|
+
import FileContentViewVersions from '../FileContentViewVersions';
|
|
7
|
+
|
|
8
|
+
const metadata = {
|
|
9
|
+
total: 1, subtotal: 1, page: 1, per_page: 20,
|
|
10
|
+
};
|
|
11
|
+
const cases = [
|
|
12
|
+
['repositories', '/repositories', <ContentRepositories contentType="files" id={248} tabKey="repositories" />,
|
|
13
|
+
{
|
|
14
|
+
id: 1, name: 'Search test repository', content_type: 'file', product: { id: 2, name: 'Product' },
|
|
15
|
+
}],
|
|
16
|
+
['content views', '/content_view_versions', <FileContentViewVersions id={248} />,
|
|
17
|
+
{ id: 1, version: '1.0', content_view: { id: 2, name: 'Search test view' } }],
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
test.each(cases)(
|
|
21
|
+
'%s search submits with the button and Enter, and clears results',
|
|
22
|
+
async (_label, path, component, row) => {
|
|
23
|
+
const endpoint = api.getApiUrl(path);
|
|
24
|
+
const autocomplete = nockInstance.get(`${endpoint}/auto_complete_search`)
|
|
25
|
+
.query(true).optionally().times(20)
|
|
26
|
+
.reply(200, []);
|
|
27
|
+
const initial = nockInstance.get(endpoint).query(query => !query.search)
|
|
28
|
+
.reply(200, { ...metadata, results: [row] });
|
|
29
|
+
const {
|
|
30
|
+
getByLabelText, getByRole, getByText, queryByRole,
|
|
31
|
+
} = renderWithRedux(component);
|
|
32
|
+
await patientlyWaitFor(() => expect(getByRole('button', { name: 'Search' })).toBeEnabled());
|
|
33
|
+
expect(queryByRole('button', { name: /bookmark/i })).toBeNull();
|
|
34
|
+
const input = getByLabelText('Search input');
|
|
35
|
+
const query = 'name = "does-not-exist"';
|
|
36
|
+
const searched = nockInstance.get(endpoint)
|
|
37
|
+
.query(params => params.search === query && params.page === '1' &&
|
|
38
|
+
params.file_id === '248' && params.organization_id !== undefined &&
|
|
39
|
+
(path === '/repositories' || params.nondefault === 'true'))
|
|
40
|
+
.reply(200, { ...metadata, subtotal: 0, results: [] });
|
|
41
|
+
input.focus();
|
|
42
|
+
fireEvent.change(input, { target: { value: query } });
|
|
43
|
+
expect(searched.isDone()).toBe(false);
|
|
44
|
+
fireEvent.click(getByRole('button', { name: 'Search' }));
|
|
45
|
+
await patientlyWaitFor(() => expect(searched.isDone()).toBe(true));
|
|
46
|
+
await patientlyWaitFor(() => expect(getByText(/No matching/)).toBeInTheDocument());
|
|
47
|
+
|
|
48
|
+
const entered = nockInstance.get(endpoint).query(params => params.search === 'another-query')
|
|
49
|
+
.reply(200, { ...metadata, subtotal: 0, results: [] });
|
|
50
|
+
input.focus();
|
|
51
|
+
fireEvent.change(input, { target: { value: 'another-query' } });
|
|
52
|
+
fireEvent.keyDown(input, { key: 'Enter', code: 'Enter', charCode: 13 });
|
|
53
|
+
await patientlyWaitFor(() => expect(entered.isDone()).toBe(true));
|
|
54
|
+
|
|
55
|
+
const cleared = nockInstance.get(endpoint).query(params => !params.search)
|
|
56
|
+
.reply(200, { ...metadata, results: [row] });
|
|
57
|
+
fireEvent.click(getByRole('button', { name: 'Reset search' }));
|
|
58
|
+
await patientlyWaitFor(() => expect(cleared.isDone()).toBe(true));
|
|
59
|
+
await patientlyWaitFor(() => expect(getByLabelText('Search input')).toHaveValue(''));
|
|
60
|
+
initial.done();
|
|
61
|
+
searched.done();
|
|
62
|
+
entered.done();
|
|
63
|
+
cleared.done();
|
|
64
|
+
autocomplete.done();
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
test.each(cases)(
|
|
70
|
+
'%s shows pagination for single-page and multi-page results',
|
|
71
|
+
async (_label, path, component, row) => {
|
|
72
|
+
const endpoint = api.getApiUrl(path);
|
|
73
|
+
nockInstance.get(`${endpoint}/auto_complete_search`)
|
|
74
|
+
.query(true).optionally().times(20)
|
|
75
|
+
.reply(200, []);
|
|
76
|
+
const initial = nockInstance.get(endpoint).query(true)
|
|
77
|
+
.reply(200, { ...metadata, results: [row] });
|
|
78
|
+
const { getByRole, getByLabelText, container } = renderWithRedux(component);
|
|
79
|
+
await patientlyWaitFor(() => expect(getByRole('button', { name: 'Search' })).toBeEnabled());
|
|
80
|
+
await patientlyWaitFor(() => {
|
|
81
|
+
expect(container.querySelector('[data-ouia-component-id="pagination-top"]'))
|
|
82
|
+
.toBeInTheDocument();
|
|
83
|
+
expect(container.querySelector('[data-ouia-component-id="pagination-bottom"]'))
|
|
84
|
+
.toBeInTheDocument();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const multiplePages = nockInstance.get(endpoint).query(params => params.search === 'many')
|
|
88
|
+
.reply(200, {
|
|
89
|
+
...metadata, total: 21, subtotal: 21, results: [row],
|
|
90
|
+
});
|
|
91
|
+
const input = getByLabelText('Search input');
|
|
92
|
+
input.focus();
|
|
93
|
+
fireEvent.change(input, { target: { value: 'many' } });
|
|
94
|
+
fireEvent.click(getByRole('button', { name: 'Search' }));
|
|
95
|
+
await patientlyWaitFor(() => {
|
|
96
|
+
expect(container.querySelector('[data-ouia-component-id="pagination-top"]'))
|
|
97
|
+
.toBeInTheDocument();
|
|
98
|
+
expect(container.querySelector('[data-ouia-component-id="pagination-bottom"]'))
|
|
99
|
+
.toBeInTheDocument();
|
|
100
|
+
});
|
|
101
|
+
initial.done();
|
|
102
|
+
multiplePages.done();
|
|
103
|
+
},
|
|
104
|
+
);
|
|
@@ -2,17 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
|
|
3
3
|
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../test-utils/nockWrapper';
|
|
4
4
|
import api from '../../../services/api';
|
|
5
|
-
import GenericContentPage from '../GenericContentPage';
|
|
6
5
|
import ansibleCollectionsResponse from './ansibleCollections.fixtures';
|
|
7
|
-
import contentTypesResponse from './contentTypes.fixtures.json';
|
|
8
6
|
import pythonPackagesResponse from './pythonPackages.fixtures.json';
|
|
7
|
+
import filesResponse from './files.fixtures.json';
|
|
8
|
+
import moduleStreamsResponse from './moduleStreams.fixtures.json';
|
|
9
9
|
import ContentTable from '../Table/ContentTable';
|
|
10
10
|
|
|
11
|
-
const contentTypesPath = api.getApiUrl('/repositories/content_types');
|
|
12
11
|
const pythonPackagesPath = api.getApiUrl('/python_packages');
|
|
13
12
|
const ansibleCollectionsPath = api.getApiUrl('/ansible_collections');
|
|
13
|
+
const filesPath = api.getApiUrl('/files');
|
|
14
|
+
const moduleStreamsPath = api.getApiUrl('/module_streams');
|
|
14
15
|
|
|
15
16
|
test('Can call API for Python Packages and show table on page load', async (done) => {
|
|
17
|
+
const mockContentTypes = { 'Python Packages': ['python_package', 'python_packages'] };
|
|
16
18
|
const autocompleteUrl = '/python_packages/auto_complete_search';
|
|
17
19
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
|
18
20
|
|
|
@@ -23,13 +25,14 @@ test('Can call API for Python Packages and show table on page load', async (done
|
|
|
23
25
|
.get(pythonPackagesPath)
|
|
24
26
|
.query(true)
|
|
25
27
|
.reply(200, pythonPackagesResponse);
|
|
26
|
-
const contentTypesScope = nockInstance
|
|
27
|
-
.get(contentTypesPath)
|
|
28
|
-
.query(true)
|
|
29
|
-
.reply(200, contentTypesResponse);
|
|
30
28
|
|
|
31
29
|
const { queryByText, getAllByText } =
|
|
32
|
-
renderWithRedux(<
|
|
30
|
+
renderWithRedux(<ContentTable
|
|
31
|
+
contentTypes={mockContentTypes}
|
|
32
|
+
selectedContentType="Python Packages"
|
|
33
|
+
setSelectedContentType={() => { }}
|
|
34
|
+
showContentTypeSelector={false}
|
|
35
|
+
/>);
|
|
33
36
|
|
|
34
37
|
expect(queryByText(firstPackage.name)).toBeNull();
|
|
35
38
|
await patientlyWaitFor(() => {
|
|
@@ -39,7 +42,6 @@ test('Can call API for Python Packages and show table on page load', async (done
|
|
|
39
42
|
});
|
|
40
43
|
|
|
41
44
|
assertNockRequest(autocompleteScope);
|
|
42
|
-
assertNockRequest(contentTypesScope);
|
|
43
45
|
assertNockRequest(pythonPackagesScope);
|
|
44
46
|
done();
|
|
45
47
|
});
|
|
@@ -75,3 +77,77 @@ test('Can call API for Ansible collections and show table on page load', async (
|
|
|
75
77
|
assertNockRequest(ansibleCollections);
|
|
76
78
|
done();
|
|
77
79
|
});
|
|
80
|
+
|
|
81
|
+
test('Can call API for Files and show table on page load', async (done) => {
|
|
82
|
+
const mockContentTypes = { Files: ['file', 'files'] };
|
|
83
|
+
const autocompleteUrl = '/files/auto_complete_search';
|
|
84
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
|
85
|
+
|
|
86
|
+
const { results } = filesResponse;
|
|
87
|
+
const [firstFile] = results;
|
|
88
|
+
|
|
89
|
+
const filesScope = nockInstance
|
|
90
|
+
.get(filesPath)
|
|
91
|
+
.query(true)
|
|
92
|
+
.reply(200, filesResponse);
|
|
93
|
+
|
|
94
|
+
const { queryByText, getAllByText } =
|
|
95
|
+
renderWithRedux(<ContentTable
|
|
96
|
+
contentTypes={mockContentTypes}
|
|
97
|
+
selectedContentType="Files"
|
|
98
|
+
setSelectedContentType={() => { }}
|
|
99
|
+
showContentTypeSelector={false}
|
|
100
|
+
/>);
|
|
101
|
+
|
|
102
|
+
expect(queryByText(firstFile.name)).toBeNull();
|
|
103
|
+
await patientlyWaitFor(() => {
|
|
104
|
+
expect(getAllByText(firstFile.name)[0]).toBeInTheDocument();
|
|
105
|
+
expect(getAllByText(firstFile.path)[0]).toBeInTheDocument();
|
|
106
|
+
expect(getAllByText(firstFile.checksum)[0]).toBeInTheDocument();
|
|
107
|
+
});
|
|
108
|
+
await patientlyWaitFor(() => {
|
|
109
|
+
expect(autocompleteScope.isDone()).toBe(true);
|
|
110
|
+
expect(filesScope.isDone()).toBe(true);
|
|
111
|
+
});
|
|
112
|
+
autocompleteScope.done();
|
|
113
|
+
filesScope.done();
|
|
114
|
+
done();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test('Can call API for Module Streams and show table on page load', async (done) => {
|
|
118
|
+
const mockContentTypes = { 'Module Streams': ['modulemd', 'module_streams'] };
|
|
119
|
+
const autocompleteUrl = '/module_streams/auto_complete_search';
|
|
120
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
|
121
|
+
|
|
122
|
+
const { results } = moduleStreamsResponse;
|
|
123
|
+
const [firstModuleStream] = results;
|
|
124
|
+
|
|
125
|
+
const moduleStreamsScope = nockInstance
|
|
126
|
+
.get(moduleStreamsPath)
|
|
127
|
+
.query(true)
|
|
128
|
+
.reply(200, moduleStreamsResponse);
|
|
129
|
+
|
|
130
|
+
const { queryByText, getAllByText } =
|
|
131
|
+
renderWithRedux(<ContentTable
|
|
132
|
+
contentTypes={mockContentTypes}
|
|
133
|
+
selectedContentType="Module Streams"
|
|
134
|
+
setSelectedContentType={() => { }}
|
|
135
|
+
showContentTypeSelector={false}
|
|
136
|
+
/>);
|
|
137
|
+
|
|
138
|
+
expect(queryByText(firstModuleStream.name)).toBeNull();
|
|
139
|
+
await patientlyWaitFor(() => {
|
|
140
|
+
expect(getAllByText(firstModuleStream.name)[0]).toBeInTheDocument();
|
|
141
|
+
expect(getAllByText(firstModuleStream.stream)[0]).toBeInTheDocument();
|
|
142
|
+
expect(getAllByText(firstModuleStream.version)[0]).toBeInTheDocument();
|
|
143
|
+
expect(getAllByText(firstModuleStream.arch)[0]).toBeInTheDocument();
|
|
144
|
+
expect(getAllByText(firstModuleStream.context)[0]).toBeInTheDocument();
|
|
145
|
+
});
|
|
146
|
+
await patientlyWaitFor(() => {
|
|
147
|
+
expect(autocompleteScope.isDone()).toBe(true);
|
|
148
|
+
expect(moduleStreamsScope.isDone()).toBe(true);
|
|
149
|
+
});
|
|
150
|
+
autocompleteScope.done();
|
|
151
|
+
moduleStreamsScope.done();
|
|
152
|
+
done();
|
|
153
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"total": 2,
|
|
3
|
+
"subtotal": 2,
|
|
4
|
+
"page": "1",
|
|
5
|
+
"per_page": "20",
|
|
6
|
+
"error": null,
|
|
7
|
+
"search": null,
|
|
8
|
+
"sort": {
|
|
9
|
+
"by": "name",
|
|
10
|
+
"order": "asc"
|
|
11
|
+
},
|
|
12
|
+
"results": [
|
|
13
|
+
{
|
|
14
|
+
"id": 1,
|
|
15
|
+
"name": "test.txt",
|
|
16
|
+
"path": "test.txt",
|
|
17
|
+
"checksum": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
18
|
+
"pulp_id": "/pulp/api/v3/content/file/files/a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6/",
|
|
19
|
+
"content_type": "file"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": 2,
|
|
23
|
+
"name": "setup.sh",
|
|
24
|
+
"path": "scripts/setup.sh",
|
|
25
|
+
"checksum": "sha256:d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
|
|
26
|
+
"pulp_id": "/pulp/api/v3/content/file/files/b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7/",
|
|
27
|
+
"content_type": "file"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"total": 2,
|
|
3
|
+
"subtotal": 2,
|
|
4
|
+
"page": "1",
|
|
5
|
+
"per_page": "20",
|
|
6
|
+
"error": null,
|
|
7
|
+
"search": null,
|
|
8
|
+
"sort": {
|
|
9
|
+
"by": "name",
|
|
10
|
+
"order": "asc"
|
|
11
|
+
},
|
|
12
|
+
"results": [
|
|
13
|
+
{
|
|
14
|
+
"id": 1,
|
|
15
|
+
"name": "postgresql",
|
|
16
|
+
"stream": "10",
|
|
17
|
+
"version": "8030020200831101924",
|
|
18
|
+
"arch": "x86_64",
|
|
19
|
+
"context": "9edba152",
|
|
20
|
+
"pulp_id": "/pulp/api/v3/content/rpm/modulemds/a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6/",
|
|
21
|
+
"content_type": "modulemd"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": 2,
|
|
25
|
+
"name": "nginx",
|
|
26
|
+
"stream": "1.18",
|
|
27
|
+
"version": "8030020200731234567",
|
|
28
|
+
"arch": "x86_64",
|
|
29
|
+
"context": "7c29f958",
|
|
30
|
+
"pulp_id": "/pulp/api/v3/content/rpm/modulemds/b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7/",
|
|
31
|
+
"content_type": "modulemd"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -144,7 +144,7 @@ const CreateContentCredentialForm = ({ setModalOpen, setFormState, refreshTable
|
|
|
144
144
|
</FormSelect>
|
|
145
145
|
</FormGroup>
|
|
146
146
|
|
|
147
|
-
<FormGroup label={__('Content')} fieldId="content">
|
|
147
|
+
<FormGroup label={__('Content')} fieldId="content" className="cc-create-content-group">
|
|
148
148
|
<TextArea
|
|
149
149
|
id="content"
|
|
150
150
|
name="content"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
.pf-v5-c-form-control {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
.cc-create-content-group .pf-v5-c-form-control.pf-m-resize-both {
|
|
2
|
+
max-height: 200px;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
}
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
DropdownPosition,
|
|
23
23
|
} from '@patternfly/react-core/deprecated';
|
|
24
24
|
import { STATUS } from 'foremanReact/constants';
|
|
25
|
-
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
|
26
25
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
27
26
|
|
|
28
27
|
import { getContentCredentialDetails } from './ContentCredentialsDetailsActions';
|
|
@@ -147,20 +146,6 @@ const ContentCredentialsDetails = () => {
|
|
|
147
146
|
</GridItem>
|
|
148
147
|
<GridItem md={4} sm={12}>
|
|
149
148
|
<Flex justifyContent={{ lg: 'justifyContentFlexEnd', sm: 'justifyContentFlexStart' }}>
|
|
150
|
-
<FlexItem>
|
|
151
|
-
<Button
|
|
152
|
-
ouiaId="credential-details-view-tasks-button"
|
|
153
|
-
component="a"
|
|
154
|
-
aria-label={__('view tasks button')}
|
|
155
|
-
href={'/foreman_tasks/tasks?search=resource_type%3D+Katello%3A%3A' +
|
|
156
|
-
`ContentCredential+resource_id%3D${credentialId}`}
|
|
157
|
-
target="_blank"
|
|
158
|
-
variant="secondary"
|
|
159
|
-
>
|
|
160
|
-
{__('View tasks ')}
|
|
161
|
-
<ExternalLinkAltIcon />
|
|
162
|
-
</Button>
|
|
163
|
-
</FlexItem>
|
|
164
149
|
<FlexItem>
|
|
165
150
|
<Dropdown
|
|
166
151
|
position={DropdownPosition.right}
|
|
@@ -435,26 +435,3 @@ test('enables edit controls when user has edit_content_credentials permission',
|
|
|
435
435
|
assertNockRequest(scope);
|
|
436
436
|
});
|
|
437
437
|
|
|
438
|
-
test('view tasks button links to foreman tasks filtered by credential', async () => {
|
|
439
|
-
const scope = nockInstance
|
|
440
|
-
.get(credentialDetailsPath)
|
|
441
|
-
.query(true)
|
|
442
|
-
.reply(200, mockCredentialData);
|
|
443
|
-
|
|
444
|
-
renderWithRedux(
|
|
445
|
-
withCredentialRoute(<ContentCredentialsDetails />),
|
|
446
|
-
renderOptions,
|
|
447
|
-
);
|
|
448
|
-
|
|
449
|
-
await patientlyWaitFor(() => {
|
|
450
|
-
const viewTasksButton = screen.getByRole('link', { name: /view tasks/i });
|
|
451
|
-
expect(viewTasksButton).toHaveAttribute(
|
|
452
|
-
'href',
|
|
453
|
-
expect.stringContaining(`resource_id%3D${credentialId}`),
|
|
454
|
-
);
|
|
455
|
-
expect(viewTasksButton).toHaveAttribute('target', '_blank');
|
|
456
|
-
});
|
|
457
|
-
|
|
458
|
-
assertNockRequest(scope);
|
|
459
|
-
});
|
|
460
|
-
|
|
@@ -8,7 +8,6 @@ const ERRATA_KEY = 'ERRATA';
|
|
|
8
8
|
const MODULE_STREAMS_KEY = 'MODULE_STREAMS';
|
|
9
9
|
const DEB_PACKAGES_KEY = 'DEB_PACKAGES';
|
|
10
10
|
const DOCKER_TAGS_KEY = 'DOCKER_TAGS';
|
|
11
|
-
const FILES_KEY = 'FILES';
|
|
12
11
|
const CONTAINER_MANIFEST_LISTS_KEY = 'CONTAINER_MANIFEST_LISTS';
|
|
13
12
|
export const CREATE_CONTENT_VIEW_KEY = 'CONTENT_VIEW_CREATE';
|
|
14
13
|
export const COPY_CONTENT_VIEW_KEY = 'CONTENT_VIEW_COPY';
|
|
@@ -36,7 +35,6 @@ export const CONTAINER_MANIFEST_LIST_CONTENT = 'CONTAINER_MANIFEST_LIST_CONTENT'
|
|
|
36
35
|
export const MODULE_STREAMS_CONTENT = 'MODULE_STREAMS_CONTENT';
|
|
37
36
|
export const DEB_PACKAGES_CONTENT = 'DEB_PACKAGES_CONTENT';
|
|
38
37
|
export const RPM_PACKAGES_CONTENT = 'RPM_PACKAGES_CONTENT';
|
|
39
|
-
export const FILE_CONTENT = 'FILE_CONTENT';
|
|
40
38
|
export const CONTENT_VIEW_NEEDS_PUBLISH = 'CV_NEEDS_PUBLISH';
|
|
41
39
|
export const CONTENT_VIEW_NEEDS_PUBLISH_RESET = 'CV_NEEDS_PUBLISH_RESET';
|
|
42
40
|
export const generatedContentKey = pluralLabel => `${toUpper(pluralLabel)}_CONTENT`;
|
|
@@ -75,7 +73,6 @@ export const cvModuleStreamsCompareKey = (versionOne, versionTwo, viewBy) => `${
|
|
|
75
73
|
export const cvDebPackagesCompareKey = (versionOne, versionTwo, viewBy) => `${DEB_PACKAGES_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
|
|
76
74
|
export const cvDockerTagsCompareKey = (versionOne, versionTwo, viewBy) => `${DOCKER_TAGS_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
|
|
77
75
|
export const cvContainerManifestListsCompareKey = (versionOne, versionTwo, viewBy) => `${CONTAINER_MANIFEST_LISTS_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
|
|
78
|
-
export const filesCompareKey = (versionOne, versionTwo, viewBy) => `${FILES_KEY}_COMPARE_${versionOne}_${versionTwo}_VIEW_BY_${toUpper(viewBy)}`;
|
|
79
76
|
|
|
80
77
|
// Repo added to content view status display and key
|
|
81
78
|
export const ADDED = 'Added';
|
|
@@ -42,7 +42,6 @@ import {
|
|
|
42
42
|
cvVersionDetailsKey,
|
|
43
43
|
cvRemoveVersionKey,
|
|
44
44
|
REPOSITORY_CONTENT,
|
|
45
|
-
FILE_CONTENT,
|
|
46
45
|
ERRATA_CONTENT,
|
|
47
46
|
MODULE_STREAMS_CONTENT,
|
|
48
47
|
DEB_PACKAGES_CONTENT,
|
|
@@ -56,7 +55,6 @@ import {
|
|
|
56
55
|
cvModuleStreamsCompareKey,
|
|
57
56
|
cvDockerTagsCompareKey,
|
|
58
57
|
cvDebPackagesCompareKey,
|
|
59
|
-
filesCompareKey,
|
|
60
58
|
genericContentCompareKey,
|
|
61
59
|
cvRepositoriesCompareKey, cvContainerManifestListsCompareKey,
|
|
62
60
|
} from '../ContentViewsConstants';
|
|
@@ -192,19 +190,6 @@ export const getContainerManifestListsComparison = (versionOne, versionTwo, view
|
|
|
192
190
|
});
|
|
193
191
|
};
|
|
194
192
|
|
|
195
|
-
export const getFilesComparison = (versionOne, versionTwo, viewBy, params) => {
|
|
196
|
-
const versions = { content_view_version_ids: [versionOne, versionTwo] };
|
|
197
|
-
const restrictComparison = { restrict_comparison: viewBy };
|
|
198
|
-
const apiParams = { ...versions, ...restrictComparison, ...params };
|
|
199
|
-
const apiUrl = '/files/compare';
|
|
200
|
-
return get({
|
|
201
|
-
key: filesCompareKey(versionOne, versionTwo, viewBy),
|
|
202
|
-
params: apiParams,
|
|
203
|
-
errorToast: error => __(`Something went wrong while retrieving the files! ${getResponseErrorMsgs(error.response)}`),
|
|
204
|
-
url: api.getApiUrl(apiUrl),
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
|
|
208
193
|
export const getGenericContentComparison =
|
|
209
194
|
(pluralLabel, versionOne, versionTwo, viewBy, params) => {
|
|
210
195
|
const versions = { content_view_version_ids: [versionOne, versionTwo] };
|
|
@@ -219,14 +204,6 @@ export const getGenericContentComparison =
|
|
|
219
204
|
});
|
|
220
205
|
};
|
|
221
206
|
|
|
222
|
-
export const getFiles = params => get({
|
|
223
|
-
type: API_OPERATIONS.GET,
|
|
224
|
-
key: FILE_CONTENT,
|
|
225
|
-
url: api.getApiUrl('/files'),
|
|
226
|
-
params,
|
|
227
|
-
errorToast: error => __(`Something went wrong while fetching files! ${getResponseErrorMsgs(error.response)}`),
|
|
228
|
-
});
|
|
229
|
-
|
|
230
207
|
export const updateContentView = (cvId, params, handleSuccess) => put({
|
|
231
208
|
type: API_OPERATIONS.PUT,
|
|
232
209
|
key: cvDetailsKey(cvId),
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
DEB_PACKAGES_CONTENT,
|
|
30
30
|
DOCKER_TAGS_CONTENT,
|
|
31
31
|
ERRATA_CONTENT,
|
|
32
|
-
FILE_CONTENT,
|
|
33
32
|
generatedContentKey,
|
|
34
33
|
HOSTS_KEY,
|
|
35
34
|
MODULE_STREAMS_CONTENT,
|
|
@@ -43,7 +42,6 @@ import {
|
|
|
43
42
|
cvModuleStreamsCompareKey,
|
|
44
43
|
cvDockerTagsCompareKey,
|
|
45
44
|
cvDebPackagesCompareKey,
|
|
46
|
-
filesCompareKey,
|
|
47
45
|
genericContentCompareKey,
|
|
48
46
|
cvRepositoriesCompareKey,
|
|
49
47
|
CONTAINER_MANIFEST_LIST_CONTENT,
|
|
@@ -212,15 +210,6 @@ export const selectDebPackagesComparisonStatus = (state, versionOne, versionTwo,
|
|
|
212
210
|
export const selectDebPackagesComparisonError = (state, versionOne, versionTwo, viewBy) =>
|
|
213
211
|
selectAPIError(state, cvDebPackagesCompareKey(versionOne, versionTwo, viewBy));
|
|
214
212
|
|
|
215
|
-
export const selectFilesComparison = (state, versionOne, versionTwo, viewBy) =>
|
|
216
|
-
selectAPIResponse(state, filesCompareKey(versionOne, versionTwo, viewBy)) || {};
|
|
217
|
-
|
|
218
|
-
export const selectFilesComparisonStatus = (state, versionOne, versionTwo, viewBy) =>
|
|
219
|
-
selectAPIStatus(state, filesCompareKey(versionOne, versionTwo, viewBy)) || STATUS.PENDING;
|
|
220
|
-
|
|
221
|
-
export const selectFilesComparisonError = (state, versionOne, versionTwo, viewBy) =>
|
|
222
|
-
selectAPIError(state, filesCompareKey(versionOne, versionTwo, viewBy));
|
|
223
|
-
|
|
224
213
|
export const selectGenericContentComparison =
|
|
225
214
|
(state, versionOne, versionTwo, pluralLabel, viewBy) =>
|
|
226
215
|
selectAPIResponse(
|
|
@@ -291,12 +280,6 @@ export const selectRPMPackages = state =>
|
|
|
291
280
|
export const selectRPMPackagesStatus = state =>
|
|
292
281
|
selectAPIStatus(state, RPM_PACKAGES_CONTENT) || STATUS.PENDING;
|
|
293
282
|
|
|
294
|
-
export const selectFiles = state =>
|
|
295
|
-
selectAPIResponse(state, FILE_CONTENT);
|
|
296
|
-
|
|
297
|
-
export const selectFilesStatus = state =>
|
|
298
|
-
selectAPIStatus(state, FILE_CONTENT) || STATUS.PENDING;
|
|
299
|
-
|
|
300
283
|
export const selectErrata = state =>
|
|
301
284
|
selectAPIResponse(state, ERRATA_CONTENT);
|
|
302
285
|
|
data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js
CHANGED
|
@@ -30,8 +30,6 @@ beforeEach(() => {
|
|
|
30
30
|
.reply(200, repoTypesResponse);
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
jest.mock('react-intl', () => ({ addLocaleData: () => { }, FormattedDate: () => 'mocked' }));
|
|
34
|
-
|
|
35
33
|
test('Can enable and disable add repositories button', async (done) => {
|
|
36
34
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
|
37
35
|
|
data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteModal.test.js
CHANGED
|
@@ -104,7 +104,7 @@ test('Open bulk delete modal and step through all steps', () => {
|
|
|
104
104
|
expect(queryAllByText('Review affected environments')).toHaveLength(3);
|
|
105
105
|
expect(getByText('Reassign affected host')).toBeInTheDocument();
|
|
106
106
|
expect(getByText('Reassign affected activation key')).toBeInTheDocument();
|
|
107
|
-
expect(getByText(
|
|
107
|
+
expect(getByText(/will be removed from the listed environments and will no longer be available for promotion\./)).toBeInTheDocument();
|
|
108
108
|
|
|
109
109
|
fireEvent.click(queryByText('Next'));
|
|
110
110
|
|
|
@@ -11,8 +11,6 @@ import {
|
|
|
11
11
|
selectPackageGroupsComparisonStatus,
|
|
12
12
|
selectRPMPackagesComparison,
|
|
13
13
|
selectRPMPackagesComparisonStatus,
|
|
14
|
-
selectFilesComparison,
|
|
15
|
-
selectFilesComparisonStatus,
|
|
16
14
|
selectErrataComparison,
|
|
17
15
|
selectErrataComparisonStatus,
|
|
18
16
|
selectDebPackagesComparison,
|
|
@@ -29,7 +27,6 @@ import {
|
|
|
29
27
|
import {
|
|
30
28
|
getPackageGroupsComparison,
|
|
31
29
|
getRPMPackagesComparison,
|
|
32
|
-
getFilesComparison,
|
|
33
30
|
getErrataComparison,
|
|
34
31
|
getDebPackagesComparison,
|
|
35
32
|
getDockerTagsComparison,
|
|
@@ -188,32 +185,6 @@ export default ({
|
|
|
188
185
|
[__('Name')]: 'name',
|
|
189
186
|
},
|
|
190
187
|
},
|
|
191
|
-
{
|
|
192
|
-
name: __('Files'),
|
|
193
|
-
getCountKey: (itemVersionOne, itemVersionTwo) =>
|
|
194
|
-
itemVersionOne?.file_count || itemVersionTwo?.file_count,
|
|
195
|
-
responseSelector: state => selectFilesComparison(state, versionOneId, versionTwoId, viewBy),
|
|
196
|
-
statusSelector: state =>
|
|
197
|
-
selectFilesComparisonStatus(state, versionOneId, versionTwoId, viewBy),
|
|
198
|
-
autocompleteEndpoint: '/katello/api/v2/files',
|
|
199
|
-
bookmarkController: 'katello_content_view_components',
|
|
200
|
-
fetchItems: params => getFilesComparison(versionOneId, versionTwoId, viewBy, params),
|
|
201
|
-
columnHeaders: [
|
|
202
|
-
{
|
|
203
|
-
title: __('Name'),
|
|
204
|
-
getProperty: item => (
|
|
205
|
-
<a href={urlBuilder(`files/${item?.id}`, '')}>
|
|
206
|
-
{item?.name}
|
|
207
|
-
</a>),
|
|
208
|
-
},
|
|
209
|
-
{ title: __('Path'), getProperty: item => item?.path },
|
|
210
|
-
{ title: __(`Version ${versionOne}`), getProperty: item => compareContent(item, versionOneId) },
|
|
211
|
-
{ title: __(`Version ${versionTwo}`), getProperty: item => compareContent(item, versionTwoId) },
|
|
212
|
-
],
|
|
213
|
-
sortConfig: {
|
|
214
|
-
[__('Name')]: 'name',
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
188
|
{
|
|
218
189
|
name: __('Errata'),
|
|
219
190
|
getCountKey: (itemVersionOne, itemVersionTwo) =>
|
data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js
CHANGED
|
@@ -660,6 +660,8 @@ test('Can select viewing by "Same" in the dropdown and see the content in common
|
|
|
660
660
|
testConfigViewBySame.forEach(({ name }) => {
|
|
661
661
|
expect(queryByText(name)).toBeTruthy();
|
|
662
662
|
});
|
|
663
|
+
});
|
|
664
|
+
await patientlyWaitFor(() => {
|
|
663
665
|
(testConfigViewBySame.filter(({ name }) => !(name === 'Files'))).forEach(({ textQuery }) => {
|
|
664
666
|
textQuery.forEach(query => expect(queryAllByText(query)).toBeTruthy());
|
|
665
667
|
});
|
|
@@ -13,9 +13,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
13
13
|
docker_manifest_count: dockerManifestCount = 0,
|
|
14
14
|
docker_manifest_list_count: dockerManifestListCount = 0,
|
|
15
15
|
docker_tag_count: dockerTagCount = 0,
|
|
16
|
-
file_count: fileCount = 0,
|
|
17
|
-
module_stream_count: moduleStreamCount = 0,
|
|
18
|
-
ansible_collection_count: ansibleCollectionCount = 0,
|
|
19
16
|
} = cvVersion;
|
|
20
17
|
|
|
21
18
|
const contentConfigTypes = ContentConfig.filter(({ names: { singularLabel } }) =>
|
|
@@ -36,7 +33,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
36
33
|
|
|
37
34
|
const noCounts =
|
|
38
35
|
!Number(debCount) && !Number(dockerManifestCount) && !Number(dockerTagCount) &&
|
|
39
|
-
!Number(fileCount) && !Number(moduleStreamCount) && !Number(ansibleCollectionCount) &&
|
|
40
36
|
!Number(dockerManifestListCount) && !contentConfigTypes?.length;
|
|
41
37
|
|
|
42
38
|
if (noCounts) {
|
|
@@ -45,13 +41,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
45
41
|
|
|
46
42
|
return (
|
|
47
43
|
<>
|
|
48
|
-
{moduleStreamCount > 0 &&
|
|
49
|
-
<>
|
|
50
|
-
<Link to={`/versions/${versionId}/moduleStreams`}>
|
|
51
|
-
{`${moduleStreamCount} Module streams`}
|
|
52
|
-
</Link><br />
|
|
53
|
-
</>
|
|
54
|
-
}
|
|
55
44
|
{debCount > 0 &&
|
|
56
45
|
<>
|
|
57
46
|
<Link to={`/versions/${versionId}/debPackages`}>
|
|
@@ -74,11 +63,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
74
63
|
</Link><br />
|
|
75
64
|
</>
|
|
76
65
|
}
|
|
77
|
-
{fileCount > 0 &&
|
|
78
|
-
<>
|
|
79
|
-
<a href={urlBuilder(`content_views/${cvId}#/versions/${versionId}/files`, '')}>{`${fileCount} Files`}</a><br />
|
|
80
|
-
</>
|
|
81
|
-
}
|
|
82
66
|
{contentConfigTypes?.length > 0 &&
|
|
83
67
|
contentConfigTypes.map(({ label, count, pluralLabel }) => (
|
|
84
68
|
<React.Fragment key={label}>
|
|
@@ -186,7 +186,9 @@ test('Can open Remove wizard and remove version from environment with hosts', as
|
|
|
186
186
|
expect(getByText('Select lifecycle environment')).toBeInTheDocument();
|
|
187
187
|
expect(getByText('Show hosts')).toBeInTheDocument();
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
await patientlyWaitFor(() => {
|
|
190
|
+
expect(getByText('affectedHost.example.com')).toBeInTheDocument();
|
|
191
|
+
});
|
|
190
192
|
fireEvent.click(getByLabelText('test1'));
|
|
191
193
|
await patientlyWaitFor(() => {
|
|
192
194
|
expect(getByText('Select content view')).toBeInTheDocument();
|
|
@@ -279,7 +281,9 @@ test('Can open Remove wizard and remove version from environment with activation
|
|
|
279
281
|
expect(getByText('Select lifecycle environment')).toBeInTheDocument();
|
|
280
282
|
expect(getByText('Show activation keys')).toBeInTheDocument();
|
|
281
283
|
});
|
|
282
|
-
|
|
284
|
+
await patientlyWaitFor(() => {
|
|
285
|
+
expect(getByText('test activation key')).toBeInTheDocument();
|
|
286
|
+
});
|
|
283
287
|
fireEvent.click(getByLabelText('test1'));
|
|
284
288
|
await patientlyWaitFor(() => {
|
|
285
289
|
expect(getByText('Select content view')).toBeInTheDocument();
|