katello 4.8.4 → 4.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +40 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/cs/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/de/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/en/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/es/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/fr/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/gu/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/hi/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/it/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ja/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ka/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/kn/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ko/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/locale/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/mr/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/or/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pa/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pt/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ru/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ta/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/te/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +1 -0
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +10 -0
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -0
- data/app/controllers/katello/api/v2/content_views_controller.rb +22 -12
- data/app/controllers/katello/api/v2/environments_controller.rb +5 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -2
- data/app/controllers/katello/api/v2/organizations_controller.rb +11 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +4 -3
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +13 -4
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +1 -3
- data/app/controllers/katello/concerns/api/api_controller.rb +2 -2
- data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +6 -4
- data/app/lib/actions/candlepin/product/content_add.rb +13 -1
- data/app/lib/actions/candlepin/product/content_update.rb +2 -1
- data/app/lib/actions/katello/agent_action.rb +3 -4
- data/app/lib/actions/katello/bulk_agent_action.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +1 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -0
- data/app/lib/actions/katello/host/update_content_view.rb +2 -4
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +0 -10
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +2 -12
- data/app/lib/actions/katello/product/content_create.rb +2 -2
- data/app/lib/actions/katello/repository/destroy.rb +15 -7
- data/app/lib/actions/katello/repository/update.rb +23 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +2 -0
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +5 -12
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +34 -2
- data/app/lib/katello/event_daemon/runner.rb +8 -4
- data/app/lib/katello/repo_discovery.rb +3 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +4 -8
- data/app/lib/katello/util/default_enablement_migrator.rb +183 -0
- data/app/models/katello/activation_key.rb +4 -0
- data/app/models/katello/alternate_content_source.rb +13 -8
- data/app/models/katello/candlepin/repository_mapper.rb +0 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +42 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +9 -40
- data/app/models/katello/concerns/smart_proxy_extensions.rb +24 -23
- data/app/models/katello/content.rb +9 -0
- data/app/models/katello/content_view.rb +99 -4
- data/app/models/katello/content_view_environment_content_facet.rb +12 -0
- data/app/models/katello/content_view_filter.rb +5 -1
- data/app/models/katello/content_view_package_filter_rule.rb +0 -1
- data/app/models/katello/content_view_repository.rb +0 -1
- data/app/models/katello/content_view_version.rb +26 -0
- data/app/models/katello/docker_meta_tag.rb +4 -0
- data/app/models/katello/host/content_facet.rb +2 -0
- data/app/models/katello/kt_environment.rb +13 -3
- data/app/models/katello/ping.rb +1 -1
- data/app/models/katello/product.rb +1 -1
- data/app/models/katello/product_content.rb +13 -15
- data/app/models/katello/root_repository.rb +21 -2
- data/app/models/katello/sync_plan.rb +2 -6
- data/app/presenters/katello/host_package_presenter.rb +5 -3
- data/app/services/katello/product_content_finder.rb +6 -1
- data/app/services/katello/pulp3/alternate_content_source.rb +5 -0
- data/app/services/katello/pulp3/module_stream.rb +2 -12
- data/app/services/katello/pulp3/repository/yum.rb +3 -0
- data/app/views/foreman/job_templates/install_errata.erb +4 -4
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +4 -7
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +5 -6
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +6 -0
- data/app/views/katello/api/v2/common/destroy.json.rabl +2 -1
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +10 -9
- data/app/views/katello/api/v2/content_view_repositories/show_all.json.rabl +6 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +11 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +3 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +4 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +10 -0
- data/app/views/katello/api/v2/host_subscriptions/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/index.json.rabl +6 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +22 -15
- data/app/views/smart_proxies/_disk_usage.html.erb +2 -0
- data/ca/redhat-uep.pem +53 -53
- data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +0 -1
- data/db/migrate/20230328180352_add_applied_filters_to_katello_content_view_versions.rb +5 -0
- data/db/migrate/20230503190626_add_metadata_expire_to_root.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +15 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-traces-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +12 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-repositories.controller.js +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-environments.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-info.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-repositories.html +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +0 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-packages.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-add-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +590 -175
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +5204 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +5159 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +5158 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +5191 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +5303 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +34 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +5161 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +5192 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +5187 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +5174 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +5170 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +5170 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +5279 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +5191 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +5158 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +38 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/views/organization-selector.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package.controller.js +8 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +12 -3
- 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/bulk/views/products-bulk-http-proxy-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +13 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +12 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details-reclaim-space-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifest-lists.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-tags.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +6 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +20 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories-reclaim-space-modal.html +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/activation_keys.scss +13 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +1 -0
- data/lib/katello/engine.rb +0 -7
- data/lib/katello/plugin.rb +18 -15
- data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +11 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +1 -2
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +215 -183
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +8901 -0
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +8900 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +216 -185
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +8906 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +223 -191
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +8897 -0
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +8906 -0
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +8900 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +215 -183
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +8902 -0
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +8897 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +218 -187
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +8897 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +233 -204
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +8900 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +215 -183
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +8902 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +215 -183
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +8896 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +216 -185
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +233 -202
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +223 -191
- data/locale/katello.pot +1844 -1796
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +215 -183
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +216 -183
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +8897 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +215 -183
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +8907 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +215 -183
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +215 -183
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +8903 -0
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +8899 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +215 -183
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +218 -187
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +8897 -0
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +8898 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +216 -184
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +8901 -0
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +8903 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +215 -183
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +8901 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +215 -183
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +8900 -0
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +8896 -0
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +8897 -0
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +8896 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +233 -202
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +216 -183
- data/package.json +1 -0
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
- data/webpack/components/Bookmark/AddBookmarkModal.js +8 -2
- data/webpack/components/Content/ContentTable.js +1 -0
- data/webpack/components/Content/Details/ContentDetailInfo.js +1 -1
- data/webpack/components/Content/Details/ContentDetails.js +3 -3
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetailInfo.test.js.snap +1 -0
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +4 -0
- data/webpack/components/Content/__tests__/__snapshots__/ContentTable.test.js.snap +1 -0
- data/webpack/components/RoutedTabs/index.js +1 -1
- data/webpack/components/SelectOrg/SetOrganization.js +7 -1
- data/webpack/components/Table/EmptyStateMessage.js +8 -3
- data/webpack/components/Table/MainTable.js +8 -2
- data/webpack/components/TooltipButton/TooltipButton.js +2 -2
- data/webpack/components/TooltipButton/__snapshots__/TooltipButton.test.js.snap +3 -0
- data/webpack/components/extensions/HostDetails/ActionsBar/index.js +2 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +81 -24
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.scss +3 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +10 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +8 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -2
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +3 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +0 -4
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js +2 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -5
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +20 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +54 -8
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +8 -1
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +2 -1
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +1 -0
- data/webpack/components/extensions/about/index.js +2 -2
- data/webpack/components/pf3Table/components/Table.js +1 -0
- data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +6 -1
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +15 -2
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +6 -1
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +4 -1
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +1 -0
- data/webpack/scenes/Content/Details/ContentDetails.js +4 -2
- data/webpack/scenes/Content/Details/ContentRepositories.js +1 -1
- data/webpack/scenes/Content/GenericContentPage.js +1 -1
- data/webpack/scenes/Content/Table/ContentTable.js +2 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +4 -0
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +26 -13
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +27 -13
- data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +8 -4
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +25 -24
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +19 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +6 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +15 -2
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +13 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +19 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +50 -51
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +45 -44
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +45 -44
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +13 -8
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +4 -3
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +5 -2
- data/webpack/scenes/ContentViews/Details/Filters/FilterRuleConstants.js +6 -0
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/Rules/ContainerTag/AddEditContainerTagRuleModal.js +10 -2
- data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +7 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +37 -24
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +3 -3
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +78 -8
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +27 -8
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailNoReposAdded.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/ActionSummary.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignActivationKeys.js +16 -16
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignHosts.js +16 -16
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteVersions.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/contentViewVersion.fixtures.json +10 -5
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +9 -2
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionOneDetials.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionThreeDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionTwoDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersions.fixtures.json +12 -6
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionOneDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionTwoDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +25 -4
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +26 -13
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +30 -17
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +8 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +55 -6
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +8 -4
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +4 -2
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +4 -2
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +30 -3
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +24 -2
- data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +4 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -2
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +1 -3
- data/webpack/scenes/ContentViews/__tests__/mockDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelect.js +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +3 -2
- data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +32 -0
- data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +52 -42
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
- data/webpack/scenes/ContentViews/components/FiltersAppliedIcon.js +17 -0
- data/webpack/scenes/ContentViews/components/NeedsPublishIcon.js +45 -0
- data/webpack/scenes/ContentViews/components/NeedsPublishIcon.scss +9 -0
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +49 -22
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +7 -1
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +1 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +2 -0
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailInfo.test.js.snap +1 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +2 -0
- data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +2 -0
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.js +6 -1
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +2 -2
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +4 -4
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailAssociations.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +2 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +4 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +2 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +5 -4
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +1 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +1 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +3 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +5 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +60 -5
- data/webpack/utils/useKatelloDocUrl.js +18 -0
- metadata +163 -22
- data/app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb +0 -36
- data/app/lib/katello/util/content_overrides_migrator.rb +0 -98
- data/webpack/components/extensions/HostDetails/common/KatelloAgentDeprecationAlert.js +0 -23
@@ -14,6 +14,7 @@ import {
|
|
14
14
|
} from '../../../ContentViewDetailSelectors';
|
15
15
|
import { orgId } from '../../../../../../services/api';
|
16
16
|
import SearchText from '../../../../../../components/Search/SearchText';
|
17
|
+
import { CONTENT_VIEW_NEEDS_PUBLISH } from '../../../../ContentViewsConstants';
|
17
18
|
|
18
19
|
const AddEditPackageRuleModal = ({
|
19
20
|
filterId, onClose, selectedFilterRuleData, repositoryIds,
|
@@ -109,6 +110,7 @@ const AddEditPackageRuleModal = ({
|
|
109
110
|
onClose();
|
110
111
|
},
|
111
112
|
));
|
113
|
+
dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH });
|
112
114
|
};
|
113
115
|
|
114
116
|
|
@@ -127,6 +129,7 @@ const AddEditPackageRuleModal = ({
|
|
127
129
|
|
128
130
|
return (
|
129
131
|
<Modal
|
132
|
+
ouiaId="add-edit-rpm-rule-modal"
|
130
133
|
title={selectedFilterRuleData ? __('Edit RPM rule') : __('Add RPM rule')}
|
131
134
|
variant={ModalVariant.small}
|
132
135
|
isOpen
|
@@ -162,6 +165,7 @@ const AddEditPackageRuleModal = ({
|
|
162
165
|
</FormGroup>
|
163
166
|
<FormGroup label={__('Version')} fieldId="version_comparator">
|
164
167
|
<FormSelect
|
168
|
+
ouiaId="version-comparator"
|
165
169
|
value={versionComparator}
|
166
170
|
onChange={setVersionComparator}
|
167
171
|
id="version_comparator"
|
@@ -177,6 +181,7 @@ const AddEditPackageRuleModal = ({
|
|
177
181
|
{showVersion &&
|
178
182
|
<FormGroup label={__('Version')} fieldId="version">
|
179
183
|
<TextInput
|
184
|
+
ouiaId="input-version"
|
180
185
|
type="text"
|
181
186
|
id="version"
|
182
187
|
aria-label="input_version"
|
@@ -188,6 +193,7 @@ const AddEditPackageRuleModal = ({
|
|
188
193
|
{showMinVersion &&
|
189
194
|
<FormGroup label={__('Minimum version')} fieldId="min_version">
|
190
195
|
<TextInput
|
196
|
+
ouiaId="input-min-version"
|
191
197
|
type="text"
|
192
198
|
id="min_version"
|
193
199
|
aria-label="input_min_version"
|
@@ -199,6 +205,7 @@ const AddEditPackageRuleModal = ({
|
|
199
205
|
{showMaxVersion &&
|
200
206
|
<FormGroup label={__('Maximum version')} fieldId="max_version">
|
201
207
|
<TextInput
|
208
|
+
ouiaId="input-max-version"
|
202
209
|
type="text"
|
203
210
|
id="max_version"
|
204
211
|
aria-label="input_max_version"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
3
3
|
import { Route } from 'react-router-dom';
|
4
|
-
|
4
|
+
import { act } from '@testing-library/react';
|
5
5
|
import ContentViewFilterDetails from '../ContentViewFilterDetails';
|
6
6
|
import { cvFilterDetailsKey } from '../../../ContentViewsConstants';
|
7
7
|
import {
|
@@ -17,7 +17,6 @@ import details from '../../../__tests__/mockDetails.fixtures.json';
|
|
17
17
|
|
18
18
|
const cvFiltersPath = api.getApiUrl('/content_view_filters');
|
19
19
|
const cvRefreshCallbackPath = api.getApiUrl('/content_views/1');
|
20
|
-
|
21
20
|
const cvFilterDetailsPath = api.getApiUrl('/content_view_filters/6');
|
22
21
|
const cvAddFilterRulePath = api.getApiUrl('/content_view_filters/6/rules');
|
23
22
|
const cvRemoveFilterRulePath = api.getApiUrl('/content_view_filters/6/rules/4');
|
@@ -33,7 +32,6 @@ const renderOptions = {
|
|
33
32
|
initialIndex: 1,
|
34
33
|
},
|
35
34
|
};
|
36
|
-
|
37
35
|
const withCVRoute = component => <Route path="/content_views/:id([0-9]+)#/filters/:filterId([0-9]+)">{component}</Route>;
|
38
36
|
|
39
37
|
test('Can enable and disable add filter button', async (done) => {
|
@@ -75,6 +73,7 @@ test('Can enable and disable add filter button', async (done) => {
|
|
75
73
|
assertNockRequest(cvFilterScope);
|
76
74
|
assertNockRequest(cvFiltersScope);
|
77
75
|
assertNockRequest(errataScope, done);
|
76
|
+
act(done);
|
78
77
|
});
|
79
78
|
|
80
79
|
test('Can add a filter rule', async (done) => {
|
@@ -124,7 +123,7 @@ test('Can add a filter rule', async (done) => {
|
|
124
123
|
fireEvent.click(getAllByLabelText('Actions')[3]);
|
125
124
|
expect(getAllByLabelText('Actions')[3]).toHaveAttribute('aria-expanded', 'true');
|
126
125
|
await patientlyWaitFor(() => expect(getByText('Add')).toBeInTheDocument());
|
127
|
-
fireEvent.click(getByText('Add'));
|
126
|
+
act(() => { fireEvent.click(getByText('Add')); });
|
128
127
|
|
129
128
|
|
130
129
|
assertNockRequest(autocompleteScope);
|
@@ -132,8 +131,8 @@ test('Can add a filter rule', async (done) => {
|
|
132
131
|
assertNockRequest(cvFiltersScope);
|
133
132
|
assertNockRequest(cvFiltersRuleScope);
|
134
133
|
assertNockRequest(cvRequestCallbackScope);
|
135
|
-
|
136
134
|
assertNockRequest(errataScope, done);
|
135
|
+
act(done);
|
137
136
|
});
|
138
137
|
|
139
138
|
test('Can remove a filter rule', async (done) => {
|
@@ -182,7 +181,7 @@ test('Can remove a filter rule', async (done) => {
|
|
182
181
|
fireEvent.click(getAllByLabelText('Actions')[2]);
|
183
182
|
expect(getAllByLabelText('Actions')[2]).toHaveAttribute('aria-expanded', 'true');
|
184
183
|
await patientlyWaitFor(() => expect(getByText('Remove')).toBeInTheDocument());
|
185
|
-
fireEvent.click(getByText('Remove'));
|
184
|
+
act(() => { fireEvent.click(getByText('Remove')); });
|
186
185
|
|
187
186
|
|
188
187
|
assertNockRequest(autocompleteScope);
|
@@ -190,8 +189,8 @@ test('Can remove a filter rule', async (done) => {
|
|
190
189
|
assertNockRequest(cvFiltersScope);
|
191
190
|
assertNockRequest(cvFiltersRuleScope);
|
192
191
|
assertNockRequest(cvRequestCallbackScope);
|
193
|
-
|
194
192
|
assertNockRequest(errataScope, done);
|
193
|
+
act(done);
|
195
194
|
});
|
196
195
|
|
197
196
|
test('Can bulk remove filter rules', async (done) => {
|
@@ -243,17 +242,19 @@ test('Can bulk remove filter rules', async (done) => {
|
|
243
242
|
});
|
244
243
|
fireEvent.click(getByLabelText('Select all rows'));
|
245
244
|
fireEvent.click(getByLabelText('bulk_actions'));
|
246
|
-
|
247
|
-
|
248
|
-
|
245
|
+
await patientlyWaitFor(() => {
|
246
|
+
expect(getByLabelText('bulk_actions')).toHaveAttribute('aria-expanded', 'true');
|
247
|
+
expect(getByLabelText('bulk_remove')).toBeInTheDocument();
|
248
|
+
});
|
249
|
+
act(() => { fireEvent.click(getByLabelText('bulk_remove')); });
|
249
250
|
|
250
251
|
assertNockRequest(autocompleteScope);
|
251
252
|
assertNockRequest(cvFilterScope);
|
252
253
|
assertNockRequest(cvFiltersScope);
|
253
254
|
assertNockRequest(cvFiltersRuleBulkDeleteScope);
|
254
255
|
assertNockRequest(cvRequestCallbackScope);
|
255
|
-
|
256
256
|
assertNockRequest(errataScope, done);
|
257
|
+
act(done);
|
257
258
|
});
|
258
259
|
|
259
260
|
test('Can bulk add filter rules', async (done) => {
|
@@ -301,17 +302,20 @@ test('Can bulk add filter rules', async (done) => {
|
|
301
302
|
expect(getByLabelText('Select all rows')).toBeInTheDocument();
|
302
303
|
expect(getByLabelText('bulk_actions')).toHaveAttribute('aria-expanded', 'false');
|
303
304
|
});
|
305
|
+
expect(getByLabelText('add_filter_rule')).toHaveAttribute('aria-disabled', 'true');
|
304
306
|
fireEvent.click(getByLabelText('Select all rows'));
|
305
|
-
|
306
|
-
|
307
|
+
await patientlyWaitFor(() => {
|
308
|
+
expect(getByLabelText('add_filter_rule')).toHaveAttribute('aria-disabled', 'false');
|
309
|
+
});
|
310
|
+
act(() => { fireEvent.click(getByLabelText('add_filter_rule')); });
|
307
311
|
|
308
312
|
assertNockRequest(autocompleteScope);
|
309
313
|
assertNockRequest(cvFilterScope);
|
310
314
|
assertNockRequest(cvFiltersScope);
|
311
315
|
assertNockRequest(cvFiltersRuleBulkAddScope);
|
312
316
|
assertNockRequest(cvRequestCallbackScope);
|
313
|
-
|
314
317
|
assertNockRequest(errataScope, done);
|
318
|
+
act(done);
|
315
319
|
});
|
316
320
|
|
317
321
|
test('Can show filters and chips', async (done) => {
|
@@ -330,15 +334,19 @@ test('Can show filters and chips', async (done) => {
|
|
330
334
|
.times(5)
|
331
335
|
.query(true)
|
332
336
|
.reply(200, allErrata);
|
337
|
+
const cvRequestCallbackScope = nockInstance
|
338
|
+
.get(cvRefreshCallbackPath)
|
339
|
+
.query(true)
|
340
|
+
.reply(200, cvFilterDetails);
|
333
341
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
334
342
|
|
335
343
|
const {
|
336
344
|
getByText, getAllByText, queryByText, getByLabelText, getByTestId,
|
337
345
|
} =
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
346
|
+
renderWithRedux(withCVRoute(<ContentViewFilterDetails
|
347
|
+
cvId={1}
|
348
|
+
details={details}
|
349
|
+
/>), renderOptions);
|
342
350
|
|
343
351
|
// Nothing will show at first, page is loading
|
344
352
|
expect(queryByText(cvFilterName)).toBeNull();
|
@@ -347,14 +355,13 @@ test('Can show filters and chips', async (done) => {
|
|
347
355
|
await patientlyWaitFor(() => {
|
348
356
|
expect(getByText(cvFilterName)).toBeInTheDocument();
|
349
357
|
expect(getByTestId('allAddedNotAdded')).toBeInTheDocument();
|
350
|
-
fireEvent.click(getByTestId('allAddedNotAdded')
|
351
|
-
?.childNodes[0]?.childNodes[1]?.childNodes[0]?.childNodes[0]);
|
352
358
|
});
|
359
|
+
fireEvent.click(getByTestId('allAddedNotAdded')?.childNodes[0]?.childNodes[1]?.childNodes[0]?.childNodes[0]);
|
353
360
|
|
354
361
|
await patientlyWaitFor(() => {
|
355
362
|
expect(getByLabelText('select Added')).toBeInTheDocument();
|
356
|
-
getByLabelText('select Added').click();
|
357
363
|
});
|
364
|
+
act(() => { getByLabelText('select Added').click(); });
|
358
365
|
|
359
366
|
await patientlyWaitFor(() => {
|
360
367
|
expect(getByText(errataId)).toBeInTheDocument();
|
@@ -362,8 +369,10 @@ test('Can show filters and chips', async (done) => {
|
|
362
369
|
});
|
363
370
|
|
364
371
|
expect(getByText('Errata type')).toBeInTheDocument();
|
365
|
-
getByText('Errata type').click();
|
366
|
-
|
372
|
+
act(() => { getByText('Errata type').click(); });
|
373
|
+
await patientlyWaitFor(() => {
|
374
|
+
expect(getByLabelText('security_selection')).toBeInTheDocument();
|
375
|
+
});
|
367
376
|
getByLabelText('security_selection').click();
|
368
377
|
|
369
378
|
await patientlyWaitFor(() => {
|
@@ -374,14 +383,18 @@ test('Can show filters and chips', async (done) => {
|
|
374
383
|
expect(getAllByText('ANY')).toHaveLength(1);
|
375
384
|
});
|
376
385
|
fireEvent.change(getByLabelText('end_date_input'), { target: { value: '08/15/2020' } });
|
386
|
+
await patientlyWaitFor(() => {
|
387
|
+
expect(queryByText('ANY')).toBeNull();
|
388
|
+
});
|
377
389
|
|
378
|
-
// expect(getByLabelText('blah')).toBeInTheDocument();
|
379
390
|
assertNockRequest(autocompleteScope);
|
380
391
|
assertNockRequest(cvFilterScope);
|
381
392
|
assertNockRequest(cvFiltersScope);
|
393
|
+
assertNockRequest(cvRequestCallbackScope);
|
382
394
|
assertNockRequest(errataScope); // 1st call on component load
|
383
395
|
assertNockRequest(errataScope); // 2nd call on status selection
|
384
396
|
assertNockRequest(errataScope); // 3rd call on errata type selection
|
385
397
|
assertNockRequest(errataScope); // 4th call on start date change
|
386
398
|
assertNockRequest(errataScope, done); // Last call on end date change
|
399
|
+
act(done);
|
387
400
|
});
|
@@ -49,9 +49,9 @@ const ContentViewHistories = ({ cvId }) => {
|
|
49
49
|
const taskType = task ? task.label : taskTypes[action];
|
50
50
|
|
51
51
|
if (taskType === taskTypes.removal) {
|
52
|
-
return <>{__('Deleted from ')} <Label isTruncated key="1" color="blue" href={`/lifecycle_environments/${environment?.id}`}>{environment?.name ?? __('all environments')}</Label></>;
|
52
|
+
return <>{__('Deleted from ')} <Label isTruncated key="1" color="blue" href={`/lifecycle_environments/${environment?.id}`}>{`${environment?.name ?? __('all environments')}`}</Label></>;
|
53
53
|
} else if (action === 'promotion' || taskType === taskTypes.promotion) {
|
54
|
-
return <>{__('Promoted to ')}<Label isTruncated key="2" color="blue" href={`/lifecycle_environments/${environment?.id}`}>{environment?.name}</Label></>;
|
54
|
+
return <>{__('Promoted to ')}<Label isTruncated key="2" color="blue" href={`/lifecycle_environments/${environment?.id}`}>{`${environment?.name}`}</Label></>;
|
55
55
|
} else if (taskType === taskTypes.publish) {
|
56
56
|
return __('Published new version');
|
57
57
|
} else if (taskType === taskTypes.export) {
|
@@ -62,7 +62,7 @@ const ContentViewHistories = ({ cvId }) => {
|
|
62
62
|
return '';
|
63
63
|
};
|
64
64
|
|
65
|
-
const emptyContentTitle = __(
|
65
|
+
const emptyContentTitle = __('No history yet');
|
66
66
|
const emptyContentBody = __('History will appear here when the content view is published or promoted.'); // needs link
|
67
67
|
const emptySearchTitle = __('No matching history record found');
|
68
68
|
const emptySearchBody = __('Try changing your search settings.');
|
@@ -77,7 +77,7 @@ test('Can handle no History being present', async (done) => {
|
|
77
77
|
const { queryByText } = renderWithRedux(<ContentViewHistories cvId={1} />, renderOptions);
|
78
78
|
|
79
79
|
expect(queryByText(firstHistory.description)).toBeNull();
|
80
|
-
await patientlyWaitFor(() => expect(queryByText(
|
80
|
+
await patientlyWaitFor(() => expect(queryByText('History will appear here when the content view is published or promoted.')).toBeInTheDocument());
|
81
81
|
assertNockRequest(autocompleteScope);
|
82
82
|
assertNockRequest(scope, done);
|
83
83
|
});
|
@@ -3,7 +3,7 @@ import React, {
|
|
3
3
|
useEffect,
|
4
4
|
useState,
|
5
5
|
} from 'react';
|
6
|
-
|
6
|
+
import { FormattedMessage } from 'react-intl';
|
7
7
|
import { translate as __ } from 'foremanReact/common/I18n';
|
8
8
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
9
9
|
import { STATUS } from 'foremanReact/constants';
|
@@ -39,6 +39,7 @@ import {
|
|
39
39
|
Th,
|
40
40
|
Td,
|
41
41
|
} from '@patternfly/react-table';
|
42
|
+
import { useKatelloDocUrl } from '../../../../utils/useKatelloDocUrl';
|
42
43
|
import AddedStatusLabel from '../../../../components/AddedStatusLabel';
|
43
44
|
import SelectableDropdown from '../../../../components/SelectableDropdown';
|
44
45
|
import TableWrapper from '../../../../components/Table/TableWrapper';
|
@@ -74,10 +75,27 @@ const repoTypeNames = {
|
|
74
75
|
ostree: 'OSTree',
|
75
76
|
};
|
76
77
|
|
78
|
+
const NoReposInOrgCallsToAction = () => (
|
79
|
+
<FormattedMessage
|
80
|
+
id="truly-empty-calls-to-action"
|
81
|
+
defaultMessage={__('{enableRedHatRepos} or {createACustomProduct}.')}
|
82
|
+
values={{
|
83
|
+
enableRedHatRepos: (
|
84
|
+
<a href="/redhat_repositories" id="empty-state-primary-action-enable-red-hat-repos">{__('Enable Red Hat repositories')}</a>
|
85
|
+
),
|
86
|
+
createACustomProduct: (
|
87
|
+
<a href="/products/" id="empty-state-primary-action-create-a-custom-product">{__('create a custom product')}</a>
|
88
|
+
),
|
89
|
+
}}
|
90
|
+
/>
|
91
|
+
);
|
92
|
+
|
77
93
|
const ContentViewRepositories = ({ cvId, details }) => {
|
78
94
|
const dispatch = useDispatch();
|
79
95
|
const response = useSelector(state => selectCVRepos(state, cvId), shallowEqual);
|
80
96
|
const { results, ...metadata } = response;
|
97
|
+
const { org_repository_count: orgRepositoryCount } = metadata;
|
98
|
+
const [isLoading, setLoading] = useState(false);
|
81
99
|
const status = useSelector(state => selectCVReposStatus(state, cvId), shallowEqual);
|
82
100
|
const error = useSelector(state => selectCVReposError(state, cvId), shallowEqual);
|
83
101
|
const repoTypesResponse = useSelector(state => selectRepoTypes(state), shallowEqual);
|
@@ -86,7 +104,7 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
86
104
|
const generatedContentView = generatedFor !== 'none';
|
87
105
|
const [searchQuery, updateSearchQuery] = useState('');
|
88
106
|
const [typeSelected, setTypeSelected] = useState(allRepositories);
|
89
|
-
const [statusSelected, setStatusSelected] = useState(
|
107
|
+
const [statusSelected, setStatusSelected] = useState(ADDED);
|
90
108
|
// repoTypes object format: [displayed_value]: API_value
|
91
109
|
const [repoTypes, setRepoTypes] = useState({});
|
92
110
|
const [bulkActionOpen, setBulkActionOpen] = useState(false);
|
@@ -121,10 +139,18 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
121
139
|
__('Status'),
|
122
140
|
];
|
123
141
|
|
142
|
+
const documentationUrl = useKatelloDocUrl('Managing_Content', '#Products_and_Repositories_content-management');
|
143
|
+
|
124
144
|
useEffect(() => {
|
125
145
|
dispatch(getRepositoryTypes());
|
126
146
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
127
147
|
|
148
|
+
useEffect(() => {
|
149
|
+
if (status !== STATUS.PENDING) {
|
150
|
+
setLoading(false);
|
151
|
+
}
|
152
|
+
}, [status]);
|
153
|
+
|
128
154
|
// Get repo type filter selections dynamically from the API
|
129
155
|
useDeepCompareEffect(() => {
|
130
156
|
if (repoTypesStatus === STATUS.RESOLVED && repoTypesResponse) {
|
@@ -149,14 +175,16 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
149
175
|
dispatch(updateContentView(
|
150
176
|
cvId,
|
151
177
|
{ repository_ids: repositoryIds.concat(repos) },
|
152
|
-
() =>
|
178
|
+
() => {
|
153
179
|
dispatch(getContentViewRepositories(
|
154
180
|
cvId,
|
155
181
|
typeSelected !== 'All repositories' ? {
|
156
182
|
content_type: repoTypes[typeSelected],
|
157
183
|
} : {},
|
158
|
-
|
159
|
-
))
|
184
|
+
ADDED,
|
185
|
+
));
|
186
|
+
setStatusSelected(ADDED);
|
187
|
+
},
|
160
188
|
));
|
161
189
|
};
|
162
190
|
|
@@ -192,6 +220,11 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
192
220
|
onRemove(reposToDelete);
|
193
221
|
};
|
194
222
|
|
223
|
+
const handleShow = () => {
|
224
|
+
setLoading(true);
|
225
|
+
setStatusSelected(ALL_STATUSES);
|
226
|
+
};
|
227
|
+
|
195
228
|
const rowDropdownItems = ({ id }) => [
|
196
229
|
{
|
197
230
|
title: 'Add',
|
@@ -217,8 +250,35 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
217
250
|
return getContentViewRepositories(cvId, allParams, statusSelected);
|
218
251
|
}, [cvId, repoTypes, statusSelected, typeSelected]);
|
219
252
|
|
220
|
-
const
|
221
|
-
const
|
253
|
+
const noResults = (results && results.length === 0) && !searchQuery && status === STATUS.RESOLVED;
|
254
|
+
const emptyContentOverride =
|
255
|
+
noResults && statusSelected === ADDED;
|
256
|
+
const noReposInOrg =
|
257
|
+
(orgRepositoryCount === 0);
|
258
|
+
const emptyContentTitles = {
|
259
|
+
addRepos: __('No repositories added yet'),
|
260
|
+
noReposInOrg: __('No repositories available to add'),
|
261
|
+
};
|
262
|
+
const emptyContentBodies = {
|
263
|
+
addRepos: __('Click to see repositories available to add.'),
|
264
|
+
noReposInOrg: '',
|
265
|
+
};
|
266
|
+
|
267
|
+
const showPrimaryAction = emptyContentOverride || noReposInOrg;
|
268
|
+
const primaryActionButton = noReposInOrg ? (
|
269
|
+
<span style={{ fontSize: 'larger' }}><NoReposInOrgCallsToAction /></span>
|
270
|
+
) : (
|
271
|
+
<Button ouiaId="empty-state-primary-action-button" onClick={handleShow}>
|
272
|
+
{__('Show repositories')}
|
273
|
+
</Button>
|
274
|
+
);
|
275
|
+
|
276
|
+
const secondaryActionLink = noReposInOrg ? documentationUrl : undefined;
|
277
|
+
const secondaryActionTitle = noReposInOrg ? __('View documentation') : undefined;
|
278
|
+
const emptyContentTitle =
|
279
|
+
noReposInOrg ? emptyContentTitles.noReposInOrg : emptyContentTitles.addRepos;
|
280
|
+
const emptyContentBody =
|
281
|
+
noReposInOrg ? emptyContentBodies.noReposInOrg : emptyContentBodies.addRepos;
|
222
282
|
const emptySearchTitle = __('No matching repositories found');
|
223
283
|
const emptySearchBody = __('Try changing your search settings.');
|
224
284
|
const activeFilters = [typeSelected, statusSelected];
|
@@ -230,6 +290,8 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
230
290
|
</DropdownItem>,
|
231
291
|
];
|
232
292
|
|
293
|
+
const loadingStatus = (isLoading || status === STATUS.PENDING) ? STATUS.PENDING : status;
|
294
|
+
|
233
295
|
return (
|
234
296
|
<TableWrapper
|
235
297
|
{...{
|
@@ -241,13 +303,21 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
241
303
|
searchQuery,
|
242
304
|
updateSearchQuery,
|
243
305
|
error,
|
244
|
-
status,
|
245
306
|
activeFilters,
|
246
307
|
defaultFilters,
|
247
308
|
selectedCount,
|
248
309
|
selectNone,
|
249
310
|
resetFilters,
|
311
|
+
emptyContentOverride,
|
312
|
+
showPrimaryAction,
|
313
|
+
primaryActionButton,
|
314
|
+
secondaryActionLink,
|
315
|
+
secondaryActionTitle,
|
250
316
|
}}
|
317
|
+
status={loadingStatus}
|
318
|
+
showSecondaryAction={noReposInOrg}
|
319
|
+
showSecondaryActionButton={noReposInOrg}
|
320
|
+
secondaryActionTargetBlank={noReposInOrg}
|
251
321
|
ouiaId="content-view-repositories-table"
|
252
322
|
{...selectAll}
|
253
323
|
variant={TableVariant.compact}
|
data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { renderWithRedux, patientlyWaitFor, act } from 'react-testing-lib-wrapper';
|
2
|
+
import { renderWithRedux, patientlyWaitFor, act, fireEvent } from 'react-testing-lib-wrapper';
|
3
3
|
|
4
4
|
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../test-utils/nockWrapper';
|
5
5
|
import api from '../../../../../services/api';
|
6
6
|
import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
|
7
7
|
import ContentViewRepositories from '../ContentViewRepositories';
|
8
8
|
import repoData from './contentViewDetailRepos.fixtures.json';
|
9
|
+
import noReposAddedData from './contentViewDetailNoReposAdded.fixtures.json';
|
9
10
|
import cvDetailData from '../../__tests__/contentViewDetails.fixtures.json';
|
10
11
|
import cvRepoAddData from './contentViewRepoAdd.fixture.json';
|
11
12
|
|
12
13
|
const autocompleteUrl = '/repositories/auto_complete_search';
|
13
14
|
const renderOptions = { apiNamespace: `${CONTENT_VIEWS_KEY}_1` };
|
14
15
|
const cvAllRepos = api.getApiUrl('/content_views/1/repositories/show_all');
|
16
|
+
const cvAddedRepos = api.getApiUrl('/content_views/1/repositories');
|
15
17
|
const repoTypesResponse = [{ name: 'deb' }, { name: 'docker' }, { name: 'file' }, { name: 'ostree' }, { name: 'yum' }];
|
16
18
|
|
17
19
|
const cvDetailsPath = api.getApiUrl('/content_views/1');
|
@@ -33,6 +35,10 @@ jest.mock('react-intl', () => ({ addLocaleData: () => { }, FormattedDate: () =>
|
|
33
35
|
test('Can enable and disable add repositories button', async (done) => {
|
34
36
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
35
37
|
|
38
|
+
const noReposScope = nockInstance
|
39
|
+
.get(cvAddedRepos)
|
40
|
+
.query(true)
|
41
|
+
.reply(200, noReposAddedData);
|
36
42
|
const scope = nockInstance
|
37
43
|
.get(cvAllRepos)
|
38
44
|
.query(true)
|
@@ -43,14 +49,18 @@ test('Can enable and disable add repositories button', async (done) => {
|
|
43
49
|
renderOptions,
|
44
50
|
);
|
45
51
|
|
52
|
+
await patientlyWaitFor(() => expect(getByText('Show repositories')).toBeInTheDocument());
|
53
|
+
fireEvent.click(getByText('Show repositories'));
|
54
|
+
|
46
55
|
await patientlyWaitFor(() => expect(getByText(firstRepo.name)).toBeInTheDocument());
|
47
56
|
expect(getByLabelText('Select all')).toBeInTheDocument();
|
48
57
|
expect(getByLabelText('add_repositories')).toHaveAttribute('aria-disabled', 'true');
|
49
|
-
getByLabelText('Select all')
|
58
|
+
fireEvent.click(getByLabelText('Select all'));
|
50
59
|
await patientlyWaitFor(() => {
|
51
60
|
expect(getByLabelText('add_repositories')).toHaveAttribute('aria-disabled', 'false');
|
52
61
|
});
|
53
62
|
assertNockRequest(autocompleteScope);
|
63
|
+
assertNockRequest(noReposScope);
|
54
64
|
assertNockRequest(scope, done);
|
55
65
|
});
|
56
66
|
|
@@ -67,6 +77,11 @@ test('Can add repositories', async (done) => {
|
|
67
77
|
.query(true)
|
68
78
|
.reply(200, cvDetailData);
|
69
79
|
|
80
|
+
const noReposScope = nockInstance
|
81
|
+
.get(cvAddedRepos)
|
82
|
+
.query(true)
|
83
|
+
.reply(200, noReposAddedData);
|
84
|
+
|
70
85
|
const scope = nockInstance
|
71
86
|
.get(cvAllRepos)
|
72
87
|
.query(true)
|
@@ -77,17 +92,21 @@ test('Can add repositories', async (done) => {
|
|
77
92
|
renderOptions,
|
78
93
|
);
|
79
94
|
|
95
|
+
await patientlyWaitFor(() => expect(getByText('Show repositories')).toBeInTheDocument());
|
96
|
+
fireEvent.click(getByText('Show repositories'));
|
97
|
+
|
80
98
|
await patientlyWaitFor(() => expect(getByText(firstRepo.name)).toBeInTheDocument());
|
81
99
|
expect(getByLabelText('Select all')).toBeInTheDocument();
|
82
100
|
expect(getByLabelText('add_repositories')).toHaveAttribute('aria-disabled', 'true');
|
83
|
-
getByLabelText('Select all')
|
84
|
-
getByLabelText('add_repositories')
|
101
|
+
fireEvent.click(getByLabelText('Select all'));
|
102
|
+
fireEvent.click(getByLabelText('add_repositories'));
|
85
103
|
await patientlyWaitFor(() => expect(getByText(firstRepo.name)).toBeInTheDocument());
|
86
104
|
|
87
105
|
assertNockRequest(repoAddscope);
|
88
106
|
|
89
107
|
assertNockRequest(cvDetailScope);
|
90
108
|
assertNockRequest(autocompleteScope);
|
109
|
+
assertNockRequest(noReposScope);
|
91
110
|
assertNockRequest(scope, done);
|
92
111
|
act(done);
|
93
112
|
});
|
@@ -96,7 +115,7 @@ test('Can remove repositories', async (done) => {
|
|
96
115
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
97
116
|
const cvRemoveParams = { include_permissions: true, repository_ids: [58, 62, 64] };
|
98
117
|
const scope = nockInstance
|
99
|
-
.get(
|
118
|
+
.get(cvAddedRepos)
|
100
119
|
.query(true)
|
101
120
|
.reply(200, repoData);
|
102
121
|
const cvDetailScope = nockInstance
|
@@ -114,16 +133,16 @@ test('Can remove repositories', async (done) => {
|
|
114
133
|
|
115
134
|
await patientlyWaitFor(() => expect(getByText(firstRepo.name)).toBeInTheDocument());
|
116
135
|
expect(getByLabelText('Select all')).toBeInTheDocument();
|
117
|
-
getByLabelText('Select all')
|
136
|
+
fireEvent.click(getByLabelText('Select all'));
|
118
137
|
await patientlyWaitFor(() => {
|
119
138
|
expect(getByLabelText('bulk_actions')).toHaveAttribute('aria-expanded', 'false');
|
120
139
|
});
|
121
|
-
getByLabelText('bulk_actions')
|
140
|
+
fireEvent.click(getByLabelText('bulk_actions'));
|
122
141
|
await patientlyWaitFor(() => {
|
123
142
|
expect(getByLabelText('bulk_actions')).toHaveAttribute('aria-expanded', 'true');
|
124
143
|
expect(getByLabelText('bulk_remove')).toBeInTheDocument();
|
125
144
|
});
|
126
|
-
getByLabelText('bulk_remove')
|
145
|
+
fireEvent.click(getByLabelText('bulk_remove'));
|
127
146
|
await patientlyWaitFor(() => expect(getByText(firstRepo.name)).toBeInTheDocument());
|
128
147
|
|
129
148
|
assertNockRequest(repoRemoveScope);
|
@@ -22,7 +22,7 @@ const ActionSummary = ({ title, text, selectedEnv: { name, id } }) => (
|
|
22
22
|
<ExclamationTriangleIcon color={warningColor.value} />
|
23
23
|
</FlexItem>
|
24
24
|
<FlexItem style={{ marginRight: '8px' }}>
|
25
|
-
<Text>{text}</Text>
|
25
|
+
<Text ouiaId="action-summary-text">{text}</Text>
|
26
26
|
</FlexItem>
|
27
27
|
{name && id &&
|
28
28
|
<FlexItem>
|
data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignActivationKeys.js
CHANGED
@@ -4,7 +4,6 @@ import React, {
|
|
4
4
|
} from 'react';
|
5
5
|
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
7
|
-
import { STATUS } from 'foremanReact/constants';
|
8
7
|
import { first } from 'lodash';
|
9
8
|
import { FormattedMessage } from 'react-intl';
|
10
9
|
import {
|
@@ -38,6 +37,7 @@ import {
|
|
38
37
|
getNumberOfActivationKeys,
|
39
38
|
} from '../BulkDeleteHelpers';
|
40
39
|
import ContentViewSelect from '../../../../components/ContentViewSelect/ContentViewSelect';
|
40
|
+
import { getCVPlaceholderText, shouldDisableCVSelect } from '../../../../components/ContentViewSelect/helpers';
|
41
41
|
|
42
42
|
export default () => {
|
43
43
|
const dispatch = useDispatch();
|
@@ -52,7 +52,6 @@ export default () => {
|
|
52
52
|
const { results = [] } = useSelector(selectContentViews);
|
53
53
|
const { content_view: { id: cvId } } = first(versions);
|
54
54
|
const contentViewsInEnvStatus = useSelector(selectContentViewStatus);
|
55
|
-
const cvInEnvLoading = contentViewsInEnvStatus === STATUS.PENDING;
|
56
55
|
const [toggleCVSelect, setToggleCVSelect] = useState(false);
|
57
56
|
|
58
57
|
const numberOfActivationKeys = getNumberOfActivationKeys(versions);
|
@@ -88,18 +87,19 @@ export default () => {
|
|
88
87
|
{name}
|
89
88
|
</SelectOption>));
|
90
89
|
|
91
|
-
const
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
90
|
+
const placeholderText = getCVPlaceholderText({
|
91
|
+
contentSourceId: null,
|
92
|
+
environments: selectedEnvForAK,
|
93
|
+
contentViewsStatus: contentViewsInEnvStatus,
|
94
|
+
cvSelectOptions: selectOptions,
|
95
|
+
});
|
96
|
+
|
97
|
+
const disableCVSelect = shouldDisableCVSelect({
|
98
|
+
contentSourceId: null,
|
99
|
+
environments: selectedEnvForAK,
|
100
|
+
contentViewsStatus: contentViewsInEnvStatus,
|
101
|
+
cvSelectOptions: selectOptions,
|
102
|
+
});
|
103
103
|
|
104
104
|
const setUserCheckedItems = (value) => {
|
105
105
|
setSelectedCVForAK(null);
|
@@ -178,8 +178,8 @@ export default () => {
|
|
178
178
|
selections={selectedCVForAK}
|
179
179
|
onSelect={onSelect}
|
180
180
|
onClear={onClear}
|
181
|
-
isDisabled={
|
182
|
-
placeholderText={
|
181
|
+
isDisabled={disableCVSelect}
|
182
|
+
placeholderText={placeholderText}
|
183
183
|
isOpen={toggleCVSelect}
|
184
184
|
onToggle={setToggleCVSelect}
|
185
185
|
menuAppendTo={() => document.body}
|