katello 4.18.1 → 4.19.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ca/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/cs/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/de/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/el/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/en/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/en_US/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/es/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/fr/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/gl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/gu/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/hi/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/id/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/it/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ja/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/ka/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/kn/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ko/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/mr/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/or/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pa/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pt/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/ro/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ru/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/sl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ta/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/te/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/tr/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/vi/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/zh/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +57 -108
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +41 -12
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -65
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +18 -3
- data/app/controllers/katello/api/v2/debs_controller.rb +21 -11
- data/app/controllers/katello/api/v2/docker_tags_controller.rb +7 -0
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +21 -19
- data/app/controllers/katello/api/v2/host_debs_controller.rb +16 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +3 -60
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +10 -53
- data/app/controllers/katello/api/v2/repositories_controller.rb +0 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +3 -0
- data/app/lib/actions/candlepin/activation_key/create.rb +0 -2
- data/app/lib/actions/candlepin/activation_key/update.rb +0 -2
- data/app/lib/actions/candlepin/product/content_create.rb +3 -5
- data/app/lib/actions/candlepin/product/content_update.rb +2 -3
- data/app/lib/actions/helpers/rolling_cv_repos.rb +1 -1
- data/app/lib/actions/katello/activation_key/create.rb +0 -1
- data/app/lib/actions/katello/activation_key/update.rb +0 -2
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -6
- data/app/lib/actions/katello/content_credential/update.rb +1 -1
- data/app/lib/actions/katello/content_view/add_rolling_repo_clone.rb +18 -24
- data/app/lib/actions/katello/content_view/create.rb +9 -4
- data/app/lib/actions/katello/content_view/refresh_rolling_repo.rb +6 -1
- data/app/lib/actions/katello/content_view/remove_rolling_repo_clone.rb +16 -11
- data/app/lib/actions/katello/content_view/update.rb +34 -7
- data/app/lib/actions/katello/product/content_create.rb +2 -2
- data/app/lib/actions/katello/product/content_destroy.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +1 -1
- data/app/lib/actions/katello/repository/create.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +4 -4
- data/app/lib/actions/katello/repository/finish_upload.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_publication.rb +3 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +45 -24
- data/app/lib/actions/pulp3/repository/save_versions.rb +2 -1
- data/app/lib/katello/resources/candlepin/activation_key.rb +3 -4
- data/app/lib/katello/resources/candlepin/upstream_job.rb +9 -1
- data/app/lib/katello/resources/candlepin.rb +4 -0
- data/app/models/katello/authorization/repository.rb +17 -4
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -7
- data/app/models/katello/content_view_deb_filter.rb +10 -0
- data/app/models/katello/content_view_deb_filter_rule.rb +7 -0
- data/app/models/katello/deb.rb +10 -10
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/provider.rb +14 -3
- data/app/models/katello/host/content_facet.rb +1 -1
- data/app/models/katello/host/subscription_facet.rb +1 -7
- data/app/models/katello/product_content.rb +2 -2
- data/app/models/katello/repository.rb +4 -23
- data/app/models/katello/root_repository.rb +2 -5
- data/app/services/katello/candlepin/event_handler.rb +0 -33
- data/app/services/katello/candlepin/message_handler.rb +0 -41
- data/app/services/katello/content_unit_indexer.rb +59 -13
- data/app/services/katello/product_content_finder.rb +5 -4
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/app/services/katello/pulp3/ansible_collection.rb +1 -0
- data/app/services/katello/pulp3/api/content_guard.rb +5 -5
- data/app/services/katello/pulp3/api/core.rb +10 -0
- data/app/services/katello/pulp3/deb.rb +1 -0
- data/app/services/katello/pulp3/docker_manifest.rb +1 -0
- data/app/services/katello/pulp3/docker_manifest_list.rb +1 -0
- data/app/services/katello/pulp3/docker_tag.rb +1 -0
- data/app/services/katello/pulp3/file_unit.rb +1 -0
- data/app/services/katello/pulp3/generic_content_unit.rb +1 -0
- data/app/services/katello/pulp3/module_stream.rb +1 -0
- data/app/services/katello/pulp3/package_group.rb +1 -0
- data/app/services/katello/pulp3/repository/apt.rb +30 -13
- data/app/services/katello/pulp3/repository.rb +59 -10
- data/app/services/katello/pulp3/rpm.rb +3 -2
- data/app/services/katello/pulp3/srpm.rb +3 -2
- data/app/services/katello/pulp3/task_group.rb +1 -1
- data/app/services/katello/registration_manager.rb +19 -17
- data/app/services/katello/repository_type_manager.rb +7 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -6
- data/app/views/foreman/job_templates/upload_profile.erb +5 -0
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +1 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -0
- data/app/views/katello/api/v2/debs/thindex.json.rabl +6 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +32 -0
- data/app/views/katello/api/v2/docker_tags/show.json.rabl +0 -5
- data/app/views/katello/api/v2/flatpak_remotes/index.json.rabl +6 -0
- data/app/views/katello/api/v2/host_debs/installed_debs.json.rabl +6 -0
- data/app/views/katello/api/v2/hosts_bulk_actions/applicable_errata.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/applicable_erratum.json.rabl +9 -0
- data/app/views/katello/api/v2/hosts_bulk_actions/installable_errata.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/{erratum.json.rabl → installable_erratum.json.rabl} +3 -3
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/config/initializers/monkeys.rb +1 -0
- data/config/routes/api/v2.rb +2 -2
- data/config/routes/overrides.rb +2 -7
- data/config/routes.rb +2 -0
- data/db/migrate/20211019192121_create_cdn_configuration.katello.rb +1 -1
- data/db/migrate/20250912000000_add_pulp_prn_fields.rb +73 -0
- data/db/migrate/20250912000001_populate_pulp_prn_fields.rb +403 -0
- data/db/migrate/20251009142516_remove_auto_attach_from_activation_keys.rb +5 -0
- data/db/migrate/20251009142517_remove_autoheal_from_subscription_facets.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +2 -2
- data/lib/katello/permission_creator.rb +2 -2
- data/lib/katello/permissions/host_permissions.rb +0 -6
- data/lib/katello/plugin.rb +16 -8
- data/lib/katello/tasks/jenkins.rake +1 -1
- data/lib/katello/tasks/upgrades/4.19/enable_structured_apt_for_deb.rake +87 -0
- data/lib/katello/tasks/upgrades/4.19/populate_repository_version_prns.rake +32 -0
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/fix_rpm_repository_gpgcheck.rb +38 -0
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +56 -107
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +56 -107
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +56 -107
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +56 -107
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +57 -108
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +58 -109
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +56 -107
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +56 -107
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +58 -109
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +56 -107
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +56 -107
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +56 -107
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +58 -109
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +56 -107
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +59 -110
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +56 -107
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +56 -107
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +56 -107
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +56 -107
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +56 -107
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +56 -107
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +59 -110
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +58 -109
- data/locale/katello.pot +676 -749
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +56 -107
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +59 -110
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +56 -107
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +56 -107
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +56 -107
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +56 -107
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +56 -107
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +56 -107
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +56 -107
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +56 -107
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +58 -109
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +56 -107
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +56 -107
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +57 -108
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +56 -107
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +56 -107
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +56 -107
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +56 -107
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +56 -107
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +56 -107
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +56 -107
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +56 -107
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +56 -107
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +59 -110
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +57 -108
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +2 -2
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +0 -2
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +0 -2
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +1 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkActionsConstants.js +7 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/BulkChangeHostCollectionsModal.js +388 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +640 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/actions.js +28 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/index.js +71 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +10 -3
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +51 -24
- data/webpack/components/extensions/Hosts/BulkActions/HostReview.js +7 -0
- data/webpack/containers/Application/config.js +11 -1
- data/webpack/global_index.js +3 -0
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/BootedContainerImagesConstants.js +1 -1
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/BootedContainerImagesPage.js +7 -43
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/__tests__/bootedContainerImagesPage.test.js +1 -1
- data/webpack/scenes/ContainerImages/ContainerImagesPage.js +86 -0
- data/webpack/scenes/ContainerImages/LabelsAnnotationsModal.js +105 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetails.js +218 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetailsActions.js +15 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetailsSelectors.js +16 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/ManifestDetails.test.js +395 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/manifestDetails.fixtures.json +43 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/manifestList.fixtures.json +58 -0
- data/webpack/scenes/ContainerImages/Synced/Details/index.js +4 -0
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.js +359 -0
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.scss +21 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/LabelsAnnotationsModal.test.js +69 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/SyncedContainerImagesPage.test.js +335 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/syncedContainerImages.fixtures.json +105 -0
- data/webpack/scenes/ContainerImages/TableEmptyState.js +67 -0
- data/webpack/scenes/ContainerImages/containerImagesHelpers.js +48 -0
- data/webpack/scenes/ContainerImages/index.js +4 -0
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +29 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +45 -1
- data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +0 -1
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +59 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js +164 -24
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVDebFilterContent.test.js +268 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvDebFilterDetail.fixtures.json +95 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvDebFilterRules.fixtures.json +31 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/emptyCVDebFilterRules.fixtures.json +10 -0
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +0 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +0 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewRollingDetail.test.js +15 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewRollingDetails.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +9 -0
- data/webpack/scenes/FlatpakRemotes/CreateEdit/CreateFlatpakRemoteModal.js +5 -3
- data/webpack/scenes/FlatpakRemotes/CreateEdit/EditFlatpakRemotesModal.js +1 -1
- data/webpack/scenes/FlatpakRemotes/CreateEdit/FlatpakRemoteform.js +35 -3
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetails.js +1 -1
- data/webpack/scenes/FlatpakRemotes/Details/RemoteRepositories/RemoteRepositoriesTable.css +3 -0
- data/webpack/scenes/FlatpakRemotes/Details/RemoteRepositories/RemoteRepositoriesTable.js +63 -132
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesPage.js +67 -143
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +10 -2
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +13 -2
- data/webpack/scenes/SmartProxy/SmartProxyContentConstants.js +1 -0
- data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +8 -2
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +67 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +2 -2
- metadata +83 -55
- data/app/lib/actions/katello/host/attach_subscriptions.rb +0 -59
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -22
- data/app/lib/actions/katello/host/remove_subscriptions.rb +0 -50
- data/app/lib/actions/katello/organization/simple_content_access/disable.rb +0 -25
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +0 -25
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +0 -42
- data/lib/katello/tasks/migrate_structure_content_for_deb.rake +0 -105
- data/lib/katello/tasks/upgrades/4.2/remove_checksum_values.rake +0 -17
- data/locale/action_names.rb +0 -186
- /data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/__tests__/bootedContainerImages.fixtures.js +0 -0
- /data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/index.js +0 -0
|
@@ -1,72 +1,27 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Table, Thead, Th, Tbody, Tr, Td } from '@patternfly/react-table';
|
|
4
3
|
import { Button } from '@patternfly/react-core';
|
|
5
4
|
import TableIndexPage from 'foremanReact/components/PF4/TableIndexPage/TableIndexPage';
|
|
6
|
-
import Pagination from 'foremanReact/components/Pagination';
|
|
7
|
-
import EmptyPage from 'foremanReact/routes/common/EmptyPage';
|
|
8
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
9
|
-
import { STATUS } from 'foremanReact/constants';
|
|
10
|
-
import { useTableSort } from 'foremanReact/components/PF4/Helpers/useTableSort';
|
|
11
6
|
import {
|
|
12
|
-
useSetParamsAndApiAndSearch,
|
|
13
7
|
useTableIndexAPIResponse,
|
|
14
8
|
} from 'foremanReact/components/PF4/TableIndexPage/Table/TableIndexHooks';
|
|
15
9
|
import LastSync from '../../../ContentViews/Details/Repositories/LastSync';
|
|
16
10
|
import { flatpakRemoteRepositoriesKey } from '../../FlatpakRemotesConstants';
|
|
17
11
|
import MirrorRepositoryModal from '../Mirror/MirrorRepositoryModal';
|
|
12
|
+
import './RemoteRepositoriesTable.css';
|
|
18
13
|
|
|
19
14
|
const RemoteRepositoriesTable = ({ frId, canMirror }) => {
|
|
20
15
|
const [selectedRepo, setSelectedRepo] = useState(null);
|
|
21
16
|
|
|
22
|
-
const columnHeaders = [__('Name'), __('ID'), __('Application name'), __('Last mirrored'), __('Mirror')];
|
|
23
|
-
|
|
24
|
-
const COLUMNS_TO_SORT_PARAMS = {
|
|
25
|
-
[columnHeaders[0]]: 'name',
|
|
26
|
-
[columnHeaders[1]]: 'id',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
17
|
const apiUrl = `/katello/api/v2/flatpak_remotes/${frId}/flatpak_remote_repositories`;
|
|
30
18
|
const apiOptions = { key: flatpakRemoteRepositoriesKey(frId) };
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const {
|
|
35
|
-
response: {
|
|
36
|
-
results = [],
|
|
37
|
-
subtotal,
|
|
38
|
-
page,
|
|
39
|
-
per_page: perPage,
|
|
40
|
-
message: error,
|
|
41
|
-
} = {},
|
|
42
|
-
status,
|
|
43
|
-
setAPIOptions,
|
|
44
|
-
} = useTableIndexAPIResponse({ apiUrl, apiOptions, defaultParams });
|
|
45
|
-
|
|
46
|
-
const { setParamsAndAPI, params } = useSetParamsAndApiAndSearch({
|
|
47
|
-
defaultParams,
|
|
20
|
+
useTableIndexAPIResponse({
|
|
21
|
+
apiUrl,
|
|
48
22
|
apiOptions,
|
|
49
|
-
setAPIOptions,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const onSort = (_event, index, direction) => {
|
|
53
|
-
const sortBy = Object.values(COLUMNS_TO_SORT_PARAMS)[index];
|
|
54
|
-
setParamsAndAPI({
|
|
55
|
-
...params,
|
|
56
|
-
order: `${sortBy} ${direction}`,
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const { pfSortParams } = useTableSort({
|
|
61
|
-
allColumns: columnHeaders,
|
|
62
|
-
columnsToSortParams: COLUMNS_TO_SORT_PARAMS,
|
|
63
|
-
onSort,
|
|
64
23
|
});
|
|
65
24
|
|
|
66
|
-
const onPaginationChange = (newPagination) => {
|
|
67
|
-
setParamsAndAPI({ ...params, ...newPagination });
|
|
68
|
-
};
|
|
69
|
-
|
|
70
25
|
const openMirrorModal = (repo) => {
|
|
71
26
|
setSelectedRepo(repo);
|
|
72
27
|
};
|
|
@@ -75,91 +30,67 @@ const RemoteRepositoriesTable = ({ frId, canMirror }) => {
|
|
|
75
30
|
setSelectedRepo(null);
|
|
76
31
|
};
|
|
77
32
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}}
|
|
121
|
-
startedAt={repo.last_mirrored?.started_at}
|
|
122
|
-
emptyMessage={__('Never')}
|
|
123
|
-
/>
|
|
124
|
-
</Td>
|
|
125
|
-
{canMirror &&
|
|
126
|
-
<Td>
|
|
127
|
-
<Button
|
|
128
|
-
variant="link"
|
|
129
|
-
isInline
|
|
130
|
-
ouiaId={`mirror-button-${repo.id}`}
|
|
131
|
-
onClick={() => openMirrorModal(repo)}
|
|
132
|
-
>
|
|
133
|
-
{__('Mirror')}
|
|
134
|
-
</Button>
|
|
135
|
-
</Td>
|
|
136
|
-
}
|
|
137
|
-
</Tr>
|
|
138
|
-
))}
|
|
139
|
-
</Tbody>
|
|
140
|
-
</Table>
|
|
141
|
-
)}
|
|
142
|
-
|
|
143
|
-
{results.length > 0 && (
|
|
144
|
-
<Pagination
|
|
145
|
-
key="remote-repos-pagination"
|
|
146
|
-
page={page}
|
|
147
|
-
perPage={perPage}
|
|
148
|
-
itemCount={subtotal}
|
|
149
|
-
onChange={onPaginationChange}
|
|
150
|
-
updateParamsByUrl
|
|
151
|
-
/>
|
|
152
|
-
)}
|
|
33
|
+
const columns = {
|
|
34
|
+
name: {
|
|
35
|
+
title: __('Name'),
|
|
36
|
+
isSorted: true,
|
|
37
|
+
},
|
|
38
|
+
id: {
|
|
39
|
+
title: __('ID'),
|
|
40
|
+
isSorted: true,
|
|
41
|
+
},
|
|
42
|
+
application_name: {
|
|
43
|
+
title: __('Application name'),
|
|
44
|
+
},
|
|
45
|
+
last_mirrored: {
|
|
46
|
+
title: __('Last mirrored'),
|
|
47
|
+
wrapper: rowData => (
|
|
48
|
+
<LastSync
|
|
49
|
+
lastSyncWords={rowData.last_mirrored?.last_mirror_words}
|
|
50
|
+
lastSync={{
|
|
51
|
+
id: rowData.last_mirrored?.mirror_id,
|
|
52
|
+
result: rowData.last_mirrored?.result,
|
|
53
|
+
}}
|
|
54
|
+
startedAt={rowData.last_mirrored?.started_at}
|
|
55
|
+
emptyMessage={__('Never')}
|
|
56
|
+
/>
|
|
57
|
+
),
|
|
58
|
+
},
|
|
59
|
+
...(canMirror && {
|
|
60
|
+
mirror: {
|
|
61
|
+
title: __('Mirror'),
|
|
62
|
+
wrapper: rowData => (
|
|
63
|
+
<Button
|
|
64
|
+
variant="link"
|
|
65
|
+
isInline
|
|
66
|
+
ouiaId={`mirror-button-${rowData.id}`}
|
|
67
|
+
onClick={() => openMirrorModal(rowData)}
|
|
68
|
+
>
|
|
69
|
+
{__('Mirror')}
|
|
70
|
+
</Button>
|
|
71
|
+
),
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
153
75
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
76
|
+
return (
|
|
77
|
+
<>
|
|
78
|
+
<TableIndexPage
|
|
79
|
+
apiUrl={apiUrl}
|
|
80
|
+
apiOptions={apiOptions}
|
|
81
|
+
columns={columns}
|
|
82
|
+
creatable={false}
|
|
83
|
+
controller="/katello/api/v2/flatpak_remote_repositories"
|
|
84
|
+
ouiaId="remote-repos-table"
|
|
85
|
+
/>
|
|
86
|
+
{selectedRepo && (
|
|
87
|
+
<MirrorRepositoryModal
|
|
88
|
+
frId={frId}
|
|
89
|
+
repo={selectedRepo}
|
|
90
|
+
closeModal={closeMirrorModal}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
</>
|
|
163
94
|
);
|
|
164
95
|
};
|
|
165
96
|
|
|
@@ -1,106 +1,83 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
3
|
-
import { useDispatch
|
|
4
|
-
import { Table, Thead, Th, Tbody, Tr, Td } from '@patternfly/react-table';
|
|
3
|
+
import { useDispatch } from 'react-redux';
|
|
5
4
|
import TableIndexPage from 'foremanReact/components/PF4/TableIndexPage/TableIndexPage';
|
|
6
5
|
import {
|
|
7
6
|
useSetParamsAndApiAndSearch,
|
|
8
7
|
useTableIndexAPIResponse,
|
|
9
8
|
} from 'foremanReact/components/PF4/TableIndexPage/Table/TableIndexHooks';
|
|
10
|
-
import { useTableSort } from 'foremanReact/components/PF4/Helpers/useTableSort';
|
|
11
|
-
import EmptyPage from 'foremanReact/routes/common/EmptyPage';
|
|
12
|
-
import Pagination from 'foremanReact/components/Pagination';
|
|
13
9
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
|
14
|
-
import {
|
|
15
|
-
import { selectFlatpakRemotes, selectFlatpakRemotesError, selectFlatpakRemotesStatus } from './FlatpakRemotesSelectors';
|
|
16
|
-
import { getResponseErrorMsgs, truncate } from '../../utils/helpers';
|
|
10
|
+
import { truncate } from '../../utils/helpers';
|
|
17
11
|
import CreateFlatpakModal from './CreateEdit/CreateFlatpakRemoteModal';
|
|
18
12
|
import EditFlatpakModal from './CreateEdit/EditFlatpakRemotesModal';
|
|
19
13
|
import { scanFlatpakRemote } from './Details/FlatpakRemoteDetailActions';
|
|
20
14
|
import DeleteFlatpakModal from './Delete/DeleteFlatpakModal';
|
|
21
15
|
|
|
22
16
|
const FlatpakRemotesPage = () => {
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const status = useSelector(selectFlatpakRemotesStatus);
|
|
26
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
27
|
-
const [isEditModalOpen, setEditModalOpen] = useState(false);
|
|
17
|
+
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
|
18
|
+
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
|
|
28
19
|
const [editingRemoteData, setEditingRemoteData] = useState(null);
|
|
29
20
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
|
|
30
21
|
const [remoteIdToDelete, setRemoteIdToDelete] = useState('');
|
|
31
22
|
const dispatch = useDispatch();
|
|
32
|
-
const {
|
|
33
|
-
results = [],
|
|
34
|
-
subtotal,
|
|
35
|
-
page,
|
|
36
|
-
perPage,
|
|
37
|
-
can_edit: canEdit = false,
|
|
38
|
-
can_delete: canDelete = false,
|
|
39
|
-
can_create: canCreate = false,
|
|
40
|
-
} = response || {};
|
|
41
|
-
|
|
42
|
-
const columnHeaders = [__('Name'), __('URL')];
|
|
43
|
-
const COLUMNS_TO_SORT_PARAMS = {
|
|
44
|
-
[columnHeaders[0]]: 'name',
|
|
45
|
-
[columnHeaders[1]]: 'url',
|
|
46
|
-
};
|
|
47
23
|
|
|
48
24
|
const apiOptions = {
|
|
49
25
|
key: 'FLATPAK_REMOTES',
|
|
50
26
|
};
|
|
51
27
|
|
|
52
|
-
const defaultParams = {
|
|
53
|
-
page: page || 1,
|
|
54
|
-
per_page: perPage || 20,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
28
|
const apiUrl = '/katello/api/v2/flatpak_remotes';
|
|
58
29
|
|
|
59
30
|
const apiResponse = useTableIndexAPIResponse({
|
|
60
31
|
apiUrl,
|
|
61
32
|
apiOptions,
|
|
62
|
-
defaultParams,
|
|
63
33
|
});
|
|
64
34
|
|
|
65
|
-
|
|
66
|
-
setParamsAndAPI,
|
|
67
|
-
params,
|
|
68
|
-
} = useSetParamsAndApiAndSearch({
|
|
69
|
-
defaultParams,
|
|
35
|
+
useSetParamsAndApiAndSearch({
|
|
70
36
|
apiOptions,
|
|
71
37
|
setAPIOptions: apiResponse.setAPIOptions,
|
|
72
38
|
});
|
|
73
39
|
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const onPaginationChange = (newPagination) => {
|
|
83
|
-
setParamsAndAPI({
|
|
84
|
-
...params,
|
|
85
|
-
...newPagination,
|
|
86
|
-
});
|
|
87
|
-
};
|
|
40
|
+
const {
|
|
41
|
+
can_edit: canEdit = false,
|
|
42
|
+
can_delete: canDelete = false,
|
|
43
|
+
can_create: canCreate = false,
|
|
44
|
+
has_redhat_flatpak_remote: hasRedhatRemote = false,
|
|
45
|
+
} = apiResponse.response || {};
|
|
88
46
|
|
|
89
|
-
const
|
|
90
|
-
allColumns: columnHeaders,
|
|
91
|
-
columnsToSortParams: COLUMNS_TO_SORT_PARAMS,
|
|
92
|
-
onSort,
|
|
93
|
-
});
|
|
47
|
+
const openCreateModal = () => setIsCreateModalOpen(true);
|
|
94
48
|
|
|
95
|
-
const
|
|
49
|
+
const columns = {
|
|
50
|
+
name: {
|
|
51
|
+
title: __('Name'),
|
|
52
|
+
isSorted: true,
|
|
53
|
+
wrapper: rowData => (
|
|
54
|
+
<a href={`${urlBuilder('flatpak_remotes', '')}${rowData.id}`}>
|
|
55
|
+
{truncate(rowData.name)}
|
|
56
|
+
</a>
|
|
57
|
+
),
|
|
58
|
+
},
|
|
59
|
+
url: {
|
|
60
|
+
title: __('URL'),
|
|
61
|
+
isSorted: true,
|
|
62
|
+
wrapper: rowData => (
|
|
63
|
+
<a href={rowData.url} target="_blank" rel="noopener noreferrer">
|
|
64
|
+
{truncate(rowData.url)}
|
|
65
|
+
</a>
|
|
66
|
+
),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
96
69
|
|
|
97
|
-
const
|
|
98
|
-
{
|
|
70
|
+
const rowKebabItems = remote => [
|
|
71
|
+
{
|
|
72
|
+
title: __('Scan'),
|
|
73
|
+
isDisabled: !canEdit,
|
|
74
|
+
onClick: () => { dispatch(scanFlatpakRemote(remote.id)); },
|
|
75
|
+
},
|
|
99
76
|
{
|
|
100
77
|
title: __('Edit'),
|
|
101
78
|
isDisabled: !canEdit,
|
|
102
79
|
onClick: () => {
|
|
103
|
-
|
|
80
|
+
setIsEditModalOpen(true);
|
|
104
81
|
setEditingRemoteData(remote);
|
|
105
82
|
},
|
|
106
83
|
},
|
|
@@ -115,87 +92,34 @@ const FlatpakRemotesPage = () => {
|
|
|
115
92
|
];
|
|
116
93
|
|
|
117
94
|
return (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
{
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<Th key={col} sort={pfSortParams(col)}>
|
|
147
|
-
{col}
|
|
148
|
-
</Th>
|
|
149
|
-
))}
|
|
150
|
-
<Th key="action-menu" aria-label="action menu table header" />
|
|
151
|
-
</Tr>
|
|
152
|
-
</Thead>
|
|
153
|
-
<Tbody>
|
|
154
|
-
{results.map((remote) => {
|
|
155
|
-
const {
|
|
156
|
-
id, name, url,
|
|
157
|
-
} = remote;
|
|
158
|
-
return (
|
|
159
|
-
<Tr key={id} ouiaId={`flatpak-remote-row-${id}`}>
|
|
160
|
-
<Td><a href={`${urlBuilder('flatpak_remotes', '')}${id}`}>{truncate(name)}</a></Td>
|
|
161
|
-
<Td>
|
|
162
|
-
<a href={url} target="_blank" rel="noopener noreferrer">
|
|
163
|
-
{truncate(url)}
|
|
164
|
-
</a>
|
|
165
|
-
</Td>
|
|
166
|
-
<Td actions={{ items: actionsWithPermissions(remote) }} />
|
|
167
|
-
</Tr>
|
|
168
|
-
);
|
|
169
|
-
})}
|
|
170
|
-
</Tbody>
|
|
171
|
-
</Table>
|
|
172
|
-
)}
|
|
173
|
-
{results.length > 0 && (
|
|
174
|
-
<Pagination
|
|
175
|
-
key="table-bottom-pagination"
|
|
176
|
-
page={page}
|
|
177
|
-
perPage={perPage}
|
|
178
|
-
itemCount={subtotal}
|
|
179
|
-
onChange={onPaginationChange}
|
|
180
|
-
updateParamsByUrl
|
|
181
|
-
/>
|
|
182
|
-
)}
|
|
183
|
-
<CreateFlatpakModal
|
|
184
|
-
show={isModalOpen}
|
|
185
|
-
setIsOpen={setIsModalOpen}
|
|
186
|
-
/>
|
|
187
|
-
<EditFlatpakModal
|
|
188
|
-
show={isEditModalOpen}
|
|
189
|
-
setIsOpen={setEditModalOpen}
|
|
190
|
-
remoteData={editingRemoteData}
|
|
191
|
-
/>
|
|
192
|
-
<DeleteFlatpakModal
|
|
193
|
-
isModalOpen={isDeleteModalOpen}
|
|
194
|
-
handleModalToggle={() => setIsDeleteModalOpen(!isDeleteModalOpen)}
|
|
195
|
-
remoteId={remoteIdToDelete}
|
|
196
|
-
/>
|
|
197
|
-
</>
|
|
198
|
-
</TableIndexPage>
|
|
95
|
+
<>
|
|
96
|
+
<TableIndexPage
|
|
97
|
+
apiUrl={apiUrl}
|
|
98
|
+
apiOptions={apiOptions}
|
|
99
|
+
header={__('Flatpak Remotes')}
|
|
100
|
+
columns={columns}
|
|
101
|
+
rowKebabItems={rowKebabItems}
|
|
102
|
+
creatable={canCreate}
|
|
103
|
+
customCreateAction={() => openCreateModal}
|
|
104
|
+
controller="/katello/api/v2/flatpak_remotes"
|
|
105
|
+
ouiaId="flatpak-remotes-table"
|
|
106
|
+
/>
|
|
107
|
+
<CreateFlatpakModal
|
|
108
|
+
show={isCreateModalOpen}
|
|
109
|
+
setIsOpen={setIsCreateModalOpen}
|
|
110
|
+
hasRedhatRemote={hasRedhatRemote}
|
|
111
|
+
/>
|
|
112
|
+
<EditFlatpakModal
|
|
113
|
+
show={isEditModalOpen}
|
|
114
|
+
setIsOpen={setIsEditModalOpen}
|
|
115
|
+
remoteData={editingRemoteData}
|
|
116
|
+
/>
|
|
117
|
+
<DeleteFlatpakModal
|
|
118
|
+
isModalOpen={isDeleteModalOpen}
|
|
119
|
+
handleModalToggle={() => setIsDeleteModalOpen(!isDeleteModalOpen)}
|
|
120
|
+
remoteId={remoteIdToDelete}
|
|
121
|
+
/>
|
|
122
|
+
</>
|
|
199
123
|
);
|
|
200
124
|
};
|
|
201
125
|
|
|
@@ -9,7 +9,7 @@ import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
|
|
9
9
|
import { useSet } from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
|
|
10
10
|
import ContentViewIcon from '../ContentViews/components/ContentViewIcon';
|
|
11
11
|
import ExpandedSmartProxyRepositories from './ExpandedSmartProxyRepositories';
|
|
12
|
-
import { updateSmartProxyContentCounts } from './SmartProxyContentActions';
|
|
12
|
+
import { updateSmartProxyContentCounts, repairSmartProxyContent } from './SmartProxyContentActions';
|
|
13
13
|
|
|
14
14
|
const ExpandableCvDetails = ({
|
|
15
15
|
smartProxyId, contentViews, contentCounts, envId,
|
|
@@ -31,6 +31,14 @@ const ExpandableCvDetails = ({
|
|
|
31
31
|
}));
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
|
+
const repairContentAction = cvId => ({
|
|
35
|
+
title: __('Verify Content Checksum'),
|
|
36
|
+
onClick: () => {
|
|
37
|
+
dispatch(repairSmartProxyContent(smartProxyId, {
|
|
38
|
+
environment_id: envId, content_view_id: cvId,
|
|
39
|
+
}));
|
|
40
|
+
},
|
|
41
|
+
});
|
|
34
42
|
|
|
35
43
|
const anyRepoInEnv = (repositories) => {
|
|
36
44
|
if (repositories && Object.values(repositories)) {
|
|
@@ -103,7 +111,7 @@ const ExpandableCvDetails = ({
|
|
|
103
111
|
<Td
|
|
104
112
|
key={`rowActions-${id}`}
|
|
105
113
|
actions={{
|
|
106
|
-
items: [refreshCountAction(id)],
|
|
114
|
+
items: [refreshCountAction(id), repairContentAction(id)],
|
|
107
115
|
}}
|
|
108
116
|
/>
|
|
109
117
|
</Tr>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API_OPERATIONS, get, post } from 'foremanReact/redux/API';
|
|
2
2
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
3
3
|
import api, { foremanApi, orgId } from '../../services/api';
|
|
4
|
-
import SMART_PROXY_CONTENT_KEY, { SMART_PROXY_COUNTS_UPDATE_KEY, SMART_PROXY_KEY } from './SmartProxyContentConstants';
|
|
4
|
+
import SMART_PROXY_CONTENT_KEY, { SMART_PROXY_COUNTS_UPDATE_KEY, SMART_PROXY_REPAIR_CONTENT_KEY, SMART_PROXY_KEY } from './SmartProxyContentConstants';
|
|
5
5
|
import { renderTaskStartedToast } from '../Tasks/helpers';
|
|
6
6
|
import { getResponseErrorMsgs } from '../../utils/helpers';
|
|
7
7
|
|
|
@@ -26,7 +26,18 @@ export const updateSmartProxyContentCounts = (smartProxyId, params) => post({
|
|
|
26
26
|
handleSuccess: (response) => {
|
|
27
27
|
renderTaskStartedToast(response?.data, __('Smart proxy content count refresh has started in the background'));
|
|
28
28
|
},
|
|
29
|
-
errorToast: error => __(`Something went wrong while refreshing content counts: ${getResponseErrorMsgs(error
|
|
29
|
+
errorToast: error => __(`Something went wrong while refreshing content counts: ${getResponseErrorMsgs(error?.response)}`),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const repairSmartProxyContent = (smartProxyId, params) => post({
|
|
33
|
+
type: API_OPERATIONS.POST,
|
|
34
|
+
key: SMART_PROXY_REPAIR_CONTENT_KEY,
|
|
35
|
+
url: api.getApiUrl(`/capsules/${smartProxyId}/content/verify_checksum`),
|
|
36
|
+
params,
|
|
37
|
+
handleSuccess: (response) => {
|
|
38
|
+
renderTaskStartedToast(response?.data, __('Smart proxy verify content checksum has started in the background'));
|
|
39
|
+
},
|
|
40
|
+
errorToast: error => __(`Something went wrong while verifying content checksums: ${getResponseErrorMsgs(error?.response)}`),
|
|
30
41
|
});
|
|
31
42
|
|
|
32
43
|
export default getSmartProxyContent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const SMART_PROXY_CONTENT_KEY = 'SMART_PROXY_CONTENT';
|
|
2
2
|
export const SMART_PROXY_KEY = 'SMART_PROXY';
|
|
3
3
|
export const SMART_PROXY_COUNTS_UPDATE_KEY = 'SMART_PROXY_COUNTS_UPDATE_KEY';
|
|
4
|
+
export const SMART_PROXY_REPAIR_CONTENT_KEY = 'SMART_PROXY_REPAIR_CONTENT_KEY';
|
|
4
5
|
export default SMART_PROXY_CONTENT_KEY;
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
5
5
|
import { Thead, Tbody, Th, Tr, Td } from '@patternfly/react-table';
|
|
6
6
|
import { useSet } from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
|
|
7
|
-
import getSmartProxyContent, { updateSmartProxyContentCounts } from './SmartProxyContentActions';
|
|
7
|
+
import getSmartProxyContent, { updateSmartProxyContentCounts, repairSmartProxyContent } from './SmartProxyContentActions';
|
|
8
8
|
import {
|
|
9
9
|
selectSmartProxyContent,
|
|
10
10
|
selectSmartProxyContentStatus,
|
|
@@ -41,6 +41,12 @@ const SmartProxyExpandableTable = ({ smartProxyId, organizationId }) => {
|
|
|
41
41
|
dispatch(updateSmartProxyContentCounts(smartProxyId, { environment_id: envId }));
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
|
+
const repairContentAction = envId => ({
|
|
45
|
+
title: __('Verify Content Checksum'),
|
|
46
|
+
onClick: () => {
|
|
47
|
+
dispatch(repairSmartProxyContent(smartProxyId, { environment_id: envId }));
|
|
48
|
+
},
|
|
49
|
+
});
|
|
44
50
|
|
|
45
51
|
const fetchItems = useCallback(
|
|
46
52
|
() => getSmartProxyContent({ smartProxyId, organizationId }),
|
|
@@ -110,7 +116,7 @@ const SmartProxyExpandableTable = ({ smartProxyId, organizationId }) => {
|
|
|
110
116
|
<Td
|
|
111
117
|
key={`rowActions-${id}`}
|
|
112
118
|
actions={{
|
|
113
|
-
items: [refreshCountAction(id)],
|
|
119
|
+
items: [refreshCountAction(id), repairContentAction(id)],
|
|
114
120
|
}}
|
|
115
121
|
/>
|
|
116
122
|
</Tr>
|
|
@@ -9,6 +9,7 @@ const smartProxyContentData = require('./SmartProxyContentTest.fixtures.json');
|
|
|
9
9
|
|
|
10
10
|
const smartProxyContentPath = api.getApiUrl('/capsules/1/content/sync');
|
|
11
11
|
const smartProxyRefreshCountPath = api.getApiUrl('/capsules/1/content/update_counts');
|
|
12
|
+
const smartProxyRepairContentPath = api.getApiUrl('/capsules/1/content/verify_checksum');
|
|
12
13
|
|
|
13
14
|
const smartProxyContent = { ...smartProxyContentData };
|
|
14
15
|
|
|
@@ -129,7 +130,6 @@ test('Can call content count refresh for content view', async (done) => {
|
|
|
129
130
|
})
|
|
130
131
|
.reply(202);
|
|
131
132
|
|
|
132
|
-
|
|
133
133
|
const {
|
|
134
134
|
getByText, getAllByText, getByLabelText, getAllByLabelText,
|
|
135
135
|
} = renderWithRedux(contentTable);
|
|
@@ -153,3 +153,69 @@ test('Can call content count refresh for content view', async (done) => {
|
|
|
153
153
|
assertNockRequest(countsCVRefreshScope, done);
|
|
154
154
|
act(done);
|
|
155
155
|
});
|
|
156
|
+
|
|
157
|
+
test('Can call content repair for environment', async (done) => {
|
|
158
|
+
const detailsScope = nockInstance
|
|
159
|
+
.get(smartProxyContentPath)
|
|
160
|
+
.query(true)
|
|
161
|
+
.reply(200, smartProxyContent);
|
|
162
|
+
|
|
163
|
+
const contentEnvRepairScope = nockInstance
|
|
164
|
+
.post(smartProxyRepairContentPath, {
|
|
165
|
+
environment_id: 1,
|
|
166
|
+
})
|
|
167
|
+
.reply(202);
|
|
168
|
+
|
|
169
|
+
const {
|
|
170
|
+
getByText, getAllByLabelText,
|
|
171
|
+
} = renderWithRedux(contentTable);
|
|
172
|
+
await patientlyWaitFor(() => expect(getByText('Environment')).toBeInTheDocument());
|
|
173
|
+
expect(getAllByLabelText('Kebab toggle')[0]).toHaveAttribute('aria-expanded', 'false');
|
|
174
|
+
fireEvent.click(getAllByLabelText('Kebab toggle')[0]);
|
|
175
|
+
expect(getAllByLabelText('Kebab toggle')[0]).toHaveAttribute('aria-expanded', 'true');
|
|
176
|
+
|
|
177
|
+
await patientlyWaitFor(() => expect(getByText('Verify Content Checksum')).toBeInTheDocument());
|
|
178
|
+
const verifyEnv = getByText('Verify Content Checksum');
|
|
179
|
+
verifyEnv.click();
|
|
180
|
+
|
|
181
|
+
assertNockRequest(detailsScope);
|
|
182
|
+
assertNockRequest(contentEnvRepairScope, done);
|
|
183
|
+
act(done);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
test('Can call content repair for content view', async (done) => {
|
|
187
|
+
const detailsScope = nockInstance
|
|
188
|
+
.get(smartProxyContentPath)
|
|
189
|
+
.query(true)
|
|
190
|
+
.reply(200, smartProxyContent);
|
|
191
|
+
|
|
192
|
+
const contentCVRepairScope = nockInstance
|
|
193
|
+
.post(smartProxyRepairContentPath, {
|
|
194
|
+
content_view_id: 1,
|
|
195
|
+
environment_id: 1,
|
|
196
|
+
})
|
|
197
|
+
.reply(202);
|
|
198
|
+
|
|
199
|
+
const {
|
|
200
|
+
getByText, getAllByText, getByLabelText, getAllByLabelText,
|
|
201
|
+
} = renderWithRedux(contentTable);
|
|
202
|
+
await patientlyWaitFor(() => expect(getByText('Environment')).toBeInTheDocument());
|
|
203
|
+
const tdEnvExpand = getByLabelText('expand-env-1');
|
|
204
|
+
const envExpansion = within(tdEnvExpand).getByLabelText('Details');
|
|
205
|
+
envExpansion.click();
|
|
206
|
+
await patientlyWaitFor(() => expect(getAllByText('Content view')[0]).toBeInTheDocument());
|
|
207
|
+
expect(getAllByText('Last published')[0]).toBeInTheDocument();
|
|
208
|
+
expect(getAllByText('Repository')[0]).toBeInTheDocument();
|
|
209
|
+
expect(getAllByText('Synced')[0]).toBeInTheDocument();
|
|
210
|
+
expect(getAllByLabelText('Kebab toggle')[1]).toHaveAttribute('aria-expanded', 'false');
|
|
211
|
+
fireEvent.click(getAllByLabelText('Kebab toggle')[1]);
|
|
212
|
+
expect(getAllByLabelText('Kebab toggle')[1]).toHaveAttribute('aria-expanded', 'true');
|
|
213
|
+
|
|
214
|
+
await patientlyWaitFor(() => expect(getByText('Verify Content Checksum')).toBeInTheDocument());
|
|
215
|
+
const repairCv = getByText('Verify Content Checksum');
|
|
216
|
+
repairCv.click();
|
|
217
|
+
|
|
218
|
+
assertNockRequest(detailsScope);
|
|
219
|
+
assertNockRequest(contentCVRepairScope, done);
|
|
220
|
+
act(done);
|
|
221
|
+
});
|