katello 4.18.0 → 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 +52 -349
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ca/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/cs/katello.js +53 -350
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +54 -351
- data/app/assets/javascripts/katello/locale/de/katello.js +56 -353
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/el/katello.js +54 -351
- data/app/assets/javascripts/katello/locale/en/katello.js +53 -350
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +53 -350
- data/app/assets/javascripts/katello/locale/en_US/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/es/katello.js +56 -353
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/fr/katello.js +138 -435
- data/app/assets/javascripts/katello/locale/gl/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/gu/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/hi/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/id/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/it/katello.js +53 -350
- data/app/assets/javascripts/katello/locale/ja/katello.js +142 -439
- data/app/assets/javascripts/katello/locale/ka/katello.js +56 -353
- data/app/assets/javascripts/katello/locale/kn/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ko/katello.js +135 -432
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/mr/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/or/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/pa/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/pl/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/pt/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +56 -353
- data/app/assets/javascripts/katello/locale/ro/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ru/katello.js +54 -351
- data/app/assets/javascripts/katello/locale/sl/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ta/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/te/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/tr/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/vi/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/zh/katello.js +52 -349
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +135 -432
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +54 -351
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +46 -13
- 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_export_incrementals_controller.rb +56 -34
- 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/errata_controller.rb +4 -4
- 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/publish.rb +7 -7
- 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 -12
- 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 +16 -7
- 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/content_view_version/export.rb +25 -10
- 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/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +6 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +4 -4
- 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 +52 -349
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +52 -349
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +52 -349
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +54 -350
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +54 -351
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +56 -353
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +52 -349
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +52 -349
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +55 -352
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +54 -350
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +53 -350
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +52 -349
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +56 -353
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +52 -349
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +139 -435
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +52 -349
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +52 -349
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +52 -349
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +52 -349
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +52 -349
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +53 -350
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +143 -439
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +56 -353
- data/locale/katello.pot +695 -1152
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +52 -349
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +136 -432
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +52 -349
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +52 -349
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +52 -349
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +52 -349
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +52 -349
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +52 -349
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +52 -349
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +52 -349
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +56 -353
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +52 -349
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +52 -349
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +54 -351
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +52 -349
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +52 -349
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +52 -349
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +52 -349
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +52 -349
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +52 -349
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +52 -349
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +52 -349
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +52 -349
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +136 -432
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +54 -351
- 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
|
@@ -7,7 +7,7 @@ import CreateContentViewForm from '../CreateContentViewForm';
|
|
|
7
7
|
import cvCreateData from './contentViewCreateResult.fixtures.json';
|
|
8
8
|
|
|
9
9
|
const cvCreatePath = api.getApiUrl('/content_views');
|
|
10
|
-
|
|
10
|
+
const envPath = api.getApiUrl('/organizations/1/environments/paths?permission_type=promotable');
|
|
11
11
|
const mockFn = jest.fn();
|
|
12
12
|
|
|
13
13
|
delete window.location;
|
|
@@ -27,6 +27,17 @@ const createDetails = {
|
|
|
27
27
|
auto_publish: false,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const createRollingDetails = {
|
|
31
|
+
name: '1232123',
|
|
32
|
+
label: '1232123',
|
|
33
|
+
description: '',
|
|
34
|
+
composite: false,
|
|
35
|
+
rolling: true,
|
|
36
|
+
solve_dependencies: false,
|
|
37
|
+
auto_publish: false,
|
|
38
|
+
environment_ids: [],
|
|
39
|
+
};
|
|
40
|
+
|
|
30
41
|
const createdCVDetails = { ...cvCreateData };
|
|
31
42
|
|
|
32
43
|
const form = <CreateContentViewForm setModalOpen={mockFn} />;
|
|
@@ -48,6 +59,30 @@ test('Can save content view from form', async (done) => {
|
|
|
48
59
|
done();
|
|
49
60
|
});
|
|
50
61
|
|
|
62
|
+
test('Can save rolling content view from form with environment_ids param passed', async (done) => {
|
|
63
|
+
const createscope = nockInstance
|
|
64
|
+
.post(cvCreatePath, createRollingDetails)
|
|
65
|
+
.reply(201, createdCVDetails);
|
|
66
|
+
const envscope = nockInstance
|
|
67
|
+
.get(envPath)
|
|
68
|
+
.reply(200, []);
|
|
69
|
+
|
|
70
|
+
const { queryByText, getByLabelText } = renderWithRedux(form);
|
|
71
|
+
expect(queryByText('Description')).toBeInTheDocument();
|
|
72
|
+
fireEvent.change(getByLabelText('input_name'), { target: { value: '1232123' } });
|
|
73
|
+
|
|
74
|
+
await patientlyWaitFor(() => { expect(getByLabelText('input_label')).toHaveAttribute('value', '1232123'); });
|
|
75
|
+
|
|
76
|
+
fireEvent.click(getByLabelText('rolling_tile'));
|
|
77
|
+
await patientlyWaitFor(() => { expect(getByLabelText('rolling_tile')).toHaveAttribute('aria-selected', 'true'); });
|
|
78
|
+
|
|
79
|
+
getByLabelText('create_content_view').click();
|
|
80
|
+
|
|
81
|
+
assertNockRequest(createscope);
|
|
82
|
+
assertNockRequest(envscope);
|
|
83
|
+
done();
|
|
84
|
+
});
|
|
85
|
+
|
|
51
86
|
test('Form closes itself upon save', async (done) => {
|
|
52
87
|
const createscope = nockInstance
|
|
53
88
|
.post(cvCreatePath, createDetails)
|
|
@@ -81,6 +116,7 @@ test('Displays dependent fields correctly', () => {
|
|
|
81
116
|
expect(getByText('Rolling content view')).toBeInTheDocument();
|
|
82
117
|
expect(getByText('Solve dependencies')).toBeInTheDocument();
|
|
83
118
|
expect(queryByText('Auto publish')).not.toBeInTheDocument();
|
|
119
|
+
expect(queryByText('Lifecycle Environments')).not.toBeInTheDocument();
|
|
84
120
|
|
|
85
121
|
// label auto_set
|
|
86
122
|
fireEvent.change(getByLabelText('input_name'), { target: { value: '123 2123' } });
|
|
@@ -90,11 +126,19 @@ test('Displays dependent fields correctly', () => {
|
|
|
90
126
|
fireEvent.click(getByLabelText('composite_tile'));
|
|
91
127
|
expect(queryByText('Solve dependencies')).not.toBeInTheDocument();
|
|
92
128
|
expect(getByText('Auto publish')).toBeInTheDocument();
|
|
129
|
+
expect(queryByText('Lifecycle Environments')).not.toBeInTheDocument();
|
|
93
130
|
|
|
94
131
|
// display Solve Dependencies when Component CV
|
|
95
132
|
fireEvent.click(getByLabelText('component_tile'));
|
|
96
133
|
expect(getByText('Solve dependencies')).toBeInTheDocument();
|
|
97
134
|
expect(queryByText('Auto publish')).not.toBeInTheDocument();
|
|
135
|
+
expect(queryByText('Lifecycle Environments')).not.toBeInTheDocument();
|
|
136
|
+
|
|
137
|
+
// display Lifecycle Environments when Rolling CV
|
|
138
|
+
fireEvent.click(getByLabelText('rolling_tile'));
|
|
139
|
+
expect(queryByText('Solve dependencies')).not.toBeInTheDocument();
|
|
140
|
+
expect(queryByText('Auto publish')).not.toBeInTheDocument();
|
|
141
|
+
expect(getByText('Lifecycle Environments')).toBeInTheDocument();
|
|
98
142
|
});
|
|
99
143
|
|
|
100
144
|
test('Validates label field', () => {
|
|
@@ -129,7 +129,6 @@
|
|
|
129
129
|
"last_checkin": "2021-10-01 14:23:38 -0400",
|
|
130
130
|
"service_level": "",
|
|
131
131
|
"release_version": null,
|
|
132
|
-
"autoheal": true,
|
|
133
132
|
"registered_at": "2021-09-21 19:40:43 -0400",
|
|
134
133
|
"registered_through": "centos7-devel4.samir.example.com",
|
|
135
134
|
"purpose_role": "",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
3
|
import {
|
|
4
|
+
Button,
|
|
4
5
|
Flex,
|
|
5
6
|
FlexItem,
|
|
6
7
|
TextContent,
|
|
@@ -20,6 +21,8 @@ import ActionableDetail from '../../../components/ActionableDetail';
|
|
|
20
21
|
import './contentViewInfo.scss';
|
|
21
22
|
import { dependenciesHelpText, autoPublishHelpText, hasPermission } from '../helpers';
|
|
22
23
|
import { LabelImportOnly, LabelGenerated } from '../Create/ContentViewFormComponents';
|
|
24
|
+
import getEnvironmentPaths from '../components/EnvironmentPaths/EnvironmentPathActions';
|
|
25
|
+
import EnvironmentPaths from '../components/EnvironmentPaths/EnvironmentPaths';
|
|
23
26
|
|
|
24
27
|
const ContentViewInfo = ({ cvId, details }) => {
|
|
25
28
|
const dispatch = useDispatch();
|
|
@@ -35,8 +38,11 @@ const ContentViewInfo = ({ cvId, details }) => {
|
|
|
35
38
|
auto_publish: autoPublish,
|
|
36
39
|
import_only: importOnly,
|
|
37
40
|
generated_for: generatedFor,
|
|
41
|
+
environments,
|
|
38
42
|
permissions,
|
|
39
43
|
} = details;
|
|
44
|
+
const [selectedEnvs, setSelectedEnvs] = useState([]);
|
|
45
|
+
const [buttonLoading, setButtonLoading] = useState(false);
|
|
40
46
|
const generatedContentView = generatedFor !== 'none';
|
|
41
47
|
const onEdit = (val, attribute) => {
|
|
42
48
|
if (val === details[attribute]) return;
|
|
@@ -44,7 +50,30 @@ const ContentViewInfo = ({ cvId, details }) => {
|
|
|
44
50
|
};
|
|
45
51
|
let iconText = __('Content view');
|
|
46
52
|
if (composite) { iconText = __('Composite content view'); } else if (rolling) { iconText = __('Rolling content view'); }
|
|
53
|
+
useEffect(
|
|
54
|
+
() => {
|
|
55
|
+
if (rolling) {
|
|
56
|
+
dispatch(getEnvironmentPaths());
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
[rolling, dispatch],
|
|
60
|
+
);
|
|
61
|
+
// Fetch environment paths only if rolling content view
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (environments?.length) {
|
|
64
|
+
setSelectedEnvs(environments);
|
|
65
|
+
}
|
|
66
|
+
}, [environments, setSelectedEnvs]);
|
|
67
|
+
|
|
47
68
|
|
|
69
|
+
const updateEnvs = (optedEnvs) => {
|
|
70
|
+
setButtonLoading(true);
|
|
71
|
+
const checkedEnvIds = optedEnvs?.map(env => env.id) ?? [];
|
|
72
|
+
dispatch(updateContentView(cvId, { environment_ids: checkedEnvIds }, () => {
|
|
73
|
+
// This callback runs only on success
|
|
74
|
+
setButtonLoading(false);
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
48
77
|
return (
|
|
49
78
|
<TextContent className="margin-0-24">
|
|
50
79
|
<TextList component={TextListVariants.dl}>
|
|
@@ -146,6 +175,34 @@ const ContentViewInfo = ({ cvId, details }) => {
|
|
|
146
175
|
/>
|
|
147
176
|
</TextListItem>
|
|
148
177
|
</>}
|
|
178
|
+
{rolling &&
|
|
179
|
+
<>
|
|
180
|
+
<TextListItem component={TextListItemVariants.dt}>
|
|
181
|
+
{__('Lifecycle Environments')}
|
|
182
|
+
</TextListItem>
|
|
183
|
+
<TextListItem component={TextListItemVariants.dd} className="foreman-spaced-list">
|
|
184
|
+
<EnvironmentPaths
|
|
185
|
+
headerText=""
|
|
186
|
+
publishing={false}
|
|
187
|
+
userCheckedItems={selectedEnvs}
|
|
188
|
+
setUserCheckedItems={setSelectedEnvs}
|
|
189
|
+
/>
|
|
190
|
+
<Flex>
|
|
191
|
+
<FlexItem spacer={{ default: 'spacerXs' }}>
|
|
192
|
+
<Button
|
|
193
|
+
ouiaId="save-button"
|
|
194
|
+
isLoading={buttonLoading}
|
|
195
|
+
isDisabled={buttonLoading}
|
|
196
|
+
onClick={() => updateEnvs(selectedEnvs)}
|
|
197
|
+
style={{ marginTop: '1rem' }}
|
|
198
|
+
>
|
|
199
|
+
{__('Save Environments')}
|
|
200
|
+
</Button>
|
|
201
|
+
</FlexItem>
|
|
202
|
+
</Flex>
|
|
203
|
+
</TextListItem>
|
|
204
|
+
</>
|
|
205
|
+
}
|
|
149
206
|
</TextList>
|
|
150
207
|
</TextContent>
|
|
151
208
|
);
|
|
@@ -163,6 +220,7 @@ ContentViewInfo.propTypes = {
|
|
|
163
220
|
auto_publish: PropTypes.bool,
|
|
164
221
|
import_only: PropTypes.bool,
|
|
165
222
|
generated_for: PropTypes.string,
|
|
223
|
+
environments: PropTypes.arrayOf(PropTypes.shape({})),
|
|
166
224
|
permissions: PropTypes.shape({}),
|
|
167
225
|
}).isRequired,
|
|
168
226
|
};
|
data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js
CHANGED
|
@@ -4,30 +4,91 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
4
4
|
import { STATUS } from 'foremanReact/constants';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
Modal, ModalVariant, Form, FormGroup, TextInput,
|
|
9
|
+
ActionGroup, Button, FormSelect, FormSelectOption, Popover,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
11
|
+
import {
|
|
12
|
+
HelpIcon,
|
|
13
|
+
} from '@patternfly/react-icons';
|
|
8
14
|
import { addCVFilterRule, editCVFilterRule, getCVFilterRules } from '../../../ContentViewDetailActions';
|
|
9
15
|
import {
|
|
10
16
|
selectCreateFilterRuleStatus,
|
|
11
17
|
} from '../../../ContentViewDetailSelectors';
|
|
18
|
+
import { orgId } from '../../../../../../services/api';
|
|
19
|
+
import SearchText from '../../../../../../components/Search/SearchText';
|
|
20
|
+
import { CONTENT_VIEW_NEEDS_PUBLISH } from '../../../../ContentViewsConstants';
|
|
12
21
|
|
|
13
|
-
const AddEditDebPackageRuleModal = ({
|
|
22
|
+
const AddEditDebPackageRuleModal = ({
|
|
23
|
+
filterId, onClose, selectedFilterRuleData, repositoryIds,
|
|
24
|
+
}) => {
|
|
14
25
|
const {
|
|
15
26
|
id: editingId,
|
|
16
27
|
name: editingName,
|
|
17
28
|
arch: editingArchitecture,
|
|
29
|
+
version: editingVersion,
|
|
30
|
+
min_version: editingMinVersion,
|
|
31
|
+
max_version: editingMaxVersion,
|
|
18
32
|
} = selectedFilterRuleData || {};
|
|
19
33
|
|
|
20
34
|
const isEditing = !!selectedFilterRuleData;
|
|
21
35
|
|
|
36
|
+
const VersionModifiers = {
|
|
37
|
+
'All versions': __('All versions'),
|
|
38
|
+
'Equal to': __('Equal to'),
|
|
39
|
+
'Greater than': __('Greater than'),
|
|
40
|
+
'Less than': __('Less than'),
|
|
41
|
+
/* eslint-disable quote-props */
|
|
42
|
+
'Range': __('Range'),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const versionText = () => {
|
|
46
|
+
switch (true) {
|
|
47
|
+
case !!editingVersion: return VersionModifiers['Equal to'];
|
|
48
|
+
case !!editingMinVersion && !editingMaxVersion: return VersionModifiers['Greater than'];
|
|
49
|
+
case !editingMinVersion && !!editingMaxVersion: return VersionModifiers['Less than'];
|
|
50
|
+
case !!editingMinVersion && !!editingMaxVersion: return VersionModifiers.Range;
|
|
51
|
+
default: return VersionModifiers['All versions'];
|
|
52
|
+
}
|
|
53
|
+
};
|
|
22
54
|
|
|
23
55
|
const [name, setName] = useState(editingName || '');
|
|
24
56
|
const [architecture, setArchitecture] = useState(editingArchitecture || '');
|
|
57
|
+
const [version, setVersion] = useState(editingVersion || '');
|
|
58
|
+
const [minVersion, setMinVersion] = useState(editingMinVersion || '');
|
|
59
|
+
const [maxVersion, setMaxVersion] = useState(editingMaxVersion || '');
|
|
60
|
+
const [versionComparator, setVersionComparator] = useState(versionText(selectedFilterRuleData));
|
|
25
61
|
const [saving, setSaving] = useState(false);
|
|
26
62
|
const dispatch = useDispatch();
|
|
27
63
|
const status = useSelector(state => selectCreateFilterRuleStatus(state));
|
|
28
64
|
|
|
29
65
|
const submitDisabled = !name || name.length === 0;
|
|
30
66
|
|
|
67
|
+
const showVersion = versionComparator === VersionModifiers['Equal to'];
|
|
68
|
+
const showMinVersion =
|
|
69
|
+
versionComparator === VersionModifiers['Greater than'] ||
|
|
70
|
+
versionComparator === VersionModifiers.Range;
|
|
71
|
+
const showMaxVersion =
|
|
72
|
+
versionComparator === VersionModifiers['Less than'] ||
|
|
73
|
+
versionComparator === VersionModifiers.Range;
|
|
74
|
+
|
|
75
|
+
const formVersionParams = () => {
|
|
76
|
+
switch (versionComparator) {
|
|
77
|
+
case 'All versions':
|
|
78
|
+
return {};
|
|
79
|
+
case 'Equal to':
|
|
80
|
+
return { version };
|
|
81
|
+
case 'Greater than':
|
|
82
|
+
return { min_version: minVersion };
|
|
83
|
+
case 'Less than':
|
|
84
|
+
return { max_version: maxVersion };
|
|
85
|
+
case 'Range':
|
|
86
|
+
return { min_version: minVersion, max_version: maxVersion };
|
|
87
|
+
default:
|
|
88
|
+
return {};
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
31
92
|
const onSubmit = () => {
|
|
32
93
|
setSaving(true);
|
|
33
94
|
dispatch(isEditing ?
|
|
@@ -37,6 +98,7 @@ const AddEditDebPackageRuleModal = ({ filterId, onClose, selectedFilterRuleData
|
|
|
37
98
|
id: editingId,
|
|
38
99
|
name,
|
|
39
100
|
architecture,
|
|
101
|
+
...formVersionParams(),
|
|
40
102
|
},
|
|
41
103
|
() => {
|
|
42
104
|
dispatch(getCVFilterRules(filterId));
|
|
@@ -45,11 +107,12 @@ const AddEditDebPackageRuleModal = ({ filterId, onClose, selectedFilterRuleData
|
|
|
45
107
|
) :
|
|
46
108
|
addCVFilterRule(
|
|
47
109
|
filterId,
|
|
48
|
-
{ name, architecture }, () => {
|
|
110
|
+
{ name, architecture, ...formVersionParams() }, () => {
|
|
49
111
|
dispatch(getCVFilterRules(filterId));
|
|
50
112
|
onClose();
|
|
51
113
|
},
|
|
52
114
|
));
|
|
115
|
+
dispatch({ type: CONTENT_VIEW_NEEDS_PUBLISH });
|
|
53
116
|
};
|
|
54
117
|
|
|
55
118
|
useDeepCompareEffect(() => {
|
|
@@ -58,14 +121,35 @@ const AddEditDebPackageRuleModal = ({ filterId, onClose, selectedFilterRuleData
|
|
|
58
121
|
}
|
|
59
122
|
}, [status, setSaving]);
|
|
60
123
|
|
|
124
|
+
const nameAutoCompleteEndpoint = '/katello/api/v2/debs/auto_complete_name';
|
|
125
|
+
const archAutoCompleteEndpoint = '/katello/api/v2/debs/auto_complete_arch';
|
|
126
|
+
const searchDataProp = term => ({
|
|
127
|
+
organization_id: orgId(),
|
|
128
|
+
term,
|
|
129
|
+
repoids: repositoryIds,
|
|
130
|
+
});
|
|
131
|
+
|
|
61
132
|
return (
|
|
62
133
|
<Modal
|
|
63
134
|
ouiaId="add-edit-deb-filter-rule-modal"
|
|
64
|
-
title={selectedFilterRuleData ? __('Edit
|
|
135
|
+
title={selectedFilterRuleData ? __('Edit DEB rule') : __('Add DEB rule')}
|
|
65
136
|
variant={ModalVariant.small}
|
|
66
137
|
isOpen
|
|
67
138
|
onClose={onClose}
|
|
68
139
|
appendTo={document.body}
|
|
140
|
+
help={
|
|
141
|
+
<Popover
|
|
142
|
+
headerContent={__('Help')}
|
|
143
|
+
bodyContent={__('Filter rules may include or exclude specific Debian packages ' +
|
|
144
|
+
'by name, architecture, and version. Version comparisons follow Debian policy ' +
|
|
145
|
+
'(epoch:upstream-revision; "~" sorts before empty). Leave all version fields ' +
|
|
146
|
+
'blank to match all versions.')}
|
|
147
|
+
>
|
|
148
|
+
<Button variant="plain" aria-label="Help" ouiaId="deb-filter-rule-modal-help">
|
|
149
|
+
<HelpIcon />
|
|
150
|
+
</Button>
|
|
151
|
+
</Popover>
|
|
152
|
+
}
|
|
69
153
|
>
|
|
70
154
|
<Form onSubmit={(e) => {
|
|
71
155
|
e.preventDefault();
|
|
@@ -73,37 +157,88 @@ const AddEditDebPackageRuleModal = ({ filterId, onClose, selectedFilterRuleData
|
|
|
73
157
|
}}
|
|
74
158
|
>
|
|
75
159
|
<FormGroup label={__('DEB name')} isRequired fieldId="name">
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
160
|
+
<SearchText
|
|
161
|
+
data={{
|
|
162
|
+
autocomplete: {
|
|
163
|
+
url: nameAutoCompleteEndpoint,
|
|
164
|
+
apiParams: input => searchDataProp(input),
|
|
165
|
+
},
|
|
166
|
+
}}
|
|
167
|
+
onSearchChange={setName}
|
|
168
|
+
initialQuery={name}
|
|
85
169
|
/>
|
|
86
170
|
</FormGroup>
|
|
87
171
|
<FormGroup label={__('Architecture')} fieldId="architecture">
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
172
|
+
<SearchText
|
|
173
|
+
data={{
|
|
174
|
+
autocomplete: {
|
|
175
|
+
url: archAutoCompleteEndpoint,
|
|
176
|
+
apiParams: arch => searchDataProp(arch),
|
|
177
|
+
},
|
|
178
|
+
}}
|
|
179
|
+
onSearchChange={setArchitecture}
|
|
180
|
+
initialQuery={architecture}
|
|
96
181
|
/>
|
|
97
182
|
</FormGroup>
|
|
183
|
+
<FormGroup label={__('Version')} fieldId="version_comparator">
|
|
184
|
+
<FormSelect
|
|
185
|
+
ouiaId="deb-version-comparator"
|
|
186
|
+
value={versionComparator}
|
|
187
|
+
onChange={(_event, val) => setVersionComparator(val)}
|
|
188
|
+
id="version_comparator"
|
|
189
|
+
name="version_comparator"
|
|
190
|
+
aria-label="version_comparator"
|
|
191
|
+
>
|
|
192
|
+
{Object.entries(VersionModifiers).map(([key, label]) => (
|
|
193
|
+
<FormSelectOption key={key} value={key} label={label} />
|
|
194
|
+
))}
|
|
195
|
+
</FormSelect>
|
|
196
|
+
</FormGroup>
|
|
197
|
+
{showVersion &&
|
|
198
|
+
<FormGroup label={__('Version')} fieldId="version">
|
|
199
|
+
<TextInput
|
|
200
|
+
ouiaId="deb-input-version"
|
|
201
|
+
type="text"
|
|
202
|
+
id="version"
|
|
203
|
+
aria-label="input_version"
|
|
204
|
+
name="version"
|
|
205
|
+
value={version}
|
|
206
|
+
onChange={(_event, val) => setVersion(val)}
|
|
207
|
+
/>
|
|
208
|
+
</FormGroup>}
|
|
209
|
+
{showMinVersion &&
|
|
210
|
+
<FormGroup label={__('Minimum version')} fieldId="min_version">
|
|
211
|
+
<TextInput
|
|
212
|
+
ouiaId="deb-input-min-version"
|
|
213
|
+
type="text"
|
|
214
|
+
id="min_version"
|
|
215
|
+
aria-label="input_min_version"
|
|
216
|
+
name="min_version"
|
|
217
|
+
value={minVersion}
|
|
218
|
+
onChange={(_event, val) => setMinVersion(val)}
|
|
219
|
+
/>
|
|
220
|
+
</FormGroup>}
|
|
221
|
+
{showMaxVersion &&
|
|
222
|
+
<FormGroup label={__('Maximum version')} fieldId="max_version">
|
|
223
|
+
<TextInput
|
|
224
|
+
ouiaId="deb-input-max-version"
|
|
225
|
+
type="text"
|
|
226
|
+
id="max_version"
|
|
227
|
+
aria-label="input_max_version"
|
|
228
|
+
name="max_version"
|
|
229
|
+
value={maxVersion}
|
|
230
|
+
onChange={(_event, val) => setMaxVersion(val)}
|
|
231
|
+
/>
|
|
232
|
+
</FormGroup>}
|
|
98
233
|
<ActionGroup>
|
|
99
234
|
<Button
|
|
100
|
-
ouiaId="
|
|
101
|
-
aria-label="
|
|
235
|
+
ouiaId="add-edit-deb-package-modal-submit"
|
|
236
|
+
aria-label="add_deb_package_filter_rule"
|
|
102
237
|
variant="primary"
|
|
103
238
|
isDisabled={saving || submitDisabled}
|
|
104
239
|
type="submit"
|
|
105
240
|
>
|
|
106
|
-
{selectedFilterRuleData ? __('
|
|
241
|
+
{selectedFilterRuleData ? __('Save') : __('Add rule')}
|
|
107
242
|
</Button>
|
|
108
243
|
<Button ouiaId="cancel-button" variant="link" onClick={onClose}>
|
|
109
244
|
{__('Cancel')}
|
|
@@ -121,12 +256,17 @@ AddEditDebPackageRuleModal.propTypes = {
|
|
|
121
256
|
id: PropTypes.number,
|
|
122
257
|
name: PropTypes.string,
|
|
123
258
|
arch: PropTypes.string,
|
|
259
|
+
version: PropTypes.string,
|
|
260
|
+
min_version: PropTypes.string,
|
|
261
|
+
max_version: PropTypes.string,
|
|
124
262
|
}),
|
|
263
|
+
repositoryIds: PropTypes.arrayOf(PropTypes.number),
|
|
125
264
|
};
|
|
126
265
|
|
|
127
266
|
AddEditDebPackageRuleModal.defaultProps = {
|
|
128
267
|
onClose: null,
|
|
129
268
|
selectedFilterRuleData: undefined,
|
|
269
|
+
repositoryIds: [],
|
|
130
270
|
};
|
|
131
271
|
|
|
132
272
|
export default AddEditDebPackageRuleModal;
|