katello 3.16.2 → 3.17.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/katello/katello.scss +3 -7
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +8 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +10 -4
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +33 -8
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +11 -11
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +0 -15
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -11
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +16 -0
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -4
- data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +5 -11
- data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +10 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +6 -7
- data/app/lib/actions/candlepin/product/content_add.rb +2 -1
- data/app/lib/actions/candlepin/product/content_update_enablement.rb +18 -0
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -6
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +3 -17
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +2 -3
- data/app/lib/actions/katello/organization/simple_content_access/disable.rb +17 -0
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +17 -0
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +36 -0
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +13 -0
- data/app/lib/actions/katello/product/content_create.rb +3 -3
- data/app/lib/actions/katello/product/destroy.rb +4 -25
- data/app/lib/actions/katello/repository/content_update.rb +41 -0
- data/app/lib/actions/katello/repository/destroy.rb +1 -5
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +15 -13
- data/app/lib/actions/katello/repository/sync.rb +25 -35
- data/app/lib/actions/katello/repository/update.rb +19 -30
- data/app/lib/actions/katello/repository/update_cv_repo_cert_guard.rb +17 -0
- data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +1 -0
- data/app/lib/actions/pulp/orchestration/repository/sync.rb +1 -2
- data/app/lib/actions/pulp/repository/sync.rb +1 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +0 -1
- data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -3
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -3
- data/app/lib/actions/pulp3/repository/copy_content.rb +1 -0
- data/app/lib/actions/pulp3/repository/delete.rb +1 -1
- data/app/lib/actions/pulp3/repository/multi_copy_content.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +16 -20
- data/app/lib/actions/pulp3/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/repository/update_cv_repository_cert_guard.rb +2 -6
- data/app/lib/actions/pulp3/repository/upload_file.rb +1 -1
- data/app/lib/katello/resources/candlepin/product.rb +11 -0
- data/app/lib/katello/resources/cdn.rb +2 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +7 -9
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +11 -11
- data/app/models/katello/activation_key.rb +1 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +7 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +39 -0
- data/app/models/katello/concerns/hostgroup_extensions.rb +46 -24
- data/app/models/katello/concerns/smart_proxy_extensions.rb +5 -19
- data/app/models/katello/concerns/widget_extensions.rb +23 -0
- data/app/models/katello/content_view.rb +9 -1
- data/app/models/katello/content_view_package_filter.rb +1 -1
- data/app/models/katello/content_view_version.rb +7 -0
- data/app/models/katello/erratum.rb +13 -0
- data/app/models/katello/erratum_cve.rb +8 -0
- data/app/models/katello/glue/pulp/repo.rb +1 -1
- data/app/models/katello/host/content_facet.rb +18 -1
- data/app/models/katello/host_collection.rb +6 -0
- data/app/models/katello/hostgroup/content_facet.rb +18 -0
- data/app/models/katello/installed_package.rb +8 -0
- data/app/models/katello/kt_environment.rb +9 -1
- data/app/models/katello/model.rb +16 -0
- data/app/models/katello/pool.rb +17 -0
- data/app/models/katello/product.rb +6 -0
- data/app/models/katello/purpose_addons_status.rb +1 -0
- data/app/models/katello/purpose_role_status.rb +1 -0
- data/app/models/katello/purpose_sla_status.rb +1 -0
- data/app/models/katello/purpose_usage_status.rb +1 -0
- data/app/models/katello/repository.rb +3 -6
- data/app/models/katello/root_repository.rb +24 -16
- data/app/models/katello/subscription_status.rb +1 -1
- data/app/models/katello/trace_status.rb +1 -1
- data/app/models/setting/content.rb +6 -2
- data/app/services/cert/certs.rb +2 -10
- data/app/services/katello/event_daemon.rb +7 -8
- data/app/services/katello/host_status_manager.rb +13 -0
- data/app/services/katello/pulp3/migration.rb +1 -1
- data/app/services/katello/pulp3/repository/yum.rb +6 -72
- data/app/services/katello/pulp3/repository.rb +11 -10
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +1 -1
- data/app/services/katello/pulp3/task.rb +3 -3
- data/app/services/katello/pulp3/task_group.rb +0 -6
- data/app/services/katello/smart_proxy_helper.rb +16 -13
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/config/routes/api/rhsm.rb +0 -1
- data/config/routes/api/v2.rb +8 -2
- data/config/routes/overrides.rb +0 -4
- data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
- data/db/migrate/20180904122343_create_hostgroup_content_facet.katello.rb +16 -0
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +53 -0
- data/db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb +9 -0
- data/db/migrate/20200701150946_add_auto_enabled_to_root_repository.rb +5 -0
- data/db/seeds.d/75-job_templates.rb +2 -2
- data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +14 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces-resolve.factory.js +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +45 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +11 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +16 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/lib/katello/engine.rb +6 -5
- data/lib/katello/permission_creator.rb +3 -3
- data/lib/katello/permissions/host_permissions.rb +0 -1
- data/lib/katello/plugin.rb +20 -16
- data/lib/katello/tasks/pulp3_post_migration_check.rake +1 -2
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/reports.rake +0 -12
- data/lib/katello/tasks/test.rake +15 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +48 -48
- data/locale/bn/katello.po +137 -14
- data/locale/cs/katello.po +137 -14
- data/locale/de/katello.po +138 -15
- data/locale/en/katello.po +137 -14
- data/locale/es/katello.po +138 -15
- data/locale/fr/katello.po +138 -15
- data/locale/gu/katello.po +137 -14
- data/locale/hi/katello.po +137 -14
- data/locale/it/katello.po +138 -15
- data/locale/ja/katello.po +138 -15
- data/locale/katello.pot +969 -769
- data/locale/kn/katello.po +137 -14
- data/locale/ko/katello.po +138 -15
- data/locale/mr/katello.po +137 -14
- data/locale/or/katello.po +137 -14
- data/locale/pa/katello.po +137 -14
- data/locale/pt/katello.po +137 -14
- data/locale/pt_BR/katello.po +138 -15
- data/locale/ru/katello.po +138 -15
- data/locale/ta/katello.po +137 -14
- data/locale/te/katello.po +137 -14
- data/locale/zh_CN/katello.po +138 -15
- data/locale/zh_TW/katello.po +138 -15
- data/package.json +8 -25
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +3 -0
- data/webpack/components/ActionableDetail.js +63 -0
- data/webpack/components/Content/ContentTable.js +2 -2
- data/webpack/components/Content/Details/ContentDetailRepositoryTableSchema.js +1 -1
- data/webpack/components/Content/Details/ContentDetails.js +1 -1
- data/webpack/components/Content/__tests__/ContentTable.test.js +2 -2
- data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +1 -1
- data/webpack/components/EditableSwitch.js +30 -0
- data/webpack/components/EditableTextInput/EditableTextInput.js +120 -0
- data/webpack/components/EditableTextInput/__tests__/editableTextInput.test.js +52 -0
- data/webpack/components/EditableTextInput/editableTextInput.scss +14 -0
- data/webpack/components/EditableTextInput/index.js +3 -0
- data/webpack/{scenes/ContentViews/components → components}/Loading.js +8 -5
- data/webpack/{move_to_pf → components}/LoadingState/LoadingState.js +0 -0
- data/webpack/{move_to_pf → components}/LoadingState/LoadingState.scss +0 -0
- data/webpack/{move_to_pf → components}/LoadingState/LoadingState.test.js +0 -0
- data/webpack/{move_to_pf → components}/LoadingState/__snapshots__/LoadingState.test.js.snap +0 -0
- data/webpack/{move_to_pf → components}/LoadingState/index.js +0 -0
- data/webpack/components/MultiSelect/index.js +1 -1
- data/webpack/{move_to_pf → components}/OptionTooltip/OptionTooltip.scss +0 -0
- data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/OptionTooltip.test.js +0 -0
- data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/__snapshots__/OptionTooltip.test.js.snap +0 -0
- data/webpack/{move_to_pf → components}/OptionTooltip/index.js +0 -0
- data/webpack/components/Search/Search.js +124 -0
- data/webpack/components/Search/Search.test.js +2 -1
- data/webpack/components/Search/__snapshots__/Search.test.js.snap +2 -0
- data/webpack/components/Search/__tests__/search.test.js +124 -0
- data/webpack/components/Search/index.js +11 -87
- data/webpack/{move_to_pf → components}/Select/Select.js +0 -0
- data/webpack/components/SelectOrg/SetOrganization.js +2 -2
- data/webpack/components/TabWrapper/TabWrapper.js +26 -0
- data/webpack/components/TabWrapper/index.js +3 -0
- data/webpack/components/TabbedView/TabbedView.js +38 -0
- data/webpack/components/TabbedView/TabbedView.scss +3 -0
- data/webpack/components/TabbedView/index.js +3 -0
- data/webpack/components/Table/EmptyStateMessage.js +61 -0
- data/webpack/{scenes/ContentViews/Table/TableWrapper.js → components/Table/MainTable.js} +23 -12
- data/webpack/components/Table/TableWrapper.js +94 -0
- data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.js +0 -0
- data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.scss +0 -0
- data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.test.js +0 -0
- data/webpack/{move_to_pf → components}/TooltipButton/__snapshots__/TooltipButton.test.js.snap +0 -0
- data/webpack/{move_to_pf → components}/TooltipButton/index.js +0 -0
- data/webpack/components/TypeAhead/TypeAhead.js +109 -0
- data/webpack/{move_to_pf → components}/TypeAhead/TypeAhead.scss +0 -0
- data/webpack/components/TypeAhead/helpers/commonPropTypes.js +35 -0
- data/webpack/components/TypeAhead/helpers/helpers.js +32 -0
- data/webpack/components/TypeAhead/index.js +3 -0
- data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadInput.js +3 -6
- data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadItems.js +3 -7
- data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +52 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +44 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.scss +11 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +57 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +66 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.scss +5 -0
- data/webpack/components/extensions/about/__tests__/SystemStatuses.test.js +1 -1
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableFixtures.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/Table.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBody.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBodyMessage.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionCell.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/index.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/EntitlementsInlineEditFormatter.js +1 -1
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/EntitlementsInlineEditFormatter.test.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/cellFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/collapseableAndSelectionCellFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/ellipsisCellFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/headerFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/index.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionCellFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionHeaderCellFormatter.js +0 -0
- data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/index.js +0 -0
- data/webpack/{move_to_pf → components}/react-bootstrap-select/index.js +0 -0
- data/webpack/containers/Application/config.js +5 -0
- data/webpack/containers/Application/overrides.scss +5 -0
- data/webpack/global_test_setup.js +3 -1
- data/webpack/redux/OrganizationProducts/OrganizationProductsActions.js +1 -1
- data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsActions.test.js +2 -2
- data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +1 -1
- data/webpack/redux/reducers/index.js +2 -0
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsActions.js +1 -1
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js +1 -1
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js +1 -1
- data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsActions.test.js +2 -2
- data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsTable.test.js +1 -1
- data/webpack/scenes/ContentViews/ContentViewSelectors.js +1 -2
- data/webpack/scenes/ContentViews/ContentViewsActions.js +4 -4
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +4 -1
- data/webpack/scenes/ContentViews/ContentViewsPage.js +12 -6
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +44 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +23 -0
- data/webpack/scenes/ContentViews/{details → Details}/ContentViewDetailSelectors.js +3 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +70 -0
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +116 -0
- data/webpack/scenes/ContentViews/{details → Details}/DetailsContainer.js +8 -4
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +101 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +106 -0
- data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +8 -0
- data/webpack/scenes/ContentViews/Details/index.js +7 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +51 -36
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +47 -44
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +31 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +173 -23
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +26 -0
- data/webpack/scenes/ContentViews/components/{contentViewName.scss → contentViewIcon.scss} +0 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +1 -1
- data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +1 -1
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsActions.test.js +2 -2
- data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +1 -1
- data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +1 -1
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -1
- data/webpack/scenes/Organizations/OrganizationSelectors.js +14 -0
- data/webpack/scenes/Products/ProductActions.js +1 -1
- data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +1 -1
- data/webpack/scenes/Settings/SettingsConstants.js +3 -0
- data/webpack/scenes/Settings/SettingsReducer.js +33 -0
- data/webpack/scenes/Settings/SettingsSelectors.js +4 -0
- data/webpack/scenes/Settings/index.js +2 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +59 -73
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +15 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +43 -1
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +8 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +78 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +2 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +56 -1
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +114 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +6 -6
- data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +36 -0
- data/webpack/scenes/Subscriptions/Manifest/index.js +3 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -0
- data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +38 -11
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +30 -18
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +1 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +2 -2
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionHelpers.test.js +0 -11
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +4 -4
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +26 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +2 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +27 -21
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +6 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +28 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +5 -10
- data/webpack/scenes/Subscriptions/index.js +6 -2
- data/webpack/test-utils/nockWrapper.js +39 -5
- data/webpack/test-utils/react-testing-lib-wrapper.js +35 -9
- data/webpack/{move_to_foreman/common → utils}/helpers.js +12 -8
- data/webpack/utils/useEventListener.js +37 -0
- metadata +143 -83
- data/app/lib/actions/katello/repository/verify_checksum.rb +0 -28
- data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +0 -22
- data/app/lib/actions/pulp3/repository/presenters/repair_presenter.rb +0 -85
- data/app/lib/actions/pulp3/repository/repair.rb +0 -29
- data/app/services/katello/host_trace_manager.rb +0 -38
- data/vendor/assets/stylesheets/katello/jquery.loadmask.css.scss +0 -40
- data/vendor/assets/stylesheets/katello/ui.spinner.css.scss +0 -3
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +0 -2
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalSelectors.js +0 -2
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +0 -4
- data/webpack/__mocks__/foremanReact/components/Settings/SettingsActions.js +0 -4
- data/webpack/__mocks__/foremanReact/components/Settings/SettingsConstants.js +0 -2
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +0 -138
- data/webpack/move_to_pf/TypeAhead/helpers.js +0 -5
- data/webpack/scenes/ContentViews/components/ContentViewName.js +0 -33
- data/webpack/scenes/ContentViews/components/EmptyStateMessage.js +0 -43
- data/webpack/scenes/ContentViews/details/ContentViewDetailActions.js +0 -12
- data/webpack/scenes/ContentViews/expansions/RepositoriesExpansion.js +0 -12
@@ -8,6 +8,7 @@ Object {
|
|
8
8
|
"hasUpstreamConnection": false,
|
9
9
|
"itemCount": 0,
|
10
10
|
"loading": true,
|
11
|
+
"manifestActionInProgress": false,
|
11
12
|
"pagination": Object {
|
12
13
|
"page": 0,
|
13
14
|
"perPage": 20,
|
@@ -34,6 +35,7 @@ Object {
|
|
34
35
|
"hasUpstreamConnection": false,
|
35
36
|
"itemCount": 0,
|
36
37
|
"loading": true,
|
38
|
+
"manifestActionInProgress": false,
|
37
39
|
"pagination": Object {
|
38
40
|
"page": 0,
|
39
41
|
"perPage": 20,
|
@@ -57,10 +59,10 @@ Object {
|
|
57
59
|
"availableQuantities": null,
|
58
60
|
"deleteButtonDisabled": true,
|
59
61
|
"deleteModalOpened": false,
|
60
|
-
"disconnected": "some-value",
|
61
62
|
"hasUpstreamConnection": false,
|
62
63
|
"itemCount": 0,
|
63
64
|
"loading": true,
|
65
|
+
"manifestActionInProgress": false,
|
64
66
|
"pagination": Object {
|
65
67
|
"page": 0,
|
66
68
|
"perPage": 20,
|
@@ -82,6 +84,7 @@ Object {
|
|
82
84
|
"hasUpstreamConnection": false,
|
83
85
|
"itemCount": 0,
|
84
86
|
"loading": true,
|
87
|
+
"manifestActionInProgress": false,
|
85
88
|
"pagination": Object {
|
86
89
|
"page": 0,
|
87
90
|
"perPage": 20,
|
@@ -103,6 +106,7 @@ Object {
|
|
103
106
|
"hasUpstreamConnection": false,
|
104
107
|
"itemCount": 0,
|
105
108
|
"loading": true,
|
109
|
+
"manifestActionInProgress": false,
|
106
110
|
"pagination": Object {
|
107
111
|
"page": 0,
|
108
112
|
"perPage": 20,
|
@@ -129,6 +133,7 @@ Object {
|
|
129
133
|
"hasUpstreamConnection": false,
|
130
134
|
"itemCount": 0,
|
131
135
|
"loading": true,
|
136
|
+
"manifestActionInProgress": false,
|
132
137
|
"pagination": Object {
|
133
138
|
"page": 0,
|
134
139
|
"perPage": 20,
|
@@ -150,6 +155,7 @@ Object {
|
|
150
155
|
"hasUpstreamConnection": false,
|
151
156
|
"itemCount": 0,
|
152
157
|
"loading": true,
|
158
|
+
"manifestActionInProgress": false,
|
153
159
|
"pagination": Object {
|
154
160
|
"page": 0,
|
155
161
|
"perPage": 20,
|
@@ -175,6 +181,7 @@ Object {
|
|
175
181
|
"hasUpstreamConnection": false,
|
176
182
|
"itemCount": 0,
|
177
183
|
"loading": true,
|
184
|
+
"manifestActionInProgress": false,
|
178
185
|
"pagination": Object {
|
179
186
|
"page": 0,
|
180
187
|
"perPage": 20,
|
@@ -196,6 +203,7 @@ Object {
|
|
196
203
|
"hasUpstreamConnection": false,
|
197
204
|
"itemCount": 0,
|
198
205
|
"loading": true,
|
206
|
+
"manifestActionInProgress": false,
|
199
207
|
"pagination": Object {
|
200
208
|
"page": 0,
|
201
209
|
"perPage": 20,
|
@@ -217,6 +225,7 @@ Object {
|
|
217
225
|
"hasUpstreamConnection": false,
|
218
226
|
"itemCount": 0,
|
219
227
|
"loading": false,
|
228
|
+
"manifestActionInProgress": false,
|
220
229
|
"missingPermissions": undefined,
|
221
230
|
"pagination": Object {
|
222
231
|
"page": 0,
|
@@ -239,6 +248,7 @@ Object {
|
|
239
248
|
"hasUpstreamConnection": false,
|
240
249
|
"itemCount": 0,
|
241
250
|
"loading": true,
|
251
|
+
"manifestActionInProgress": false,
|
242
252
|
"pagination": Object {
|
243
253
|
"page": 0,
|
244
254
|
"perPage": 20,
|
@@ -260,6 +270,7 @@ Object {
|
|
260
270
|
"hasUpstreamConnection": false,
|
261
271
|
"itemCount": 0,
|
262
272
|
"loading": true,
|
273
|
+
"manifestActionInProgress": false,
|
263
274
|
"pagination": Object {
|
264
275
|
"page": 0,
|
265
276
|
"perPage": 20,
|
@@ -281,6 +292,7 @@ Object {
|
|
281
292
|
"hasUpstreamConnection": false,
|
282
293
|
"itemCount": 0,
|
283
294
|
"loading": true,
|
295
|
+
"manifestActionInProgress": false,
|
284
296
|
"pagination": Object {
|
285
297
|
"page": 0,
|
286
298
|
"perPage": 20,
|
@@ -307,6 +319,7 @@ Object {
|
|
307
319
|
"hasUpstreamConnection": false,
|
308
320
|
"itemCount": 0,
|
309
321
|
"loading": true,
|
322
|
+
"manifestActionInProgress": false,
|
310
323
|
"pagination": Object {
|
311
324
|
"page": 0,
|
312
325
|
"perPage": 20,
|
@@ -328,6 +341,7 @@ Object {
|
|
328
341
|
"hasUpstreamConnection": false,
|
329
342
|
"itemCount": 0,
|
330
343
|
"loading": true,
|
344
|
+
"manifestActionInProgress": false,
|
331
345
|
"pagination": Object {
|
332
346
|
"page": 0,
|
333
347
|
"perPage": 20,
|
@@ -349,6 +363,7 @@ Object {
|
|
349
363
|
"hasUpstreamConnection": false,
|
350
364
|
"itemCount": 0,
|
351
365
|
"loading": true,
|
366
|
+
"manifestActionInProgress": false,
|
352
367
|
"pagination": Object {
|
353
368
|
"page": 0,
|
354
369
|
"perPage": 20,
|
@@ -370,6 +385,7 @@ Object {
|
|
370
385
|
"hasUpstreamConnection": false,
|
371
386
|
"itemCount": 0,
|
372
387
|
"loading": true,
|
388
|
+
"manifestActionInProgress": false,
|
373
389
|
"pagination": Object {
|
374
390
|
"page": 0,
|
375
391
|
"perPage": 20,
|
@@ -391,6 +407,7 @@ Object {
|
|
391
407
|
"hasUpstreamConnection": false,
|
392
408
|
"itemCount": 0,
|
393
409
|
"loading": true,
|
410
|
+
"manifestActionInProgress": false,
|
394
411
|
"pagination": Object {
|
395
412
|
"page": 0,
|
396
413
|
"perPage": 20,
|
@@ -418,6 +435,7 @@ Object {
|
|
418
435
|
"hasUpstreamConnection": false,
|
419
436
|
"itemCount": 20,
|
420
437
|
"loading": false,
|
438
|
+
"manifestActionInProgress": false,
|
421
439
|
"pagination": Object {
|
422
440
|
"page": 1,
|
423
441
|
"perPage": 10,
|
@@ -441,6 +459,7 @@ Object {
|
|
441
459
|
"hasUpstreamConnection": false,
|
442
460
|
"itemCount": 0,
|
443
461
|
"loading": true,
|
462
|
+
"manifestActionInProgress": false,
|
444
463
|
"pagination": Object {
|
445
464
|
"page": 0,
|
446
465
|
"perPage": 20,
|
@@ -462,6 +481,7 @@ Object {
|
|
462
481
|
"hasUpstreamConnection": false,
|
463
482
|
"itemCount": 0,
|
464
483
|
"loading": true,
|
484
|
+
"manifestActionInProgress": false,
|
465
485
|
"pagination": Object {
|
466
486
|
"page": 0,
|
467
487
|
"perPage": 20,
|
@@ -488,6 +508,7 @@ Object {
|
|
488
508
|
"hasUpstreamConnection": false,
|
489
509
|
"itemCount": 0,
|
490
510
|
"loading": true,
|
511
|
+
"manifestActionInProgress": false,
|
491
512
|
"pagination": Object {
|
492
513
|
"page": 0,
|
493
514
|
"perPage": 20,
|
@@ -509,6 +530,7 @@ Object {
|
|
509
530
|
"hasUpstreamConnection": false,
|
510
531
|
"itemCount": 0,
|
511
532
|
"loading": true,
|
533
|
+
"manifestActionInProgress": false,
|
512
534
|
"pagination": Object {
|
513
535
|
"page": 0,
|
514
536
|
"perPage": 20,
|
@@ -535,6 +557,7 @@ Object {
|
|
535
557
|
"hasUpstreamConnection": false,
|
536
558
|
"itemCount": 0,
|
537
559
|
"loading": true,
|
560
|
+
"manifestActionInProgress": false,
|
538
561
|
"pagination": Object {
|
539
562
|
"page": 0,
|
540
563
|
"perPage": 20,
|
@@ -559,6 +582,7 @@ Object {
|
|
559
582
|
"hasUpstreamConnection": false,
|
560
583
|
"itemCount": 0,
|
561
584
|
"loading": true,
|
585
|
+
"manifestActionInProgress": false,
|
562
586
|
"pagination": Object {
|
563
587
|
"page": 0,
|
564
588
|
"perPage": 20,
|
@@ -585,6 +609,7 @@ Object {
|
|
585
609
|
"hasUpstreamConnection": false,
|
586
610
|
"itemCount": 0,
|
587
611
|
"loading": true,
|
612
|
+
"manifestActionInProgress": false,
|
588
613
|
"pagination": Object {
|
589
614
|
"page": 0,
|
590
615
|
"perPage": 20,
|
data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { Link } from 'react-router-dom';
|
3
2
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
3
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
5
4
|
|
@@ -9,11 +8,12 @@ export const subscriptionTypeFormatter = (value, { rowData }) => {
|
|
9
8
|
if (rowData.virt_only === false) {
|
10
9
|
cellContent = __('Physical');
|
11
10
|
} else if (rowData.hypervisor) {
|
11
|
+
const hypervisorLink = urlBuilder('content_hosts', '', rowData.hypervisor.id);
|
12
12
|
cellContent = (
|
13
13
|
<span>
|
14
14
|
{__('Guests of')}
|
15
15
|
{' '}
|
16
|
-
<
|
16
|
+
<a href={hypervisorLink}>{rowData.hypervisor.name}</a>
|
17
17
|
</span>
|
18
18
|
);
|
19
19
|
} else if (rowData.unmapped_guest) {
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { cloneDeep, findIndex, isEqual } from 'lodash';
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
|
-
import { LoadingState } from '../../../../
|
5
|
+
import { LoadingState } from '../../../../components/LoadingState';
|
6
6
|
import { recordsValid } from '../../SubscriptionValidations';
|
7
7
|
import { buildTableRows, groupSubscriptionsByProductId } from './SubscriptionsTableHelpers';
|
8
8
|
import Table from './components/Table';
|
@@ -29,7 +29,10 @@ class SubscriptionsTable extends Component {
|
|
29
29
|
nextProps.subscriptions !== undefined &&
|
30
30
|
!isEqual(nextProps.subscriptions, prevState.subscriptions)
|
31
31
|
) {
|
32
|
-
const groupedSubscriptions = groupSubscriptionsByProductId(
|
32
|
+
const groupedSubscriptions = groupSubscriptionsByProductId(
|
33
|
+
nextProps.subscriptions,
|
34
|
+
prevState.groupedSubscriptions,
|
35
|
+
);
|
33
36
|
const rows = buildTableRows(
|
34
37
|
groupedSubscriptions,
|
35
38
|
nextProps.subscriptions.availableQuantities,
|
@@ -192,19 +195,20 @@ class SubscriptionsTable extends Component {
|
|
192
195
|
|
193
196
|
|
194
197
|
toggleSubscriptionGroup = (groupId) => {
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
groupedSubscriptions[groupId].open = !open;
|
198
|
+
this.setState((prevState) => {
|
199
|
+
const { subscriptions } = this.props;
|
200
|
+
const { groupedSubscriptions, updatedQuantity } = prevState;
|
201
|
+
const { open } = groupedSubscriptions[groupId];
|
200
202
|
|
201
|
-
|
202
|
-
groupedSubscriptions,
|
203
|
-
subscriptions.availableQuantities,
|
204
|
-
updatedQuantity,
|
205
|
-
);
|
203
|
+
groupedSubscriptions[groupId].open = !open;
|
206
204
|
|
207
|
-
|
205
|
+
const rows = buildTableRows(
|
206
|
+
groupedSubscriptions,
|
207
|
+
subscriptions.availableQuantities,
|
208
|
+
updatedQuantity,
|
209
|
+
);
|
210
|
+
return { rows, groupedSubscriptions };
|
211
|
+
});
|
208
212
|
};
|
209
213
|
|
210
214
|
enableEditing = (editingState) => {
|
@@ -215,15 +219,17 @@ class SubscriptionsTable extends Component {
|
|
215
219
|
};
|
216
220
|
|
217
221
|
updateRows = (updatedQuantity) => {
|
218
|
-
|
219
|
-
|
222
|
+
this.setState((prevState) => {
|
223
|
+
const { groupedSubscriptions } = prevState;
|
224
|
+
const { subscriptions } = this.props;
|
220
225
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
226
|
+
const rows = buildTableRows(
|
227
|
+
groupedSubscriptions,
|
228
|
+
subscriptions.availableQuantities,
|
229
|
+
updatedQuantity,
|
230
|
+
);
|
231
|
+
return { rows, updatedQuantity };
|
232
|
+
});
|
227
233
|
};
|
228
234
|
|
229
235
|
showUpdateConfirm = (show) => {
|
data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js
CHANGED
@@ -76,13 +76,17 @@ export const buildTableRows = (groupedSubscriptions, availableQuantities, update
|
|
76
76
|
return rows;
|
77
77
|
};
|
78
78
|
|
79
|
-
export const groupSubscriptionsByProductId = (
|
79
|
+
export const groupSubscriptionsByProductId = (
|
80
|
+
{ results: subscriptions },
|
81
|
+
prevGroupedSubscriptions,
|
82
|
+
) => {
|
80
83
|
const grouped = {};
|
81
84
|
|
82
85
|
subscriptions.forEach((subscription) => {
|
83
86
|
if (grouped[subscription.product_id] === undefined) {
|
87
|
+
const prevOpenState = prevGroupedSubscriptions?.[subscription.product_id]?.open || false;
|
84
88
|
grouped[subscription.product_id] = {
|
85
|
-
open:
|
89
|
+
open: prevOpenState,
|
86
90
|
subscriptions: [],
|
87
91
|
};
|
88
92
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import React from 'react';
|
3
3
|
import { Icon } from 'patternfly-react';
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
|
-
import { entitlementsInlineEditFormatter } from '../../../../
|
5
|
+
import { entitlementsInlineEditFormatter } from '../../../../components/pf3Table/formatters/EntitlementsInlineEditFormatter';
|
6
6
|
import { subscriptionTypeFormatter } from './SubscriptionTypeFormatter';
|
7
7
|
import { subscriptionNameFormatter } from './SubscriptionNameFormatter';
|
8
8
|
import {
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
cellFormatter,
|
11
11
|
selectionHeaderCellFormatter,
|
12
12
|
collapseableAndSelectionCellFormatter,
|
13
|
-
} from '../../../../
|
13
|
+
} from '../../../../components/pf3Table';
|
14
14
|
|
15
15
|
function getEntitlementsFormatter(inlineEditController, canManageSubscriptionAllocations) {
|
16
16
|
if (canManageSubscriptionAllocations) {
|
@@ -4,7 +4,7 @@ import { Table as PFtable } from 'patternfly-react';
|
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import classNames from 'classnames';
|
6
6
|
import { createSubscriptionsTableSchema } from '../SubscriptionsTableSchema';
|
7
|
-
import { Table as ForemanTable, TableBody as ForemanTableBody } from '../../../../../
|
7
|
+
import { Table as ForemanTable, TableBody as ForemanTableBody } from '../../../../../components/pf3Table';
|
8
8
|
|
9
9
|
const Table = ({
|
10
10
|
emptyState,
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import { Row, Col, Form, FormGroup, Button } from 'patternfly-react';
|
3
|
+
import { Row, Col, Form, FormGroup, Button, OverlayTrigger, Tooltip, Icon } from 'patternfly-react';
|
4
4
|
import { LinkContainer } from 'react-router-bootstrap';
|
5
5
|
import { noop } from 'foremanReact/common/helpers';
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
7
|
+
import { SUBSCRIPTION_WATCH_URL } from '../../SubscriptionConstants';
|
7
8
|
|
8
9
|
import Search from '../../../../components/Search/index';
|
9
|
-
import TooltipButton from '../../../../
|
10
|
-
import OptionTooltip from '../../../../
|
10
|
+
import TooltipButton from '../../../../components/TooltipButton';
|
11
|
+
import OptionTooltip from '../../../../components/OptionTooltip';
|
11
12
|
|
12
13
|
const SubscriptionsToolbar = ({
|
13
14
|
canManageSubscriptionAllocations,
|
@@ -25,6 +26,7 @@ const SubscriptionsToolbar = ({
|
|
25
26
|
tableColumns,
|
26
27
|
toolTipOnChange,
|
27
28
|
toolTipOnclose,
|
29
|
+
isManifestImported,
|
28
30
|
}) => (
|
29
31
|
<Row className="toolbar-pf table-view-pf-toolbar-external">
|
30
32
|
<Col sm={12}>
|
@@ -57,6 +59,29 @@ const SubscriptionsToolbar = ({
|
|
57
59
|
</LinkContainer>
|
58
60
|
}
|
59
61
|
|
62
|
+
{isManifestImported &&
|
63
|
+
<a
|
64
|
+
href={SUBSCRIPTION_WATCH_URL}
|
65
|
+
className="btn btn-default"
|
66
|
+
target="_blank"
|
67
|
+
rel="noreferrer"
|
68
|
+
>
|
69
|
+
{__('Subscription Watch')}
|
70
|
+
<OverlayTrigger
|
71
|
+
overlay={
|
72
|
+
<Tooltip id="sub-watch-tooltip">
|
73
|
+
{__('Learn more about your overall subscription usage (opens in a new tab)')}
|
74
|
+
</Tooltip>
|
75
|
+
}
|
76
|
+
placement="bottom"
|
77
|
+
trigger={['hover', 'focus']}
|
78
|
+
rootClose={false}
|
79
|
+
>
|
80
|
+
<Icon type="pf" name="info" />
|
81
|
+
</OverlayTrigger>
|
82
|
+
</a>
|
83
|
+
}
|
84
|
+
|
60
85
|
<Button onClick={onManageManifestButtonClick}>
|
61
86
|
{__('Manage Manifest')}
|
62
87
|
</Button>
|
@@ -22,9 +22,8 @@ exports[`SubscriptionsToolbar renders SubscriptionsToolbar 1`] = `
|
|
22
22
|
bsClass="form-group"
|
23
23
|
className="toolbar-pf-filter"
|
24
24
|
>
|
25
|
-
<Search
|
25
|
+
<Connect(Search)
|
26
26
|
getAutoCompleteParams={[MockFunction]}
|
27
|
-
initialInputValue=""
|
28
27
|
onSearch={[MockFunction]}
|
29
28
|
updateSearchQuery={[MockFunction]}
|
30
29
|
/>
|
@@ -96,9 +95,8 @@ exports[`SubscriptionsToolbar renders SubscriptionsToolbar with disabled add but
|
|
96
95
|
bsClass="form-group"
|
97
96
|
className="toolbar-pf-filter"
|
98
97
|
>
|
99
|
-
<Search
|
98
|
+
<Connect(Search)
|
100
99
|
getAutoCompleteParams={[MockFunction]}
|
101
|
-
initialInputValue=""
|
102
100
|
onSearch={[MockFunction]}
|
103
101
|
updateSearchQuery={[MockFunction]}
|
104
102
|
/>
|
@@ -170,9 +168,8 @@ exports[`SubscriptionsToolbar renders SubscriptionsToolbar with disabled delete
|
|
170
168
|
bsClass="form-group"
|
171
169
|
className="toolbar-pf-filter"
|
172
170
|
>
|
173
|
-
<Search
|
171
|
+
<Connect(Search)
|
174
172
|
getAutoCompleteParams={[MockFunction]}
|
175
|
-
initialInputValue=""
|
176
173
|
onSearch={[MockFunction]}
|
177
174
|
updateSearchQuery={[MockFunction]}
|
178
175
|
/>
|
@@ -244,9 +241,8 @@ exports[`SubscriptionsToolbar renders SubscriptionsToolbar with disabled manifes
|
|
244
241
|
bsClass="form-group"
|
245
242
|
className="toolbar-pf-filter"
|
246
243
|
>
|
247
|
-
<Search
|
244
|
+
<Connect(Search)
|
248
245
|
getAutoCompleteParams={[MockFunction]}
|
249
|
-
initialInputValue=""
|
250
246
|
onSearch={[MockFunction]}
|
251
247
|
updateSearchQuery={[MockFunction]}
|
252
248
|
/>
|
@@ -318,9 +314,8 @@ exports[`SubscriptionsToolbar renders SubscriptionsToolbar with table columns 1`
|
|
318
314
|
bsClass="form-group"
|
319
315
|
className="toolbar-pf-filter"
|
320
316
|
>
|
321
|
-
<Search
|
317
|
+
<Connect(Search)
|
322
318
|
getAutoCompleteParams={[MockFunction]}
|
323
|
-
initialInputValue=""
|
324
319
|
onSearch={[MockFunction]}
|
325
320
|
updateSearchQuery={[MockFunction]}
|
326
321
|
/>
|
@@ -14,12 +14,13 @@ import {
|
|
14
14
|
selectDeleteButtonDisabled,
|
15
15
|
selectSubscriptionsTask,
|
16
16
|
selectActivePermissions,
|
17
|
-
selectTableSettings,
|
18
17
|
selectIsTaskPending,
|
19
18
|
selectHasUpstreamConnection,
|
20
19
|
} from './SubscriptionsSelectors';
|
20
|
+
import { selectSettings,
|
21
|
+
selectTableSettings } from '../../scenes/Settings/SettingsSelectors';
|
21
22
|
import { selectIsPollingTask } from '../Tasks/TaskSelectors';
|
22
|
-
import { selectOrganizationState, selectSimpleContentAccessEnabled } from '../Organizations/OrganizationSelectors';
|
23
|
+
import { selectOrganizationState, selectSimpleContentAccessEnabled, selectIsManifestImported } from '../Organizations/OrganizationSelectors';
|
23
24
|
import { pingUpstreamSubscriptions } from './UpstreamSubscriptions/UpstreamSubscriptionsActions';
|
24
25
|
import reducer from './SubscriptionReducer';
|
25
26
|
import { SUBSCRIPTION_TABLE_NAME, SUBSCRIPTIONS } from './SubscriptionConstants';
|
@@ -29,12 +30,15 @@ import SubscriptionsPage from './SubscriptionsPage';
|
|
29
30
|
const mapStateToProps = (state) => {
|
30
31
|
const subscriptions = selectSubscriptionsState(state);
|
31
32
|
const subscriptionTableSettings = selectTableSettings(state, SUBSCRIPTION_TABLE_NAME);
|
33
|
+
const settings = selectSettings(state);
|
32
34
|
|
33
35
|
return {
|
34
36
|
subscriptions,
|
35
37
|
subscriptionTableSettings,
|
38
|
+
settings,
|
36
39
|
activePermissions: selectActivePermissions(state),
|
37
40
|
simpleContentAccess: selectSimpleContentAccessEnabled(state),
|
41
|
+
isManifestImported: selectIsManifestImported(state),
|
38
42
|
hasUpstreamConnection: selectHasUpstreamConnection(state),
|
39
43
|
task: selectSubscriptionsTask(state),
|
40
44
|
isTaskPending: selectIsTaskPending(state),
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import nock from 'nock';
|
2
|
+
import api from '../services/api';
|
2
3
|
|
3
4
|
// Using the library 'nock' as it matches actual network requests rather than mock another
|
4
5
|
// library. This is helpful when the request is not coming from Katello. For example, axios
|
@@ -9,9 +10,42 @@ import nock from 'nock';
|
|
9
10
|
export const nockInstance = nock('http://localhost');
|
10
11
|
|
11
12
|
// Calling .done() with nock asserts that the request was fufilled. We use a timeout to ensure
|
12
|
-
// that the component has set up and made the request before the assertion is made.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
// that the component has set up and made the request before the assertion is made. This function
|
14
|
+
// polls until the nock scope is met. If the `done` callback from jest is passed in, it will
|
15
|
+
// call it once the request is made, telling jest the test is done. This is to make sure all
|
16
|
+
// nock expectations are met and cleared before moving on to the next test.
|
17
|
+
export const assertNockRequest = (nockScope, jestDone, tries = 10) => {
|
18
|
+
const interval = 500;
|
19
|
+
let i = 0;
|
20
|
+
const poll = setInterval(() => {
|
21
|
+
i += 1;
|
22
|
+
if (i === tries) {
|
23
|
+
/* eslint-disable-next-line no-console */
|
24
|
+
console.error(`Nock stubbed call ${nockScope.pendingMocks()} was not met in time!`);
|
25
|
+
}
|
26
|
+
if (nockScope.isDone()) {
|
27
|
+
nockScope.done(); // Assert nock request
|
28
|
+
if (jestDone) jestDone(); // Tell jest test is done
|
29
|
+
clearInterval(poll); // Clear the interval so polling stops
|
30
|
+
}
|
31
|
+
}, interval);
|
17
32
|
};
|
33
|
+
|
34
|
+
export const mockAutocomplete = (
|
35
|
+
instance,
|
36
|
+
autoCompUrl,
|
37
|
+
query = true,
|
38
|
+
response = [],
|
39
|
+
times = 1,
|
40
|
+
) => instance
|
41
|
+
.get(api.getApiUrl(autoCompUrl))
|
42
|
+
.times(times)
|
43
|
+
.query(query) // can pass in function, see nock docs
|
44
|
+
.reply(200, response);
|
45
|
+
|
46
|
+
export const mockSetting = (instance, name, value) => instance
|
47
|
+
.get(`/api/v2/settings/${name}`)
|
48
|
+
.query(true) // can pass in function, see nock docs
|
49
|
+
.reply(200, { name, value });
|
50
|
+
|
51
|
+
export default nock;
|
@@ -4,27 +4,49 @@
|
|
4
4
|
import React from 'react';
|
5
5
|
import thunk from 'redux-thunk';
|
6
6
|
import Immutable from 'seamless-immutable';
|
7
|
-
import { reducers as apiReducer } from 'foremanReact/redux/API';
|
7
|
+
import { APIMiddleware, reducers as apiReducer } from 'foremanReact/redux/API';
|
8
|
+
import { reducers as foremanModalReducer } from 'foremanReact/components/ForemanModal';
|
8
9
|
import { STATUS } from 'foremanReact/constants';
|
9
|
-
import { render } from '@testing-library/react';
|
10
|
+
import { render, waitFor } from '@testing-library/react';
|
10
11
|
import { createStore, applyMiddleware, combineReducers } from 'redux';
|
11
12
|
import { Provider } from 'react-redux';
|
12
13
|
import { MemoryRouter } from 'react-router-dom';
|
13
|
-
import {
|
14
|
+
import { initialSettingsState } from '../scenes/Settings/SettingsReducer';
|
15
|
+
import allKatelloReducers from '../redux/reducers/index.js';
|
16
|
+
|
17
|
+
// r-t-lib's print limit for debug() is quite small, setting it to a much higher char max here.
|
18
|
+
// See https://github.com/testing-library/react-testing-library/issues/503 for more info.
|
19
|
+
process.env.DEBUG_PRINT_LIMIT = 99999;
|
14
20
|
|
15
21
|
// Renders testable component with redux and react-router according to Katello's usage
|
16
22
|
// This should be used when you want a fully connected component with Redux state and actions.
|
17
|
-
function
|
23
|
+
function renderWithRedux(
|
18
24
|
component,
|
19
25
|
{
|
20
|
-
|
21
|
-
|
26
|
+
apiNamespace, // namespace if using API middleware
|
27
|
+
initialApiState = { response: {}, status: STATUS.PENDING }, // Default state for API middleware
|
28
|
+
initialState = {}, // Override full state
|
22
29
|
} = {},
|
23
30
|
) {
|
24
31
|
// Adding the reducer in the expected namespaced format
|
25
|
-
const combinedReducers = combineReducers({
|
32
|
+
const combinedReducers = combineReducers({
|
33
|
+
katello: allKatelloReducers,
|
34
|
+
...apiReducer,
|
35
|
+
...foremanModalReducer,
|
36
|
+
});
|
37
|
+
|
26
38
|
// Namespacing the initial state as well
|
27
|
-
const initialFullState = Immutable({
|
39
|
+
const initialFullState = Immutable({
|
40
|
+
API: {
|
41
|
+
[apiNamespace]: initialApiState,
|
42
|
+
},
|
43
|
+
katello: {
|
44
|
+
settings: {
|
45
|
+
settings: initialSettingsState,
|
46
|
+
},
|
47
|
+
},
|
48
|
+
...initialState,
|
49
|
+
});
|
28
50
|
const middlewares = applyMiddleware(thunk, APIMiddleware);
|
29
51
|
const store = createStore(combinedReducers, initialFullState, middlewares);
|
30
52
|
const connectedComponent = (
|
@@ -36,7 +58,11 @@ function renderWithApiRedux(
|
|
36
58
|
return { ...render(connectedComponent), store };
|
37
59
|
}
|
38
60
|
|
61
|
+
// When the tests run slower, they can hit the default waitFor timeout, which is 1000ms
|
62
|
+
// There doesn't seem to be a way to set it globally for r-t-lib, so using this wrapper function
|
63
|
+
export const patientlyWaitFor = waitForFunc => waitFor(waitForFunc, { timeout: 5000 });
|
64
|
+
|
39
65
|
// re-export everything, so the library can be used from this wrapper.
|
40
66
|
export * from '@testing-library/react';
|
41
67
|
|
42
|
-
export {
|
68
|
+
export { renderWithRedux };
|