katello 3.8.1 → 3.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +16 -9
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/api_controller.rb +20 -22
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +5 -1
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +12 -12
- data/app/controllers/katello/api/v2/content_views_controller.rb +15 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +12 -4
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +12 -0
- data/app/controllers/katello/api/v2/module_streams_controller.rb +49 -0
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +5 -4
- data/app/controllers/katello/api/v2/products_controller.rb +1 -1
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +5 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +80 -84
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +18 -7
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -6
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +13 -24
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +12 -5
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -5
- data/app/controllers/katello/react_controller.rb +2 -0
- data/app/controllers/katello/remote_execution_controller.rb +16 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +0 -2
- data/app/lib/actions/candlepin/import_pool_handler.rb +40 -15
- data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +21 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -1
- data/app/lib/actions/katello/environment/destroy.rb +2 -3
- data/app/lib/actions/katello/environment/publish_repositories.rb +1 -1
- data/app/lib/actions/katello/event_queue/monitor.rb +9 -15
- data/app/lib/actions/katello/event_queue/poller_thread.rb +24 -1
- data/app/lib/actions/katello/event_queue/suspended_action.rb +2 -2
- data/app/lib/actions/katello/host/hypervisors_update.rb +82 -22
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -1
- data/app/lib/actions/katello/product/content_create.rb +30 -38
- data/app/lib/actions/katello/product/content_destroy.rb +11 -12
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/product/update.rb +0 -2
- data/app/lib/actions/katello/repository/clear.rb +2 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +0 -2
- data/app/lib/actions/katello/repository/clone_to_version.rb +15 -3
- data/app/lib/actions/katello/repository/clone_yum_content.rb +21 -2
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +1 -1
- data/app/lib/actions/katello/repository/correct_checksum.rb +5 -5
- data/app/lib/actions/katello/repository/create.rb +7 -7
- data/app/lib/actions/katello/repository/create_root.rb +22 -0
- data/app/lib/actions/katello/repository/destroy.rb +11 -6
- data/app/lib/actions/katello/repository/discover.rb +5 -3
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/fetch_pxe_files.rb +13 -27
- data/app/lib/actions/katello/repository/index_module_streams.rb +16 -0
- data/app/lib/actions/katello/repository/metadata_generate.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +0 -2
- data/app/lib/actions/katello/repository/update.rb +15 -28
- data/app/lib/actions/katello/repository_set/disable_repository.rb +5 -13
- data/app/lib/actions/katello/repository_set/enable_repository.rb +3 -16
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +4 -32
- data/app/lib/actions/katello/sync_plan/run.rb +37 -0
- data/app/lib/actions/pulp/abstract.rb +7 -2
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -0
- data/app/lib/actions/pulp/consumer/generate_applicability.rb +1 -0
- data/app/lib/actions/pulp/repository/copy_module_default.rb +11 -0
- data/app/lib/actions/pulp/repository/copy_module_stream.rb +11 -0
- data/app/lib/actions/pulp/repository/create.rb +2 -0
- data/app/lib/actions/pulp/repository/distributor_publish.rb +3 -2
- data/app/lib/actions/pulp/repository/remove_module_default.rb +11 -0
- data/app/lib/actions/pulp/repository/remove_module_stream.rb +11 -0
- data/app/lib/actions/pulp/repository/sync.rb +6 -19
- data/app/lib/actions/pulp/repository/update_importer.rb +9 -7
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +42 -0
- data/app/lib/katello/concerns/renderer_extensions.rb +6 -4
- data/app/lib/katello/http_resource.rb +5 -1
- data/app/lib/katello/repo_discovery.rb +6 -2
- data/app/lib/katello/resources/candlepin/consumer.rb +18 -1
- data/app/lib/katello/resources/candlepin/owner.rb +9 -0
- data/app/lib/katello/resources/candlepin/pool.rb +2 -2
- data/app/lib/katello/validators/root_repository_unique_attribute_validator.rb +13 -0
- data/app/models/katello/authorization/product.rb +3 -4
- data/app/models/katello/authorization/repository.rb +4 -4
- data/app/models/katello/candlepin/repository_mapper.rb +12 -26
- data/app/models/katello/concerns/audit_search.rb +13 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +1 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +68 -2
- data/app/models/katello/concerns/hostgroup_extensions.rb +13 -0
- data/app/models/katello/concerns/location_extensions.rb +3 -3
- data/app/models/katello/concerns/organization_extensions.rb +7 -3
- data/app/models/katello/concerns/pulp_database_unit.rb +1 -0
- data/app/models/katello/concerns/recurring_logic_extensions.rb +11 -0
- data/app/models/katello/concerns/redhat_extensions.rb +0 -25
- data/app/models/katello/concerns/search_by_repository_name.rb +21 -0
- data/app/models/katello/concerns/setting_extensions.rb +1 -1
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +43 -0
- data/app/models/katello/content.rb +7 -3
- data/app/models/katello/content_view.rb +4 -4
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_history.rb +1 -0
- data/app/models/katello/content_view_version.rb +14 -2
- data/app/models/katello/docker_manifest_list.rb +1 -1
- data/app/models/katello/docker_meta_tag.rb +11 -2
- data/app/models/katello/docker_tag.rb +1 -1
- data/app/models/katello/erratum.rb +6 -0
- data/app/models/katello/file_unit.rb +0 -1
- data/app/models/katello/glue/candlepin/owner.rb +1 -0
- data/app/models/katello/glue/candlepin/pool.rb +1 -2
- data/app/models/katello/glue/candlepin/product.rb +0 -4
- data/app/models/katello/glue/candlepin/repository.rb +0 -21
- data/app/models/katello/glue/provider.rb +4 -2
- data/app/models/katello/glue/pulp/repo.rb +10 -173
- data/app/models/katello/glue/pulp/repos.rb +2 -112
- data/app/models/katello/gpg_key.rb +6 -14
- data/app/models/katello/host/content_facet.rb +1 -1
- data/app/models/katello/host/subscription_facet.rb +32 -8
- data/app/models/katello/kt_environment.rb +9 -29
- data/app/models/katello/module_profile.rb +6 -0
- data/app/models/katello/module_profile_rpm.rb +5 -0
- data/app/models/katello/module_stream.rb +112 -0
- data/app/models/katello/module_stream_artifact.rb +5 -0
- data/app/models/katello/ostree_branch.rb +0 -1
- data/app/models/katello/package_group.rb +1 -1
- data/app/models/katello/pool.rb +4 -0
- data/app/models/katello/product.rb +18 -21
- data/app/models/katello/product_content.rb +2 -2
- data/app/models/katello/puppet_module.rb +1 -0
- data/app/models/katello/purpose_addons_status.rb +50 -0
- data/app/models/katello/purpose_role_status.rb +50 -0
- data/app/models/katello/purpose_sla_status.rb +48 -0
- data/app/models/katello/purpose_status.rb +56 -0
- data/app/models/katello/purpose_usage_status.rb +50 -0
- data/app/models/katello/repository.rb +116 -280
- data/app/models/katello/repository_module_stream.rb +7 -0
- data/app/models/katello/root_repository.rb +262 -0
- data/app/models/katello/subscription_status.rb +1 -1
- data/app/models/katello/sync_plan.rb +93 -40
- data/app/presenters/katello/content_view_version_compare_presenter.rb +7 -2
- data/app/services/katello/candlepin/consumer.rb +25 -0
- data/app/services/katello/candlepin/message_handler.rb +18 -2
- data/app/services/katello/managed_content_medium_provider.rb +27 -0
- data/app/services/katello/product_content_finder.rb +3 -3
- data/app/services/katello/pulp/module_stream.rb +9 -0
- data/app/services/katello/pulp/repository.rb +22 -0
- data/app/services/katello/pulp/srpm.rb +1 -1
- data/app/services/katello/pxe_files_downloader.rb +41 -0
- data/app/services/katello/registration_manager.rb +5 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -4
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +12 -2
- data/app/views/katello/api/v2/debs/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/docker_manifest_lists/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -0
- data/app/views/katello/api/v2/hosts/host_collections.json.rabl +3 -0
- data/app/views/katello/api/v2/module_streams/base.json.rabl +4 -0
- data/app/views/katello/api/v2/module_streams/index.json.rabl +7 -0
- data/app/views/katello/api/v2/module_streams/name_stream.json.rabl +3 -0
- data/app/views/katello/api/v2/module_streams/name_streams.json.rabl +7 -0
- data/app/views/katello/api/v2/module_streams/show.json.rabl +21 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +4 -1
- data/app/views/katello/api/v2/products/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +23 -10
- data/app/views/katello/api/v2/repositories/show.json.rabl +47 -38
- data/app/views/katello/api/v2/smart_proxies/download_policy.json.rabl +1 -0
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +2 -1
- data/app/views/katello/layouts/react.html.erb +1 -0
- data/config/katello.yaml.example +1 -2
- data/config/routes.rb +5 -0
- data/config/routes/api/v2.rb +12 -1
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20150114225023_add_upstream_name_to_repository.rb +7 -2
- data/db/migrate/20170208215148_add_docker_repo_name.rb +10 -1
- data/db/migrate/20180326190408_move_subscription_products.rb +2 -0
- data/db/migrate/20180622105300_add_docker_tags_whitelist_to_repository.rb +9 -0
- data/db/migrate/20180725083800_change_repository_password_length.rb +5 -0
- data/db/migrate/20180806205420_add_index_to_content_view_version.rb +5 -0
- data/db/migrate/20180807145652_create_katello_module_streams.rb +88 -0
- data/db/migrate/20180807164405_remove_repository_cp_label.rb +5 -0
- data/db/migrate/20180808013432_add_system_purpose_attrs.rb +39 -0
- data/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb +12 -0
- data/db/migrate/20180816142044_add_description_to_katello_module_streams.rb +6 -0
- data/db/migrate/20180821144248_add_cron_logic_to_sync_plans.rb +5 -0
- data/db/migrate/20180828161400_remove_join_table_for_role_and_usage.rb +20 -0
- data/db/migrate/20180917173645_add_source_repo_checksum_type_to_katello_repositories.rb +1 -1
- data/db/migrate/20180920123913_drop_repo_module_streams_timestamp_not_null.rb +7 -0
- data/db/migrate/20180920171008_change_repository_password_to_text.rb +17 -0
- data/db/migrate/20180920214134_create_repository_root.rb +142 -0
- data/db/seeds.d/111-container-image-bookmarks.rb +19 -0
- data/db/seeds.d/111-upgrade_tasks.rb +9 -0
- data/db/seeds.d/150-module_job_templates.rb +12 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/module-stream-actions.service.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +70 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +16 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +1 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +8 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +48 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +68 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +59 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +81 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/content-view-new.controller.js +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +38 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-module-streams.html +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-package-groups.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-packages.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-module-streams.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +6 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-repositories.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/module-stream.factory.js +27 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/module-streams.module.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/views/partials/module-streams-table.html +25 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +6 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-repositories.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/repositories-filters.service.js +89 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +15 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +15 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +36 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-module-streams.html +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/new-sync-plan-modal.controller.js +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +20 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +23 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +10 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/views/new-sync-plan-form.html +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plan-helper.service.js +3 -3
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +5 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -2
- data/lib/katello/engine.rb +7 -12
- data/lib/katello/permission_creator.rb +5 -1
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +38 -14
- data/lib/katello/tasks/clean_backend_objects.rake +7 -3
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/repository.rake +11 -8
- data/lib/katello/tasks/upgrades/3.9/migrate_sync_plans.rake +29 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +11 -7
- data/webpack/__mocks__/foremanReact/common/I18n.js +5 -0
- data/webpack/components/MultiSelect/index.js +15 -3
- data/webpack/components/PaginationRow/index.js +1 -1
- data/webpack/components/Search/__snapshots__/Search.test.js.snap +1 -0
- data/webpack/components/Search/index.js +5 -1
- data/webpack/components/SelectOrg/SetOrganization.js +2 -1
- data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +41 -0
- data/webpack/components/WithOrganization/withOrganization.js +42 -10
- data/webpack/components/WithOrganization/withOrganization.test.js +26 -0
- data/webpack/containers/Application/Headers.js +11 -0
- data/webpack/containers/Application/Routes.js +1 -1
- data/webpack/containers/Application/config.js +23 -7
- data/webpack/containers/Application/withHeaders.js +15 -0
- data/webpack/move_to_foreman/common/helpers.js +72 -8
- data/webpack/move_to_foreman/components/common/ConfirmDialog/ConfirmDialog.js +1 -0
- data/webpack/move_to_foreman/components/common/Dialog/Dialog.js +1 -0
- data/webpack/move_to_foreman/components/common/EmptyState/index.js +1 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.js +1 -1
- data/webpack/move_to_foreman/components/common/table/formatters/selectionCellFormatter.js +1 -0
- data/webpack/move_to_pf/OptionTooltip/OptionTooltip.scss +20 -0
- data/webpack/move_to_pf/OptionTooltip/__tests__/OptionTooltip.test.js +32 -0
- data/webpack/move_to_pf/OptionTooltip/__tests__/__snapshots__/OptionTooltip.test.js.snap +84 -0
- data/webpack/move_to_pf/OptionTooltip/index.js +83 -0
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +15 -2
- data/webpack/move_to_pf/react-bootstrap-select/index.js +10 -4
- data/webpack/move_to_pf/test-utils/testHelpers.js +14 -2
- data/webpack/redux/actions/RedHatRepositories/enabled.js +29 -3
- data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +27 -0
- data/webpack/redux/consts.js +8 -0
- data/webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js +62 -0
- data/webpack/redux/reducers/RedHatRepositories/{repositorySetRepositories.test.js → __tests__/repositorySetRepositories.test.js} +31 -3
- data/webpack/redux/reducers/RedHatRepositories/{sets.test.js → __tests__/sets.test.js} +3 -3
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +16 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +34 -18
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js +10 -0
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +39 -48
- data/webpack/redux/reducers/index.js +6 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailArtifacts.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailInfo.js +51 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +147 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +25 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsConstants.js +3 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js +33 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ModuleStreamDetailProfiles.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ProfileRpmsCellFormatter.js +53 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ProfileRpmsCellFormatter.scss +4 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +35 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js +24 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/__snapshots__/ModuleStreamDetailProfiles.test.js.snap +126 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/__snapshots__/ProfileRpmsCellFormatter.test.js.snap +14 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/ModuleStreamDetailRepositories.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/TableSchema.js +39 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/__snapshots__/ModuleStreamDetailRepositories.test.js.snap +70 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailArtifacts.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailInfo.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetails.test.js +27 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsActions.test.js +42 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsReducer.test.js +33 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailArtifacts.test.js.snap +18 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailInfo.test.js.snap +111 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +552 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailsActions.test.js.snap +144 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailsReducer.test.js.snap +50 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/moduleStreamDetails.fixtures.js +115 -0
- data/webpack/scenes/ModuleStreams/Details/index.js +17 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +29 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsConstants.js +3 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +98 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsReducer.js +43 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTable.js +38 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +69 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +27 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsActions.test.js +49 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsReducer.test.js +46 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +25 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +69 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +95 -0
- data/webpack/scenes/ModuleStreams/__tests__/moduleStreams.fixtures.js +72 -0
- data/webpack/scenes/ModuleStreams/index.js +17 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +120 -0
- data/webpack/scenes/RedHatRepositories/components/{EnabledRepository.stories.js → EnabledRepository/EnabledRepository.stories.js} +0 -0
- data/webpack/scenes/RedHatRepositories/components/{EnabledRepositoryContent.js → EnabledRepository/EnabledRepositoryContent.js} +0 -0
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/EnabledRepository.test.js +6 -2
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/EnabledRepositoryContent.test.js +0 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/__snapshots__/EnabledRepository.test.js.snap +31 -0
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/__snapshots__/EnabledRepositoryContent.test.js.snap +0 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/index.js +17 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +43 -5
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositoriesHelpers.js +3 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +168 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/__test__/RepositorySetRepository.test.js +38 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/__test__/__snapshots__/RepositorySetRepository.test.js.snap +70 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/index.js +18 -0
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +4 -3
- data/webpack/scenes/RedHatRepositories/components/__tests__/RepositorySetRepositories.test.js +44 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +48 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +19 -15
- data/webpack/scenes/RedHatRepositories/index.js +1 -3
- data/webpack/scenes/RedHatRepositories/index.scss +16 -0
- data/webpack/scenes/Settings/Tables/TableActions.js +73 -0
- data/webpack/scenes/Settings/Tables/TableConstants.js +11 -0
- data/webpack/scenes/Settings/Tables/TableHelpers.js +8 -0
- data/webpack/scenes/Settings/Tables/TableReducer.js +46 -0
- data/webpack/scenes/Settings/Tables/__tests__/Table.fixtures.js +125 -0
- data/webpack/scenes/Settings/Tables/__tests__/TableActions.test.js +84 -0
- data/webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js +41 -0
- data/webpack/scenes/Settings/Tables/__tests__/__snapshots__/TableReducer.test.js.snap +76 -0
- data/webpack/scenes/Settings/index.js +4 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js +20 -13
- data/webpack/scenes/Subscriptions/Details/{SubscriptionDetailEnabledProducts.js → SubscriptionDetailProductContent.js} +5 -5
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +3 -3
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +7 -6
- data/webpack/scenes/Subscriptions/Details/__tests__/{SubscriptionDetailEnabledProducts.test.js → SubscriptionDetailProductContent.test.js} +4 -4
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +2 -2
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProduct.test.js.snap +28 -16
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/{SubscriptionDetailEnabledProducts.test.js.snap → SubscriptionDetailProductContent.test.js.snap} +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +16 -16
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js +2 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +38 -61
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +3 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +12 -3
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +26 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +56 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +26 -11
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +1 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +144 -39
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +7 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +10 -16
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +11 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +15 -2
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +12 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +19 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +87 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +31 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +16 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +18 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js +33 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +29 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +34 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +24 -43
- data/webpack/scenes/Subscriptions/index.js +24 -7
- data/webpack/scenes/Tasks/TaskActions.js +43 -19
- data/webpack/scenes/Tasks/TaskConstants.js +1 -0
- data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +15 -12
- data/webpack/scenes/Tasks/helpers.js +17 -27
- data/webpack/services/api/index.js +3 -0
- metadata +160 -52
- data/app/lib/actions/katello/repository/scheduled_sync.rb +0 -15
- data/app/lib/actions/katello/sync_plan/add_products.rb +0 -27
- data/app/lib/actions/katello/sync_plan/destroy.rb +0 -26
- data/app/lib/actions/katello/sync_plan/remove_products.rb +0 -23
- data/app/lib/actions/katello/sync_plan/update.rb +0 -20
- data/app/lib/actions/pulp/repos/update.rb +0 -24
- data/app/lib/actions/pulp/repository/ensure_sync_notification.rb +0 -11
- data/app/lib/actions/pulp/repository/remove_schedule.rb +0 -16
- data/app/lib/actions/pulp/repository/update_schedule.rb +0 -47
- data/app/lib/katello/validators/repository_unique_attribute_validator.rb +0 -13
- data/app/models/katello/candlepin/docker_repository_mapper.rb +0 -77
- data/app/models/katello/input_template_renderer.rb +0 -7
- data/lib/katello/tasks/upgrades/2.4/import_distributions.rake +0 -11
- data/lib/katello/tasks/upgrades/2.4/import_package_groups.rake +0 -11
- data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +0 -12
- data/lib/katello/tasks/upgrades/2.4/import_rpms.rake +0 -12
- data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +0 -14
- data/lib/katello/tasks/upgrades/3.0/delete_docker_v1_content.rake +0 -27
- data/lib/katello/tasks/upgrades/3.0/update_puppet_repository_distributors.rake +0 -20
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +0 -9
- data/lib/katello/tasks/upgrades/3.3/hypervisors.rake +0 -7
- data/lib/katello/tasks/upgrades/3.4/reindex_docker_tags.rake +0 -12
- data/lib/katello/tasks/upgrades/3.4/remove_unused_products.rake +0 -28
- data/lib/katello/tasks/upgrades/3.6/import_backend_consumer_attributes.rake +0 -32
- data/lib/katello/tasks/upgrades/3.6/import_product_content.rake +0 -12
- data/lib/katello/tasks/upgrades/3.6/republish_file_repos.rake +0 -16
- data/lib/katello/tasks/upgrades/3.7/import_pools.rake +0 -12
- data/lib/katello/tasks/upgrades/3.7/make_all_ks_repos_bootable.rake +0 -11
- data/webpack/helpers/caret.js +0 -6
- data/webpack/redux/reducers/RedHatRepositories/enabled.test.js +0 -36
- data/webpack/redux/reducers/RedHatRepositories/filters.fixtures.js +0 -5
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +0 -105
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +0 -129
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepository.test.js.snap +0 -25
@@ -0,0 +1,12 @@
|
|
1
|
+
class AddRecurringLogicToSyncPlan < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :katello_sync_plans, :foreman_tasks_recurring_logic_id, :integer
|
4
|
+
add_foreign_key :katello_sync_plans, :foreman_tasks_recurring_logics, :name => "katello_sync_plan_foreman_tasks_recurring_logic_fk", :column => "foreman_tasks_recurring_logic_id"
|
5
|
+
Katello::SyncPlan.find_each do |sync_plan|
|
6
|
+
User.as_anonymous_admin do
|
7
|
+
sync_plan.associate_recurring_logic
|
8
|
+
sync_plan.save!
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class RemoveJoinTableForRoleAndUsage < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
remove_foreign_key :katello_subscription_facet_purpose_roles, :katello_subscription_facets
|
4
|
+
remove_foreign_key :katello_subscription_facet_purpose_roles, :katello_purpose_roles
|
5
|
+
remove_foreign_key :katello_subscription_facet_purpose_usages, :katello_subscription_facets
|
6
|
+
remove_foreign_key :katello_subscription_facet_purpose_usages, :katello_purpose_usages
|
7
|
+
|
8
|
+
drop_table :katello_subscription_facet_purpose_roles
|
9
|
+
drop_table :katello_subscription_facet_purpose_usages
|
10
|
+
drop_table :katello_subscription_facet_purpose_addons
|
11
|
+
|
12
|
+
drop_table :katello_purpose_roles
|
13
|
+
drop_table :katello_purpose_usages
|
14
|
+
drop_table :katello_purpose_addons
|
15
|
+
|
16
|
+
add_column :katello_subscription_facets, :purpose_usage, :text
|
17
|
+
add_column :katello_subscription_facets, :purpose_role, :text
|
18
|
+
add_column :katello_subscription_facets, :purpose_addons, :text
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class DropRepoModuleStreamsTimestampNotNull < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
change_column :katello_repository_module_streams, :created_at, :datetime, :null => true
|
4
|
+
change_column :katello_repository_module_streams, :updated_at, :datetime, :null => true
|
5
|
+
change_column :katello_repository_module_streams, :repository_id, :integer, :null => true
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class ChangeRepositoryPasswordToText < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
change_column :katello_repositories, :upstream_password, :text
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
add_column :katello_repositories, :temp_upstream_password, :string, :limit => 1024
|
8
|
+
|
9
|
+
Katello::Repository.find_each do |repo|
|
10
|
+
next if repo.upstream_password.blank?
|
11
|
+
repo.update_column(:temp_upstream_password, repo.upstream_password.length > 1024 ? nil : repo.upstream_password)
|
12
|
+
end
|
13
|
+
|
14
|
+
remove_column :katello_repositories, :upstream_password
|
15
|
+
rename_column :katello_repositories, :temp_upstream_password, :upstream_password
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
class CreateRepositoryRoot < ActiveRecord::Migration[5.1]
|
2
|
+
MOVED_COLUMNS = %w(name created_at updated_at major minor gpg_key_id content_id arch label url unprotected
|
3
|
+
content_type product_id docker_upstream_name mirror_on_sync download_policy
|
4
|
+
verify_ssl_on_sync upstream_username upstream_password ostree_upstream_sync_policy ostree_upstream_sync_depth
|
5
|
+
deb_releases deb_components deb_architectures ignore_global_proxy ssl_ca_cert_id
|
6
|
+
ssl_client_cert_id ssl_client_key_id ignorable_content description docker_tags_whitelist).freeze
|
7
|
+
|
8
|
+
REPO_ASSOCIATIONS = %w(RepositoryErratum ContentViewRepository RepositoryRpm RepositorySrpm RepositoryFile RepositoryPuppetModule
|
9
|
+
RepositoryDockerManifest RepositoryDockerManifestList DockerTag DockerMetaTag RepositoryOstreeBranch RepositoryDeb
|
10
|
+
ContentFacetRepository RepositoryPackageGroup RepositoryModuleStream).freeze
|
11
|
+
|
12
|
+
REPO_ASSOCIATIONS.each do |association|
|
13
|
+
CreateRepositoryRoot.const_set("Fake#{association}",
|
14
|
+
Class.new(Katello::Model) do
|
15
|
+
self.table_name = "katello_#{association.underscore.pluralize}"
|
16
|
+
belongs_to :repository, :inverse_of => association.underscore.to_sym,
|
17
|
+
:class_name => "FakeRepository"
|
18
|
+
end
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
class FakeContentFacet < Katello::Model
|
23
|
+
self.table_name = 'katello_content_facets'
|
24
|
+
belongs_to :kickstart_repository, :class_name => "CreateRepositoryConfiguration::FakeRepository", :inverse_of => :kickstart_content_facets
|
25
|
+
end
|
26
|
+
|
27
|
+
class FakeHostgroup < Katello::Model
|
28
|
+
self.table_name = 'hostgroups'
|
29
|
+
belongs_to :kickstart_repository, :class_name => "CreateRepositoryConfiguration::FakeRepository", :inverse_of => :kickstart_hostgroups
|
30
|
+
end
|
31
|
+
|
32
|
+
class FakeRepository < Katello::Model
|
33
|
+
self.table_name = 'katello_repositories'
|
34
|
+
|
35
|
+
REPO_ASSOCIATIONS.each do |association|
|
36
|
+
has_many association.underscore.pluralize.to_sym, :class_name => "CreateRepositoryConfiguration::Fake#{association}", :dependent => :delete_all, :inverse_of => :repository
|
37
|
+
end
|
38
|
+
|
39
|
+
has_many :kickstart_content_facets, :class_name => "CreateRepositoryConfiguration::FakeContentFacet", :foreign_key => :kickstart_repository_id,
|
40
|
+
:inverse_of => :kickstart_repository, :dependent => :nullify
|
41
|
+
|
42
|
+
has_many :kickstart_hostgroups, :class_name => "CreateRepositoryConfiguration::FakeHostgroup", :foreign_key => :kickstart_repository_id,
|
43
|
+
:inverse_of => :kickstart_repository, :dependent => :nullify
|
44
|
+
end
|
45
|
+
|
46
|
+
class FakeRootRepository < Katello::Model
|
47
|
+
self.table_name = 'katello_root_repositories'
|
48
|
+
end
|
49
|
+
|
50
|
+
def up
|
51
|
+
create_root_table
|
52
|
+
|
53
|
+
with_repository_root_id do
|
54
|
+
create_and_associate_roots
|
55
|
+
FakeRepository.where(:root_id => nil).destroy_all
|
56
|
+
end
|
57
|
+
|
58
|
+
update_repository_table
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_and_associate_roots
|
62
|
+
FakeRepository.where(:library_instance_id => nil).each do |library_instance|
|
63
|
+
clones = FakeRepository.where(:library_instance_id => library_instance.id).to_a
|
64
|
+
root = create_root(library_instance)
|
65
|
+
(clones + [library_instance]).each do |repo|
|
66
|
+
repo.update_attributes!(:root_id => root.id)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def with_repository_root_id
|
72
|
+
add_column :katello_repositories, :root_id, :integer, :null => true
|
73
|
+
add_foreign_key "katello_repositories", "katello_root_repositories", :name => "katello_root_repositories_repo_id", :column => 'root_id'
|
74
|
+
|
75
|
+
yield
|
76
|
+
|
77
|
+
change_column :katello_repositories, :root_id, :integer, :null => false
|
78
|
+
end
|
79
|
+
|
80
|
+
def create_root(repo)
|
81
|
+
attributes = repo.attributes.slice(*MOVED_COLUMNS)
|
82
|
+
attributes[:checksum_type] = repo.checksum_type || repo.source_repo_checksum_type
|
83
|
+
FakeRootRepository.create!(attributes)
|
84
|
+
end
|
85
|
+
|
86
|
+
# rubocop:disable MethodLength
|
87
|
+
def create_root_table
|
88
|
+
create_table 'katello_root_repositories' do |t|
|
89
|
+
t.string 'name', limit: 255
|
90
|
+
t.datetime 'created_at', null: false
|
91
|
+
t.datetime 'updated_at', null: false
|
92
|
+
t.integer 'major'
|
93
|
+
t.string 'minor', limit: 255
|
94
|
+
t.integer 'gpg_key_id'
|
95
|
+
t.string 'content_id', limit: 255
|
96
|
+
t.string 'arch', limit: 255, default: 'noarch', null: false
|
97
|
+
t.string 'label', limit: 255, null: false
|
98
|
+
t.string 'url', limit: 1024
|
99
|
+
t.boolean 'unprotected', default: false, null: false
|
100
|
+
t.string 'content_type', limit: 255, default: 'yum', null: false
|
101
|
+
t.integer 'product_id'
|
102
|
+
t.string 'checksum_type', limit: 255
|
103
|
+
t.string 'pulp_scratchpad_checksum_type', limit: 255
|
104
|
+
t.string 'docker_upstream_name', limit: 255
|
105
|
+
t.boolean 'mirror_on_sync', default: true, null: false
|
106
|
+
t.string 'download_policy', limit: 255
|
107
|
+
t.boolean 'verify_ssl_on_sync', default: true, null: false
|
108
|
+
t.string 'upstream_username', limit: 255
|
109
|
+
t.string 'upstream_password', limit: 1024
|
110
|
+
t.string 'ostree_upstream_sync_policy', limit: 25
|
111
|
+
t.integer 'ostree_upstream_sync_depth'
|
112
|
+
t.string 'deb_releases', limit: 255
|
113
|
+
t.string 'deb_components', limit: 255
|
114
|
+
t.string 'deb_architectures', limit: 255
|
115
|
+
t.boolean 'ignore_global_proxy', default: false, null: false
|
116
|
+
t.integer 'ssl_ca_cert_id'
|
117
|
+
t.integer 'ssl_client_cert_id'
|
118
|
+
t.integer 'ssl_client_key_id'
|
119
|
+
t.text 'ignorable_content'
|
120
|
+
t.text 'docker_tags_whitelist'
|
121
|
+
t.text 'description'
|
122
|
+
end
|
123
|
+
|
124
|
+
add_foreign_key "katello_root_repositories", "katello_products", :name => "katello_root_repositories_product_id", :column => 'product_id'
|
125
|
+
add_foreign_key "katello_root_repositories", "katello_gpg_keys", :name => "katello_root_repositories_gpg_key_id", :column => 'gpg_key_id'
|
126
|
+
add_foreign_key "katello_root_repositories", "katello_gpg_keys", :name => "katello_root_repositories_ssl_ca_cert_id", :column => 'ssl_ca_cert_id'
|
127
|
+
add_foreign_key "katello_root_repositories", "katello_gpg_keys", :name => "katello_root_repositories_ssl_client_cert_id", :column => 'ssl_client_cert_id'
|
128
|
+
add_foreign_key "katello_root_repositories", "katello_gpg_keys", :name => "katello_root_repositories_ssl_client_key_id", :column => 'ssl_client_key_id'
|
129
|
+
end
|
130
|
+
|
131
|
+
def update_repository_table
|
132
|
+
rename_column :katello_repositories, :checksum_type, :saved_checksum_type
|
133
|
+
remove_column :katello_repositories, :source_repo_checksum_type
|
134
|
+
MOVED_COLUMNS.each do |column|
|
135
|
+
remove_column :katello_repositories, column
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
def down
|
140
|
+
fail ActiveRecord::IrreversibleMigration
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
5
|
+
#
|
6
|
+
|
7
|
+
User.as_anonymous_admin do
|
8
|
+
Bookmark.without_auditing do
|
9
|
+
bookmarks = [
|
10
|
+
{:name => "Without a Tag", :query => 'not has tag', :controller => "katello_docker_manifests"}
|
11
|
+
]
|
12
|
+
|
13
|
+
bookmarks.each do |input|
|
14
|
+
next if SeedHelper.audit_modified? Bookmark, input[:name], :controller => input[:controller]
|
15
|
+
b = Bookmark.find_or_create_by({ :public => true }.merge(input))
|
16
|
+
fail "Unable to create bookmark: #{format_errors b}" if b.nil? || b.errors.any?
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
UpgradeTask.define_tasks(:katello) do
|
2
|
+
[
|
3
|
+
{:name => 'katello:correct_repositories', :long_running => true, :skip_failure => true, :always_run => true},
|
4
|
+
{:name => 'katello:correct_puppet_environments', :long_running => true, :skip_failure => true, :always_run => true},
|
5
|
+
{:name => 'katello:clean_backend_objects', :long_running => true, :skip_failure => true, :always_run => true},
|
6
|
+
{:name => 'katello:upgrades:3.8:clear_checksum_type'},
|
7
|
+
{:name => 'katello:upgrades:3.9:migrate_sync_plans'}
|
8
|
+
]
|
9
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
if Katello.with_remote_execution?
|
2
|
+
User.as_anonymous_admin do
|
3
|
+
JobTemplate.without_auditing do
|
4
|
+
module_template = JobTemplate.find_by(name: 'Module Action - SSH Default')
|
5
|
+
if module_template
|
6
|
+
module_template.sync_feature('katello_module_stream_action')
|
7
|
+
module_template.organizations << Organization.unscoped.all if module_template.organizations.empty?
|
8
|
+
module_template.locations << Location.unscoped.all if module_template.locations.empty?
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -37,6 +37,9 @@
|
|
37
37
|
//= require "bastion_katello/debs/debs.module.js"
|
38
38
|
//= require_tree "./debs"
|
39
39
|
|
40
|
+
//= require "bastion_katello/module-streams/module-streams.module.js"
|
41
|
+
//= require_tree "./module-streams"
|
42
|
+
|
40
43
|
//= require "bastion_katello/errata/errata.module"
|
41
44
|
//= require_tree "./errata"
|
42
45
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
(function () {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @ngdoc service
|
6
|
+
* @name Bastion.common.service:ModuleStreamActions
|
7
|
+
*
|
8
|
+
* @description
|
9
|
+
* Provides common list of actions for module streams
|
10
|
+
*/
|
11
|
+
|
12
|
+
function ModuleStreamActions(translate) {
|
13
|
+
this.getActions = function() {
|
14
|
+
return [
|
15
|
+
{ action: 'enable', description: translate("Enable")},
|
16
|
+
{ action: 'disable', description: translate("Disable")},
|
17
|
+
{ action: 'install', description: translate("Install")},
|
18
|
+
{ action: 'update', description: translate("Update")},
|
19
|
+
{ action: 'remove', description: translate("Remove")}
|
20
|
+
];
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
angular.module('Bastion.common').service('ModuleStreamActions', ModuleStreamActions);
|
25
|
+
ModuleStreamActions.$inject = ['translate'];
|
26
|
+
})();
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</td>
|
35
35
|
<td bst-table-cell ng-hide="contextAdd">{{ subscription.quantity_consumed }}</td>
|
36
36
|
<td bst-table-cell>
|
37
|
-
<a
|
37
|
+
<a ng-href="/subscriptions/{{ subscription.id }}">
|
38
38
|
{{ subscription | subscriptionConsumedFilter }}
|
39
39
|
</a>
|
40
40
|
</td>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.content-hosts.controller:ContentHostsBulkModuleStreamsModalController
|
4
|
+
*
|
5
|
+
* @requires $scope
|
6
|
+
* @requires $window
|
7
|
+
* @requires $timeout
|
8
|
+
* @requires $uibModalInstance
|
9
|
+
* @requires HostBulkAction
|
10
|
+
* @requires Nutupane
|
11
|
+
* @requires BastionConfig
|
12
|
+
* @requires hostIds
|
13
|
+
* @requires ModuleStreamActions
|
14
|
+
*
|
15
|
+
* @description
|
16
|
+
* Provides the functionality for the content host module streams list and actions.
|
17
|
+
*/
|
18
|
+
|
19
|
+
angular.module('Bastion.content-hosts').controller('ContentHostsBulkModuleStreamsModalController',
|
20
|
+
['$scope', '$window', '$timeout', '$uibModalInstance', 'HostBulkAction', 'Nutupane', 'BastionConfig',
|
21
|
+
'hostIds', 'ModuleStreamActions',
|
22
|
+
function ($scope, $window, $timeout, $uibModalInstance, HostBulkAction, Nutupane,
|
23
|
+
BastionConfig, hostIds, ModuleStreamActions) {
|
24
|
+
$scope.cancel = function () {
|
25
|
+
$uibModalInstance.dismiss('cancel');
|
26
|
+
};
|
27
|
+
|
28
|
+
$scope.moduleStreamActions = ModuleStreamActions.getActions();
|
29
|
+
|
30
|
+
$scope.working = false;
|
31
|
+
|
32
|
+
$scope.moduleStreamsNutupane = new Nutupane(HostBulkAction, hostIds, 'moduleStreams');
|
33
|
+
$scope.controllerName = 'katello_module_streams';
|
34
|
+
$scope.moduleStreamsNutupane.masterOnly = true;
|
35
|
+
$scope.table = $scope.moduleStreamsNutupane.table;
|
36
|
+
$scope.remoteExecutionPresent = BastionConfig.remoteExecutionPresent;
|
37
|
+
$scope.remoteExecutionByDefault = BastionConfig.remoteExecutionByDefault;
|
38
|
+
|
39
|
+
$scope.moduleStreamActionFormValues = {
|
40
|
+
authenticityToken: $window.AUTH_TOKEN.replace(/"/g, ''),
|
41
|
+
remoteAction: 'module_stream_action',
|
42
|
+
search: hostIds.included.search
|
43
|
+
};
|
44
|
+
|
45
|
+
if (hostIds.included.ids) {
|
46
|
+
$scope.moduleStreamActionFormValues.hostIds = hostIds.included.ids.join(',');
|
47
|
+
}
|
48
|
+
|
49
|
+
$scope.performViaRemoteExecution = function(moduleSpec, actionType) {
|
50
|
+
$scope.working = true;
|
51
|
+
$scope.moduleStreamActionFormValues.moduleSpec = moduleSpec;
|
52
|
+
$scope.moduleStreamActionFormValues.moduleStreamAction = actionType;
|
53
|
+
|
54
|
+
$timeout(function () {
|
55
|
+
angular.element('#moduleStreamActionForm').submit();
|
56
|
+
}, 0);
|
57
|
+
};
|
58
|
+
}
|
59
|
+
]
|
60
|
+
);
|
@@ -28,7 +28,8 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkRepositorySe
|
|
28
28
|
nutupaneParams = {
|
29
29
|
'organization_id': CurrentOrganization,
|
30
30
|
'offset': 0,
|
31
|
-
'paged': true
|
31
|
+
'paged': true,
|
32
|
+
'enabled': true
|
32
33
|
};
|
33
34
|
|
34
35
|
nutupane = new Nutupane(RepositorySet, nutupaneParams,
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<div data-extend-template="components/views/bst-modal.html">
|
2
|
+
<h4 data-block="modal-header">Content Host Module Stream Management</h4>
|
3
|
+
<div data-block="modal-body">
|
4
|
+
<div bst-feature-flag="remote_actions">
|
5
|
+
<h3 translate ng-hide="selectedModuleStreamOption === 'available'">Available Module Streams</h3>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<form id="moduleStreamActionForm" method="post" action="/katello/remote_execution">
|
9
|
+
<input type="hidden" name="remote_action" ng-value="moduleStreamActionFormValues.remoteAction"/>
|
10
|
+
<input type="hidden" name="module_stream_action" ng-value="moduleStreamActionFormValues.moduleStreamAction"/>
|
11
|
+
<input type="hidden" name="module_spec" ng-value="moduleStreamActionFormValues.moduleSpec"/>
|
12
|
+
<input type="hidden" name="scoped_search" ng-value="errataActionFormValues.search"/>
|
13
|
+
<input type="hidden" name="host_ids" ng-value="moduleStreamActionFormValues.hostIds"/>
|
14
|
+
<input type="hidden" name="customize" ng-value="moduleStreamActionFormValues.customize"/>
|
15
|
+
<input type="hidden" name="authenticity_token" ng-value="moduleStreamActionFormValues.authenticityToken"/>
|
16
|
+
</form>
|
17
|
+
|
18
|
+
<div data-extend-template="layouts/partials/table.html">
|
19
|
+
|
20
|
+
<span data-block="no-rows-message" translate>
|
21
|
+
There are no Module Streams to display.
|
22
|
+
</span>
|
23
|
+
|
24
|
+
<span data-block="no-search-results-message" translate>
|
25
|
+
Your search returned zero Module Streams.
|
26
|
+
</span>
|
27
|
+
<div data-block="table">
|
28
|
+
<table class="table table-striped table-bordered" ng-class="{'table-mask': table.working}">
|
29
|
+
<thead>
|
30
|
+
<tr bst-table-head>
|
31
|
+
<th bst-table-column translate>Name</th>
|
32
|
+
<th bst-table-column translate>Stream</th>
|
33
|
+
<th bst-table-column translate>Actions</th>
|
34
|
+
</tr>
|
35
|
+
</thead>
|
36
|
+
|
37
|
+
<tbody>
|
38
|
+
<tr bst-table-row ng-repeat="module in table.rows">
|
39
|
+
<td bst-table-cell>
|
40
|
+
<a href="/module_streams?search=module_spec%3D{{ module.module_spec }}">
|
41
|
+
{{ module.name }}</a></td>
|
42
|
+
<td bst-table-cell>{{ module.stream }}</td>
|
43
|
+
<td bst-table-cell>
|
44
|
+
<div class="dropdown" ng-hide="!remoteExecutionPresent || denied('edit_content_hosts', contentHost)">
|
45
|
+
<button class="btn btn-default dropdown-toggle" ng-disabled="$scope.working" type="button" id="dropdownMenu1" data-toggle="dropdown"> Actions
|
46
|
+
<span class="caret"></span>
|
47
|
+
</button>
|
48
|
+
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
49
|
+
<li role="presentation">
|
50
|
+
<label class="drop-down-check-box">
|
51
|
+
<input id="customize" name="customize" ng-model="moduleStreamActionFormValues.customize" type="checkbox"/>
|
52
|
+
<span translate>Customize</span>
|
53
|
+
</label>
|
54
|
+
</li>
|
55
|
+
<li role="presentation" class="divider"></li>
|
56
|
+
|
57
|
+
<li role="presentation" ng-repeat="action in moduleStreamActions"><a role="menuitem" tabindex="-1" ng-click="performViaRemoteExecution(module.module_spec, action.action)" href="#">{{ action.description}}</a></li>
|
58
|
+
</ul>
|
59
|
+
</div>
|
60
|
+
</td>
|
61
|
+
</tr>
|
62
|
+
</tbody>
|
63
|
+
</table>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
<div data-block="modal-footer">
|
68
|
+
<button class="btn btn-default" ng-click="cancel()" translate>Cancel</button>
|
69
|
+
</div>
|
70
|
+
</div>
|