katello 3.13.4 → 3.14.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/controllers/katello/api/registry/registry_proxies_controller.rb +25 -16
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +26 -21
- data/app/controllers/katello/api/v2/ansible_collections_controller.rb +6 -0
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +8 -2
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +8 -1
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +3 -3
- data/app/controllers/katello/api/v2/katello_ping_controller.rb +24 -0
- data/app/controllers/katello/api/v2/module_streams_controller.rb +21 -0
- data/app/controllers/katello/api/v2/package_groups_controller.rb +5 -0
- data/app/controllers/katello/api/v2/packages_controller.rb +16 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +7 -4
- data/app/controllers/katello/api/v2/srpms_controller.rb +1 -1
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +5 -1
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +7 -5
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +36 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +12 -0
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +55 -0
- data/app/lib/actions/katello/capsule_content/sync.rb +13 -64
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +40 -0
- data/app/lib/actions/katello/content_view/publish.rb +0 -3
- data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +1 -3
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +21 -0
- data/app/lib/actions/katello/repository/create.rb +8 -0
- data/app/lib/actions/katello/repository/import_upload.rb +13 -12
- data/app/lib/actions/katello/repository/metadata_generate.rb +2 -2
- data/app/lib/actions/katello/repository/update.rb +9 -0
- data/app/lib/actions/katello/repository/upload_files.rb +4 -11
- data/app/lib/actions/pulp/consumer/sync_capsule.rb +4 -0
- data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +16 -0
- data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +25 -0
- data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +34 -0
- data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +35 -0
- data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +15 -0
- data/app/lib/actions/{katello/capsule_content → pulp/orphan_cleanup}/remove_unneeded_repos.rb +2 -2
- data/app/lib/actions/pulp/repository/import_upload.rb +7 -11
- data/app/lib/actions/pulp3/abstract_async_task.rb +7 -7
- data/app/lib/actions/pulp3/capsule_content/generate_metadata.rb +32 -0
- data/app/lib/actions/pulp3/capsule_content/refresh_distribution.rb +31 -0
- data/app/lib/actions/pulp3/capsule_content/sync.rb +26 -0
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +20 -0
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +15 -15
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +3 -1
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +36 -0
- data/app/lib/actions/pulp3/orchestration/repository/refresh_repos.rb +24 -0
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +25 -0
- data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb +20 -0
- data/app/lib/actions/pulp3/orphan_cleanup/remove_unneeded_repos.rb +16 -0
- data/app/lib/actions/pulp3/repository/create_publication.rb +1 -5
- data/app/lib/actions/pulp3/repository/import_upload.rb +21 -0
- data/app/lib/actions/pulp3/repository/save_artifact.rb +19 -0
- data/app/lib/actions/pulp3/repository/save_version.rb +3 -2
- data/app/lib/actions/pulp3/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/repository/upload_file.rb +76 -0
- data/app/lib/katello/api/v2/rendering.rb +1 -2
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +34 -2
- data/app/lib/katello/errors.rb +21 -0
- data/app/lib/katello/resources/candlepin/consumer.rb +0 -9
- data/app/lib/katello/resources/candlepin/owner.rb +0 -5
- data/app/lib/katello/resources/candlepin/product.rb +2 -6
- data/app/lib/katello/resources/registry.rb +25 -10
- data/app/lib/katello/util/filter_clause_generator.rb +1 -1
- data/app/lib/katello/util/module_stream_clause_generator.rb +49 -0
- data/app/lib/katello/util/package_clause_generator.rb +1 -1
- data/app/models/katello/ansible_collection.rb +5 -8
- data/app/models/katello/ansible_collection_tag.rb +8 -0
- data/app/models/katello/ansible_tag.rb +8 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +16 -14
- data/app/models/katello/concerns/pulp_database_unit.rb +27 -4
- data/app/models/katello/concerns/search_by_repository_name.rb +4 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +44 -20
- data/app/models/katello/content_view_docker_filter.rb +15 -2
- data/app/models/katello/content_view_filter.rb +28 -8
- data/app/models/katello/content_view_module_stream_filter.rb +14 -0
- data/app/models/katello/content_view_module_stream_filter_rule.rb +11 -0
- data/app/models/katello/content_view_package_filter.rb +18 -8
- data/app/models/katello/content_view_version.rb +7 -2
- data/app/models/katello/deb.rb +0 -8
- data/app/models/katello/docker_manifest.rb +0 -8
- data/app/models/katello/docker_manifest_list.rb +0 -8
- data/app/models/katello/docker_meta_tag.rb +38 -20
- data/app/models/katello/docker_tag.rb +22 -33
- data/app/models/katello/erratum.rb +10 -8
- data/app/models/katello/file_unit.rb +1 -13
- data/app/models/katello/glue/candlepin/owner.rb +0 -5
- data/app/models/katello/glue/candlepin/product.rb +1 -5
- data/app/models/katello/glue/pulp/repo.rb +1 -1
- data/app/models/katello/host/content_facet.rb +6 -0
- data/app/models/katello/host_collection.rb +4 -0
- data/app/models/katello/installed_package.rb +4 -0
- data/app/models/katello/module_stream.rb +1 -12
- data/app/models/katello/ostree_branch.rb +0 -7
- data/app/models/katello/package_group.rb +0 -7
- data/app/models/katello/ping.rb +10 -3
- data/app/models/katello/pool.rb +11 -1
- data/app/models/katello/puppet_module.rb +0 -7
- data/app/models/katello/repository.rb +15 -6
- data/app/models/katello/repository_docker_meta_tag.rb +7 -0
- data/app/models/katello/repository_docker_tag.rb +7 -0
- data/app/models/katello/repository_file_unit.rb +7 -0
- data/app/models/katello/rhsm_fact_name.rb +5 -1
- data/app/models/katello/rhsm_fact_parser.rb +17 -1
- data/app/models/katello/root_repository.rb +11 -6
- data/app/models/katello/rpm.rb +0 -8
- data/app/models/katello/srpm.rb +0 -8
- data/app/models/katello/upstream_pool.rb +2 -0
- data/app/models/katello/yum_metadata_file.rb +0 -4
- data/app/models/setting/content.rb +124 -128
- data/app/services/katello/candlepin/consumer.rb +0 -1
- data/app/services/katello/pulp/content.rb +11 -4
- data/app/services/katello/pulp/docker_tag.rb +0 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +4 -0
- data/app/services/katello/pulp/repository.rb +53 -0
- data/app/services/katello/pulp/repository/file.rb +1 -1
- data/app/services/katello/pulp/repository/puppet.rb +8 -1
- data/app/services/katello/pulp/repository/yum.rb +42 -9
- data/app/services/katello/pulp/smart_proxy_repository.rb +13 -96
- data/app/services/katello/pulp3/ansible_collection.rb +7 -3
- data/app/services/katello/pulp3/content.rb +60 -0
- data/app/services/katello/pulp3/docker_blob.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest_list.rb +1 -1
- data/app/services/katello/pulp3/docker_tag.rb +2 -2
- data/app/services/katello/pulp3/file_unit.rb +7 -1
- data/app/services/katello/pulp3/pulp_content_unit.rb +15 -5
- data/app/services/katello/pulp3/repository.rb +301 -24
- data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
- data/app/services/katello/pulp3/repository/docker.rb +54 -9
- data/app/services/katello/pulp3/repository/file.rb +8 -0
- data/app/services/katello/pulp3/repository/yum.rb +61 -0
- data/app/services/katello/pulp3/smart_proxy_repository.rb +38 -0
- data/app/services/katello/repository_type_manager.rb +7 -0
- data/app/services/katello/smart_proxy_helper.rb +50 -0
- data/app/views/foreman/smart_proxies/_content_tab.html.erb +1 -1
- data/app/views/katello/api/v2/ansible_collections/base.json.rabl +5 -0
- data/app/views/katello/api/v2/ansible_collections/show.json.rabl +7 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -0
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/base.json.rabl +5 -0
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +2 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/erratum.json.rabl +2 -0
- data/app/views/katello/api/v2/{ping → katello_ping}/server_status.json.rabl +0 -0
- data/app/views/katello/api/v2/{ping → katello_ping}/show.json.rabl +0 -0
- data/app/views/katello/api/v2/{ping → katello_ping}/version.json.rabl +0 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
- data/app/views/katello/api/v2/subscriptions/permissions.rabl +11 -0
- data/config/katello.yaml.example +9 -0
- data/config/routes.rb +2 -1
- data/config/routes/api/v2.rb +2 -2
- data/db/migrate/20180920214134_create_repository_root.rb +1 -1
- data/db/migrate/20190730183518_add_docker_tag_join_table.rb +25 -0
- data/db/migrate/20190730203334_add_docker_meta_tag_join_table.rb +25 -0
- data/db/migrate/20190814025338_create_content_view_module_stream_filter_rules.rb +13 -0
- data/db/migrate/20190816162733_rename_ansible_collection_whitelist_to_requirements.rb +5 -0
- data/db/migrate/20190822144300_add_ansible_fields.rb +18 -0
- data/db/migrate/20190912210927_rename_repository_file_unit.rb +12 -0
- data/engines/bastion/README.md +2 -2
- data/engines/bastion/app/assets/javascripts/bastion/components/bst-edit.directive.js +2 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +20 -6
- data/engines/bastion/app/assets/javascripts/bastion/components/views/bst-modal.html +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/layouts/partials/table.html +2 -1
- data/engines/bastion/app/assets/stylesheets/bastion/overrides.scss +1 -0
- data/engines/bastion/lib/bastion.rb +1 -0
- data/engines/bastion_katello/README.md +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ansible-collections/ansible-collections.factory.js +28 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ansible-collections/ansible-collections.module.js +15 -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/capsule-content/capsule-content.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-destroy-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +4 -16
- 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/views/content-hosts.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +1 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +47 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-module-stream-filter.controller.js +68 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-helper.service.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-rule-matching-package-modal.controller.js +37 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filters.controller.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/module-stream-list-filter.controller.js +73 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-filter.controller.js +14 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-details.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-rule-matching-package-modal.html +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter-details.html +41 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter.html +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +44 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +12 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +21 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ansible-collections.html +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/download-policy.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +24 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +29 -15
- 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 +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +8 -0
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +8 -8
- data/lib/katello/engine.rb +0 -4
- data/lib/katello/plugin.rb +19 -1
- data/lib/katello/repository_types/yum.rb +2 -0
- data/lib/katello/tasks/delete_orphaned_content.rake +1 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/package.json +9 -5
- data/webpack/__mocks__/foremanReact/common/helpers.js +4 -1
- data/webpack/__mocks__/foremanReact/components/PermissionDenied/index.js +2 -0
- data/webpack/components/Content/ContentPage.js +55 -0
- data/webpack/{scenes/ModuleStreams/ModuleStreamsTable.js → components/Content/ContentTable.js} +9 -8
- data/webpack/components/Content/Details/ContentDetailInfo.js +33 -0
- data/webpack/{scenes/ModuleStreams/Details/Repositories/ModuleStreamDetailRepositories.js → components/Content/Details/ContentDetailRepositories.js} +4 -4
- data/webpack/{scenes/ModuleStreams/Details/Repositories/TableSchema.js → components/Content/Details/ContentDetailRepositoryTableSchema.js} +1 -1
- data/webpack/components/Content/Details/ContentDetails.js +70 -0
- data/webpack/components/Content/Details/__tests__/ContentDetailInfo.test.js +28 -0
- data/webpack/components/Content/Details/__tests__/ContentDetailRepositories.test.js +22 -0
- data/webpack/components/Content/Details/__tests__/ContentDetails.test.js +64 -0
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetailInfo.test.js.snap +39 -0
- data/webpack/{scenes/ModuleStreams/Details/Repositories/__tests__/__snapshots__/ModuleStreamDetailRepositories.test.js.snap → components/Content/Details/__tests__/__snapshots__/ContentDetailRepositories.test.js.snap} +3 -9
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +137 -0
- data/webpack/components/Content/__tests__/ContentPage.test.js +36 -0
- data/webpack/components/Content/__tests__/ContentTable.test.js +40 -0
- data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +70 -0
- data/webpack/components/Content/__tests__/__snapshots__/ContentTable.test.js.snap +33 -0
- data/webpack/components/Search/index.js +6 -7
- data/webpack/components/SelectOrg/SelectOrgAction.js +20 -22
- data/webpack/containers/Application/config.js +10 -0
- data/webpack/containers/Application/overrides.scss +5 -0
- data/webpack/move_to_foreman/common/helpers.js +1 -1
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js +5 -2
- data/webpack/move_to_foreman/components/common/table/formatters/EntitlementsInlineEditFormatter.js +9 -2
- data/webpack/move_to_foreman/components/common/table/formatters/collapseableAndSelectionCellFormatter.js +2 -0
- data/webpack/move_to_foreman/components/common/table/formatters/selectionCellFormatter.js +3 -0
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +1 -0
- data/webpack/redux/OrganizationProducts/OrganizationProductsActions.js +10 -10
- data/webpack/redux/actions/RedHatRepositories/__tests__/enabled.test.js +39 -0
- data/webpack/redux/actions/RedHatRepositories/enabled.js +24 -24
- data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +23 -22
- data/webpack/redux/actions/RedHatRepositories/sets.js +17 -21
- data/webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js +1 -0
- data/webpack/redux/reducers/RedHatRepositories/__tests__/sets.test.js +1 -1
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +1 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +42 -33
- data/webpack/redux/reducers/RedHatRepositories/sets.fixtures.js +2 -1
- data/webpack/redux/reducers/RedHatRepositories/sets.js +2 -1
- data/webpack/redux/reducers/index.js +4 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsActions.js +30 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsConstants.js +3 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsPage.js +80 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js +39 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js +60 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTables.scss +0 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetails.js +91 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js +23 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsConstants.js +3 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsReducer.js +30 -0
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionsSchema.js +35 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailInfo.test.js +16 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetails.fixtures.js +25 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetails.test.js +29 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsActions.test.js +41 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsReducer.test.js +33 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailInfo.test.js.snap +83 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetails.test.js.snap +190 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailsActions.test.js.snap +54 -0
- data/webpack/scenes/AnsibleCollections/Details/__tests__/__snapshots__/AnsibleCollectionDetailsReducer.test.js.snap +50 -0
- data/webpack/scenes/AnsibleCollections/Details/index.js +17 -0
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionPage.test.js +25 -0
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollections.fixtures.js +52 -0
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsActions.test.js +48 -0
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsReducer.test.js +46 -0
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsTable.test.js +27 -0
- data/webpack/scenes/AnsibleCollections/__tests__/__snapshots__/AnsibleCollectionPage.test.js.snap +73 -0
- data/webpack/scenes/AnsibleCollections/__tests__/__snapshots__/AnsibleCollectionsTable.test.js.snap +81 -0
- data/webpack/scenes/AnsibleCollections/index.js +17 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +56 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +7 -71
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +9 -11
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailInfo.test.js +5 -3
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +453 -507
- data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +10 -11
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +12 -33
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +2 -4
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsActions.test.js +8 -9
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +5 -3
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +83 -65
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +1 -1
- data/webpack/scenes/Organizations/OrganizationActions.js +27 -32
- data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +12 -12
- data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +1 -1
- data/webpack/scenes/Products/ProductActions.js +10 -10
- data/webpack/scenes/Products/__tests__/ProductActions.test.js +6 -6
- data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +118 -0
- data/webpack/scenes/RedHatRepositories/__tests__/RedHatRepositoriesPage.test.js +51 -0
- data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +117 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +44 -45
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/EnabledRepository.test.js +84 -5
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +46 -47
- data/webpack/scenes/RedHatRepositories/helpers.js +1 -1
- data/webpack/scenes/RedHatRepositories/index.js +2 -101
- data/webpack/scenes/Settings/Tables/TableActions.js +42 -43
- data/webpack/scenes/Settings/Tables/__tests__/TableActions.test.js +18 -18
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +10 -10
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +7 -6
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailActions.test.js +8 -8
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +142 -113
- data/webpack/scenes/Subscriptions/Manifest/Manifest.scss +8 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +40 -40
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +24 -24
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +0 -199
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +52 -46
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +21 -2
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +64 -42
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +21 -21
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +20 -21
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -15
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +12 -13
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +11 -14
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +21 -23
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +35 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +13 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +7 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +18 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +5 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +26 -5
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +9 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +27 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTableHelpers.test.js +5 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UpdateDialog.js +9 -9
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +8 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +28 -23
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +0 -135
- data/webpack/scenes/Subscriptions/index.js +2 -0
- data/webpack/scenes/Tasks/TaskActions.js +36 -31
- data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +35 -47
- metadata +146 -67
- data/app/controllers/katello/api/v2/ping_controller.rb +0 -24
- data/app/lib/actions/katello/capsule_content/create_repos.rb +0 -30
- data/app/lib/actions/katello/capsule_content/remove_orphans.rb +0 -21
- data/app/lib/actions/pulp/repository/refresh_needed.rb +0 -37
- data/app/lib/katello/resources/candlepin/owner_info.rb +0 -18
- data/app/models/katello/glue/candlepin/owner_info.rb +0 -41
- data/app/models/katello/repository_file.rb +0 -7
- data/app/overrides/add_subscription_status.rb +0 -6
- data/app/views/overrides/hosts/_subscription_link.html.erb +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-events.controller.js +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-events.html +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js +0 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +0 -58
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-product-details.controller.js +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-products.controller.js +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +0 -120
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-products.html +0 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/grouped.filter.js +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-details.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-history.controller.js +0 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +0 -261
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest.controller.js +0 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-delete-modal.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html +0 -46
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +0 -92
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest.html +0 -33
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js +0 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptionAttachAmountFilter.filter.js +0 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.controller.js +0 -73
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +0 -110
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html +0 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions-delete-bulk.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +0 -63
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailInfo.js +0 -52
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +0 -16
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js
CHANGED
@@ -32,7 +32,7 @@ angular.module('Bastion.packages').controller('PackagesController',
|
|
32
32
|
|
33
33
|
$scope.repository = {name: translate('All Repositories'), id: 'all'};
|
34
34
|
|
35
|
-
Repository.queryUnpaged({'organization_id': CurrentOrganization, 'content_type': 'yum'}, function (response) {
|
35
|
+
Repository.queryUnpaged({'organization_id': CurrentOrganization, 'content_type': 'yum', 'with_content': 'rpm'}, function (response) {
|
36
36
|
$scope.repositories = [$scope.repository];
|
37
37
|
$scope.repositories = $scope.repositories.concat(response.results);
|
38
38
|
|
@@ -157,6 +157,18 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
|
|
157
157
|
$scope.progress.uploading = false;
|
158
158
|
};
|
159
159
|
|
160
|
+
$scope.handleFiles = function (element) {
|
161
|
+
var reader = new FileReader();
|
162
|
+
$scope.uploadedFile = true;
|
163
|
+
reader.addEventListener("loadend", function() {
|
164
|
+
var data = reader.result;
|
165
|
+
/* eslint-disable camelcase */
|
166
|
+
$scope.repository.ansible_collection_requirements = data;
|
167
|
+
$scope.$apply();
|
168
|
+
});
|
169
|
+
reader.readAsText(element.files[0]);
|
170
|
+
};
|
171
|
+
|
160
172
|
$scope.checksums = Checksum.checksums;
|
161
173
|
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
162
174
|
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
@@ -18,13 +18,14 @@
|
|
18
18
|
* @requires File
|
19
19
|
* @requires Deb
|
20
20
|
* @requires ModuleStream
|
21
|
+
* @requires AnsibleCollection
|
21
22
|
*
|
22
23
|
* @description
|
23
24
|
* Provides the functionality for the repository details pane.
|
24
25
|
*/
|
25
26
|
angular.module('Bastion.repositories').controller('RepositoryManageContentController',
|
26
|
-
['$scope', '$state', 'translate', 'Notification', 'Nutupane', 'Repository', 'Package', 'PackageGroup', 'PuppetModule', 'DockerManifest', 'DockerManifestList', 'DockerTag', 'OstreeBranch', 'File', 'Deb', 'ModuleStream',
|
27
|
-
function ($scope, $state, translate, Notification, Nutupane, Repository, Package, PackageGroup, PuppetModule, DockerManifest, DockerManifestList, DockerTag, OstreeBranch, File, Deb, ModuleStream) {
|
27
|
+
['$scope', '$state', 'translate', 'Notification', 'Nutupane', 'Repository', 'Package', 'PackageGroup', 'PuppetModule', 'DockerManifest', 'DockerManifestList', 'DockerTag', 'OstreeBranch', 'File', 'Deb', 'ModuleStream', 'AnsibleCollection',
|
28
|
+
function ($scope, $state, translate, Notification, Nutupane, Repository, Package, PackageGroup, PuppetModule, DockerManifest, DockerManifestList, DockerTag, OstreeBranch, File, Deb, ModuleStream, AnsibleCollection) {
|
28
29
|
var contentTypes;
|
29
30
|
|
30
31
|
function success(response, selected) {
|
@@ -63,7 +64,8 @@ angular.module('Bastion.repositories').controller('RepositoryManageContentContro
|
|
63
64
|
'ostree-branches': { type: OstreeBranch, controllerName: 'katello_ostree_branches' },
|
64
65
|
'files': { type: File, controllerName: 'katello_files' },
|
65
66
|
'debs': { type: Deb, controllerName: 'katello_debs' },
|
66
|
-
'module-streams': { type: ModuleStream, controllerName: 'katello_module_streams' }
|
67
|
+
'module-streams': { type: ModuleStream, controllerName: 'katello_module_streams' },
|
68
|
+
'ansible-collections': { type: AnsibleCollection, controllerName: 'katello_ansible_collections'}
|
67
69
|
};
|
68
70
|
|
69
71
|
$scope.contentNutupane = new Nutupane(contentTypes[$scope.currentState].type, {
|
@@ -27,6 +27,11 @@
|
|
27
27
|
<dd>{{ repository.content_type }}</dd>
|
28
28
|
</dl>
|
29
29
|
|
30
|
+
<div class="alert alert-warning" ng-if="repository.content_type === 'ostree' || repository.content_type === 'puppet'">
|
31
|
+
<span class="pficon pficon-warning-triangle-o"></span>
|
32
|
+
<strong>Deprecation Warning: </strong>Puppet and OSTree will no longer be supported in Katello 3.16.
|
33
|
+
</div>
|
34
|
+
|
30
35
|
<div class="divider"></div>
|
31
36
|
<h4 translate>Sync Settings</h4>
|
32
37
|
<dl class="dl-horizontal dl-horizontal-left">
|
@@ -76,10 +81,23 @@
|
|
76
81
|
</span>
|
77
82
|
|
78
83
|
<span ng-if="repository.content_type == 'ansible_collection'">
|
79
|
-
|
80
|
-
<dd
|
84
|
+
<dt translate>Upload Requirements</dt>
|
85
|
+
<dd>
|
86
|
+
<input id="requirementFile" type="file" name="file_path" onclick="this.value = null" onchange="angular.element(this).scope().handleFiles(this)"/>
|
87
|
+
<p bst-alert='info' ng-show="repository.content_type == 'ansible_collection'">
|
88
|
+
<span translate>
|
89
|
+
You can upload a requirements.yml file above to auto-fill contents <b>OR</b> paste contents of <a ng-href="https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#install-multiple-collections-with-a-requirements-file" target="_blank"> Requirements.yml </a>below.
|
90
|
+
</span>
|
91
|
+
</p>
|
92
|
+
</dd>
|
93
|
+
</span>
|
94
|
+
|
95
|
+
<span ng-if="repository.content_type == 'ansible_collection'">
|
96
|
+
<dt translate>Requirements</dt>
|
97
|
+
<dd class="overflow-span" bst-edit-textarea="repository.ansible_collection_requirements"
|
81
98
|
on-save="save(repository)"
|
82
|
-
readonly="denied('edit_products', product)"
|
99
|
+
readonly="denied('edit_products', product)"
|
100
|
+
edit-trigger="uploadedFile">
|
83
101
|
</dd>
|
84
102
|
</span>
|
85
103
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<span page-title ng-model="repository">{{ 'Manage Ansible Collections for Repository:' | translate }} {{ repository.name }}</span>
|
2
|
+
|
3
|
+
<div data-extend-template="layouts/partials/table.html">
|
4
|
+
<div data-block="table">
|
5
|
+
<table class="table table-striped table-bordered" >
|
6
|
+
|
7
|
+
<thead>
|
8
|
+
<tr bst-table-head>
|
9
|
+
<th bst-table-column><span translate>Collection Name</span></th>
|
10
|
+
<th bst-table-column><span translate>Author</span></th>
|
11
|
+
<th bst-table-column><span translate>Version</span></th>
|
12
|
+
<th bst-table-column><span translate>Checksum</span></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
|
16
|
+
<tbody>
|
17
|
+
<tr bst-table-row ng-repeat="collection in table.rows">
|
18
|
+
<td bst-table-cell>
|
19
|
+
<a href="ansible_collections/{{ collection.id }}">
|
20
|
+
{{ collection.name }}
|
21
|
+
</a>
|
22
|
+
</td>
|
23
|
+
<td bst-table-cell>
|
24
|
+
{{ collection.namespace }}
|
25
|
+
</td>
|
26
|
+
<td bst-table-cell>
|
27
|
+
{{ collection.version }}
|
28
|
+
</td>
|
29
|
+
<td bst-table-cell>
|
30
|
+
{{ collection.checksum }}
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
</tbody>
|
34
|
+
</table>
|
35
|
+
</div>
|
36
|
+
</div>
|
@@ -12,7 +12,7 @@ angular.module('Bastion.repositories').service('DownloadPolicy',
|
|
12
12
|
|
13
13
|
this.downloadPolicies = {
|
14
14
|
'on_demand': translate('On Demand'),
|
15
|
-
'background': translate('Background'),
|
15
|
+
'background': translate('Background (Deprecated)'),
|
16
16
|
'immediate': translate('Immediate')
|
17
17
|
};
|
18
18
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
* @name Bastion.repositories.controller:NewRepositoryController
|
4
4
|
*
|
5
5
|
* @requires $scope
|
6
|
+
* @requires $sce
|
6
7
|
* @requires Repository
|
7
8
|
* @requires Product
|
8
9
|
* @requires ContentCredential
|
@@ -23,8 +24,8 @@
|
|
23
24
|
* Controls the creation of an empty Repository object for use by sub-controllers.
|
24
25
|
*/
|
25
26
|
angular.module('Bastion.repositories').controller('NewRepositoryController',
|
26
|
-
['$scope', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'YumContentUnits', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture', 'RepositoryTypesService', 'HttpProxy', 'HttpProxyPolicy',
|
27
|
-
function ($scope, Repository, Product, ContentCredential, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, YumContentUnits, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture, RepositoryTypesService, HttpProxy, HttpProxyPolicy) {
|
27
|
+
['$scope', '$sce', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'YumContentUnits', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture', 'RepositoryTypesService', 'HttpProxy', 'HttpProxyPolicy',
|
28
|
+
function ($scope, $sce, Repository, Product, ContentCredential, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, YumContentUnits, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture, RepositoryTypesService, HttpProxy, HttpProxyPolicy) {
|
28
29
|
|
29
30
|
function success() {
|
30
31
|
Notification.setSuccessMessage(translate('Repository %s successfully created.').replace('%s', $scope.repository.name));
|
@@ -87,6 +88,17 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
87
88
|
}
|
88
89
|
});
|
89
90
|
|
91
|
+
$scope.handleFiles = function (element) {
|
92
|
+
var reader = new FileReader();
|
93
|
+
reader.addEventListener("loadend", function() {
|
94
|
+
var data = reader.result;
|
95
|
+
/* eslint-disable camelcase */
|
96
|
+
$scope.repository.ansible_collection_requirements = data;
|
97
|
+
$scope.$apply();
|
98
|
+
});
|
99
|
+
reader.readAsText(element.files[0]);
|
100
|
+
};
|
101
|
+
|
90
102
|
ContentCredential.queryUnpaged(function (contentCredentials) {
|
91
103
|
$scope.contentCredentials = contentCredentials.results;
|
92
104
|
});
|
@@ -123,6 +135,16 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
123
135
|
$scope.policies = HttpProxyPolicy.policies;
|
124
136
|
$scope.proxies = [];
|
125
137
|
|
138
|
+
$scope.collectionURLPopover = $sce.trustAsHtml("You can sync collections utilizing just the url:<br/>" +
|
139
|
+
"<b>1. For all collections in Ansible Galaxy:</b><br/>" +
|
140
|
+
"https://galaxy.ansible.com/api/v2/collections <br/>" +
|
141
|
+
"<b>2. For specific collection with URL filtering:</b><br/>" +
|
142
|
+
"https://galaxy.ansible.com/api/v2/collections/testing/k8s_demo_collection <br/>" +
|
143
|
+
"<b>3. For specific collections with Requirements.yml:</b><br/>" +
|
144
|
+
"Use base URL https://galaxy.ansible.com/ and specify requirements.yml below to specify collections");
|
145
|
+
|
146
|
+
$scope.requirementPopover = $sce.trustAsHtml("To learn more about requirement.yml specification, visit <a href='https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#install-multiple-collections-with-a-requirements-file' target=\"_blank\">documentation </a>");
|
147
|
+
|
126
148
|
$scope.displayHttpProxyPolicyName = function (policy) {
|
127
149
|
return HttpProxyPolicy.displayHttpProxyPolicyName(policy);
|
128
150
|
};
|
@@ -35,10 +35,15 @@
|
|
35
35
|
id="content_type"
|
36
36
|
name="content_type"
|
37
37
|
ng-model="repository.content_type"
|
38
|
-
ng-options="type.name as type.name for type in repositoryTypes">
|
38
|
+
ng-options="type.name as type.name.replace('_',' ') for type in repositoryTypes">
|
39
39
|
</select>
|
40
40
|
</div>
|
41
41
|
|
42
|
+
<div class="alert alert-warning" ng-if="repository.content_type === 'ostree' || repository.content_type === 'puppet'">
|
43
|
+
<span class="pficon pficon-warning-triangle-o"></span>
|
44
|
+
<strong>Deprecation Warning: </strong>Puppet and OSTree will no longer be supported in Katello 3.16.
|
45
|
+
</div>
|
46
|
+
|
42
47
|
<div bst-form-group label="{{ 'Restrict to Architecture' | translate }}" ng-show="repository.content_type === 'yum'">
|
43
48
|
<select id="architecture_restricted"
|
44
49
|
name="architecture_restricted"
|
@@ -52,7 +57,7 @@
|
|
52
57
|
</div>
|
53
58
|
<div ng-show="repository.content_type !== undefined">
|
54
59
|
<h4 translate> Sync Settings </h4>
|
55
|
-
<div bst-form-group label="{{ 'Upstream URL' | translate }}">
|
60
|
+
<div bst-form-group label="{{ 'Upstream URL' | translate }} ">
|
56
61
|
<input id="url"
|
57
62
|
name="url"
|
58
63
|
ng-model="repository.url"
|
@@ -61,21 +66,30 @@
|
|
61
66
|
URL of the registry you want to sync. Example: https://registry-1.docker.io/
|
62
67
|
</p>
|
63
68
|
<p class="help-block" ng-show="repository.content_type === 'ansible_collection'" translate>
|
64
|
-
|
69
|
+
Content synced depends on the specifity of the URL and/or the optional requirements.yaml specified below <a class="fa fa-question-circle" ng-show="repository.content_type === 'ansible_collection'"
|
70
|
+
uib-popover-html="collectionURLPopover" popover-class="popover-large" popover-trigger="'outsideClick'" popover-append-to-body="true" popover-title="Upstream URL">
|
71
|
+
</a>
|
65
72
|
</p>
|
66
73
|
|
67
74
|
</div>
|
68
75
|
|
69
|
-
<div ng-show="repository.content_type === 'ansible_collection'" bst-form-group label="{{ '
|
70
|
-
<textarea id="
|
71
|
-
name="
|
72
|
-
ng-model="repository.
|
76
|
+
<div ng-show="repository.content_type === 'ansible_collection'" bst-form-group label="{{ 'Requirements.yml' | translate }}">
|
77
|
+
<textarea id="ansible_collection_requirements"
|
78
|
+
name="ansible_collection_requirements"
|
79
|
+
ng-model="repository.ansible_collection_requirements"
|
80
|
+
rows="10"
|
81
|
+
placeholder= "{{ 'You can upload a requirements.yml file below to auto-fill contents or paste contents of requirement.yml here' | translate }}"
|
73
82
|
type="text"/>
|
74
|
-
<p class="help-block" translate>
|
75
|
-
Name / Comma-separated names of ansible collection(s) you want to sync from the galaxy. ex: newswangerd.collection_demo, devoperate.base
|
76
|
-
</p>
|
77
83
|
</div>
|
78
84
|
|
85
|
+
<div class="form-group" ng-show="repository.content_type === 'ansible_collection'">
|
86
|
+
<input id="requirementFile" type="file" name="file_path" onclick="this.value = null" onchange="angular.element(this).scope().handleFiles(this)"/>
|
87
|
+
<p class="help-block" translate>Upload Requirements.yml file <a class="fa fa-question-circle" ng-show="repository.content_type === 'ansible_collection'"
|
88
|
+
uib-popover-html="requirementPopover" popover-class="popover-large" popover-trigger="'outsideClick'" popover-append-to-body="true">
|
89
|
+
</a></p>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
79
93
|
<div ng-show="repository.content_type === 'deb'" bst-form-group label="{{ 'Releases' | translate }}">
|
80
94
|
<input id="deb_releases"
|
81
95
|
name="deb_releases"
|
@@ -117,9 +131,9 @@
|
|
117
131
|
ng-model="repository.ostree_upstream_sync_depth"
|
118
132
|
type="number"
|
119
133
|
ng-disabled="repository.ostree_upstream_sync_policy !== 'custom'"/>
|
120
|
-
<
|
134
|
+
<p class="help-block" translate>
|
121
135
|
Choose one of the policy selections for downloading ostree content from upstream url during synchronization. Choose "Latest" for downloading the latest version of the upstream branch. Choose "All History" to download all available versions of the upstream repository (this may take a large amount of space). Choose "Custom Depth" and provide an number to indicate the number of prior versions of the upstream branch to download.
|
122
|
-
</
|
136
|
+
</p>
|
123
137
|
|
124
138
|
</div>
|
125
139
|
|
@@ -143,9 +157,9 @@
|
|
143
157
|
ng-options="id as name for (id, name) in ignorableYumContentUnits">
|
144
158
|
</select>
|
145
159
|
|
146
|
-
<
|
160
|
+
<p class="help-block" translate>
|
147
161
|
Select content units to ignore while synchronizing this repository.
|
148
|
-
</
|
162
|
+
</p>
|
149
163
|
</div>
|
150
164
|
|
151
165
|
<div class="checkbox">
|
@@ -189,7 +203,7 @@
|
|
189
203
|
<p class="help-block" translate>
|
190
204
|
For On Demand synchronization, only the metadata is downloaded during sync and packages are fetched and stored on the filesystem when clients request them.
|
191
205
|
On Demand is not recommended for custom repositories unless the upstream repository maintains older versions of packages within the repository.
|
192
|
-
For Background synchronization, a background task will download all packages after the initial sync.
|
206
|
+
For Background synchronization, a background task will download all packages after the initial sync (Deprecated).
|
193
207
|
The Immediate option will download all metadata and packages immediately during the sync.
|
194
208
|
</p>
|
195
209
|
</div>
|
@@ -161,6 +161,15 @@
|
|
161
161
|
label: "{{'Debs' | translate }}",
|
162
162
|
parent: 'product.repository.info'
|
163
163
|
}
|
164
|
+
})
|
165
|
+
.state('product.repository.manage-content.ansible-collections', {
|
166
|
+
url: '/content/ansible_collections',
|
167
|
+
permission: 'view_products',
|
168
|
+
templateUrl: 'products/details/repositories/details/views/repository-manage-ansible-collections.html',
|
169
|
+
ncyBreadcrumb: {
|
170
|
+
label: "{{'Ansible Collections' | translate }}",
|
171
|
+
parent: 'product.repository.info'
|
172
|
+
}
|
164
173
|
});
|
165
174
|
|
166
175
|
$stateProvider.state('product.repository.tasks', {
|
@@ -184,7 +184,7 @@
|
|
184
184
|
<span ng-show="repository.content_type == 'ansible_collection'">
|
185
185
|
<div>
|
186
186
|
<a translate ui-sref="product.repository.manage-content.ansible-collections({productId: product.id, repositoryId: repository.id})">
|
187
|
-
{{ repository.content_counts.ansible_collection || 0 }}
|
187
|
+
{{ repository.content_counts.ansible_collection || 0 }} Ansible Collections
|
188
188
|
</a>
|
189
189
|
</div>
|
190
190
|
</span>
|
@@ -31,6 +31,10 @@
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
34
|
+
.overflow-span {
|
35
|
+
max-height:20em;
|
36
|
+
overflow:auto;
|
37
|
+
}
|
34
38
|
.list-aligned {
|
35
39
|
list-style-position: inside;
|
36
40
|
}
|
@@ -59,4 +63,8 @@
|
|
59
63
|
.kat-inline {
|
60
64
|
float: left;
|
61
65
|
padding-right: 5px;
|
66
|
+
}
|
67
|
+
|
68
|
+
.popover-large {
|
69
|
+
max-width: 100%;
|
62
70
|
}
|
@@ -35,19 +35,19 @@ module BastionKatello
|
|
35
35
|
lifecycle_environments
|
36
36
|
products
|
37
37
|
puppet_modules
|
38
|
-
legacy_subscriptions
|
39
38
|
sync_plans
|
40
39
|
host_collections
|
41
40
|
katello_tasks
|
42
41
|
select_organization
|
43
42
|
),
|
44
|
-
:
|
45
|
-
'consumerCertRPM' => consumer_cert_rpm,
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
:config_generator => lambda do
|
44
|
+
{ 'consumerCertRPM' => consumer_cert_rpm,
|
45
|
+
'defaultDownloadPolicy' => !Foreman.in_rake? && db_migrated && Setting['default_download_policy'],
|
46
|
+
'remoteExecutionPresent' => ::Katello.with_remote_execution?,
|
47
|
+
'remoteExecutionByDefault' => ::Katello.with_remote_execution? &&
|
48
|
+
db_migrated && Setting['remote_execution_by_default']
|
49
|
+
}
|
50
|
+
end
|
51
51
|
)
|
52
52
|
end
|
53
53
|
end
|
data/lib/katello/engine.rb
CHANGED
@@ -134,10 +134,6 @@ module Katello
|
|
134
134
|
)
|
135
135
|
FastGettext.default_text_domain = 'katello'
|
136
136
|
|
137
|
-
unless SETTINGS[:organizations_enabled]
|
138
|
-
fail Foreman::Exception, N_("Organizations disabled, try allowing them in foreman/config/settings.yaml")
|
139
|
-
end
|
140
|
-
|
141
137
|
# Lib Extensions
|
142
138
|
::Foreman::Renderer::Scope::Variables::Base.send :include, Katello::Concerns::RendererExtensions
|
143
139
|
::Foreman::Renderer::Scope::Base.send :include, Katello::Concerns::BaseTemplateScopeExtensions
|
data/lib/katello/plugin.rb
CHANGED
@@ -3,7 +3,7 @@ require 'katello/repository_types.rb'
|
|
3
3
|
|
4
4
|
# rubocop:disable Metrics/BlockLength
|
5
5
|
Foreman::Plugin.register :katello do
|
6
|
-
requires_foreman '>= 1.
|
6
|
+
requires_foreman '>= 1.24'
|
7
7
|
|
8
8
|
sub_menu :top_menu, :content_menu, :caption => N_('Content'),
|
9
9
|
:icon => 'fa fa-book', :after => :monitor_menu do
|
@@ -164,6 +164,17 @@ Foreman::Plugin.register :katello do
|
|
164
164
|
:turbolinks => false
|
165
165
|
end
|
166
166
|
|
167
|
+
if ::Katello::RepositoryTypeManager.enabled?(::Katello::Repository::ANSIBLE_COLLECTION_TYPE)
|
168
|
+
menu :top_menu,
|
169
|
+
:ansible_collections,
|
170
|
+
:caption => N_('Ansible Collections'),
|
171
|
+
:url => '/ansible_collections',
|
172
|
+
:url_hash => {:controller => 'katello/api/v2/ansible_collections',
|
173
|
+
:action => 'index'},
|
174
|
+
:engine => Katello::Engine,
|
175
|
+
:turbolinks => false
|
176
|
+
end
|
177
|
+
|
167
178
|
if ::Katello::RepositoryTypeManager.enabled?(::Katello::Repository::PUPPET_TYPE)
|
168
179
|
menu :top_menu,
|
169
180
|
:puppet_modules,
|
@@ -253,6 +264,9 @@ Foreman::Plugin.register :katello do
|
|
253
264
|
register_custom_status(Katello::PurposeStatus)
|
254
265
|
register_custom_status(Katello::TraceStatus)
|
255
266
|
|
267
|
+
register_ping_extension { Katello::Ping.ping }
|
268
|
+
register_status_extension { Katello::Ping.status }
|
269
|
+
|
256
270
|
extend_rabl_template 'api/v2/smart_proxies/main', 'katello/api/v2/smart_proxies/download_policy'
|
257
271
|
extend_rabl_template 'api/v2/hosts/show', 'katello/api/v2/hosts/host_collections'
|
258
272
|
|
@@ -276,6 +290,10 @@ Foreman::Plugin.register :katello do
|
|
276
290
|
extend_model ::Katello::Concerns::SubscriptionFacetHostExtensions
|
277
291
|
end
|
278
292
|
|
293
|
+
describe_host do
|
294
|
+
overview_buttons_provider :content_host_overview_button
|
295
|
+
end
|
296
|
+
|
279
297
|
if Katello.with_remote_execution?
|
280
298
|
RemoteExecutionFeature.register(:katello_package_install, N_("Katello: Install Package"), :description => N_("Install package via Katello interface"), :provided_inputs => ['package'])
|
281
299
|
RemoteExecutionFeature.register(:katello_package_update, N_("Katello: Update Package"), :description => N_("Update package via Katello interface"), :provided_inputs => ['package'])
|
@@ -1,5 +1,7 @@
|
|
1
1
|
Katello::RepositoryTypeManager.register(::Katello::Repository::YUM_TYPE) do
|
2
2
|
service_class Katello::Pulp::Repository::Yum
|
3
|
+
pulp3_service_class Katello::Pulp3::Repository::Yum
|
4
|
+
pulp3_plugin 'pulp_rpm'
|
3
5
|
prevent_unneeded_metadata_publish
|
4
6
|
|
5
7
|
default_managed_content_type Katello::Rpm
|
@@ -15,7 +15,7 @@ namespace :katello do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_orphan(proxy)
|
18
|
-
ForemanTasks.async_task(Actions::Katello::
|
18
|
+
ForemanTasks.async_task(Actions::Katello::OrphanCleanup::RemoveOrphans, proxy)
|
19
19
|
puts _("Orphaned content deletion started in background.")
|
20
20
|
rescue RuntimeError => e
|
21
21
|
Rails.logger.error "Smart proxy with ID #{proxy.id} may be down: #{e}"
|