katello 4.0.3 → 4.1.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 +0 -33
- data/app/assets/stylesheets/katello/contents.scss +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +5 -11
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
- data/app/controllers/katello/api/v2/api_controller.rb +15 -3
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
- data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
- data/app/controllers/katello/api/v2/host_errata_controller.rb +7 -6
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +16 -16
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +13 -12
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
- data/app/helpers/katello/katello_urls_helper.rb +23 -0
- data/app/lib/actions/candlepin/owner/import.rb +10 -3
- data/app/lib/actions/candlepin/product/content_update.rb +1 -1
- data/app/lib/actions/foreman/environment/destroy.rb +2 -2
- data/app/lib/actions/katello/agent_action.rb +1 -6
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +21 -31
- data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
- data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
- data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
- data/app/lib/actions/katello/content_view_version/export.rb +20 -22
- data/app/lib/actions/katello/content_view_version/import.rb +27 -13
- data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +12 -67
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
- data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
- data/app/lib/actions/katello/foreman/content_update.rb +0 -3
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
- data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +4 -3
- data/app/lib/actions/katello/repository/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +0 -1
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
- data/app/lib/actions/pulp/repository/create.rb +1 -7
- data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
- data/app/lib/actions/pulp/repository/sync.rb +1 -3
- data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +17 -0
- data/app/lib/actions/pulp3/content_guard/refresh.rb +10 -6
- data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
- data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
- data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
- data/app/lib/katello/agent/client_message_handler.rb +3 -11
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +117 -3
- data/app/lib/katello/errors.rb +6 -11
- data/app/lib/katello/event_daemon/monitor.rb +0 -1
- data/app/lib/katello/event_daemon/runner.rb +2 -2
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +10 -6
- data/app/lib/katello/http_resource.rb +1 -6
- data/app/lib/katello/logging.rb +11 -6
- data/app/lib/katello/qpid/connection.rb +1 -3
- data/app/lib/katello/repo_discovery.rb +15 -1
- data/app/lib/katello/resources/candlepin/owner.rb +3 -2
- data/app/lib/katello/resources/candlepin/pool.rb +6 -2
- data/app/lib/katello/resources/candlepin.rb +10 -0
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
- data/app/models/katello/authorization/content_view.rb +8 -0
- data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +1 -32
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -9
- data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -25
- data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
- data/app/models/katello/concerns/organization_extensions.rb +4 -18
- data/app/models/katello/concerns/redhat_extensions.rb +10 -18
- data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -31
- data/app/models/katello/content_view.rb +17 -113
- data/app/models/katello/content_view_component.rb +5 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
- data/app/models/katello/content_view_package_filter_rule.rb +4 -0
- data/app/models/katello/content_view_package_group_filter.rb +1 -0
- data/app/models/katello/content_view_repository.rb +4 -5
- data/app/models/katello/content_view_version.rb +9 -33
- data/app/models/katello/content_view_version_export_history.rb +18 -4
- data/app/models/katello/content_view_version_import_history.rb +42 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/events/delete_pool.rb +19 -0
- data/app/models/katello/glue/candlepin/environment.rb +7 -0
- data/app/models/katello/glue/candlepin/owner.rb +12 -1
- data/app/models/katello/glue/candlepin/pool.rb +42 -25
- data/app/models/katello/glue/provider.rb +3 -6
- data/app/models/katello/glue/pulp/repo.rb +19 -9
- data/app/models/katello/host/content_facet.rb +1 -0
- data/app/models/katello/host/subscription_facet.rb +3 -1
- data/app/models/katello/kt_environment.rb +0 -6
- data/app/models/katello/package_group.rb +4 -0
- data/app/models/katello/ping.rb +15 -4
- data/app/models/katello/pool.rb +9 -0
- data/app/models/katello/product.rb +0 -6
- data/app/models/katello/product_content.rb +3 -1
- data/app/models/katello/pulp_sync_status.rb +0 -10
- data/app/models/katello/repository.rb +20 -35
- data/app/models/katello/root_repository.rb +0 -5
- data/app/models/katello/subscription.rb +10 -0
- data/app/models/katello/sync_plan.rb +7 -0
- data/app/models/setting/content.rb +7 -8
- data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
- data/app/presenters/katello/product_content_presenter.rb +3 -5
- data/app/services/cert/certs.rb +3 -7
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
- data/app/services/katello/candlepin/event_handler.rb +22 -22
- data/app/services/katello/candlepin/message_handler.rb +24 -15
- data/app/services/katello/content_view_manager.rb +24 -0
- data/app/services/katello/event_monitor/poller_thread.rb +25 -20
- data/app/services/katello/managed_content_medium_provider.rb +4 -0
- data/app/services/katello/organization_creator.rb +120 -0
- data/app/services/katello/product_content_finder.rb +5 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
- data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
- data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
- data/app/services/katello/pulp3/api/apt.rb +1 -1
- data/app/services/katello/pulp3/api/content_guard.rb +6 -40
- data/app/services/katello/pulp3/api/core.rb +27 -2
- data/app/services/katello/pulp3/api/docker.rb +1 -1
- data/app/services/katello/pulp3/api/file.rb +5 -1
- data/app/services/katello/pulp3/api/yum.rb +9 -1
- data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
- data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
- data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
- data/app/services/katello/pulp3/repository/apt.rb +2 -1
- data/app/services/katello/pulp3/repository/yum.rb +0 -16
- data/app/services/katello/pulp3/repository.rb +20 -1
- data/app/services/katello/pulp3/rpm.rb +5 -1
- data/app/services/katello/pulp3/task.rb +12 -5
- data/app/services/katello/pulp3/task_group.rb +10 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -8
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +0 -1
- data/app/services/katello/ui_notifications/system_error.rb +25 -0
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
- data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
- data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
- data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
- data/app/views/overrides/smart_proxies/_download_policy.erb +1 -1
- data/config/initializers/monkeys.rb +0 -1
- data/config/katello.yaml.example +0 -1
- data/config/routes/api/v2.rb +9 -21
- data/config/routes/overrides.rb +1 -2
- data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +1 -1
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +14 -20
- data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
- data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
- data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
- data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
- data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
- data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
- data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
- data/db/seeds.d/101-locations.rb +0 -3
- data/db/seeds.d/102-organizations.rb +1 -5
- data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
- data/db/seeds.d/111-upgrade_tasks.rb +3 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
- data/lib/katello/engine.rb +16 -15
- data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
- data/lib/katello/permission_creator.rb +12 -28
- data/lib/katello/permissions/host_permissions.rb +3 -2
- data/lib/katello/plugin.rb +6 -19
- data/lib/katello/repository_types/ansible_collection.rb +1 -1
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/file.rb +1 -1
- data/lib/katello/repository_types/yum.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +25 -0
- data/lib/katello/tasks/jenkins.rake +6 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
- data/lib/katello/tasks/reimport.rake +0 -1
- data/lib/katello/tasks/repository.rake +0 -30
- data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
- data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +2 -4
- data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
- data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +1 -1
- data/locale/action_names.rb +65 -63
- data/locale/bn/katello.edit.po +1357 -1606
- data/locale/bn/katello.po +465 -744
- data/locale/cs/katello.edit.po +1213 -1087
- data/locale/cs/katello.po +307 -219
- data/locale/de/katello.edit.po +1498 -1520
- data/locale/de/katello.po +589 -625
- data/locale/en/katello.edit.po +1198 -1074
- data/locale/en/katello.po +304 -213
- data/locale/es/katello.edit.po +2344 -2304
- data/locale/es/katello.po +1407 -1407
- data/locale/fr/katello.edit.po +2720 -2642
- data/locale/fr/katello.po +1703 -1750
- data/locale/gu/katello.edit.po +1546 -1797
- data/locale/gu/katello.po +654 -935
- data/locale/hi/katello.edit.po +1545 -1793
- data/locale/hi/katello.po +653 -931
- data/locale/it/katello.edit.po +1323 -1310
- data/locale/it/katello.po +407 -409
- data/locale/ja/katello.edit.po +2645 -2557
- data/locale/ja/katello.po +1646 -1664
- data/locale/katello.pot +1435 -1289
- data/locale/kn/katello.edit.po +1546 -1795
- data/locale/kn/katello.po +654 -933
- data/locale/ko/katello.edit.po +1464 -1449
- data/locale/ko/katello.po +554 -554
- data/locale/mr/katello.edit.po +1545 -1758
- data/locale/mr/katello.po +653 -896
- data/locale/or/katello.edit.po +1546 -1795
- data/locale/or/katello.po +654 -933
- data/locale/pa/katello.edit.po +1541 -1775
- data/locale/pa/katello.po +649 -913
- data/locale/pt/katello.edit.po +1289 -1255
- data/locale/pt/katello.po +398 -394
- data/locale/pt_BR/katello.edit.po +2370 -2315
- data/locale/pt_BR/katello.po +1435 -1421
- data/locale/ru/katello.edit.po +1611 -1608
- data/locale/ru/katello.po +704 -716
- data/locale/ta/katello.edit.po +1358 -1605
- data/locale/ta/katello.po +465 -742
- data/locale/te/katello.edit.po +1545 -1792
- data/locale/te/katello.po +653 -930
- data/locale/zh_CN/katello.edit.po +3052 -2930
- data/locale/zh_CN/katello.po +2055 -2039
- data/locale/zh_TW/katello.edit.po +1571 -1669
- data/locale/zh_TW/katello.po +649 -777
- data/package.json +2 -2
- data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
- data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
- data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
- data/webpack/components/RoutedTabs/index.js +4 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
- data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
- data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
- data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
- data/webpack/containers/Application/overrides.scss +3 -0
- data/webpack/fills_index.js +3 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
- data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
- data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
- data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
- data/webpack/scenes/Tasks/helpers.js +2 -2
- data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
- data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
- data/webpack/utils/helpers.js +2 -0
- data/webpack/utils/paramsFromHash.js +16 -0
- data/webpack/utils/useUrlParams.js +14 -0
- metadata +122 -206
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
- data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
- data/app/lib/actions/candlepin/owner/create.rb +0 -16
- data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
- data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
- data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
- data/app/lib/actions/katello/environment/library_create.rb +0 -35
- data/app/lib/actions/katello/organization/create.rb +0 -38
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
- data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
- data/app/lib/actions/pulp3/content_migration.rb +0 -31
- data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
- data/app/lib/actions/pulp3/content_migration_reset.rb +0 -22
- data/app/lib/katello/foreman.rb +0 -32
- data/app/lib/katello/mapping.rb +0 -31
- data/app/lib/katello/util/hostgroup_facets_helper.rb +0 -126
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
- data/app/models/katello/concerns/environment_extensions.rb +0 -74
- data/app/models/katello/content_view_puppet_environment.rb +0 -116
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
- data/app/models/katello/content_view_puppet_module.rb +0 -63
- data/app/models/katello/puppet_module.rb +0 -77
- data/app/models/katello/repository_puppet_module.rb +0 -7
- data/app/services/katello/pulp/puppet_module.rb +0 -21
- data/app/services/katello/pulp/repository/puppet.rb +0 -68
- data/app/services/katello/pulp3/migration.rb +0 -329
- data/app/services/katello/pulp3/migration_plan.rb +0 -178
- data/app/services/katello/pulp3/migration_switchover.rb +0 -126
- data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
- data/app/views/foreman/hosts/_registration.html.erb +0 -12
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
- data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
- data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
- data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
- data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
- data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
- data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
- data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
- data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
- data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
- data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
- data/lib/katello/repository_types/puppet.rb +0 -5
- data/lib/katello/tasks/fix_hostgroup_facets.rake +0 -8
- data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
- data/lib/katello/tasks/pulp3_migration.rake +0 -41
- data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
- data/lib/katello/tasks/pulp3_migration_reset.rake +0 -26
- data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
- data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
- data/lib/monkeys/passenger_tee_input.rb +0 -20
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/components/TabWrapper/TabWrapper.js +0 -26
- data/webpack/components/TabWrapper/index.js +0 -3
- data/webpack/components/TabbedView/TabbedView.js +0 -38
- data/webpack/components/TabbedView/TabbedView.scss +0 -3
- data/webpack/components/TabbedView/index.js +0 -3
- data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
- data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
@@ -0,0 +1,370 @@
|
|
1
|
+
{
|
2
|
+
"total": 4,
|
3
|
+
"subtotal": 4,
|
4
|
+
"page": "1",
|
5
|
+
"per_page": "20",
|
6
|
+
"error": null,
|
7
|
+
"search": null,
|
8
|
+
"sort": {
|
9
|
+
"by": "content_view_version_id",
|
10
|
+
"order": "asc"
|
11
|
+
},
|
12
|
+
"results": [
|
13
|
+
{
|
14
|
+
"user": "admin",
|
15
|
+
"status": "successful",
|
16
|
+
"description": "description1",
|
17
|
+
"action": "removal",
|
18
|
+
"created_at": "2021-03-26 09:44:18 -0400",
|
19
|
+
"updated_at": "2021-03-26 09:44:20 -0400",
|
20
|
+
"environment": {
|
21
|
+
"id": 2,
|
22
|
+
"name": "test"
|
23
|
+
},
|
24
|
+
"task": {
|
25
|
+
"id": "6b2a9627-1240-4fad-9bd9-0810c65cd820",
|
26
|
+
"label": "Actions::Katello::ContentView::Remove",
|
27
|
+
"pending": false,
|
28
|
+
"action": "Remove Versions and Associations content view 'cv1'; organization 'Default Organization'",
|
29
|
+
"username": "admin",
|
30
|
+
"started_at": "2021-03-26 09:44:18 -0400",
|
31
|
+
"ended_at": "2021-03-26 09:44:20 -0400",
|
32
|
+
"state": "stopped",
|
33
|
+
"result": "success",
|
34
|
+
"progress": 1,
|
35
|
+
"input": {
|
36
|
+
"content_view": {
|
37
|
+
"id": 2,
|
38
|
+
"name": "cv1",
|
39
|
+
"label": "cv1"
|
40
|
+
},
|
41
|
+
"organization": {
|
42
|
+
"id": 1,
|
43
|
+
"name": "Default Organization",
|
44
|
+
"label": "Default_Organization"
|
45
|
+
},
|
46
|
+
"services_checked": [
|
47
|
+
"pulp3",
|
48
|
+
"candlepin",
|
49
|
+
"candlepin_auth"
|
50
|
+
],
|
51
|
+
"content_view_id": 2,
|
52
|
+
"environment_ids": [
|
53
|
+
2
|
54
|
+
],
|
55
|
+
"environment_names": [
|
56
|
+
"test"
|
57
|
+
],
|
58
|
+
"version_ids": [],
|
59
|
+
"content_view_history_ids": [
|
60
|
+
6
|
61
|
+
],
|
62
|
+
"locale": "en",
|
63
|
+
"current_request_id": "dcbe37e4-29d3-46e0-9491-5ae682a165a5",
|
64
|
+
"current_timezone": "America/New_York",
|
65
|
+
"current_organization_id": 1,
|
66
|
+
"current_location_id": 2,
|
67
|
+
"current_user_id": 4
|
68
|
+
},
|
69
|
+
"output": {},
|
70
|
+
"humanized": {
|
71
|
+
"action": "Remove Versions and Associations",
|
72
|
+
"input": [
|
73
|
+
[
|
74
|
+
"content_view",
|
75
|
+
{
|
76
|
+
"text": "content view 'cv1'",
|
77
|
+
"link": "/content_views/2/versions"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
[
|
81
|
+
"organization",
|
82
|
+
{
|
83
|
+
"text": "organization 'Default Organization'",
|
84
|
+
"link": "/organizations/1/edit"
|
85
|
+
}
|
86
|
+
]
|
87
|
+
],
|
88
|
+
"output": "",
|
89
|
+
"errors": []
|
90
|
+
},
|
91
|
+
"cli_example": null,
|
92
|
+
"start_at": "2021-03-26 09:44:18 -0400",
|
93
|
+
"available_actions": {
|
94
|
+
"cancellable": false,
|
95
|
+
"resumable": false
|
96
|
+
}
|
97
|
+
},
|
98
|
+
"version": "3.0",
|
99
|
+
"publish": false,
|
100
|
+
"version_id": 4,
|
101
|
+
"triggered_by": null,
|
102
|
+
"triggered_by_id": null
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"user": "admin",
|
106
|
+
"status": "successful",
|
107
|
+
"description": "description2",
|
108
|
+
"action": "promotion",
|
109
|
+
"created_at": "2021-03-26 09:43:59 -0400",
|
110
|
+
"updated_at": "2021-03-26 09:44:03 -0400",
|
111
|
+
"environment": {
|
112
|
+
"id": 2,
|
113
|
+
"name": "test"
|
114
|
+
},
|
115
|
+
"task": {
|
116
|
+
"id": "c0ed4349-6d1e-433a-bf33-50b4700923ff",
|
117
|
+
"label": "Actions::Katello::ContentView::Promote",
|
118
|
+
"pending": false,
|
119
|
+
"action": "Promote content view 'cv1'; organization 'Default Organization'",
|
120
|
+
"username": "admin",
|
121
|
+
"started_at": "2021-03-26 09:43:59 -0400",
|
122
|
+
"ended_at": "2021-03-26 09:44:03 -0400",
|
123
|
+
"state": "stopped",
|
124
|
+
"result": "success",
|
125
|
+
"progress": 1,
|
126
|
+
"input": {
|
127
|
+
"content_view": {
|
128
|
+
"id": 2,
|
129
|
+
"name": "cv1",
|
130
|
+
"label": "cv1"
|
131
|
+
},
|
132
|
+
"organization": {
|
133
|
+
"id": 1,
|
134
|
+
"name": "Default Organization",
|
135
|
+
"label": "Default_Organization"
|
136
|
+
},
|
137
|
+
"environments": [
|
138
|
+
"test"
|
139
|
+
],
|
140
|
+
"services_checked": [
|
141
|
+
"candlepin",
|
142
|
+
"candlepin_auth",
|
143
|
+
"pulp3"
|
144
|
+
],
|
145
|
+
"locale": "en",
|
146
|
+
"current_request_id": "6ea7c18b-b5ed-4ca0-869d-3342d325961b",
|
147
|
+
"current_timezone": "America/New_York",
|
148
|
+
"current_organization_id": 1,
|
149
|
+
"current_location_id": 2,
|
150
|
+
"current_user_id": 4
|
151
|
+
},
|
152
|
+
"output": {},
|
153
|
+
"humanized": {
|
154
|
+
"action": "Promote",
|
155
|
+
"input": [
|
156
|
+
[
|
157
|
+
"content_view",
|
158
|
+
{
|
159
|
+
"text": "content view 'cv1'",
|
160
|
+
"link": "/content_views/2/versions"
|
161
|
+
}
|
162
|
+
],
|
163
|
+
[
|
164
|
+
"organization",
|
165
|
+
{
|
166
|
+
"text": "organization 'Default Organization'",
|
167
|
+
"link": "/organizations/1/edit"
|
168
|
+
}
|
169
|
+
]
|
170
|
+
],
|
171
|
+
"output": "",
|
172
|
+
"errors": []
|
173
|
+
},
|
174
|
+
"cli_example": null,
|
175
|
+
"start_at": "2021-03-26 09:43:59 -0400",
|
176
|
+
"available_actions": {
|
177
|
+
"cancellable": false,
|
178
|
+
"resumable": false
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"version": "3.0",
|
182
|
+
"publish": false,
|
183
|
+
"version_id": 4,
|
184
|
+
"triggered_by": null,
|
185
|
+
"triggered_by_id": null
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"user": "admin",
|
189
|
+
"status": "successful",
|
190
|
+
"description": "description3",
|
191
|
+
"action": "publish",
|
192
|
+
"created_at": "2021-03-26 09:39:30 -0400",
|
193
|
+
"updated_at": "2021-03-26 09:39:35 -0400",
|
194
|
+
"environment": null,
|
195
|
+
"task": {
|
196
|
+
"id": "d126ec01-e308-4604-9e70-337a45e9b8d4",
|
197
|
+
"label": "Actions::Katello::ContentView::Publish",
|
198
|
+
"pending": false,
|
199
|
+
"action": "Publish content view 'cv1'; organization 'Default Organization'",
|
200
|
+
"username": "admin",
|
201
|
+
"started_at": "2021-03-26 09:39:30 -0400",
|
202
|
+
"ended_at": "2021-03-26 09:39:35 -0400",
|
203
|
+
"state": "stopped",
|
204
|
+
"result": "success",
|
205
|
+
"progress": 1,
|
206
|
+
"input": {
|
207
|
+
"content_view": {
|
208
|
+
"id": 2,
|
209
|
+
"name": "cv1",
|
210
|
+
"label": "cv1"
|
211
|
+
},
|
212
|
+
"organization": {
|
213
|
+
"id": 1,
|
214
|
+
"name": "Default Organization",
|
215
|
+
"label": "Default_Organization"
|
216
|
+
},
|
217
|
+
"services_checked": [
|
218
|
+
"pulp3",
|
219
|
+
"pulp",
|
220
|
+
"pulp_auth",
|
221
|
+
"candlepin",
|
222
|
+
"candlepin_auth"
|
223
|
+
],
|
224
|
+
"history_id": 3,
|
225
|
+
"content_view_id": 2,
|
226
|
+
"auto_publish_composite_ids": [],
|
227
|
+
"content_view_version_name": "cv1 3.0",
|
228
|
+
"content_view_version_id": 4,
|
229
|
+
"environment_id": 1,
|
230
|
+
"user_id": 4,
|
231
|
+
"skip_promotion": null,
|
232
|
+
"locale": "en",
|
233
|
+
"current_request_id": "af6cc6b0-9615-4e2e-8941-16193b1a6acd",
|
234
|
+
"current_timezone": "America/New_York",
|
235
|
+
"current_organization_id": 1,
|
236
|
+
"current_location_id": 2,
|
237
|
+
"current_user_id": 4
|
238
|
+
},
|
239
|
+
"output": {
|
240
|
+
"content_view_id": 2,
|
241
|
+
"content_view_version_id": 4,
|
242
|
+
"skip_promotion": null
|
243
|
+
},
|
244
|
+
"humanized": {
|
245
|
+
"action": "Publish",
|
246
|
+
"input": [
|
247
|
+
[
|
248
|
+
"content_view",
|
249
|
+
{
|
250
|
+
"text": "content view 'cv1'",
|
251
|
+
"link": "/content_views/2/versions"
|
252
|
+
}
|
253
|
+
],
|
254
|
+
[
|
255
|
+
"organization",
|
256
|
+
{
|
257
|
+
"text": "organization 'Default Organization'",
|
258
|
+
"link": "/organizations/1/edit"
|
259
|
+
}
|
260
|
+
]
|
261
|
+
],
|
262
|
+
"output": "",
|
263
|
+
"errors": []
|
264
|
+
},
|
265
|
+
"cli_example": null,
|
266
|
+
"start_at": "2021-03-26 09:39:30 -0400",
|
267
|
+
"available_actions": {
|
268
|
+
"cancellable": false,
|
269
|
+
"resumable": false
|
270
|
+
}
|
271
|
+
},
|
272
|
+
"version": "3.0",
|
273
|
+
"publish": true,
|
274
|
+
"version_id": 4,
|
275
|
+
"triggered_by": null,
|
276
|
+
"triggered_by_id": null
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"user": "admin",
|
280
|
+
"status": "successful",
|
281
|
+
"description": "A new version of cv1 will be created and promoted to the Library environment. It can be promoted to other environments from the Versions tab of this Content View.\nA new version of cv1 will be created and promoted to the Library environment. It can be promoted to other environments from the Versions tab of this Content View.\nA new version of cv1 will be created and promoted to the Library environment. It can be promoted to other environments from the Versions tab of this Content View.\nA new version of cv1 will be created and promoted to the Library environment. It can be promoted to other environments from the Versions tab of this Content View.",
|
282
|
+
"action": "publish",
|
283
|
+
"created_at": "2021-03-26 11:36:27 -0400",
|
284
|
+
"updated_at": "2021-03-26 11:36:32 -0400",
|
285
|
+
"environment": null,
|
286
|
+
"task": {
|
287
|
+
"id": "65b8eff5-c144-44b8-8765-ef9c89f3fe68",
|
288
|
+
"label": "Actions::Katello::ContentView::Publish",
|
289
|
+
"pending": false,
|
290
|
+
"action": "Publish content view 'cv1'; organization 'Default Organization'",
|
291
|
+
"username": "admin",
|
292
|
+
"started_at": "2021-03-26 11:36:27 -0400",
|
293
|
+
"ended_at": "2021-03-26 11:36:32 -0400",
|
294
|
+
"state": "stopped",
|
295
|
+
"result": "success",
|
296
|
+
"progress": 1,
|
297
|
+
"input": {
|
298
|
+
"content_view": {
|
299
|
+
"id": 2,
|
300
|
+
"name": "cv1",
|
301
|
+
"label": "cv1"
|
302
|
+
},
|
303
|
+
"organization": {
|
304
|
+
"id": 1,
|
305
|
+
"name": "Default Organization",
|
306
|
+
"label": "Default_Organization"
|
307
|
+
},
|
308
|
+
"services_checked": [
|
309
|
+
"pulp3",
|
310
|
+
"pulp",
|
311
|
+
"pulp_auth",
|
312
|
+
"candlepin",
|
313
|
+
"candlepin_auth"
|
314
|
+
],
|
315
|
+
"history_id": 8,
|
316
|
+
"content_view_id": 2,
|
317
|
+
"auto_publish_composite_ids": [],
|
318
|
+
"content_view_version_name": "cv1 4.0",
|
319
|
+
"content_view_version_id": 5,
|
320
|
+
"environment_id": 1,
|
321
|
+
"user_id": 4,
|
322
|
+
"skip_promotion": null,
|
323
|
+
"locale": "en",
|
324
|
+
"current_request_id": "0ea97e4c-57c1-4248-b98f-81529db7e070",
|
325
|
+
"current_timezone": "America/New_York",
|
326
|
+
"current_organization_id": 1,
|
327
|
+
"current_location_id": 2,
|
328
|
+
"current_user_id": 4
|
329
|
+
},
|
330
|
+
"output": {
|
331
|
+
"content_view_id": 2,
|
332
|
+
"content_view_version_id": 5,
|
333
|
+
"skip_promotion": null
|
334
|
+
},
|
335
|
+
"humanized": {
|
336
|
+
"action": "Publish",
|
337
|
+
"input": [
|
338
|
+
[
|
339
|
+
"content_view",
|
340
|
+
{
|
341
|
+
"text": "content view 'cv1'",
|
342
|
+
"link": "/content_views/2/versions"
|
343
|
+
}
|
344
|
+
],
|
345
|
+
[
|
346
|
+
"organization",
|
347
|
+
{
|
348
|
+
"text": "organization 'Default Organization'",
|
349
|
+
"link": "/organizations/1/edit"
|
350
|
+
}
|
351
|
+
]
|
352
|
+
],
|
353
|
+
"output": "",
|
354
|
+
"errors": []
|
355
|
+
},
|
356
|
+
"cli_example": null,
|
357
|
+
"start_at": "2021-03-26 11:36:27 -0400",
|
358
|
+
"available_actions": {
|
359
|
+
"cancellable": false,
|
360
|
+
"resumable": false
|
361
|
+
}
|
362
|
+
},
|
363
|
+
"version": "4.0",
|
364
|
+
"publish": true,
|
365
|
+
"version_id": 5,
|
366
|
+
"triggered_by": null,
|
367
|
+
"triggered_by_id": null
|
368
|
+
}
|
369
|
+
]
|
370
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
|
3
|
+
|
4
|
+
import nock, { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
|
5
|
+
import api from '../../../../../services/api';
|
6
|
+
import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
|
7
|
+
import ContentViewHistories from '../ContentViewHistories';
|
8
|
+
|
9
|
+
const historyData = require('./contentViewHistory.fixtures.json');
|
10
|
+
|
11
|
+
const renderOptions = { apiNamespace: `${CONTENT_VIEWS_KEY}_1` };
|
12
|
+
const cvHistories = api.getApiUrl('/content_views/1/history');
|
13
|
+
const autocompleteUrl = '/content_views/1/history/auto_complete_search';
|
14
|
+
|
15
|
+
let firstHistory;
|
16
|
+
let searchDelayScope;
|
17
|
+
let autoSearchScope;
|
18
|
+
|
19
|
+
beforeEach(() => {
|
20
|
+
const { results } = historyData;
|
21
|
+
[firstHistory] = results;
|
22
|
+
searchDelayScope = mockSetting(nockInstance, 'autosearch_delay', 500);
|
23
|
+
autoSearchScope = mockSetting(nockInstance, 'autosearch_while_typing', true);
|
24
|
+
});
|
25
|
+
|
26
|
+
afterEach(() => {
|
27
|
+
nock.cleanAll();
|
28
|
+
assertNockRequest(searchDelayScope);
|
29
|
+
assertNockRequest(autoSearchScope);
|
30
|
+
});
|
31
|
+
|
32
|
+
test('Can call API and show history on page load', async (done) => {
|
33
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
34
|
+
const scope = nockInstance
|
35
|
+
.get(cvHistories)
|
36
|
+
.query(true)
|
37
|
+
.reply(200, historyData);
|
38
|
+
|
39
|
+
const { getByText, queryByText } = renderWithRedux(
|
40
|
+
<ContentViewHistories cvId={1} />,
|
41
|
+
renderOptions,
|
42
|
+
);
|
43
|
+
|
44
|
+
// Nothing will show at first, page is loading
|
45
|
+
expect(queryByText(firstHistory.description)).toBeNull();
|
46
|
+
// Assert that the repo name is now showing on the screen, but wait for it to appear.
|
47
|
+
await patientlyWaitFor(() => expect(getByText(firstHistory.description)).toBeTruthy());
|
48
|
+
assertNockRequest(autocompleteScope);
|
49
|
+
assertNockRequest(scope, done);
|
50
|
+
});
|
51
|
+
|
52
|
+
test('Can link to view environment', async () => {
|
53
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
54
|
+
const scope = nockInstance
|
55
|
+
.get(cvHistories)
|
56
|
+
.query(true)
|
57
|
+
.reply(200, historyData);
|
58
|
+
|
59
|
+
const { getAllByText } = renderWithRedux(
|
60
|
+
<ContentViewHistories cvId={1} />,
|
61
|
+
renderOptions,
|
62
|
+
);
|
63
|
+
|
64
|
+
await patientlyWaitFor(() => {
|
65
|
+
expect(getAllByText('test')[0].closest('a'))
|
66
|
+
.toHaveAttribute('href', '/lifecycle_environments/2');
|
67
|
+
});
|
68
|
+
|
69
|
+
assertNockRequest(autocompleteScope);
|
70
|
+
assertNockRequest(scope);
|
71
|
+
});
|
72
|
+
|
73
|
+
test('Can handle no History being present', async (done) => {
|
74
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
75
|
+
|
76
|
+
const noResults = {
|
77
|
+
total: 0,
|
78
|
+
subtotal: 0,
|
79
|
+
page: 1,
|
80
|
+
per_page: 20,
|
81
|
+
results: [],
|
82
|
+
};
|
83
|
+
const scope = nockInstance
|
84
|
+
.get(cvHistories)
|
85
|
+
.query(true)
|
86
|
+
.reply(200, noResults);
|
87
|
+
|
88
|
+
const { queryByText } = renderWithRedux(<ContentViewHistories cvId={1} />, renderOptions);
|
89
|
+
|
90
|
+
expect(queryByText(firstHistory.description)).toBeNull();
|
91
|
+
await patientlyWaitFor(() => expect(queryByText("You currently don't have any history for this content view.")).toBeTruthy());
|
92
|
+
assertNockRequest(autocompleteScope);
|
93
|
+
assertNockRequest(scope, done);
|
94
|
+
});
|
@@ -15,7 +15,6 @@ const repoLabels = {
|
|
15
15
|
file: ['files', 'file', 'content/files'],
|
16
16
|
ostree_branch: ['ostree branches', 'ostree branch', 'content/ostree_branches'],
|
17
17
|
package_group: ['package groups', 'package group', 'package_groups'],
|
18
|
-
puppet_module: ['puppet modules', 'puppet module', 'content/puppet_modules'],
|
19
18
|
srpm: ['source RPMs', 'source RPM', 'source_rpms'], // no link?
|
20
19
|
};
|
21
20
|
|
@@ -1,6 +1,16 @@
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
2
2
|
import { useSelector, shallowEqual, useDispatch } from 'react-redux';
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
Bullseye,
|
5
|
+
Split,
|
6
|
+
SplitItem,
|
7
|
+
Button,
|
8
|
+
ActionList,
|
9
|
+
ActionListItem,
|
10
|
+
Dropdown,
|
11
|
+
DropdownItem,
|
12
|
+
KebabToggle,
|
13
|
+
} from '@patternfly/react-core';
|
4
14
|
import { TableVariant, fitContent } from '@patternfly/react-table';
|
5
15
|
import { STATUS } from 'foremanReact/constants';
|
6
16
|
import { translate as __ } from 'foremanReact/common/I18n';
|
@@ -9,19 +19,20 @@ import PropTypes from 'prop-types';
|
|
9
19
|
|
10
20
|
import TableWrapper from '../../../../components/Table/TableWrapper';
|
11
21
|
import onSelect from '../../../../components/Table/helpers';
|
12
|
-
import { getContentViewRepositories, getRepositoryTypes } from '../ContentViewDetailActions';
|
22
|
+
import { getContentViewRepositories, getRepositoryTypes, updateContentView } from '../ContentViewDetailActions';
|
13
23
|
import {
|
14
24
|
selectCVRepos,
|
15
25
|
selectCVReposStatus,
|
16
26
|
selectCVReposError,
|
17
27
|
selectRepoTypes,
|
18
28
|
selectRepoTypesStatus,
|
29
|
+
selectCVDetails,
|
19
30
|
} from '../ContentViewDetailSelectors';
|
20
31
|
import { ADDED, NOT_ADDED, ALL_STATUSES } from '../../ContentViewsConstants';
|
21
32
|
import ContentCounts from './ContentCounts';
|
22
33
|
import LastSync from './LastSync';
|
23
|
-
import RepoAddedStatus from './RepoAddedStatus';
|
24
34
|
import RepoIcon from './RepoIcon';
|
35
|
+
import AddedStatusLabel from '../../../../components/AddedStatusLabel';
|
25
36
|
import SelectableDropdown from '../../../../components/SelectableDropdown';
|
26
37
|
import { capitalize } from '../../../../utils/helpers';
|
27
38
|
|
@@ -41,6 +52,7 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
41
52
|
const error = useSelector(state => selectCVReposError(state, cvId), shallowEqual);
|
42
53
|
const repoTypesResponse = useSelector(state => selectRepoTypes(state), shallowEqual);
|
43
54
|
const repoTypesStatus = useSelector(state => selectRepoTypesStatus(state), shallowEqual);
|
55
|
+
const details = useSelector(state => selectCVDetails(state, cvId), shallowEqual);
|
44
56
|
|
45
57
|
const [rows, setRows] = useState([]);
|
46
58
|
const [metadata, setMetadata] = useState({});
|
@@ -49,6 +61,8 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
49
61
|
const [statusSelected, setStatusSelected] = useState(ALL_STATUSES);
|
50
62
|
// repoTypes object format: [displayed_value]: API_value
|
51
63
|
const [repoTypes, setRepoTypes] = useState({});
|
64
|
+
const [bulkActionOpen, setBulkActionOpen] = useState(false);
|
65
|
+
const [bulkActionEnabled, setBulkActionEnabled] = useState(false);
|
52
66
|
|
53
67
|
const columnHeaders = [
|
54
68
|
{ title: __('Type'), transforms: [fitContent] },
|
@@ -81,22 +95,14 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
81
95
|
{ title: <LastSync {...{ lastSyncWords, lastSync }} /> },
|
82
96
|
{ title: <ContentCounts {...{ counts, productId }} repoId={id} /> },
|
83
97
|
{
|
84
|
-
title: <
|
98
|
+
title: <AddedStatusLabel added={addedToCV || statusSelected === ADDED} />,
|
85
99
|
},
|
86
100
|
];
|
87
|
-
|
88
|
-
newRows.push({ cells });
|
101
|
+
newRows.push({ repoId: id, cells });
|
89
102
|
});
|
90
103
|
return newRows;
|
91
104
|
};
|
92
105
|
|
93
|
-
const getCVReposWithOptions = (params = {}) => {
|
94
|
-
const allParams = { ...params };
|
95
|
-
if (typeSelected !== 'All repositories') allParams.content_type = repoTypes[typeSelected];
|
96
|
-
|
97
|
-
return getContentViewRepositories(cvId, allParams, statusSelected);
|
98
|
-
};
|
99
|
-
|
100
106
|
useEffect(() => {
|
101
107
|
const { results, ...meta } = response;
|
102
108
|
setMetadata(meta);
|
@@ -111,6 +117,11 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
111
117
|
dispatch(getRepositoryTypes());
|
112
118
|
}, []);
|
113
119
|
|
120
|
+
useEffect(() => {
|
121
|
+
const rowsAreSelected = rows.some(row => row.selected);
|
122
|
+
setBulkActionEnabled(rowsAreSelected);
|
123
|
+
}, [rows]);
|
124
|
+
|
114
125
|
// Get repo type filter selections dynamically from the API
|
115
126
|
useEffect(() => {
|
116
127
|
if (repoTypesStatus === STATUS.RESOLVED && repoTypesResponse) {
|
@@ -126,12 +137,76 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
126
137
|
}
|
127
138
|
}, [JSON.stringify(repoTypesResponse), repoTypesStatus]);
|
128
139
|
|
140
|
+
const toggleBulkAction = () => {
|
141
|
+
setBulkActionOpen(!bulkActionOpen);
|
142
|
+
};
|
143
|
+
|
144
|
+
const onAdd = (repos) => {
|
145
|
+
const { repository_ids: repositoryIds = [] } = details;
|
146
|
+
dispatch(updateContentView(cvId, { repository_ids: repositoryIds.concat(repos) }));
|
147
|
+
};
|
148
|
+
|
149
|
+
const onRemove = (repos) => {
|
150
|
+
const reposToDelete = [].concat(repos);
|
151
|
+
const { repository_ids: repositoryIds = [] } = details;
|
152
|
+
const deletedRepos = repositoryIds.filter(x => !reposToDelete.includes(x));
|
153
|
+
dispatch(updateContentView(cvId, { repository_ids: deletedRepos }));
|
154
|
+
};
|
155
|
+
|
156
|
+
const addBulk = () => {
|
157
|
+
const reposToAdd = [];
|
158
|
+
rows.forEach(row => row.selected && reposToAdd.push(row.repoId));
|
159
|
+
onAdd(reposToAdd);
|
160
|
+
};
|
161
|
+
|
162
|
+
const removeBulk = () => {
|
163
|
+
const reposToDelete = [];
|
164
|
+
rows.forEach(row => row.selected && reposToDelete.push(row.repoId));
|
165
|
+
onRemove(reposToDelete);
|
166
|
+
};
|
167
|
+
|
168
|
+
const actionResolver = (rowData, { _rowIndex }) => {
|
169
|
+
if (rowData.parent || rowData.compoundParent || rowData.noactions) return null;
|
170
|
+
const { repository_ids: repositoryIds } = details;
|
171
|
+
return [
|
172
|
+
{
|
173
|
+
title: 'Add',
|
174
|
+
isDisabled: repositoryIds && repositoryIds.includes(rowData.repoId),
|
175
|
+
onClick: (_event, rowId, rowInfo) => {
|
176
|
+
onAdd(rowInfo.repoId);
|
177
|
+
},
|
178
|
+
},
|
179
|
+
{
|
180
|
+
title: 'Remove',
|
181
|
+
isDisabled: repositoryIds && !repositoryIds.includes(rowData.repoId),
|
182
|
+
onClick: (_event, rowId, rowInfo) => {
|
183
|
+
onRemove(rowInfo.repoId);
|
184
|
+
},
|
185
|
+
},
|
186
|
+
];
|
187
|
+
};
|
188
|
+
|
189
|
+
const getCVReposWithOptions = (params = {}) => {
|
190
|
+
const allParams = { ...params };
|
191
|
+
if (typeSelected !== 'All repositories') allParams.content_type = repoTypes[typeSelected];
|
192
|
+
|
193
|
+
return getContentViewRepositories(cvId, allParams, statusSelected);
|
194
|
+
};
|
195
|
+
|
129
196
|
const emptyContentTitle = __("You currently don't have any repositories to add to this content view.");
|
130
197
|
const emptyContentBody = __('Please add some repositories.'); // needs link
|
131
198
|
const emptySearchTitle = __('No matching repositories found');
|
132
199
|
const emptySearchBody = __('Try changing your search settings.');
|
133
200
|
const activeFilters = (typeSelected && typeSelected !== allRepositories) ||
|
134
201
|
(statusSelected && statusSelected !== ALL_STATUSES);
|
202
|
+
const dropdownItems = [
|
203
|
+
<DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!bulkActionEnabled} component="button" onClick={addBulk}>
|
204
|
+
Add
|
205
|
+
</DropdownItem>,
|
206
|
+
<DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!bulkActionEnabled} component="button" onClick={removeBulk}>
|
207
|
+
Remove
|
208
|
+
</DropdownItem>,
|
209
|
+
];
|
135
210
|
|
136
211
|
return (
|
137
212
|
<TableWrapper
|
@@ -144,6 +219,7 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
144
219
|
emptySearchBody,
|
145
220
|
searchQuery,
|
146
221
|
updateSearchQuery,
|
222
|
+
actionResolver,
|
147
223
|
error,
|
148
224
|
status,
|
149
225
|
activeFilters,
|
@@ -176,6 +252,23 @@ const ContentViewRepositories = ({ cvId }) => {
|
|
176
252
|
placeholderText="Status"
|
177
253
|
/>
|
178
254
|
</SplitItem>
|
255
|
+
<SplitItem>
|
256
|
+
<ActionList>
|
257
|
+
<ActionListItem>
|
258
|
+
<Button onClick={addBulk} isDisabled={!bulkActionEnabled} variant="secondary" aria-label="add_repositories">
|
259
|
+
Add repositories
|
260
|
+
</Button>
|
261
|
+
</ActionListItem>
|
262
|
+
<ActionListItem>
|
263
|
+
<Dropdown
|
264
|
+
toggle={<KebabToggle aria-label="bulk_actions" onToggle={toggleBulkAction} />}
|
265
|
+
isOpen={bulkActionOpen}
|
266
|
+
isPlain
|
267
|
+
dropdownItems={dropdownItems}
|
268
|
+
/>
|
269
|
+
</ActionListItem>
|
270
|
+
</ActionList>
|
271
|
+
</SplitItem>
|
179
272
|
</Split>
|
180
273
|
</TableWrapper>
|
181
274
|
);
|