katello 3.10.2 → 3.11.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 +16 -22
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +4 -7
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +4 -5
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -3
- data/app/controllers/katello/api/v2/docker_manifests_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -3
- data/app/controllers/katello/api/v2/package_groups_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -24
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +4 -4
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/sync_management_controller.rb +1 -1
- data/app/helpers/katello/errata_mailer_helper.rb +1 -1
- data/app/helpers/katello/sync_management_helper.rb +1 -1
- data/app/lib/actions/candlepin/environment/add_content_to_environment.rb +18 -0
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -4
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +20 -0
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +3 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +15 -16
- data/app/lib/actions/katello/host/hypervisors_update.rb +17 -6
- data/app/lib/actions/katello/organization/manifest_delete.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_import.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -3
- data/app/lib/actions/katello/provider/update.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +8 -2
- data/app/lib/actions/katello/repository/clone_contents.rb +52 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -11
- data/app/lib/actions/katello/repository/clone_to_version.rb +19 -29
- data/app/lib/actions/katello/repository/create.rb +3 -4
- data/app/lib/actions/katello/repository/export.rb +1 -2
- data/app/lib/actions/katello/repository/import_upload.rb +7 -5
- data/app/lib/actions/katello/repository/purge_empty_content.rb +16 -0
- data/app/lib/actions/katello/repository/remove_content.rb +2 -2
- data/app/lib/actions/katello/repository/sync.rb +1 -1
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +36 -0
- data/app/lib/actions/pulp/repository/copy_all_units.rb +27 -0
- data/app/lib/actions/pulp/repository/copy_units.rb +29 -0
- data/app/lib/actions/pulp/repository/refresh.rb +3 -7
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +5 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +5 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +9 -0
- data/app/lib/katello/resources/candlepin/content.rb +2 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +1 -2
- data/app/lib/katello/util/path_with_substitutions.rb +18 -1
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +2 -2
- data/app/lib/katello/validators/environment_docker_repositories_validator.rb +7 -5
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -7
- data/app/models/katello/concerns/organization_extensions.rb +11 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +40 -24
- data/app/models/katello/concerns/redhat_extensions.rb +7 -3
- data/app/models/katello/content_view.rb +5 -7
- data/app/models/katello/content_view_docker_filter.rb +3 -3
- data/app/models/katello/content_view_puppet_environment.rb +1 -1
- data/app/models/katello/content_view_puppet_module.rb +2 -3
- data/app/models/katello/docker_meta_tag.rb +1 -1
- data/app/models/katello/docker_tag.rb +4 -6
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/pulp/repo.rb +3 -0
- data/app/models/katello/glue/pulp/repos.rb +4 -0
- data/app/models/katello/host/info_provider.rb +2 -2
- data/app/models/katello/host/subscription_facet.rb +0 -1
- data/app/models/katello/module_stream.rb +10 -4
- data/app/models/katello/ostree_branch.rb +4 -2
- data/app/models/katello/package_group.rb +2 -2
- data/app/models/katello/ping.rb +1 -1
- data/app/models/katello/puppet_module.rb +3 -3
- data/app/models/katello/repository.rb +15 -2
- data/app/models/katello/root_repository.rb +10 -0
- data/app/models/katello/yum_metadata_file.rb +46 -0
- data/app/services/katello/abstract/pulp/content.rb +19 -0
- data/app/services/katello/applicable_content_helper.rb +5 -5
- data/app/services/katello/pulp/content.rb +17 -0
- data/app/services/katello/pulp/repository.rb +45 -15
- data/app/services/katello/pulp/repository/deb.rb +8 -0
- data/app/services/katello/pulp/repository/docker.rb +19 -0
- data/app/services/katello/pulp/repository/file.rb +10 -0
- data/app/services/katello/pulp/repository/ostree.rb +4 -0
- data/app/services/katello/pulp/repository/puppet.rb +10 -0
- data/app/services/katello/pulp/repository/yum.rb +73 -0
- data/app/services/katello/pulp/yum_metadata_file.rb +7 -0
- data/app/services/katello/repository_type.rb +5 -0
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/katello/api/v2/debs/base.json.rabl +2 -1
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +3 -3
- data/app/views/katello/api/v2/errata/show.json.rabl +2 -1
- data/app/views/katello/api/v2/file_units/base.json.rabl +2 -1
- data/app/views/katello/api/v2/module_streams/base.json.rabl +2 -1
- data/app/views/katello/api/v2/ostree_branches/show.json.rabl +3 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -1
- data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
- data/app/views/katello/api/v2/packages/base.json.rabl +2 -1
- data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +2 -1
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/layouts/react.html.erb +3 -3
- data/db/migrate/20181219205642_create_yum_metadata_file.rb +20 -0
- data/db/migrate/20190107160723_units_uuid_to_backend_ident.rb +8 -0
- data/db/seeds.d/101-locations.rb +11 -13
- data/db/seeds.d/102-organizations.rb +5 -3
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +2 -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/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-events.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +20 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js +50 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +6 -1
- data/lib/katello/engine.rb +3 -3
- data/lib/katello/plugin.rb +3 -3
- data/lib/katello/repository_types/deb.rb +1 -0
- data/lib/katello/repository_types/yum.rb +1 -0
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/repository.rake +1 -1
- data/lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake +12 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +3 -1
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +8 -0
- data/webpack/common_index.js +6 -0
- data/webpack/containers/Application/config.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.test.js +2 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/Table.test.js.snap +1 -17
- data/webpack/redux/actions/RedHatRepositories/helpers.js +19 -10
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetails.test.js +2 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +1 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProductContent.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +10 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +16 -0
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +3 -3
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +28 -25
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +6 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +0 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +1 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +0 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionValidations.test.js +9 -4
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +14 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +2 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +24 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +138 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +8 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +23 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +14 -10
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +105 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +2 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTableHelpers.test.js +44 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +2 -222
- data/webpack/scenes/Subscriptions/index.js +4 -0
- metadata +41 -44
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content.rb +0 -32
- data/app/lib/actions/katello/repository/clone_deb_content.rb +0 -70
- data/app/lib/actions/katello/repository/clone_docker_content.rb +0 -26
- data/app/lib/actions/katello/repository/clone_file_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_ostree_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_yum_content.rb +0 -105
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +0 -36
- data/app/lib/actions/pulp/repository/copy_deb.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_deb_component.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_deb_release.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_distribution.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_manifest.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_tag.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_errata.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_files.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_default.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_stream.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_ostree_branch.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_package_group.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_puppet_module.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_rpm.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_srpm.rb +0 -16
- data/app/lib/actions/pulp/repository/copy_yum_metadata_file.rb +0 -11
- data/app/lib/actions/pulp/repository/purge_empty_errata.rb +0 -19
- data/app/lib/actions/pulp/repository/purge_empty_package_groups.rb +0 -24
- data/db/migrate/20190326145039_remove_version_date_from_ostree_branch.rb +0 -5
- data/lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake +0 -32
- data/webpack/components/PaginationRow/PaginationRow.test.js +0 -25
- data/webpack/components/PaginationRow/__snapshots__/PaginationRow.test.js.snap +0 -35
- data/webpack/components/PaginationRow/index.js +0 -94
- data/webpack/move_to_foreman/components/common/EmptyState/index.js +0 -68
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.21'
|
7
7
|
|
8
8
|
sub_menu :top_menu, :content_menu, :caption => N_('Content'),
|
9
9
|
:icon => 'fa fa-book', :after => :monitor_menu do
|
@@ -296,13 +296,13 @@ Foreman::Plugin.register :katello do
|
|
296
296
|
'bastion/bastion/index_ie should have a permission that grants access'
|
297
297
|
])
|
298
298
|
|
299
|
-
add_controller_action_scope(HostsController, :index) do |base_scope|
|
299
|
+
add_controller_action_scope('HostsController', :index) do |base_scope|
|
300
300
|
base_scope
|
301
301
|
.preload(:content_view, :lifecycle_environment, :subscription_facet)
|
302
302
|
.preload(content_facet: [:bound_repositories, :content_view, :lifecycle_environment])
|
303
303
|
end
|
304
304
|
|
305
|
-
add_controller_action_scope(Api::V2::HostsController, :index) do |base_scope|
|
305
|
+
add_controller_action_scope('Api::V2::HostsController', :index) do |base_scope|
|
306
306
|
base_scope
|
307
307
|
.preload(:content_view, :lifecycle_environment, :subscription_facet)
|
308
308
|
.preload(content_facet: [:bound_repositories, :content_view, :lifecycle_environment])
|
@@ -98,7 +98,7 @@ namespace :katello do
|
|
98
98
|
repos.find_each.with_index do |repo, index|
|
99
99
|
puts "Processing Repository #{index + 1}/#{repos.count}: #{repo.name} (#{repo.id})"
|
100
100
|
begin
|
101
|
-
ForemanTasks.sync_task(::Actions::Katello::Repository::Update, repo,
|
101
|
+
ForemanTasks.sync_task(::Actions::Katello::Repository::Update, repo.root,
|
102
102
|
download_policy: policy)
|
103
103
|
rescue => e
|
104
104
|
puts "Failed to update repository #{repo.name} (#{repo.id}): #{e.message}"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :katello do
|
2
|
+
namespace :upgrades do
|
3
|
+
namespace '3.11' do
|
4
|
+
desc "Import yum metadata file units from pulp"
|
5
|
+
task :import_yum_metadata => ["environment"] do
|
6
|
+
User.current = User.anonymous_api_admin
|
7
|
+
puts _("Importing Yum Metadata Files")
|
8
|
+
Katello::YumMetadataFile.import_all
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/katello/version.rb
CHANGED
data/package.json
CHANGED
@@ -59,7 +59,9 @@
|
|
59
59
|
"jed": "^1.1.1",
|
60
60
|
"lodash": "^4.17.5",
|
61
61
|
"patternfly": "^3.41.1",
|
62
|
-
"patternfly-react": "
|
62
|
+
"patternfly-react": "^2.5.1",
|
63
|
+
"angular": "1.5.5",
|
64
|
+
"ngreact": "^0.5.0",
|
63
65
|
"prop-types": "^15.6.0",
|
64
66
|
"query-string": "^6.1.0",
|
65
67
|
"react": "^16.4.0",
|
@@ -21,7 +21,7 @@ export const links = [
|
|
21
21
|
{
|
22
22
|
path: 'subscriptions',
|
23
23
|
component: WithOrganization(
|
24
|
-
withHeader(Subscriptions, { title: __('
|
24
|
+
withHeader(Subscriptions, { title: __('Subscriptions') }),
|
25
25
|
'/subscriptions',
|
26
26
|
),
|
27
27
|
},
|
@@ -31,7 +31,7 @@ export const links = [
|
|
31
31
|
},
|
32
32
|
{
|
33
33
|
// eslint-disable-next-line no-useless-escape
|
34
|
-
path: 'subscriptions/:id([0-9]
|
34
|
+
path: 'subscriptions/:id([0-9]*$)',
|
35
35
|
component: withHeader(SubscriptionDetails, { title: __('Subscription Details') }),
|
36
36
|
},
|
37
37
|
{
|
@@ -43,7 +43,7 @@ export const links = [
|
|
43
43
|
component: withHeader(ModuleStreams, { title: __('Module Streams') }),
|
44
44
|
},
|
45
45
|
{
|
46
|
-
path: 'module_streams/:id([0-9]
|
46
|
+
path: 'module_streams/:id([0-9]*$)',
|
47
47
|
component: withHeader(ModuleStreamDetails, { title: __('Module Stream Details') }),
|
48
48
|
},
|
49
49
|
];
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { Table as PfTable } from 'patternfly-react';
|
4
4
|
import { noop } from 'foremanReact/common/helpers';
|
5
|
-
import EmptyState from '
|
6
|
-
import
|
5
|
+
import EmptyState from 'foremanReact/components/common/EmptyState';
|
6
|
+
import Pagination from 'foremanReact/components/Pagination/PaginationWrapper';
|
7
7
|
|
8
8
|
import TableBody from './TableBody';
|
9
9
|
|
@@ -42,7 +42,7 @@ const Table = ({
|
|
42
42
|
{body}
|
43
43
|
</PfTable.PfProvider>
|
44
44
|
{shouldRenderPagination && (
|
45
|
-
<
|
45
|
+
<Pagination
|
46
46
|
viewType="table"
|
47
47
|
itemCount={itemCount}
|
48
48
|
pagination={pagination}
|
@@ -3,6 +3,8 @@ import { testComponentSnapshotsWithFixtures } from '../../../../../move_to_pf/te
|
|
3
3
|
import Table from './Table';
|
4
4
|
import { columnsFixtures, rowsFixtures } from './TableFixtures';
|
5
5
|
|
6
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper');
|
7
|
+
|
6
8
|
const fixtures = {
|
7
9
|
'renders Table with emptyState': {
|
8
10
|
columns: columnsFixtures,
|
data/webpack/move_to_foreman/components/common/table/components/__snapshots__/Table.test.js.snap
CHANGED
@@ -137,24 +137,8 @@ exports[`Table renders Table with pagination 1`] = `
|
|
137
137
|
>
|
138
138
|
some children
|
139
139
|
</TablePfProvider>
|
140
|
-
<
|
141
|
-
className=""
|
142
|
-
dropdownButtonId="pagination-row-dropdown"
|
140
|
+
<PaginationWrapper
|
143
141
|
itemCount={2}
|
144
|
-
messages={
|
145
|
-
Object {
|
146
|
-
"currentPage": "Current Page",
|
147
|
-
"firstPage": "First Page",
|
148
|
-
"lastPage": "Last Page",
|
149
|
-
"nextPage": "Next Page",
|
150
|
-
"of": "of",
|
151
|
-
"perPage": "per page",
|
152
|
-
"previousPage": "Previous Page",
|
153
|
-
}
|
154
|
-
}
|
155
|
-
onChange={[Function]}
|
156
|
-
onPageSet={[Function]}
|
157
|
-
onPerPageSelect={[Function]}
|
158
142
|
pagination={
|
159
143
|
Object {
|
160
144
|
"page": 1,
|
@@ -7,22 +7,31 @@ const repoTypeSearchQueryMap = {
|
|
7
7
|
beta: 'name ~ beta',
|
8
8
|
};
|
9
9
|
|
10
|
-
const
|
10
|
+
const recommendedRepositoriesRHEL = [
|
11
11
|
'rhel-7-server-rpms',
|
12
|
-
'rhel-6-server-rpms',
|
13
|
-
'rhel-6-server-satellite-tools-6.3-rpms',
|
14
|
-
'rhel-server-rhscl-7-rpms',
|
15
|
-
'rhel-7-server-satellite-capsule-6.3-rpms',
|
16
|
-
'rhel-7-server-satellite-capsule-6.4-rpms',
|
17
|
-
'rhel-7-server-satellite-tools-6.3-rpms',
|
18
|
-
'rhel-6-server-satellite-tools-6.3-rpms',
|
19
|
-
'rhel-7-server-ansible-2.5-rpms',
|
20
12
|
'rhel-7-server-optional-rpms',
|
21
13
|
'rhel-7-server-extras-rpms',
|
22
|
-
'rhel-5-server-els-rpms',
|
23
14
|
'rhel-7-server-eus-rpms',
|
15
|
+
'rhel-6-server-rpms',
|
16
|
+
'rhel-5-server-els-rpms',
|
24
17
|
];
|
25
18
|
|
19
|
+
const recommendedRepositoriesSatTools = [
|
20
|
+
'rhel-7-server-satellite-tools-6.4-rpms',
|
21
|
+
'rhel-6-server-satellite-tools-6.4-rpms',
|
22
|
+
'rhel-5-server-els-satellite-tools-6.4-rpms',
|
23
|
+
];
|
24
|
+
|
25
|
+
const recommendedRepositoriesMisc = [
|
26
|
+
'rhel-server-rhscl-7-rpms',
|
27
|
+
'rhel-7-server-satellite-capsule-6.4-rpms',
|
28
|
+
'rhel-7-server-ansible-2.6-rpms',
|
29
|
+
];
|
30
|
+
|
31
|
+
const recommendedRepositorySetLables = recommendedRepositoriesRHEL
|
32
|
+
.concat(recommendedRepositoriesSatTools)
|
33
|
+
.concat(recommendedRepositoriesMisc);
|
34
|
+
|
26
35
|
const createLablesQuery = lables =>
|
27
36
|
lables.map(label => `label = ${label}`).join(' or ');
|
28
37
|
|
data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js
CHANGED
@@ -2,6 +2,8 @@ import ModuleStreamDetailProfiles from '../ModuleStreamDetailProfiles';
|
|
2
2
|
import { testComponentSnapshotsWithFixtures } from '../../../../../move_to_pf/test-utils/testHelpers';
|
3
3
|
import { details } from '../../__tests__/moduleStreamDetails.fixtures';
|
4
4
|
|
5
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper');
|
6
|
+
|
5
7
|
const fixtures = {
|
6
8
|
'renders with profiles': {
|
7
9
|
profiles: details.profiles,
|
@@ -2,6 +2,8 @@ import ModuleStreamDetailRepositories from '../ModuleStreamDetailRepositories';
|
|
2
2
|
import { testComponentSnapshotsWithFixtures } from '../../../../../move_to_pf/test-utils/testHelpers';
|
3
3
|
import { details } from '../../__tests__/moduleStreamDetails.fixtures';
|
4
4
|
|
5
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper');
|
6
|
+
|
5
7
|
const fixtures = {
|
6
8
|
'renders with repositories': {
|
7
9
|
repositories: details.repositories,
|
@@ -2,6 +2,8 @@ import ModuleStreamDetails from '../ModuleStreamDetails';
|
|
2
2
|
import { testComponentSnapshotsWithFixtures } from '../../../../move_to_pf/test-utils/testHelpers';
|
3
3
|
import { details, loadingState } from './moduleStreamDetails.fixtures';
|
4
4
|
|
5
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper');
|
6
|
+
|
5
7
|
const mockFunc = jest.fn();
|
6
8
|
|
7
9
|
const baseProps = {
|
@@ -6,6 +6,7 @@ import ModuleStreamsTable from '../ModuleStreamsTable';
|
|
6
6
|
import Search from '../../../components/Search/index';
|
7
7
|
|
8
8
|
jest.mock('../../../move_to_foreman/foreman_toast_notifications');
|
9
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
9
10
|
|
10
11
|
describe('Module streams page', () => {
|
11
12
|
it('should render and contain appropiate components', async () => {
|
@@ -5,6 +5,7 @@ import ModuleStreamsTable from '../ModuleStreamsTable';
|
|
5
5
|
import { Table } from '../../../move_to_foreman/components/common/table';
|
6
6
|
|
7
7
|
jest.mock('../../../move_to_foreman/foreman_toast_notifications');
|
8
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
8
9
|
|
9
10
|
describe('Module streams table', () => {
|
10
11
|
it('should render and contain appropiate components', async () => {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ListView } from 'patternfly-react';
|
3
3
|
import { sprintf } from 'foremanReact/common/I18n';
|
4
|
+
import Pagination from 'foremanReact/components/Pagination/PaginationWrapper';
|
4
5
|
|
5
|
-
import PaginationRow from '../../components/PaginationRow/index';
|
6
6
|
import RepositorySet from './components/RepositorySet';
|
7
7
|
import EnabledRepository from './components/EnabledRepository';
|
8
8
|
|
@@ -33,7 +33,7 @@ export const getSetsComponent = (repoSetsState, onPaginationChange) => {
|
|
33
33
|
return (
|
34
34
|
<ListView>
|
35
35
|
<div className="sticky-pagination">
|
36
|
-
<
|
36
|
+
<Pagination
|
37
37
|
viewType="list"
|
38
38
|
itemCount={itemCount}
|
39
39
|
pagination={pagination}
|
@@ -63,7 +63,7 @@ export const getEnabledComponent = (enabledReposState, onPaginationChange) => {
|
|
63
63
|
return (
|
64
64
|
<ListView>
|
65
65
|
<div className="sticky-pagination sticky-pagination-grey">
|
66
|
-
<
|
66
|
+
<Pagination
|
67
67
|
viewType="list"
|
68
68
|
itemCount={itemCount}
|
69
69
|
pagination={pagination}
|
@@ -112,7 +112,7 @@ class ManageManifestModal extends Component {
|
|
112
112
|
header: __('There is no Manifest History to display.'),
|
113
113
|
description: __('Import a Manifest using the manifest tab above.'),
|
114
114
|
documentation: {
|
115
|
-
|
115
|
+
label: __('Learn more about adding Subscription Manifests'),
|
116
116
|
url: 'http://redhat.com',
|
117
117
|
},
|
118
118
|
});
|
@@ -5,6 +5,7 @@ import ManageManifestModal from '../ManageManifestModal';
|
|
5
5
|
import { manifestHistorySuccessState } from './manifest.fixtures';
|
6
6
|
|
7
7
|
jest.mock('../../../../move_to_foreman/foreman_toast_notifications');
|
8
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
8
9
|
|
9
10
|
describe('manage manifest modal', () => {
|
10
11
|
const noop = () => {};
|
data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap
CHANGED
@@ -312,7 +312,7 @@ exports[`manage manifest modal should render 1`] = `
|
|
312
312
|
Object {
|
313
313
|
"description": "Import a Manifest using the manifest tab above.",
|
314
314
|
"documentation": Object {
|
315
|
-
"
|
315
|
+
"label": "Learn more about adding Subscription Manifests",
|
316
316
|
"url": "http://redhat.com",
|
317
317
|
},
|
318
318
|
"header": "There is no Manifest History to display.",
|
@@ -24,6 +24,10 @@ import {
|
|
24
24
|
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
25
25
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
26
26
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
27
|
+
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
28
|
+
SUBSCRIPTIONS_CLOSE_TASK_MODAL,
|
29
|
+
SUBSCRIPTIONS_DISABLE_DELETE_BUTTON,
|
30
|
+
SUBSCRIPTIONS_ENABLE_DELETE_BUTTON,
|
27
31
|
} from './SubscriptionConstants';
|
28
32
|
import { filterRHSubscriptions, selectSubscriptionsQuantitiesFromResponse } from './SubscriptionHelpers.js';
|
29
33
|
import { apiError } from '../../move_to_foreman/common/helpers.js';
|
@@ -136,4 +140,10 @@ export const closeManageManifestModal = () => ({ type: SUBSCRIPTIONS_CLOSE_MANIF
|
|
136
140
|
export const openDeleteModal = () => ({ type: SUBSCRIPTIONS_OPEN_DELETE_MODAL });
|
137
141
|
export const closeDeleteModal = () => ({ type: SUBSCRIPTIONS_CLOSE_DELETE_MODAL });
|
138
142
|
|
143
|
+
export const openTaskModal = () => ({ type: SUBSCRIPTIONS_OPEN_TASK_MODAL });
|
144
|
+
export const closeTaskModal = () => ({ type: SUBSCRIPTIONS_CLOSE_TASK_MODAL });
|
145
|
+
|
146
|
+
export const disableDeleteButton = () => ({ type: SUBSCRIPTIONS_DISABLE_DELETE_BUTTON });
|
147
|
+
export const enableDeleteButton = () => ({ type: SUBSCRIPTIONS_ENABLE_DELETE_BUTTON });
|
148
|
+
|
139
149
|
export default loadSubscriptions;
|
@@ -27,6 +27,12 @@ export const SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL = 'SUBSCRIPTIONS_CLOSE_MANIFEST_
|
|
27
27
|
export const SUBSCRIPTIONS_OPEN_DELETE_MODAL = 'SUBSCRIPTIONS_OPEN_DELETE_MODAL';
|
28
28
|
export const SUBSCRIPTIONS_CLOSE_DELETE_MODAL = 'SUBSCRIPTIONS_CLOSE_DELETE_MODAL';
|
29
29
|
|
30
|
+
export const SUBSCRIPTIONS_OPEN_TASK_MODAL = 'SUBSCRIPTIONS_OPEN_TASK_MODAL';
|
31
|
+
export const SUBSCRIPTIONS_CLOSE_TASK_MODAL = 'SUBSCRIPTIONS_CLOSE_TASK_MODAL';
|
32
|
+
|
33
|
+
export const SUBSCRIPTIONS_DISABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_DISABLE_DELETE_BUTTON';
|
34
|
+
export const SUBSCRIPTIONS_ENABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_ENABLE_DELETE_BUTTON';
|
35
|
+
|
30
36
|
export const BLOCKING_FOREMAN_TASK_TYPES = [
|
31
37
|
'Actions::Katello::Organization::ManifestImport',
|
32
38
|
'Actions::Katello::Organization::ManifestRefresh',
|
@@ -22,6 +22,10 @@ import {
|
|
22
22
|
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
23
23
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
24
24
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
25
|
+
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
26
|
+
SUBSCRIPTIONS_CLOSE_TASK_MODAL,
|
27
|
+
SUBSCRIPTIONS_DISABLE_DELETE_BUTTON,
|
28
|
+
SUBSCRIPTIONS_ENABLE_DELETE_BUTTON,
|
25
29
|
} from './SubscriptionConstants';
|
26
30
|
import { GET_SETTING_SUCCESS } from '../../move_to_foreman/Settings/SettingsConstants';
|
27
31
|
|
@@ -30,6 +34,8 @@ const initialState = Immutable({
|
|
30
34
|
searchQuery: '',
|
31
35
|
manifestModalOpened: false,
|
32
36
|
deleteModalOpened: false,
|
37
|
+
taskModalOpened: false,
|
38
|
+
deleteButtonDisabled: true,
|
33
39
|
quantitiesLoading: false,
|
34
40
|
availableQuantities: null,
|
35
41
|
tasks: [],
|
@@ -147,6 +153,16 @@ export default (state = initialState, action) => {
|
|
147
153
|
case SUBSCRIPTIONS_CLOSE_DELETE_MODAL:
|
148
154
|
return state.set('deleteModalOpened', false);
|
149
155
|
|
156
|
+
case SUBSCRIPTIONS_OPEN_TASK_MODAL:
|
157
|
+
return state.set('taskModalOpened', true);
|
158
|
+
case SUBSCRIPTIONS_CLOSE_TASK_MODAL:
|
159
|
+
return state.set('taskModalOpened', false);
|
160
|
+
|
161
|
+
case SUBSCRIPTIONS_DISABLE_DELETE_BUTTON:
|
162
|
+
return state.set('deleteButtonDisabled', true);
|
163
|
+
case SUBSCRIPTIONS_ENABLE_DELETE_BUTTON:
|
164
|
+
return state.set('deleteButtonDisabled', false);
|
165
|
+
|
150
166
|
default:
|
151
167
|
return state;
|
152
168
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { translate as __ } from 'foremanReact/common/I18n';
|
2
2
|
import { filterRHSubscriptions } from './SubscriptionHelpers.js';
|
3
3
|
|
4
|
-
export const validateQuantity = (quantity,
|
4
|
+
export const validateQuantity = (quantity, maxQuantity) => {
|
5
5
|
let state;
|
6
6
|
let message;
|
7
7
|
|
@@ -12,7 +12,7 @@ export const validateQuantity = (quantity, availableQuantity) => {
|
|
12
12
|
} else if (numberValue <= 0) {
|
13
13
|
state = 'error';
|
14
14
|
message = __('Has to be > 0');
|
15
|
-
} else if (
|
15
|
+
} else if (maxQuantity && maxQuantity >= 0 && numberValue > maxQuantity) {
|
16
16
|
state = 'error';
|
17
17
|
message = __('Exceeds available quantity');
|
18
18
|
}
|
@@ -23,4 +23,4 @@ export const validateQuantity = (quantity, availableQuantity) => {
|
|
23
23
|
};
|
24
24
|
|
25
25
|
export const recordsValid = rows =>
|
26
|
-
filterRHSubscriptions(rows).every(row => validateQuantity(row.quantity, row.
|
26
|
+
filterRHSubscriptions(rows).every(row => validateQuantity(row.quantity, row.maxQuantity).state !== 'error');
|