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,154 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
|
3
|
+
import nock, { nockInstance, assertNockRequest, mockAutocomplete, mockSetting } from '../../../../../test-utils/nockWrapper';
|
4
|
+
import api from '../../../../../services/api';
|
5
|
+
import CONTENT_VIEWS_KEY from '../../../ContentViewsConstants';
|
6
|
+
import ContentViewVersions from '../ContentViewVersions';
|
7
|
+
|
8
|
+
const cvVersionsData = require('./contentViewVersions.fixtures.json');
|
9
|
+
const emptyCVVersionData = require('./emptyCVVersion.fixtures.json');
|
10
|
+
|
11
|
+
const renderOptions = { apiNamespace: `${CONTENT_VIEWS_KEY}_1` };
|
12
|
+
const cvVersions = api.getApiUrl('/content_view_versions/');
|
13
|
+
const autocompleteUrl = '/content_view_versions/auto_complete_search';
|
14
|
+
|
15
|
+
let firstVersion;
|
16
|
+
let searchDelayScope;
|
17
|
+
let autoSearchScope;
|
18
|
+
|
19
|
+
beforeEach(() => {
|
20
|
+
const { results } = cvVersionsData;
|
21
|
+
[firstVersion] = 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 versions on page load', async (done) => {
|
33
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
34
|
+
const scope = nockInstance
|
35
|
+
.get(cvVersions)
|
36
|
+
.query(true)
|
37
|
+
.reply(200, cvVersionsData);
|
38
|
+
|
39
|
+
const { getByText, queryByText } = renderWithRedux(
|
40
|
+
<ContentViewVersions cvId={5} />,
|
41
|
+
renderOptions,
|
42
|
+
);
|
43
|
+
|
44
|
+
// Nothing will show at first, page is loading
|
45
|
+
expect(queryByText(`Version ${firstVersion.version}`)).toBeNull();
|
46
|
+
// Assert that the CV version is now showing on the screen, but wait for it to appear.
|
47
|
+
await patientlyWaitFor(() => {
|
48
|
+
expect(getByText(`Version ${firstVersion.version}`)).toBeTruthy();
|
49
|
+
});
|
50
|
+
assertNockRequest(autocompleteScope);
|
51
|
+
assertNockRequest(scope, done);
|
52
|
+
});
|
53
|
+
|
54
|
+
test('Can link to view environment and see publish time', async () => {
|
55
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
56
|
+
const scope = nockInstance
|
57
|
+
.get(cvVersions)
|
58
|
+
.query(true)
|
59
|
+
.reply(200, cvVersionsData);
|
60
|
+
|
61
|
+
const { getByText, getAllByText } = renderWithRedux(
|
62
|
+
<ContentViewVersions cvId={5} />,
|
63
|
+
renderOptions,
|
64
|
+
);
|
65
|
+
|
66
|
+
await patientlyWaitFor(() => {
|
67
|
+
// Able to display multiple env of version with humanized published/promoted date
|
68
|
+
expect(getAllByText('Library')[0].closest('a'))
|
69
|
+
.toHaveAttribute('href', '/lifecycle_environments/1');
|
70
|
+
expect(getByText('5 days ago')).toBeTruthy();
|
71
|
+
expect(getAllByText('dev')[0].closest('a'))
|
72
|
+
.toHaveAttribute('href', '/lifecycle_environments/2');
|
73
|
+
expect(getAllByText('4 days ago')[0]).toBeTruthy();
|
74
|
+
|
75
|
+
// Able to display empty text for version in no environments
|
76
|
+
expect(getAllByText('No environments')).toHaveLength(3);
|
77
|
+
});
|
78
|
+
|
79
|
+
assertNockRequest(autocompleteScope);
|
80
|
+
assertNockRequest(scope);
|
81
|
+
});
|
82
|
+
|
83
|
+
test('Can show package and erratas and link to list page', async () => {
|
84
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
85
|
+
const scope = nockInstance
|
86
|
+
.get(cvVersions)
|
87
|
+
.query(true)
|
88
|
+
.reply(200, cvVersionsData);
|
89
|
+
|
90
|
+
const { getByText, getAllByText } = renderWithRedux(
|
91
|
+
<ContentViewVersions cvId={5} />,
|
92
|
+
renderOptions,
|
93
|
+
);
|
94
|
+
|
95
|
+
|
96
|
+
await patientlyWaitFor(() => {
|
97
|
+
expect(getAllByText(8)[0].closest('a'))
|
98
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/packages/');
|
99
|
+
expect(getAllByText(15)[0].closest('a'))
|
100
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/errata/');
|
101
|
+
expect(getByText(5).closest('a'))
|
102
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/errata?queryPagedSearch=%20type%20%3D%20security');
|
103
|
+
expect(getByText(3).closest('a'))
|
104
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/errata?queryPagedSearch=%20type%20%3D%20bugfix');
|
105
|
+
expect(getByText(7).closest('a'))
|
106
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/errata?queryPagedSearch=%20type%20%3D%20enhancement');
|
107
|
+
});
|
108
|
+
|
109
|
+
assertNockRequest(autocompleteScope);
|
110
|
+
assertNockRequest(scope);
|
111
|
+
});
|
112
|
+
|
113
|
+
test('Can show additional content and link to list page', async () => {
|
114
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
115
|
+
const scope = nockInstance
|
116
|
+
.get(cvVersions)
|
117
|
+
.query(true)
|
118
|
+
.reply(200, cvVersionsData);
|
119
|
+
|
120
|
+
const { getByText } = renderWithRedux(
|
121
|
+
<ContentViewVersions cvId={5} />,
|
122
|
+
renderOptions,
|
123
|
+
);
|
124
|
+
|
125
|
+
|
126
|
+
await patientlyWaitFor(() => {
|
127
|
+
expect(getByText('3 Files').closest('a'))
|
128
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/file/');
|
129
|
+
expect(getByText('1 Deb Packages').closest('a'))
|
130
|
+
.toHaveAttribute('href', '/content_views/5/versions/11/deb/');
|
131
|
+
});
|
132
|
+
|
133
|
+
assertNockRequest(autocompleteScope);
|
134
|
+
assertNockRequest(scope);
|
135
|
+
});
|
136
|
+
|
137
|
+
test('Can load for empty versions', async () => {
|
138
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
139
|
+
const scope = nockInstance
|
140
|
+
.get(cvVersions)
|
141
|
+
.query(true)
|
142
|
+
.reply(200, emptyCVVersionData);
|
143
|
+
|
144
|
+
const { queryByText } = renderWithRedux(
|
145
|
+
<ContentViewVersions cvId={5} />,
|
146
|
+
renderOptions,
|
147
|
+
);
|
148
|
+
|
149
|
+
expect(queryByText(`Version ${firstVersion.version}`)).toBeNull();
|
150
|
+
await patientlyWaitFor(() =>
|
151
|
+
expect(queryByText("You currently don't have any versions for this content view.")).toBeTruthy());
|
152
|
+
assertNockRequest(autocompleteScope);
|
153
|
+
assertNockRequest(scope);
|
154
|
+
});
|
@@ -11,9 +11,11 @@ const cvDetailData = require('./contentViewDetails.fixtures.json');
|
|
11
11
|
const renderOptions = { apiNamespace: `${CONTENT_VIEWS_KEY}_1` };
|
12
12
|
const cvDetailsPath = api.getApiUrl('/content_views/1');
|
13
13
|
|
14
|
-
// The
|
14
|
+
// The tabs will load in the background, prevent this by mocking
|
15
15
|
jest.mock('../Repositories/ContentViewRepositories.js', () => () => 'mocked!');
|
16
16
|
jest.mock('../Filters/ContentViewFilters.js', () => () => 'mocked!');
|
17
|
+
jest.mock('../Histories/ContentViewHistories.js', () => () => 'mocked!');
|
18
|
+
jest.mock('../Versions/ContentViewVersions.js', () => () => 'mocked!');
|
17
19
|
|
18
20
|
test('Can call API and show details on page load', async (done) => {
|
19
21
|
const { label, name, description } = cvDetailData;
|
@@ -3,7 +3,6 @@
|
|
3
3
|
"composite": false,
|
4
4
|
"component_ids": [],
|
5
5
|
"default": false,
|
6
|
-
"force_puppet_environment": false,
|
7
6
|
"version_count": 5,
|
8
7
|
"latest_version": "5.0",
|
9
8
|
"auto_publish": false,
|
@@ -55,7 +54,6 @@
|
|
55
54
|
"content_type": "yum"
|
56
55
|
}
|
57
56
|
],
|
58
|
-
"puppet_modules": [],
|
59
57
|
"versions": [
|
60
58
|
{
|
61
59
|
"id": 956,
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { Flex, FlexItem } from '@patternfly/react-core';
|
4
|
+
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
5
|
+
import ComponentEnvironments from '../Details/ComponentContentViews/ComponentEnvironments';
|
6
|
+
|
7
|
+
const ContentViewVersionCell = ({
|
8
|
+
id, latestVersion, latestVersionId, latestVersionEnvironments,
|
9
|
+
}) => (
|
10
|
+
<Flex grow={{ default: 'grow' }}>
|
11
|
+
<FlexItem>
|
12
|
+
<a href={urlBuilder(`content_views/${id}/versions/${latestVersionId}`, '')}>{`Version ${latestVersion}`}</a>
|
13
|
+
</FlexItem>
|
14
|
+
<FlexItem>
|
15
|
+
<ComponentEnvironments environments={latestVersionEnvironments} />
|
16
|
+
</FlexItem>
|
17
|
+
</Flex>
|
18
|
+
);
|
19
|
+
|
20
|
+
ContentViewVersionCell.propTypes = {
|
21
|
+
id: PropTypes.number.isRequired,
|
22
|
+
latestVersion: PropTypes.string.isRequired,
|
23
|
+
latestVersionId: PropTypes.number,
|
24
|
+
latestVersionEnvironments: PropTypes.instanceOf(Array),
|
25
|
+
};
|
26
|
+
|
27
|
+
ContentViewVersionCell.defaultProps = {
|
28
|
+
latestVersionId: null,
|
29
|
+
latestVersionEnvironments: [],
|
30
|
+
};
|
31
|
+
|
32
|
+
export default ContentViewVersionCell;
|
33
|
+
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
4
|
import { STATUS } from 'foremanReact/constants';
|
5
5
|
import { Button } from '@patternfly/react-core';
|
6
|
+
import { TableVariant } from '@patternfly/react-table';
|
6
7
|
import TableWrapper from '../../../components/Table/TableWrapper';
|
7
8
|
import tableDataGenerator from './tableDataGenerator';
|
8
9
|
import getContentViews from '../ContentViewsActions';
|
@@ -11,7 +12,7 @@ import CopyContentViewModal from '../Copy/CopyContentViewModal';
|
|
11
12
|
|
12
13
|
const ContentViewTable = ({ response, status, error }) => {
|
13
14
|
const [table, setTable] = useState({ rows: [], columns: [] });
|
14
|
-
const [
|
15
|
+
const [rowMappingIds, setRowMappingIds] = useState([]);
|
15
16
|
const [searchQuery, updateSearchQuery] = useState('');
|
16
17
|
const { results, ...metadata } = response;
|
17
18
|
const loadingResponse = status === STATUS.PENDING;
|
@@ -26,15 +27,12 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
26
27
|
useEffect(
|
27
28
|
() => {
|
28
29
|
if (!loadingResponse && results) {
|
29
|
-
const {
|
30
|
-
results,
|
31
|
-
rowMapping,
|
32
|
-
);
|
30
|
+
const { newRowMappingIds, ...tableData } = tableDataGenerator(results);
|
33
31
|
setTable(tableData);
|
34
|
-
|
32
|
+
setRowMappingIds(newRowMappingIds);
|
35
33
|
}
|
36
34
|
},
|
37
|
-
[results,
|
35
|
+
[results, loadingResponse, setTable, setRowMappingIds],
|
38
36
|
);
|
39
37
|
|
40
38
|
const onSelect = (_event, isSelected, rowId) => {
|
@@ -49,19 +47,13 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
49
47
|
setTable(prevTable => ({ ...prevTable, rows }));
|
50
48
|
};
|
51
49
|
|
52
|
-
const
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
if (!isOpen) {
|
58
|
-
setRowMapping((prev) => {
|
59
|
-
const updatedMap = { ...prev[rowIndex], expandedColumn: adjustedColIndex };
|
60
|
-
return { ...prev, [rowIndex]: updatedMap };
|
61
|
-
});
|
50
|
+
const onCollapse = (event, rowId, isOpen) => {
|
51
|
+
let rows;
|
52
|
+
if (rowId === -1) {
|
53
|
+
rows = table.rows.map(row => ({ ...row, isOpen }));
|
62
54
|
} else {
|
63
|
-
|
64
|
-
|
55
|
+
rows = [...table.rows];
|
56
|
+
rows[rowId].isOpen = isOpen;
|
65
57
|
}
|
66
58
|
|
67
59
|
setTable(prevTable => ({ ...prevTable, rows }));
|
@@ -69,19 +61,21 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
69
61
|
|
70
62
|
const actionResolver = (rowData, { _rowIndex }) => {
|
71
63
|
// don't show actions for the expanded parts
|
72
|
-
if (rowData.parent || rowData.compoundParent || rowData.noactions) return null;
|
64
|
+
if (rowData.parent !== undefined || rowData.compoundParent || rowData.noactions) return null;
|
73
65
|
|
74
66
|
// printing to the console for now until these are hooked up
|
75
67
|
/* eslint-disable no-console */
|
76
68
|
return [
|
77
69
|
{
|
78
70
|
title: 'Publish and Promote',
|
71
|
+
isDisabled: true,
|
79
72
|
onClick: (_event, rowId, rowInfo) => {
|
80
73
|
console.log(`clicked on row ${JSON.stringify(rowInfo)}`);
|
81
74
|
},
|
82
75
|
},
|
83
76
|
{
|
84
77
|
title: 'Promote',
|
78
|
+
isDisabled: true,
|
85
79
|
onClick: (_event, rowId, rowInfo) => console.log(`clicked on row ${rowInfo.cvName}`),
|
86
80
|
},
|
87
81
|
{
|
@@ -94,6 +88,7 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
94
88
|
},
|
95
89
|
{
|
96
90
|
title: 'Delete',
|
91
|
+
isDisabled: true,
|
97
92
|
onClick: (_event, rowId, _rowInfo) => console.log(`clicked on row ${rowId}`),
|
98
93
|
},
|
99
94
|
];
|
@@ -102,7 +97,6 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
102
97
|
// Prevents flash of "No Content" before rows are loaded
|
103
98
|
const tableStatus = () => {
|
104
99
|
if (typeof results === 'undefined') return status; // will handle errored state
|
105
|
-
const rowMappingIds = Object.values(rowMapping).map(row => row.id);
|
106
100
|
const resultsIds = Array.from(results.map(result => result.id));
|
107
101
|
// All results are accounted for in row mapping, the page is ready to load
|
108
102
|
if (resultsIds.length === rowMappingIds.length &&
|
@@ -129,13 +123,14 @@ const ContentViewTable = ({ response, status, error }) => {
|
|
129
123
|
emptySearchTitle,
|
130
124
|
emptySearchBody,
|
131
125
|
onSelect,
|
132
|
-
onExpand,
|
133
126
|
actionResolver,
|
134
127
|
searchQuery,
|
135
128
|
updateSearchQuery,
|
136
129
|
}}
|
130
|
+
variant={TableVariant.compact}
|
137
131
|
status={tableStatus()}
|
138
132
|
fetchItems={getContentViews}
|
133
|
+
onCollapse={onCollapse}
|
139
134
|
canSelectAll={false}
|
140
135
|
cells={columns}
|
141
136
|
autocompleteEndpoint="/content_views/auto_complete_search"
|
@@ -1,137 +1,86 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
ScreenIcon,
|
5
|
-
ContainerNodeIcon,
|
6
|
-
} from '@patternfly/react-icons';
|
2
|
+
import { fitContent, expandable } from '@patternfly/react-table';
|
7
3
|
import { Link } from 'react-router-dom';
|
8
4
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
9
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
10
|
-
|
11
|
-
import IconWithCount from '../components/IconWithCount';
|
12
|
-
import DetailsExpansion from '../expansions/DetailsExpansion';
|
13
|
-
import EnvironmentsExpansion from '../expansions/EnvironmentsExpansion';
|
14
|
-
import VersionsExpansion from '../expansions/VersionsExpansion';
|
6
|
+
import LongDateTime from 'foremanReact/components/common/dates/LongDateTime';
|
15
7
|
import ContentViewIcon from '../components/ContentViewIcon';
|
16
|
-
import
|
8
|
+
import DetailsExpansion from '../expansions/DetailsExpansion';
|
9
|
+
import ContentViewVersionCell from './ContentViewVersionCell';
|
10
|
+
import InactiveText from '../components/InactiveText';
|
11
|
+
import LastSync from '../Details/Repositories/LastSync';
|
17
12
|
|
18
13
|
export const buildColumns = () => [
|
19
|
-
{ title: __('Type'), transforms: [fitContent] },
|
20
|
-
__('Name'), __('Last published'), __('
|
21
|
-
{ title: __('Environments'), cellTransforms: [compoundExpand] },
|
22
|
-
{ title: __('Versions'), cellTransforms: [compoundExpand] },
|
14
|
+
{ title: __('Type'), cellFormatters: [expandable], transforms: [fitContent] },
|
15
|
+
__('Name'), __('Last published'), __('Last task'), __('Latest version'),
|
23
16
|
];
|
24
17
|
|
25
|
-
const buildRow = (contentView
|
18
|
+
const buildRow = (contentView) => {
|
19
|
+
/* eslint-disable max-len */
|
26
20
|
const {
|
27
|
-
id, composite, name,
|
21
|
+
id, composite, name, last_published: lastPublished, latest_version: latestVersion, latest_version_id: latestVersionId,
|
22
|
+
latest_version_environments: latestVersionEnvironments, last_task: lastTask,
|
28
23
|
} = contentView;
|
24
|
+
/* eslint-enable max-len */
|
25
|
+
const { last_sync_words: lastSyncWords } = lastTask || {};
|
29
26
|
const row = [
|
30
27
|
{ title: <ContentViewIcon composite={composite ? true : undefined} /> },
|
31
28
|
{ title: <Link to={urlBuilder('labs/content_views', '', id)}>{name}</Link> },
|
32
|
-
lastPublished
|
33
|
-
{ title:
|
34
|
-
{
|
35
|
-
title: <IconWithCount Icon={ScreenIcon} count={environments.length} title={`environments-icon-${id}`} />,
|
36
|
-
props: { isOpen: false, ariaControls: `cv-environments-expansion-${id}` },
|
37
|
-
},
|
29
|
+
{ title: lastPublished ? <LongDateTime date={lastPublished} showRelativeTimeTooltip /> : <InactiveText text={__('Not yet published')} /> },
|
30
|
+
{ title: <LastSync lastSync={lastTask} lastSyncWords={lastSyncWords} emptyMessage="N/A" /> },
|
38
31
|
{
|
39
|
-
title:
|
40
|
-
|
32
|
+
title: latestVersion ? <ContentViewVersionCell {...{
|
33
|
+
id, latestVersion, latestVersionId, latestVersionEnvironments,
|
34
|
+
}}
|
35
|
+
/> : <InactiveText style={{ marginTop: '0.5em', marginBottom: '0.5em' }} text={__('Not yet published')} />,
|
41
36
|
},
|
42
37
|
];
|
43
|
-
if (openColumn) row[openColumn].props.isOpen = true;
|
44
38
|
return row;
|
45
39
|
};
|
46
40
|
|
47
|
-
const
|
48
|
-
const
|
49
|
-
|
50
|
-
const containerProps = column => ({ ...cvId, isOpen: openColumn === column });
|
51
|
-
const offsetColumn = 3; // index of first expandable column
|
41
|
+
const buildExpandableRows = (contentViews) => {
|
42
|
+
const rows = [];
|
43
|
+
let cvCount = 0;
|
52
44
|
|
53
|
-
|
54
|
-
{
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
],
|
65
|
-
},
|
66
|
-
{
|
67
|
-
compoundParent: offsetColumn + 1,
|
45
|
+
contentViews.forEach((contentView) => {
|
46
|
+
const {
|
47
|
+
id, name, description, activation_keys: activationKeys, hosts,
|
48
|
+
} = contentView;
|
49
|
+
const cells = buildRow(contentView);
|
50
|
+
const cellParent = {
|
51
|
+
cvId: id, cvName: name, isOpen: false, cells,
|
52
|
+
};
|
53
|
+
rows.push(cellParent);
|
54
|
+
const cellChild = {
|
55
|
+
parent: cvCount,
|
68
56
|
cells: [
|
69
57
|
{
|
70
|
-
title:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
props: { colSpan: 6 },
|
58
|
+
title: <DetailsExpansion cvId={id} {...{ activationKeys, hosts }} />,
|
59
|
+
props: {
|
60
|
+
colSpan: 2,
|
61
|
+
},
|
75
62
|
},
|
76
|
-
],
|
77
|
-
},
|
78
|
-
{
|
79
|
-
compoundParent: offsetColumn + 2,
|
80
|
-
cells: [
|
81
63
|
{
|
82
|
-
title: (
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
props: { colSpan: 6 },
|
64
|
+
title: description || <InactiveText text={__('No description')} />,
|
65
|
+
props: {
|
66
|
+
colSpan: 4,
|
67
|
+
},
|
87
68
|
},
|
88
69
|
],
|
89
|
-
}
|
90
|
-
|
91
|
-
|
92
|
-
detailDropdowns = detailDropdowns.map(detail => ({ ...detail, parent: rowIndex }));
|
93
|
-
|
94
|
-
return detailDropdowns;
|
95
|
-
};
|
96
|
-
|
97
|
-
const buildRowsAndMapping = (contentViews, newRowMapping) => {
|
98
|
-
const updatedRowMap = { ...newRowMapping };
|
99
|
-
const rows = [];
|
100
|
-
|
101
|
-
contentViews.forEach((contentView) => {
|
102
|
-
const { id, name } = contentView;
|
103
|
-
const rowIndex = rows.length;
|
104
|
-
const needsUpdate = !Object.keys(updatedRowMap).find(i => updatedRowMap[i].id === id) ||
|
105
|
-
!Object.keys(updatedRowMap[rowIndex] || {}).includes('expandedColumn');
|
106
|
-
if (needsUpdate) updatedRowMap[rowIndex] = { expandedColumn: null, id };
|
107
|
-
const openColumn = updatedRowMap[rowIndex].expandedColumn;
|
108
|
-
const cells = buildRow(contentView, openColumn);
|
109
|
-
const isOpen = !!openColumn;
|
110
|
-
|
111
|
-
rows.push({
|
112
|
-
cvId: id, cvName: name, isOpen, cells,
|
113
|
-
});
|
114
|
-
rows.push(...buildDetailDropdowns(id, rowIndex, openColumn));
|
70
|
+
};
|
71
|
+
rows.push(cellChild);
|
72
|
+
cvCount = rows.length;
|
115
73
|
});
|
116
|
-
|
117
|
-
return { rows, updatedRowMap };
|
74
|
+
return { rows };
|
118
75
|
};
|
119
76
|
|
120
|
-
const tableDataGenerator = (results
|
121
|
-
// If a search was performed or perPage has changed, we can clear mapping
|
122
|
-
const prevRowMapping = (results.length === Object.keys(rowMapping).length) ? rowMapping : {};
|
123
|
-
const newRowMapping = {};
|
77
|
+
const tableDataGenerator = (results) => {
|
124
78
|
const contentViews = results || [];
|
125
79
|
const columns = buildColumns();
|
126
|
-
const
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
if (contentViewIds.includes(value.id)) newRowMapping[rowId] = value;
|
131
|
-
});
|
132
|
-
const { updatedRowMap, rows } = buildRowsAndMapping(contentViews, newRowMapping);
|
133
|
-
|
134
|
-
return { updatedRowMap, rows, columns };
|
80
|
+
const newRowMappingIds = [];
|
81
|
+
const { rows } = buildExpandableRows(contentViews);
|
82
|
+
rows.forEach(row => row.cvId && newRowMappingIds.push(row.cvId));
|
83
|
+
return { newRowMappingIds, rows, columns };
|
135
84
|
};
|
136
85
|
|
137
86
|
export default tableDataGenerator;
|
@@ -6,12 +6,14 @@ const buildContentView = id => ({
|
|
6
6
|
repositories: [],
|
7
7
|
versions: [],
|
8
8
|
last_published: 'Not Yet Published',
|
9
|
+
activation_keys: [],
|
10
|
+
hosts: [],
|
9
11
|
});
|
10
12
|
|
11
13
|
const createBasicCVs = (amount) => {
|
12
14
|
const response = {
|
13
|
-
total:
|
14
|
-
subtotal:
|
15
|
+
total: amount,
|
16
|
+
subtotal: amount,
|
15
17
|
page: 1,
|
16
18
|
per_page: 20,
|
17
19
|
error: null,
|
@@ -23,7 +25,7 @@ const createBasicCVs = (amount) => {
|
|
23
25
|
results: [],
|
24
26
|
};
|
25
27
|
|
26
|
-
[...Array(amount).keys()].forEach((_, i) => response.results.push(buildContentView(i)));
|
28
|
+
[...Array(amount).keys()].forEach((_, i) => response.results.push(buildContentView(i + 1)));
|
27
29
|
|
28
30
|
return response;
|
29
31
|
};
|
@@ -14,9 +14,21 @@
|
|
14
14
|
"composite": false,
|
15
15
|
"component_ids": [],
|
16
16
|
"default": false,
|
17
|
-
"force_puppet_environment": false,
|
18
17
|
"version_count": 1,
|
19
18
|
"latest_version": "1.0",
|
19
|
+
"latest_version_id": 11,
|
20
|
+
"latest_version_environments": [
|
21
|
+
{
|
22
|
+
"id": 1,
|
23
|
+
"name": "Library",
|
24
|
+
"label": "Library"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"id": 2,
|
28
|
+
"name": "dev",
|
29
|
+
"label": "dev"
|
30
|
+
}
|
31
|
+
],
|
20
32
|
"auto_publish": false,
|
21
33
|
"solve_dependencies": false,
|
22
34
|
"repository_ids": [
|
@@ -52,7 +64,6 @@
|
|
52
64
|
"content_type": "yum"
|
53
65
|
}
|
54
66
|
],
|
55
|
-
"puppet_modules": [],
|
56
67
|
"versions": [
|
57
68
|
{
|
58
69
|
"id": 2,
|
@@ -65,7 +76,23 @@
|
|
65
76
|
],
|
66
77
|
"components": [],
|
67
78
|
"content_view_components": [],
|
68
|
-
"activation_keys": [
|
79
|
+
"activation_keys": [
|
80
|
+
{
|
81
|
+
"id": 1,
|
82
|
+
"name": "test_ack_key"
|
83
|
+
}
|
84
|
+
],
|
85
|
+
"hosts": [
|
86
|
+
{
|
87
|
+
"id": 1,
|
88
|
+
"name": "katello-client1.samir.example.com"
|
89
|
+
}
|
90
|
+
],
|
91
|
+
"last_task": {
|
92
|
+
"id": "54088dac-b990-491c-a891-1d7d1a3f5161",
|
93
|
+
"result": "successful",
|
94
|
+
"last_sync_words": "3 days"
|
95
|
+
},
|
69
96
|
"next_version": "2.0",
|
70
97
|
"last_published": "2020-03-19 15:09:11 UTC",
|
71
98
|
"permissions": {
|
@@ -83,7 +110,6 @@
|
|
83
110
|
28
|
84
111
|
],
|
85
112
|
"default": false,
|
86
|
-
"force_puppet_environment": false,
|
87
113
|
"version_count": 0,
|
88
114
|
"latest_version": null,
|
89
115
|
"auto_publish": false,
|
@@ -161,7 +187,6 @@
|
|
161
187
|
"content_type": "yum"
|
162
188
|
}
|
163
189
|
],
|
164
|
-
"puppet_modules": [],
|
165
190
|
"versions": [],
|
166
191
|
"components": [
|
167
192
|
{
|