katello 4.14.0 → 4.15.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/chosen.jquery.js +3 -3
- data/app/assets/javascripts/katello/common/env_select_scroll.js +3 -3
- data/app/assets/javascripts/katello/common/katello.js +8 -7
- data/app/assets/javascripts/katello/common/katello_object.js +3 -3
- data/app/assets/javascripts/katello/common/menu.js +7 -7
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +6 -6
- data/app/assets/javascripts/katello/locale/bn/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ca/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/el/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_US/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/es/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/fr/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/gl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/gu/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/hi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/id/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/it/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ja/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ka/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/kn/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ko/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/mr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/or/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pa/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ro/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ru/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/sl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ta/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/te/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/tr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +259 -28
- data/app/assets/javascripts/katello/organizations/download_certificate.js +1 -1
- data/app/assets/javascripts/katello/sync_management/sync_management.js +22 -18
- data/app/assets/javascripts/katello/widgets/env_content_view_selector.js +5 -5
- data/app/assets/javascripts/katello/widgets/path_selector.js +6 -6
- data/app/assets/javascripts/katello/widgets/subpanel_new.js +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +7 -7
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +6 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +131 -59
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +21 -10
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_environments_controller.rb +54 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +1 -1
- data/app/controllers/katello/api/v2/exports_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_contents_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -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 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -16
- data/app/controllers/katello/concerns/api/v2/multi_cv_params_handling.rb +24 -0
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +2 -5
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
- data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +5 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -2
- data/app/helpers/katello/katello_url_helper.rb +1 -1
- data/app/lib/actions/candlepin/product/content_create.rb +12 -1
- data/app/lib/actions/candlepin/product/content_update.rb +21 -4
- data/app/lib/actions/katello/activation_key/reassign.rb +4 -3
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +8 -3
- data/app/lib/actions/katello/capsule_content/update_content_counts.rb +21 -3
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/capsule_sync.rb +17 -1
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
- data/app/lib/actions/katello/content_view/remove.rb +8 -12
- data/app/lib/actions/katello/content_view_version/import.rb +1 -1
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +2 -2
- data/app/lib/actions/katello/flatpak/scan_remote.rb +62 -0
- data/app/lib/actions/katello/host/hypervisors.rb +1 -1
- data/app/lib/actions/katello/product/content_create.rb +28 -19
- data/app/lib/actions/katello/product/content_destroy.rb +6 -5
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +14 -0
- data/app/lib/actions/katello/repository/create.rb +24 -17
- data/app/lib/actions/katello/repository/create_container_push_root.rb +44 -0
- data/app/lib/actions/katello/repository/create_root.rb +5 -14
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/finish_upload.rb +13 -0
- data/app/lib/actions/katello/repository/import_upload.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +16 -0
- data/app/lib/actions/katello/repository/update.rb +11 -20
- data/app/lib/actions/katello/repository/upload_files.rb +1 -1
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +1 -1
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +1 -1
- data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +6 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +6 -1
- data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +1 -1
- data/app/lib/actions/pulp3/repository/initialize.rb +17 -0
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -1
- data/app/lib/katello/api/constraints/register_with_activation_key_constraint.rb +11 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +6 -6
- data/app/lib/katello/messaging/stomp_connection.rb +4 -4
- data/app/lib/katello/resources/candlepin/activation_key.rb +1 -1
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/product.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +1 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -3
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/lib/katello/resources/discovery/container.rb +5 -3
- data/app/lib/katello/resources/discovery/yum.rb +3 -1
- data/app/lib/katello/resources/registry.rb +0 -3
- data/app/lib/katello/util/candlepin_repository_checker.rb +2 -2
- data/app/lib/katello/util/cveak_migrator.rb +38 -0
- data/app/lib/katello/util/deb.rb +9 -0
- data/app/lib/katello/util/deduplication_migrator.rb +8 -8
- data/app/lib/katello/util/model.rb +2 -2
- data/app/lib/katello/util/search.rb +5 -5
- data/app/lib/katello/util/task_status.rb +19 -19
- data/app/lib/katello/util/url_matcher.rb +3 -3
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +2 -1
- data/app/lib/katello/validators/katello_url_format_validator.rb +2 -2
- data/app/mailers/katello/errata_mailer.rb +1 -4
- data/app/models/katello/activation_key.rb +123 -27
- data/app/models/katello/alternate_content_source.rb +5 -5
- data/app/models/katello/authorization/activation_key.rb +1 -1
- data/app/models/katello/authorization/content_view_environment.rb +7 -0
- data/app/models/katello/cdn_configuration.rb +1 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +24 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +29 -22
- data/app/models/katello/concerns/organization_extensions.rb +4 -4
- data/app/models/katello/concerns/redhat_extensions.rb +1 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +84 -39
- data/app/models/katello/content.rb +3 -3
- data/app/models/katello/content_view.rb +15 -18
- data/app/models/katello/content_view_environment.rb +56 -15
- data/app/models/katello/content_view_environment_activation_key.rb +20 -0
- data/app/models/katello/content_view_erratum_filter_rule.rb +1 -1
- data/app/models/katello/content_view_filter.rb +2 -2
- data/app/models/katello/content_view_history.rb +1 -1
- data/app/models/katello/content_view_repository.rb +1 -1
- data/app/models/katello/content_view_version.rb +3 -3
- data/app/models/katello/content_view_version_export_history.rb +2 -2
- data/app/models/katello/content_view_version_import_history.rb +1 -1
- data/app/models/katello/events/delete_latest_content_view_version.rb +1 -1
- data/app/models/katello/flatpak_remote.rb +11 -0
- data/app/models/katello/flatpak_remote_repository.rb +12 -0
- data/app/models/katello/flatpak_remote_repository_manifest.rb +10 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +1 -1
- data/app/models/katello/glue/candlepin/candlepin_object.rb +1 -1
- data/app/models/katello/glue/candlepin/pool.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/content_facet.rb +33 -17
- data/app/models/katello/host/info_provider.rb +2 -4
- data/app/models/katello/host/subscription_facet.rb +3 -3
- data/app/models/katello/host_available_module_stream.rb +1 -1
- data/app/models/katello/installed_product.rb +2 -2
- data/app/models/katello/kt_environment.rb +11 -6
- data/app/models/katello/ping.rb +2 -3
- data/app/models/katello/repository.rb +40 -6
- data/app/models/katello/rhel_lifecycle_status.rb +10 -10
- data/app/models/katello/root_repository.rb +14 -18
- data/app/models/katello/task_status.rb +1 -1
- data/app/models/katello/upstream_pool.rb +2 -2
- data/app/presenters/katello/product_content_presenter.rb +2 -2
- data/app/presenters/katello/repository_presenter.rb +3 -3
- data/app/presenters/katello/sync_status_presenter.rb +3 -3
- data/app/services/cert/certs.rb +6 -2
- data/app/services/katello/candlepin_event_listener.rb +1 -1
- data/app/services/katello/event_monitor/poller_thread.rb +1 -1
- data/app/services/katello/event_queue.rb +1 -1
- data/app/services/katello/product_content_finder.rb +10 -10
- data/app/services/katello/product_content_importer.rb +1 -1
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/app/services/katello/pulp3/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/api/apt.rb +4 -0
- data/app/services/katello/pulp3/content.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +3 -10
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +4 -4
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +2 -2
- data/app/services/katello/pulp3/deb.rb +35 -1
- data/app/services/katello/pulp3/docker_manifest.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest_list.rb +6 -2
- data/app/services/katello/pulp3/docker_tag.rb +1 -1
- data/app/services/katello/pulp3/erratum.rb +2 -2
- data/app/services/katello/pulp3/file_unit.rb +1 -1
- data/app/services/katello/pulp3/generic_content_unit.rb +1 -1
- data/app/services/katello/pulp3/module_stream.rb +2 -2
- data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/repository/apt.rb +22 -16
- data/app/services/katello/pulp3/repository/docker.rb +2 -2
- data/app/services/katello/pulp3/repository/file.rb +1 -1
- data/app/services/katello/pulp3/repository/generic.rb +1 -1
- data/app/services/katello/pulp3/repository/yum.rb +7 -7
- data/app/services/katello/pulp3/repository.rb +15 -9
- data/app/services/katello/pulp3/repository_mirror.rb +3 -3
- data/app/services/katello/registration_manager.rb +23 -6
- data/app/services/katello/repository_type.rb +3 -3
- data/app/services/katello/smart_proxy_helper.rb +3 -3
- data/app/services/katello/ui_notifications/content_view/delete_latest_version_failure.rb +1 -1
- data/app/services/katello/ui_notifications/subscriptions/expire_soon.rb +3 -3
- data/app/services/katello/ui_notifications/subscriptions/manifest_expire_soon_warning.rb +3 -3
- data/app/services/katello/ui_notifications/task_notification.rb +2 -2
- data/app/services/katello/upstream_connection_checker.rb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +43 -8
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +1 -1
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +5 -5
- data/app/views/katello/api/v2/common/_metadata.json.rabl +1 -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 +15 -6
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_environments/index.json.rabl +7 -0
- data/app/views/katello/api/v2/content_view_environments/show.json.rabl +33 -0
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +3 -3
- data/app/views/katello/api/v2/content_views/base.json.rabl +4 -3
- data/app/views/katello/api/v2/content_views/show.json.rabl +1 -2
- data/app/views/katello/api/v2/debs/backend.json.rabl +7 -0
- data/app/views/katello/api/v2/debs/base.json.rabl +4 -0
- data/app/views/katello/api/v2/debs/show.json.rabl +2 -0
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +1 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +2 -2
- data/app/views/katello/api/v2/environments/show.json.rabl +4 -4
- data/app/views/katello/api/v2/gpg_keys/show.json.rabl +1 -1
- data/app/views/katello/api/v2/host_collections/base.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts/base.json.rabl +2 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -2
- data/app/views/katello/api/v2/products/show.json.rabl +2 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +3 -3
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +1 -1
- data/app/views/katello/sync_management/index.html.erb +2 -2
- data/config/initializers/inflections.rb +11 -0
- data/config/katello.yaml.example +4 -10
- data/config/routes/api/registry.rb +0 -2
- data/config/routes/api/rhsm.rb +1 -4
- data/config/routes/api/v2.rb +2 -3
- data/db/migrate/20140716211853_repo_rename_feed_to_url.rb +1 -1
- data/db/migrate/20141003210742_add_docker_container_registry_url_to_providers.rb +1 -1
- data/db/migrate/20150224083608_remove_docker_registry_url.rb +1 -1
- data/db/migrate/20160808002834_add_files.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +1 -1
- data/db/migrate/20200818192230_update_system_purpose_status.rb +1 -1
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +1 -1
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +1 -1
- data/db/migrate/20211220185935_clean_duplicate_content_units.rb +2 -2
- data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +1 -1
- data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +1 -1
- data/db/migrate/20240508100434_add_content_id_to_katello_repository.rb +5 -0
- data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +87 -0
- data/db/migrate/20240806130902_add_more_deb_fields.rb +15 -0
- data/db/migrate/20240903194428_add_priority_to_content_view_environment_activation_key.rb +5 -0
- data/db/migrate/20241007200316_add_fields_to_katello_docker_manifest_list.rb +8 -0
- data/db/migrate/20241007212705_add_bootc_facts_to_content_facet.rb +27 -0
- data/db/migrate/20241025151105_remove_pulp3_migrated_hrefs_from_content_tables.rb +10 -0
- data/db/migrate/20241030181402_create_katello_flatpak_tables.rb +41 -0
- data/db/seeds.d/106-mail_notifications.rb +9 -9
- data/db/seeds.d/108-subcription-bookmarks.rb +1 -1
- data/db/seeds.d/109-katello-notification-blueprints.rb +21 -21
- data/db/seeds.d/110-content-view-autopublish.rb +5 -5
- data/db/seeds.d/111-container-image-bookmarks.rb +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/i18n/i18n.module.js +4 -0
- data/engines/bastion/lib/bastion/engine.rb +1 -1
- data/engines/bastion/lib/bastion.rb +1 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-gettext/angular-gettext.js +5 -1
- 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-info.html +29 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.routes.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-dependencies.html +54 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +13 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb.html +8 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +11 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/activation_keys.scss +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -1
- data/lib/katello/engine.rb +17 -15
- data/lib/katello/permission_creator.rb +51 -49
- data/lib/katello/permissions/host_permissions.rb +4 -4
- data/lib/katello/permissions/organization_permissions.rb +4 -4
- data/lib/katello/permissions/registry_permissions.rb +1 -1
- data/lib/katello/permissions/roles_permissions.rb +1 -1
- data/lib/katello/permissions/user_permissions.rb +1 -1
- data/lib/katello/plugin.rb +14 -8
- data/lib/katello/repository_types/docker.rb +4 -2
- data/lib/katello/repository_types/ostree.rb +5 -3
- data/lib/katello/repository_types/python.rb +1 -1
- data/lib/katello/repository_types/yum.rb +2 -1
- data/lib/katello/scheduled_jobs.rb +1 -1
- data/lib/katello/tasks/migrate_structure_content_for_deb.rake +105 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/repository.rake +19 -9
- data/lib/katello/tasks/upgrades/4.1/reupdate_content_import_export_perms.rake +1 -1
- data/lib/katello/tasks/upgrades/4.3/fix_url_auth.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +92 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +259 -28
- data/locale/bn_IN/katello.po +258 -27
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +258 -27
- data/locale/cs/katello.po +258 -30
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +258 -27
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +259 -28
- data/locale/de_AT/katello.po +258 -27
- data/locale/de_DE/katello.po +258 -27
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +258 -27
- data/locale/en/katello.po +258 -27
- data/locale/en_GB/katello.po +258 -27
- data/locale/en_US/katello.po +258 -27
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +259 -28
- data/locale/et_EE/katello.po +258 -27
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +259 -28
- data/locale/gl/katello.po +258 -27
- data/locale/gu/katello.po +258 -27
- data/locale/he_IL/katello.po +258 -27
- data/locale/hi/katello.po +258 -27
- data/locale/id/katello.po +258 -27
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +259 -28
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +259 -28
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +259 -28
- data/locale/katello.pot +1041 -696
- data/locale/kn/katello.po +258 -27
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +259 -28
- data/locale/ml_IN/katello.po +258 -27
- data/locale/mr/katello.po +258 -27
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +258 -27
- data/locale/or/katello.po +258 -27
- data/locale/pa/katello.po +258 -27
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +258 -27
- data/locale/pl_PL/katello.po +258 -27
- data/locale/pt/katello.po +258 -27
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +259 -28
- data/locale/ro/katello.po +258 -27
- data/locale/ro_RO/katello.po +258 -27
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +259 -28
- data/locale/sl/katello.po +258 -27
- data/locale/sv_SE/katello.po +258 -27
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +259 -28
- data/locale/ta_IN/katello.po +258 -27
- data/locale/te/katello.po +258 -27
- data/locale/tr/katello.po +258 -27
- data/locale/vi/katello.po +258 -27
- data/locale/vi_VN/katello.po +258 -27
- data/locale/zh/katello.po +258 -27
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +259 -28
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +259 -28
- data/vendor/assets/javascripts/katello/chosen.jquery.js +2 -2
- data/vendor/assets/javascripts/katello/jquery.ba-bbq.js +1 -1
- data/vendor/assets/javascripts/katello/jquery.hoverIntent.js +2 -2
- data/webpack/ForemanColumnExtensions/index.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +113 -86
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js +31 -4
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -7
- data/webpack/components/extensions/RegistrationCommands/helpers.js +15 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +3 -9
- data/webpack/global_index.js +11 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +8 -6
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +4 -0
- data/webpack/scenes/ActivationKeys/Details/components/CVEDetailsCard.js +37 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -2
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -8
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +22 -2
- data/webpack/scenes/SmartProxy/ExpandedSmartProxyRepositories.js +39 -20
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +2 -1
- data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +6 -4
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +62 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +6 -4
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +1 -1
- metadata +86 -76
- data/app/lib/katello/api/constraints/activation_key_constraint.rb +0 -7
- /data/app/lib/katello/{api → routing}/mapper_extensions.rb +0 -0
@@ -382,7 +382,7 @@ Copyright (c) 2011 by Harvest
|
|
382
382
|
this.search_results.mouseout(function(evt) {
|
383
383
|
return _this.search_results_mouseout(evt);
|
384
384
|
});
|
385
|
-
this.form_field_jq.
|
385
|
+
this.form_field_jq.on("liszt:updated", function(evt) {
|
386
386
|
return _this.results_update_field(evt);
|
387
387
|
});
|
388
388
|
this.search_field.blur(function(evt) {
|
@@ -421,7 +421,7 @@ Copyright (c) 2011 by Harvest
|
|
421
421
|
this.container.removeClass('chzn-disabled');
|
422
422
|
this.search_field[0].disabled = false;
|
423
423
|
if (!this.is_multiple) {
|
424
|
-
return this.selected_item.
|
424
|
+
return this.selected_item.on("focus", this.activate_action);
|
425
425
|
}
|
426
426
|
}
|
427
427
|
};
|
@@ -1021,7 +1021,7 @@
|
|
1021
1021
|
// example) use $(window).trigger( 'hashchange' );
|
1022
1022
|
// * The event can be bound before DOM ready, but since it won't be usable
|
1023
1023
|
// before then in IE6/7 (due to the necessary Iframe), recommended usage is
|
1024
|
-
// to bind it inside a $(document).
|
1024
|
+
// to bind it inside a $(document).on('loadJS', ) callback.
|
1025
1025
|
|
1026
1026
|
jq_event_special[ str_hashchange ] = $.extend( jq_event_special[ str_hashchange ], {
|
1027
1027
|
|
@@ -87,7 +87,7 @@
|
|
87
87
|
// set "previous" X and Y position based on initial entry point
|
88
88
|
pX = ev.pageX; pY = ev.pageY;
|
89
89
|
// update "current" X and Y position based on mousemove
|
90
|
-
$(ob).
|
90
|
+
$(ob).on("mousemove",track);
|
91
91
|
// start polling interval (self-calling timeout) to compare mouse coordinates over time
|
92
92
|
if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
|
93
93
|
|
@@ -101,6 +101,6 @@
|
|
101
101
|
};
|
102
102
|
|
103
103
|
// bind the function to the two event listeners
|
104
|
-
return this.
|
104
|
+
return this.on('mouseenter',handleHover).on('mouseleave',handleHover);
|
105
105
|
};
|
106
106
|
})(jQuery);
|
@@ -131,7 +131,7 @@ const hostsIndexColumnExtensions = [
|
|
131
131
|
}
|
132
132
|
>
|
133
133
|
<FlexItem>
|
134
|
-
{truncate(contentViewEnvironments.map(cve => cve.
|
134
|
+
{truncate(contentViewEnvironments.map(cve => cve.label).join(', '), 35)}
|
135
135
|
</FlexItem>
|
136
136
|
</Popover>
|
137
137
|
</Flex>
|
@@ -24,6 +24,7 @@ import ContentViewIcon from '../../../../../scenes/ContentViews/components/Conte
|
|
24
24
|
import { hasRequiredPermissions, hostIsRegistered } from '../../hostDetailsHelpers';
|
25
25
|
import ChangeHostCVModal from './ChangeHostCVModal';
|
26
26
|
import { truncate } from '../../../../../utils/helpers';
|
27
|
+
import InactiveText from '../../../../../scenes/ContentViews/components/InactiveText';
|
27
28
|
|
28
29
|
const requiredPermissions = [
|
29
30
|
'view_lifecycle_environments', 'view_content_views',
|
@@ -95,7 +96,106 @@ ContentViewEnvironmentDisplay.propTypes = {
|
|
95
96
|
}).isRequired,
|
96
97
|
};
|
97
98
|
|
98
|
-
const
|
99
|
+
export const CVEDetailsBareCard = ({
|
100
|
+
contentViewEnvironments, hostPermissions, permissions, dropdownItems,
|
101
|
+
isDropdownOpen, toggleHamburger,
|
102
|
+
}) => {
|
103
|
+
const userPermissions = { ...hostPermissions, ...permissions };
|
104
|
+
const showKebab = hasRequiredPermissions(requiredPermissions, userPermissions);
|
105
|
+
|
106
|
+
return (
|
107
|
+
<Card ouiaId="content-view-details-card">
|
108
|
+
<CardHeader>
|
109
|
+
<Flex
|
110
|
+
alignItems={{ default: 'alignItemsCenter' }}
|
111
|
+
justifyContent={{ default: 'justifyContentSpaceBetween' }}
|
112
|
+
style={{ width: '100%' }}
|
113
|
+
>
|
114
|
+
<FlexItem>
|
115
|
+
<Flex
|
116
|
+
alignItems={{ default: 'alignItemsCenter' }}
|
117
|
+
justifyContent={{ default: 'justifyContentSpaceBetween' }}
|
118
|
+
>
|
119
|
+
<FlexItem>
|
120
|
+
<CardTitle>
|
121
|
+
<FormattedMessage
|
122
|
+
id="cv-card-title"
|
123
|
+
defaultMessage="{count, plural, =0 {Content view environments} one {Content view environment} other {Content view environments}}"
|
124
|
+
values={{
|
125
|
+
count: contentViewEnvironments.length,
|
126
|
+
}}
|
127
|
+
/>
|
128
|
+
</CardTitle>
|
129
|
+
</FlexItem>
|
130
|
+
</Flex>
|
131
|
+
</FlexItem>
|
132
|
+
{showKebab && dropdownItems && (
|
133
|
+
<FlexItem>
|
134
|
+
<Dropdown
|
135
|
+
toggle={<KebabToggle aria-label="change_content_view_hamburger" onToggle={toggleHamburger} />}
|
136
|
+
isOpen={isDropdownOpen}
|
137
|
+
isPlain
|
138
|
+
ouiaId="change-content-view-environments-card-kebab"
|
139
|
+
position="right"
|
140
|
+
dropdownItems={dropdownItems}
|
141
|
+
/>
|
142
|
+
</FlexItem>
|
143
|
+
)}
|
144
|
+
</Flex>
|
145
|
+
</CardHeader>
|
146
|
+
<CardBody>
|
147
|
+
<Flex direction={{ default: 'column' }}>
|
148
|
+
{contentViewEnvironments.length === 0 && (
|
149
|
+
<InactiveText text={__('N/A')} />
|
150
|
+
)}
|
151
|
+
{contentViewEnvironments.map(env => (
|
152
|
+
<ContentViewEnvironmentDisplay
|
153
|
+
key={`${env.lifecycle_environment.name}-${env.content_view.name}`}
|
154
|
+
contentView={env.content_view}
|
155
|
+
lifecycleEnvironment={env.lifecycle_environment}
|
156
|
+
/>
|
157
|
+
))}
|
158
|
+
</Flex>
|
159
|
+
</CardBody>
|
160
|
+
</Card>
|
161
|
+
);
|
162
|
+
};
|
163
|
+
|
164
|
+
CVEDetailsBareCard.propTypes = {
|
165
|
+
contentViewEnvironments: PropTypes.arrayOf(PropTypes.shape({
|
166
|
+
content_view: PropTypes.shape({
|
167
|
+
name: PropTypes.string,
|
168
|
+
id: PropTypes.number,
|
169
|
+
composite: PropTypes.bool,
|
170
|
+
}),
|
171
|
+
lifecycle_environment: PropTypes.shape({
|
172
|
+
name: PropTypes.string,
|
173
|
+
id: PropTypes.number,
|
174
|
+
}),
|
175
|
+
})),
|
176
|
+
hostPermissions: PropTypes.shape({
|
177
|
+
edit_hosts: PropTypes.bool,
|
178
|
+
}),
|
179
|
+
permissions: PropTypes.shape({
|
180
|
+
view_content_views: PropTypes.bool,
|
181
|
+
view_lifecycle_environments: PropTypes.bool,
|
182
|
+
promote_or_remove_content_views_to_environments: PropTypes.bool,
|
183
|
+
}),
|
184
|
+
dropdownItems: PropTypes.arrayOf(PropTypes.node),
|
185
|
+
isDropdownOpen: PropTypes.bool,
|
186
|
+
toggleHamburger: PropTypes.func,
|
187
|
+
};
|
188
|
+
|
189
|
+
CVEDetailsBareCard.defaultProps = {
|
190
|
+
contentViewEnvironments: [],
|
191
|
+
hostPermissions: {},
|
192
|
+
permissions: {},
|
193
|
+
dropdownItems: [],
|
194
|
+
isDropdownOpen: false,
|
195
|
+
toggleHamburger: () => {},
|
196
|
+
};
|
197
|
+
|
198
|
+
export const ContentViewEnvironmentDetails = ({
|
99
199
|
contentViewEnvironments, hostId, hostName, orgId, hostEnvId,
|
100
200
|
hostPermissions, permissions, contentSourceId,
|
101
201
|
}) => {
|
@@ -126,57 +226,14 @@ const HostContentViewDetails = ({
|
|
126
226
|
|
127
227
|
return (
|
128
228
|
<GridItem rowSpan={1} md={6} lg={4} xl2={3} >
|
129
|
-
<
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<Flex
|
138
|
-
alignItems={{ default: 'alignItemsCenter' }}
|
139
|
-
justifyContent={{ default: 'justifyContentSpaceBetween' }}
|
140
|
-
>
|
141
|
-
<FlexItem>
|
142
|
-
<CardTitle>
|
143
|
-
<FormattedMessage
|
144
|
-
id="cv-card-title"
|
145
|
-
defaultMessage="{count, plural, =0 {Content view environments} one {Content view environment} other {Content view environments}}"
|
146
|
-
values={{
|
147
|
-
count: contentViewEnvironments.length,
|
148
|
-
}}
|
149
|
-
/>
|
150
|
-
</CardTitle>
|
151
|
-
</FlexItem>
|
152
|
-
</Flex>
|
153
|
-
</FlexItem>
|
154
|
-
{showKebab && (
|
155
|
-
<FlexItem>
|
156
|
-
<Dropdown
|
157
|
-
toggle={<KebabToggle aria-label="change_content_view_hamburger" onToggle={toggleHamburger} />}
|
158
|
-
isOpen={isDropdownOpen}
|
159
|
-
isPlain
|
160
|
-
ouiaId="change-host-content-view-kebab"
|
161
|
-
position="right"
|
162
|
-
dropdownItems={dropdownItems}
|
163
|
-
/>
|
164
|
-
</FlexItem>
|
165
|
-
)}
|
166
|
-
</Flex>
|
167
|
-
</CardHeader>
|
168
|
-
<CardBody>
|
169
|
-
<Flex direction={{ default: 'column' }}>
|
170
|
-
{contentViewEnvironments.map(env => (
|
171
|
-
<ContentViewEnvironmentDisplay
|
172
|
-
key={`${env.lifecycle_environment.name}-${env.content_view.name}`}
|
173
|
-
contentView={env.content_view}
|
174
|
-
lifecycleEnvironment={env.lifecycle_environment}
|
175
|
-
/>
|
176
|
-
))}
|
177
|
-
</Flex>
|
178
|
-
</CardBody>
|
179
|
-
</Card>
|
229
|
+
<CVEDetailsBareCard
|
230
|
+
isDropdownOpen={isDropdownOpen}
|
231
|
+
toggleHamburger={toggleHamburger}
|
232
|
+
contentViewEnvironments={contentViewEnvironments}
|
233
|
+
hostPermissions={hostPermissions}
|
234
|
+
permissions={permissions}
|
235
|
+
dropdownItems={showKebab ? dropdownItems : []}
|
236
|
+
/>
|
180
237
|
{hostId &&
|
181
238
|
<ChangeHostCVModal
|
182
239
|
isOpen={isModalOpen}
|
@@ -194,7 +251,7 @@ const HostContentViewDetails = ({
|
|
194
251
|
);
|
195
252
|
};
|
196
253
|
|
197
|
-
|
254
|
+
ContentViewEnvironmentDetails.propTypes = {
|
198
255
|
contentViewEnvironments: PropTypes.arrayOf(PropTypes.shape({
|
199
256
|
content_view: PropTypes.shape({
|
200
257
|
name: PropTypes.string,
|
@@ -221,7 +278,7 @@ HostContentViewDetails.propTypes = {
|
|
221
278
|
contentSourceId: PropTypes.number,
|
222
279
|
};
|
223
280
|
|
224
|
-
|
281
|
+
ContentViewEnvironmentDetails.defaultProps = {
|
225
282
|
contentViewEnvironments: [],
|
226
283
|
hostId: null,
|
227
284
|
hostName: '',
|
@@ -232,10 +289,11 @@ HostContentViewDetails.defaultProps = {
|
|
232
289
|
contentSourceId: null,
|
233
290
|
};
|
234
291
|
|
292
|
+
|
235
293
|
const ContentViewDetailsCard = ({ hostDetails }) => {
|
236
294
|
if (hostIsRegistered({ hostDetails })
|
237
295
|
&& hostDetails.content_facet_attributes && hostDetails.organization_id) {
|
238
|
-
return (<
|
296
|
+
return (<ContentViewEnvironmentDetails
|
239
297
|
hostId={hostDetails.id}
|
240
298
|
hostName={hostDetails.name}
|
241
299
|
contentSourceId={hostDetails.content_facet_attributes.content_source?.id}
|
@@ -248,37 +306,6 @@ const ContentViewDetailsCard = ({ hostDetails }) => {
|
|
248
306
|
return null;
|
249
307
|
};
|
250
308
|
|
251
|
-
HostContentViewDetails.propTypes = {
|
252
|
-
contentView: PropTypes.shape({
|
253
|
-
name: PropTypes.string,
|
254
|
-
id: PropTypes.number,
|
255
|
-
composite: PropTypes.bool,
|
256
|
-
}).isRequired,
|
257
|
-
hostId: PropTypes.number,
|
258
|
-
hostName: PropTypes.string,
|
259
|
-
contentSourceId: PropTypes.number,
|
260
|
-
orgId: PropTypes.number,
|
261
|
-
hostEnvId: PropTypes.number,
|
262
|
-
hostPermissions: PropTypes.shape({
|
263
|
-
edit_hosts: PropTypes.bool,
|
264
|
-
}),
|
265
|
-
permissions: PropTypes.shape({
|
266
|
-
view_content_views: PropTypes.bool,
|
267
|
-
view_lifecycle_environments: PropTypes.bool,
|
268
|
-
promote_or_remove_content_views_to_environments: PropTypes.bool,
|
269
|
-
}),
|
270
|
-
};
|
271
|
-
|
272
|
-
HostContentViewDetails.defaultProps = {
|
273
|
-
hostEnvId: null,
|
274
|
-
hostId: null,
|
275
|
-
hostName: '',
|
276
|
-
orgId: null,
|
277
|
-
contentSourceId: null,
|
278
|
-
hostPermissions: {},
|
279
|
-
permissions: {},
|
280
|
-
};
|
281
|
-
|
282
309
|
ContentViewDetailsCard.propTypes = {
|
283
310
|
hostDetails: PropTypes.shape({
|
284
311
|
id: PropTypes.number,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
+
import { number_to_human_size as NumberToHumanSize } from 'number_helpers';
|
3
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
5
|
import {
|
5
6
|
DescriptionList,
|
@@ -46,7 +47,7 @@ const HwPropertiesCard = ({ isExpandedGlobal, hostDetails }) => {
|
|
46
47
|
const cpuSockets = facts?.['cpu::cpu_socket(s)'];
|
47
48
|
const coreSocket = facts?.['cpu::core(s)_per_socket'];
|
48
49
|
const blockDevices = facts?.blockdevices;
|
49
|
-
const memory = facts?.['
|
50
|
+
const memory = facts?.['memory::memtotal'];
|
50
51
|
|
51
52
|
return (
|
52
53
|
<CardTemplate
|
@@ -74,7 +75,11 @@ const HwPropertiesCard = ({ isExpandedGlobal, hostDetails }) => {
|
|
74
75
|
</DescriptionListGroup>
|
75
76
|
<DescriptionListGroup>
|
76
77
|
<DescriptionListTerm>{__('RAM')}</DescriptionListTerm>
|
77
|
-
<DescriptionListDescription>
|
78
|
+
<DescriptionListDescription>
|
79
|
+
{NumberToHumanSize(memory * 1024, {
|
80
|
+
strip_insignificant_zeros: true,
|
81
|
+
})}
|
82
|
+
</DescriptionListDescription>
|
78
83
|
</DescriptionListGroup>
|
79
84
|
<DescriptionListGroup>
|
80
85
|
<HostDisks blockDevices={blockDevices} />
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useCallback, useState, useRef } from 'react';
|
2
|
-
import { useSelector } from 'react-redux';
|
2
|
+
import { useSelector, useDispatch } from 'react-redux';
|
3
3
|
import {
|
4
4
|
ActionList,
|
5
5
|
ActionListItem,
|
@@ -19,6 +19,7 @@ import {
|
|
19
19
|
import { TableVariant, Thead, Tbody, Tr, Th, Td, TableText } from '@patternfly/react-table';
|
20
20
|
import PropTypes from 'prop-types';
|
21
21
|
import { translate as __ } from 'foremanReact/common/I18n';
|
22
|
+
import { HOST_DETAILS_KEY } from 'foremanReact/components/HostDetails/consts';
|
22
23
|
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
|
23
24
|
|
24
25
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
@@ -44,6 +45,7 @@ import { hasRequiredPermissions as can,
|
|
44
45
|
userPermissionsFromHostDetails } from '../../hostDetailsHelpers';
|
45
46
|
import SortableColumnHeaders from '../../../../Table/components/SortableColumnHeaders';
|
46
47
|
import { useRexJobPolling } from '../RemoteExecutionHooks';
|
48
|
+
import { runSubmanRepos } from '../../Cards/ContentViewDetailsCard/HostContentViewActions';
|
47
49
|
|
48
50
|
export const hideDebsTab = ({ hostDetails }) => !(hostDetails?.operatingsystem_family === 'Debian');
|
49
51
|
|
@@ -197,6 +199,7 @@ export const DebsTab = () => {
|
|
197
199
|
const { results, ...metadata } = response;
|
198
200
|
const { error: errorSearchBody } = metadata;
|
199
201
|
const status = useSelector(state => selectHostDebsStatus(state));
|
202
|
+
const dispatch = useDispatch();
|
200
203
|
const {
|
201
204
|
selectOne,
|
202
205
|
isSelected,
|
@@ -269,6 +272,21 @@ export const DebsTab = () => {
|
|
269
272
|
isPolling: isInstallInProgress,
|
270
273
|
} = useRexJobPolling(packageInstallAction, getHostDetails({ hostname }));
|
271
274
|
|
275
|
+
const refreshHostDetails = () => dispatch({
|
276
|
+
type: 'API_GET',
|
277
|
+
payload: {
|
278
|
+
key: HOST_DETAILS_KEY,
|
279
|
+
url: `/api/hosts/${hostname}`,
|
280
|
+
},
|
281
|
+
});
|
282
|
+
const {
|
283
|
+
triggerJobStart: triggerRecalculate, lastCompletedJob: lastCompletedRecalculate,
|
284
|
+
} = useRexJobPolling(() => runSubmanRepos(hostname, refreshHostDetails));
|
285
|
+
const handleRefreshApplicabilityClick = () => {
|
286
|
+
setIsBulkActionOpen(false);
|
287
|
+
triggerRecalculate();
|
288
|
+
};
|
289
|
+
|
272
290
|
const actionInProgress = (isRemoveInProgress || isUpgradeInProgress
|
273
291
|
|| isBulkRemoveInProgress || isBulkUpgradeInProgress || isInstallInProgress);
|
274
292
|
const disabledReason = __('A remote execution job is in progress.');
|
@@ -345,7 +363,7 @@ export const DebsTab = () => {
|
|
345
363
|
</DropdownItem>,
|
346
364
|
];
|
347
365
|
|
348
|
-
const
|
366
|
+
const kebabItems = [
|
349
367
|
<DropdownItem
|
350
368
|
aria-label="bulk_remove"
|
351
369
|
ouiaId="bulk_remove"
|
@@ -366,6 +384,15 @@ export const DebsTab = () => {
|
|
366
384
|
>
|
367
385
|
{__('Install packages')}
|
368
386
|
</DropdownItem>,
|
387
|
+
<DropdownItem
|
388
|
+
aria-label="refresh_applicability"
|
389
|
+
ouiaId="refresh_applicability"
|
390
|
+
key="refresh_applicability"
|
391
|
+
component="button"
|
392
|
+
onClick={handleRefreshApplicabilityClick}
|
393
|
+
>
|
394
|
+
{__('Refresh package applicability')}
|
395
|
+
</DropdownItem>,
|
369
396
|
];
|
370
397
|
|
371
398
|
const handlePackageStatusSelected = newStatus => setPackageStatusSelected((prevStatus) => {
|
@@ -406,7 +433,7 @@ export const DebsTab = () => {
|
|
406
433
|
toggle={<KebabToggle aria-label="bulk_actions" onToggle={toggleBulkAction} />}
|
407
434
|
isOpen={isBulkActionOpen}
|
408
435
|
isPlain
|
409
|
-
dropdownItems={
|
436
|
+
dropdownItems={kebabItems}
|
410
437
|
ouiaId="bulk_actions_dropdown"
|
411
438
|
/>
|
412
439
|
</ActionListItem>
|
@@ -461,7 +488,7 @@ export const DebsTab = () => {
|
|
461
488
|
additionalListeners={[hostId, packageStatusSelected,
|
462
489
|
activeSortDirection, activeSortColumn, lastCompletedPackageUpgrade,
|
463
490
|
lastCompletedPackageRemove, lastCompletedBulkPackageRemove,
|
464
|
-
lastCompletedBulkPackageUpgrade, lastCompletedPackageInstall]}
|
491
|
+
lastCompletedBulkPackageUpgrade, lastCompletedPackageInstall, lastCompletedRecalculate]}
|
465
492
|
fetchItems={fetchItems}
|
466
493
|
bookmarkController="katello_host_installed_debs"
|
467
494
|
readOnlyBookmarks={readOnlyBookmarks}
|
@@ -194,7 +194,7 @@ const RepositorySetsTab = () => {
|
|
194
194
|
const { name: lifecycleEnvironmentName } = lifecycleEnvironment ?? {};
|
195
195
|
const multiEnvHost = contentViewEnvironments.length > 1;
|
196
196
|
const contentViewEnvironmentNames =
|
197
|
-
contentViewEnvironments.map(({
|
197
|
+
contentViewEnvironments.map(({ label }) => label).join(', ');
|
198
198
|
const nonLibraryHost = contentViewDefault === false ||
|
199
199
|
lifecycleEnvironmentLibrary === false;
|
200
200
|
const [isBulkActionOpen, setIsBulkActionOpen] = useState(false);
|
@@ -62,12 +62,6 @@ const ActivationKeys = ({
|
|
62
62
|
);
|
63
63
|
}, [handleInvalidField, hostGroupId, hostGroupActivationKeys, pluginValues]);
|
64
64
|
|
65
|
-
useEffect(() => {
|
66
|
-
if (activationKeys?.length === 1) {
|
67
|
-
onChange({ activationKeys: [activationKeys[0].name] });
|
68
|
-
}
|
69
|
-
}, [activationKeys, onChange]);
|
70
|
-
|
71
65
|
return (
|
72
66
|
<FormGroup
|
73
67
|
onFocus={() => setHasInteraction(true)}
|
@@ -131,7 +125,7 @@ const ActivationKeys = ({
|
|
131
125
|
<SelectOption
|
132
126
|
key={ack.name}
|
133
127
|
value={ack.name}
|
134
|
-
description={ack?.
|
128
|
+
description={ack?.cves ? ack.cves : __('No content view environments')}
|
135
129
|
/>
|
136
130
|
))}
|
137
131
|
</Select>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export const determineInitialAKSelection = (activationKeys, initialAKSelection) => {
|
2
|
+
// If we've received the initialAKSelection from the URL, and it's a valid activation key, use it
|
3
|
+
if (initialAKSelection &&
|
4
|
+
(activationKeys ?? []).some(ak => ak.name === initialAKSelection)) {
|
5
|
+
return { activationKeys: initialAKSelection.split(',') };
|
6
|
+
}
|
7
|
+
// If there's only one activation key, use it
|
8
|
+
if (activationKeys?.length === 1) {
|
9
|
+
return { activationKeys: [activationKeys[0].name] };
|
10
|
+
}
|
11
|
+
// Otherwise, don't select any activation keys
|
12
|
+
return { activationKeys: [] };
|
13
|
+
};
|
14
|
+
|
15
|
+
export default determineInitialAKSelection;
|
@@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { noop } from 'foremanReact/common/helpers';
|
4
4
|
import { useUrlParams } from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
|
5
|
+
import { determineInitialAKSelection } from './helpers';
|
5
6
|
|
6
7
|
import ActivationKeys from './fields/ActivationKeys';
|
7
8
|
import IgnoreSubmanErrors from './fields/IgnoreSubmanErrors';
|
@@ -51,15 +52,8 @@ export const RegistrationActivationKeys = ({
|
|
51
52
|
}) => {
|
52
53
|
const { initialAKSelection } = useUrlParams();
|
53
54
|
useEffect(() => {
|
54
|
-
onChange(
|
55
|
-
}, [onChange, organizationId, hostGroupId]);
|
56
|
-
|
57
|
-
useEffect(() => {
|
58
|
-
if (initialAKSelection &&
|
59
|
-
(pluginData?.activationKeys ?? []).some(ak => ak.name === initialAKSelection)) {
|
60
|
-
onChange({ activationKeys: initialAKSelection.split(',') });
|
61
|
-
}
|
62
|
-
}, [initialAKSelection, onChange, pluginData?.activationKeys]);
|
55
|
+
onChange(determineInitialAKSelection(pluginData?.activationKeys, initialAKSelection));
|
56
|
+
}, [initialAKSelection, onChange, pluginData?.activationKeys, organizationId, hostGroupId]);
|
63
57
|
|
64
58
|
return (
|
65
59
|
<ActivationKeys
|
data/webpack/global_index.js
CHANGED
@@ -38,6 +38,7 @@ import BulkChangeHostCVModal from './components/extensions/Hosts/BulkActions/Bul
|
|
38
38
|
import BulkPackagesWizardModal from './components/extensions/Hosts/BulkActions/BulkPackagesWizard/index.js';
|
39
39
|
import BulkErrataWizardModal from './components/extensions/Hosts/BulkActions/BulkErrataWizard/index.js';
|
40
40
|
import ActivationKeysSearch from './components/ActivationKeysSearch';
|
41
|
+
import { CVEDetailsCard } from './scenes/ActivationKeys/Details/components/CVEDetailsCard.js';
|
41
42
|
|
42
43
|
registerReducer('katelloExtends', extendReducer);
|
43
44
|
registerReducer('katello', rootReducer);
|
@@ -102,8 +103,14 @@ registerGetActions({
|
|
102
103
|
tableName: 'hosts',
|
103
104
|
});
|
104
105
|
|
105
|
-
componentRegistry.
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
componentRegistry.registerMultiple([
|
107
|
+
{
|
108
|
+
name: 'ActivationKeysSearch',
|
109
|
+
type: ActivationKeysSearch,
|
110
|
+
},
|
111
|
+
{
|
112
|
+
name: 'CVEDetailsCard',
|
113
|
+
type: CVEDetailsCard,
|
114
|
+
},
|
115
|
+
]);
|
109
116
|
|
@@ -14,23 +14,25 @@ const recommendedRepositoriesRHEL = [
|
|
14
14
|
'rhel-9-for-x86_64-baseos-kickstart',
|
15
15
|
'rhel-9-for-x86_64-appstream-rpms',
|
16
16
|
'rhel-9-for-x86_64-appstream-kickstart',
|
17
|
+
'rhel-9-for-x86_64-baseos-eus-rpms',
|
18
|
+
'rhel-9-for-x86_64-appstream-eus-rpms',
|
17
19
|
'rhel-8-for-x86_64-baseos-rpms',
|
18
20
|
'rhel-8-for-x86_64-baseos-kickstart',
|
19
21
|
'rhel-8-for-x86_64-appstream-rpms',
|
20
22
|
'rhel-8-for-x86_64-appstream-kickstart',
|
21
23
|
'rhel-8-for-x86_64-baseos-eus-rpms',
|
22
24
|
'rhel-8-for-x86_64-appstream-eus-rpms',
|
23
|
-
'rhel-7-server-rpms',
|
24
|
-
'rhel-7-server-optional-rpms',
|
25
|
-
'rhel-7-server-extras-rpms',
|
26
|
-
'rhel-7-server-kickstart',
|
25
|
+
'rhel-7-server-els-rpms',
|
26
|
+
'rhel-7-server-els-optional-rpms',
|
27
27
|
];
|
28
28
|
|
29
29
|
const recommendedRepositoriesSatTools = [
|
30
30
|
'satellite-client-6-for-rhel-9-x86_64-rpms',
|
31
31
|
'satellite-client-6-for-rhel-8-x86_64-rpms',
|
32
|
-
'rhel-7-server-satellite-client-6-rpms',
|
33
|
-
'rhel-
|
32
|
+
'rhel-7-server-els-satellite-client-6-rpms',
|
33
|
+
'rhel-7-server-els-satellite-6-client-2-rpms',
|
34
|
+
'satellite-6-client-2-for-rhel-8-x86_64-rpms',
|
35
|
+
'satellite-6-client-2-for-rhel-9-x86_64-rpms',
|
34
36
|
];
|
35
37
|
|
36
38
|
const recommendedRepositoriesMisc = [
|
@@ -34,6 +34,7 @@ import { getActivationKey } from './ActivationKeyActions';
|
|
34
34
|
import DeleteModal from './components/DeleteModal';
|
35
35
|
import InactiveText from '../../ContentViews/components/InactiveText';
|
36
36
|
import SystemPurposeCard from '../../../components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard';
|
37
|
+
import { CVEDetailsBareCard } from '../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
|
37
38
|
|
38
39
|
const ActivationKeyDetails = ({ match }) => {
|
39
40
|
const dispatch = useDispatch();
|
@@ -113,6 +114,9 @@ const ActivationKeyDetails = ({ match }) => {
|
|
113
114
|
<GridItem span={6}>
|
114
115
|
<SystemPurposeCard akDetails={akDetails} />
|
115
116
|
</GridItem>
|
117
|
+
<GridItem span={6}>
|
118
|
+
<CVEDetailsBareCard contentViewEnvironments={akDetails.contentViewEnvironments} />
|
119
|
+
</GridItem>
|
116
120
|
</Grid>
|
117
121
|
</PageSection>
|
118
122
|
<DeleteModal isModalOpen={isModalOpen} handleModalToggle={handleModalToggle} akId={akId} />
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
2
|
+
import { propsToCamelCase } from 'foremanReact/common/helpers';
|
3
|
+
import { CVEDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
|
4
|
+
|
5
|
+
const getAKDetailsFromDOM = (node) => {
|
6
|
+
try {
|
7
|
+
return propsToCamelCase(JSON.parse(node.dataset.akDetails));
|
8
|
+
} catch (e) {
|
9
|
+
return null;
|
10
|
+
}
|
11
|
+
};
|
12
|
+
export const CVEDetailsCard = () => { // used as foreman-react-component, takes no props
|
13
|
+
const akDetailsNode = useRef(document.getElementById('ak-cve-details')).current;
|
14
|
+
const [akDetails, setAkDetails] = useState(getAKDetailsFromDOM(akDetailsNode));
|
15
|
+
|
16
|
+
const observer = new MutationObserver((mutationsList) => {
|
17
|
+
// eslint-disable-next-line no-restricted-syntax
|
18
|
+
for (const mutation of mutationsList) {
|
19
|
+
if (mutation.type === 'attributes' && mutation.attributeName.startsWith('data-')) {
|
20
|
+
akDetailsNode.current = document.getElementById('ak-cve-details');
|
21
|
+
setAkDetails(getAKDetailsFromDOM(akDetailsNode));
|
22
|
+
}
|
23
|
+
}
|
24
|
+
});
|
25
|
+
|
26
|
+
// Start observing akDetailsNode for attribute changes
|
27
|
+
if (akDetailsNode) observer.observe(akDetailsNode, { attributes: true });
|
28
|
+
|
29
|
+
if (!akDetails || !akDetails.contentViewEnvironments) return null;
|
30
|
+
return (
|
31
|
+
<CVEDetailsBareCard
|
32
|
+
contentViewEnvironments={akDetails.contentViewEnvironments}
|
33
|
+
/>
|
34
|
+
);
|
35
|
+
};
|
36
|
+
|
37
|
+
export default CVEDetailsCard;
|
@@ -18,12 +18,6 @@ export const formIsLoading = (data, contentView, change) => (
|
|
18
18
|
change === STATUS.PENDING
|
19
19
|
);
|
20
20
|
|
21
|
-
export const copyToClipboard = (event, textToCopy) => {
|
22
|
-
|
23
|
-
const el = document.createElement('textarea');
|
24
|
-
el.value = textToCopy;
|
25
|
-
clipboard.appendChild(el);
|
26
|
-
el.select();
|
27
|
-
document.execCommand('copy');
|
28
|
-
clipboard.removeChild(el);
|
21
|
+
export const copyToClipboard = async (event, textToCopy) => {
|
22
|
+
await navigator.clipboard.writeText(textToCopy);
|
29
23
|
};
|