katello 5.0.0.rc2 → 5.0.1
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +63 -15
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/ca/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/cs/katello.js +63 -15
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +64 -16
- data/app/assets/javascripts/katello/locale/de/katello.js +66 -18
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +63 -15
- data/app/assets/javascripts/katello/locale/el/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/en/katello.js +63 -15
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/en_US/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/es/katello.js +66 -18
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/fr/katello.js +300 -252
- data/app/assets/javascripts/katello/locale/gl/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/gu/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/hi/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/id/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/it/katello.js +64 -16
- data/app/assets/javascripts/katello/locale/ja/katello.js +378 -330
- data/app/assets/javascripts/katello/locale/ka/katello.js +67 -19
- data/app/assets/javascripts/katello/locale/kn/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/ko/katello.js +297 -249
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/mr/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/or/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/pa/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/pl/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/pt/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +66 -18
- data/app/assets/javascripts/katello/locale/ro/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/ru/katello.js +64 -16
- data/app/assets/javascripts/katello/locale/sl/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/ta/katello.js +63 -15
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/te/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/tr/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/vi/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/zh/katello.js +62 -14
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +285 -237
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +64 -16
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +29 -26
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -10
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +61 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +18 -18
- data/app/views/katello/api/v2/content_facet/base.json.rabl +19 -19
- data/app/views/katello/api/v2/content_view_environments/show.json.rabl +10 -10
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +5 -5
- data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +5 -5
- data/db/migrate/20260402151630_add_content_view_environment_to_hostgroup_content_facet.rb +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +23 -24
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +20 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +31 -39
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +8 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +8 -8
- data/lib/katello/tasks/upgrades/4.20/clean_cve_with_no_cvv.rake +4 -4
- data/lib/katello/version.rb +1 -1
- data/lib/rubocop/cop/katello/cve_abbreviation.rb +82 -0
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +63 -15
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +62 -14
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +62 -14
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +64 -15
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +65 -17
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +67 -19
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +62 -14
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +64 -16
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +62 -14
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +64 -15
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +62 -14
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +62 -14
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +68 -21
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +62 -14
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +304 -256
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +62 -14
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +62 -14
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +62 -14
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +62 -14
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +62 -14
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +64 -16
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +379 -331
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +67 -19
- data/locale/katello.pot +457 -393
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +62 -14
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +300 -251
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +62 -14
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +62 -14
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +62 -14
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +62 -14
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +62 -14
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +62 -14
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +62 -14
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +62 -14
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +68 -20
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +62 -14
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +62 -14
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +64 -16
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +62 -14
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +62 -14
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +63 -15
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +62 -14
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +62 -14
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +62 -14
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +62 -14
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +62 -14
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +62 -14
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +286 -238
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +64 -16
- data/package.json +2 -2
- data/webpack/ForemanColumnExtensions/index.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/AssignHostCVModal.js +3 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +5 -5
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/OrderableAssignments.js +5 -5
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/AssignHostCVModal.test.js +17 -17
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/BulkAssignCVEnvsModal.js +4 -8
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/__tests__/BulkAssignCVEnvsModal.test.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/BulkChangeHostCollectionsModal.js +5 -10
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +6 -24
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/BulkManageTracesModal.js +4 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/03_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/BulkRepositorySetsWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/BulkSystemPurposeModal.js +5 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/__tests__/bulkSystemPurposeModal.test.js +6 -1
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +6 -6
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
- data/webpack/containers/Application/config.js +1 -1
- data/webpack/eslint-rules/no-cve-abbreviation.js +121 -0
- data/webpack/global_index.js +6 -6
- data/webpack/redux/reducers/index.js +0 -2
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +2 -2
- data/webpack/scenes/ActivationKeys/Details/components/AssignAKCVModal.js +3 -3
- data/webpack/scenes/ActivationKeys/Details/components/CreateAKCVModal.js +1 -1
- data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCard.js → CvEnvDetailsCard.js} +9 -9
- data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCreateCard.js → CvEnvDetailsCreateCard.js} +10 -10
- data/webpack/scenes/ActivationKeys/Details/components/__tests__/{CVEDetailsCreateCard.test.js → CvEnvDetailsCreateCard.test.js} +8 -8
- data/webpack/scenes/ContainerImages/Booted/BootedContainerImagesPage.js +2 -2
- data/webpack/scenes/ContainerImages/ContainerImagesPage.js +59 -52
- data/webpack/scenes/ContainerImages/ContainerImagesPage.scss +27 -4
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +1 -11
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +9 -9
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +0 -28
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +46 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionContent.test.js +41 -0
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/CdnTabContent.js +44 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +179 -307
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModalConstants.js +5 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +64 -70
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +5 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js +61 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js +357 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +129 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +69 -110
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +6 -2
- data/webpack/scenes/Subscriptions/Manifest/index.js +16 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +79 -145
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -35
- data/webpack/scenes/Subscriptions/SubscriptionsColumns.js +90 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +297 -217
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +40 -30
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +11 -8
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsConstants.js +0 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +104 -205
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +12 -8
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +245 -241
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +61 -27
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +487 -73
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +22 -4
- data/webpack/utils/contentViewEnvironmentLabel.js +3 -3
- data/webpack/utils/helpers.js +2 -2
- metadata +22 -20
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +0 -39
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +0 -47
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +0 -223
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -31
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -297
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -244
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -47
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionNameFormatter.js +0 -23
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +0 -32
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +0 -169
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js +0 -41
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/index.js +0 -2
- data/webpack/scenes/Subscriptions/index.js +0 -57
data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCard.js → CvEnvDetailsCard.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { DropdownItem } from '@patternfly/react-core/deprecated';
|
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
4
|
import { isEqual } from 'lodash';
|
|
5
5
|
import { useForemanContext, useForemanPermissions } from 'foremanReact/Root/Context/ForemanContext';
|
|
6
|
-
import {
|
|
6
|
+
import { CvEnvDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
|
|
7
7
|
import AssignAKCVModal from './AssignAKCVModal';
|
|
8
8
|
|
|
9
9
|
const getAKDetailsFromDOM = (node) => {
|
|
@@ -13,7 +13,7 @@ const getAKDetailsFromDOM = (node) => {
|
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
export const
|
|
16
|
+
export const CvEnvDetailsCard = () => { // used as foreman-react-component, takes no props
|
|
17
17
|
const akDetailsNode = useRef(document.getElementById('ak-cve-details')).current;
|
|
18
18
|
const [akDetails, setAkDetails] = useState(getAKDetailsFromDOM(akDetailsNode));
|
|
19
19
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
@@ -61,7 +61,7 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
|
|
|
61
61
|
// Check for edit_activation_keys permission from ForemanContext
|
|
62
62
|
const hasEditPermission = userPermissions.has('edit_activation_keys');
|
|
63
63
|
|
|
64
|
-
// Build permissions object for
|
|
64
|
+
// Build permissions object for CvEnvDetailsBareCard
|
|
65
65
|
// Convert Set to object format expected by the card
|
|
66
66
|
const permissions = {
|
|
67
67
|
view_lifecycle_environments: userPermissions.has('view_lifecycle_environments'),
|
|
@@ -86,15 +86,15 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
|
|
|
86
86
|
// Transform existing assignments to the format expected by AssignAKCVModal
|
|
87
87
|
// Map from snake_case (API data) to the format the modal expects
|
|
88
88
|
// Include the label from the parent content_view_environment object
|
|
89
|
-
const existingAssignments = akDetails.content_view_environments?.map(
|
|
90
|
-
contentView:
|
|
91
|
-
environment:
|
|
92
|
-
|
|
89
|
+
const existingAssignments = akDetails.content_view_environments?.map(cvEnv => ({
|
|
90
|
+
contentView: cvEnv.content_view,
|
|
91
|
+
environment: cvEnv.lifecycle_environment,
|
|
92
|
+
cvEnvLabel: cvEnv.label, // Pre-computed label from backend
|
|
93
93
|
})) || [];
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<>
|
|
97
|
-
<
|
|
97
|
+
<CvEnvDetailsBareCard
|
|
98
98
|
contentViewEnvironments={akDetails.content_view_environments}
|
|
99
99
|
permissions={permissions}
|
|
100
100
|
dropdownItems={dropdownItems}
|
|
@@ -118,4 +118,4 @@ export const CVEDetailsCard = () => { // used as foreman-react-component, takes
|
|
|
118
118
|
);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
export default
|
|
121
|
+
export default CvEnvDetailsCard;
|
|
@@ -2,10 +2,10 @@ import React, { useRef, useState } from 'react';
|
|
|
2
2
|
import { DropdownItem } from '@patternfly/react-core/deprecated';
|
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
4
|
import { useForemanContext, useForemanPermissions } from 'foremanReact/Root/Context/ForemanContext';
|
|
5
|
-
import {
|
|
5
|
+
import { CvEnvDetailsBareCard } from '../../../../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard';
|
|
6
6
|
import CreateAKCVModal from './CreateAKCVModal';
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const CvEnvDetailsCreateCard = () => {
|
|
9
9
|
const dataNode = useRef(document.getElementById('ak-create-cve-data')).current;
|
|
10
10
|
const [assignments, setAssignments] = useState([]);
|
|
11
11
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -42,7 +42,7 @@ export const CVEDetailsCreateCard = () => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
// Transform assignments to format for display in
|
|
45
|
+
// Transform assignments to format for display in CvEnvDetailsBareCard
|
|
46
46
|
const displayAssignments = assignments
|
|
47
47
|
.filter(a => a.contentView && a.environment)
|
|
48
48
|
.map(a => ({
|
|
@@ -50,7 +50,7 @@ export const CVEDetailsCreateCard = () => {
|
|
|
50
50
|
lifecycle_environment: a.environment,
|
|
51
51
|
}));
|
|
52
52
|
|
|
53
|
-
// Build permissions object for
|
|
53
|
+
// Build permissions object for CvEnvDetailsBareCard
|
|
54
54
|
const permissions = {
|
|
55
55
|
view_lifecycle_environments: userPermissions.has('view_lifecycle_environments'),
|
|
56
56
|
view_content_views: userPermissions.has('view_content_views'),
|
|
@@ -59,10 +59,10 @@ export const CVEDetailsCreateCard = () => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// Check if user has permission to assign content view environments
|
|
62
|
-
const
|
|
62
|
+
const canAssignCvEnvs = userPermissions.has('create_activation_keys');
|
|
63
63
|
|
|
64
64
|
// Create dropdown items for kebab menu if user has permission
|
|
65
|
-
const dropdownItems =
|
|
65
|
+
const dropdownItems = canAssignCvEnvs ? [
|
|
66
66
|
<DropdownItem
|
|
67
67
|
aria-label="assign-content-view-environments"
|
|
68
68
|
ouiaId="assign-content-view-environments"
|
|
@@ -79,16 +79,16 @@ export const CVEDetailsCreateCard = () => {
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<>
|
|
82
|
-
<
|
|
82
|
+
<CvEnvDetailsBareCard
|
|
83
83
|
contentViewEnvironments={displayAssignments}
|
|
84
84
|
permissions={permissions}
|
|
85
85
|
dropdownItems={dropdownItems}
|
|
86
86
|
isDropdownOpen={isDropdownOpen}
|
|
87
87
|
toggleKebab={toggleKebab}
|
|
88
|
-
openModal={
|
|
88
|
+
openModal={canAssignCvEnvs ? openModal : null}
|
|
89
89
|
allowMultipleContentViews={allowMultipleContentViews}
|
|
90
90
|
/>
|
|
91
|
-
{
|
|
91
|
+
{canAssignCvEnvs && (
|
|
92
92
|
<CreateAKCVModal
|
|
93
93
|
isOpen={isModalOpen}
|
|
94
94
|
closeModal={closeModal}
|
|
@@ -102,4 +102,4 @@ export const CVEDetailsCreateCard = () => {
|
|
|
102
102
|
);
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
export default
|
|
105
|
+
export default CvEnvDetailsCreateCard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
|
|
3
|
-
import {
|
|
3
|
+
import { CvEnvDetailsCreateCard } from '../CvEnvDetailsCreateCard';
|
|
4
4
|
|
|
5
5
|
// Mock the ForemanContext
|
|
6
6
|
jest.mock('foremanReact/Root/Context/ForemanContext', () => ({
|
|
@@ -10,7 +10,7 @@ jest.mock('foremanReact/Root/Context/ForemanContext', () => ({
|
|
|
10
10
|
|
|
11
11
|
const { useForemanContext, useForemanPermissions } = require('foremanReact/Root/Context/ForemanContext');
|
|
12
12
|
|
|
13
|
-
describe('
|
|
13
|
+
describe('CvEnvDetailsCreateCard', () => {
|
|
14
14
|
beforeEach(() => {
|
|
15
15
|
// Reset mocks before each test
|
|
16
16
|
jest.clearAllMocks();
|
|
@@ -45,7 +45,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
test('Renders empty state when no assignments', async () => {
|
|
48
|
-
const { getByText } = renderWithRedux(<
|
|
48
|
+
const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
49
49
|
|
|
50
50
|
await patientlyWaitFor(() => {
|
|
51
51
|
expect(getByText('No content view environments yet')).toBeInTheDocument();
|
|
@@ -54,7 +54,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
test('Shows "Assign content view environments" button', async () => {
|
|
57
|
-
const { getByRole } = renderWithRedux(<
|
|
57
|
+
const { getByRole } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
58
58
|
|
|
59
59
|
await patientlyWaitFor(() => {
|
|
60
60
|
expect(getByRole('button', { name: 'assign_content_view_environments' })).toBeInTheDocument();
|
|
@@ -66,7 +66,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
66
66
|
const dataNode = document.getElementById('ak-create-cve-data');
|
|
67
67
|
delete dataNode.dataset.orgId;
|
|
68
68
|
|
|
69
|
-
const { container } = renderWithRedux(<
|
|
69
|
+
const { container } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
70
70
|
|
|
71
71
|
// Component should return null and not render anything
|
|
72
72
|
expect(container.firstChild).toBeNull();
|
|
@@ -82,7 +82,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
82
82
|
},
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
const { getByText } = renderWithRedux(<
|
|
85
|
+
const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
86
86
|
|
|
87
87
|
await patientlyWaitFor(() => {
|
|
88
88
|
// With 0 assignments, shows plural "Content view environments"
|
|
@@ -96,7 +96,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
96
96
|
metadata: {},
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
const { getByText } = renderWithRedux(<
|
|
99
|
+
const { getByText } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
100
100
|
|
|
101
101
|
await patientlyWaitFor(() => {
|
|
102
102
|
// With 0 assignments, shows plural "Content view environments"
|
|
@@ -119,7 +119,7 @@ describe('CVEDetailsCreateCard', () => {
|
|
|
119
119
|
element: jest.fn(() => mockElement),
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
const { getByRole } = renderWithRedux(<
|
|
122
|
+
const { getByRole } = renderWithRedux(<CvEnvDetailsCreateCard />);
|
|
123
123
|
|
|
124
124
|
await patientlyWaitFor(() => {
|
|
125
125
|
expect(getByRole('button', { name: 'assign_content_view_environments' })).toBeInTheDocument();
|
|
@@ -109,7 +109,7 @@ const BootedContainerImagesPage = () => {
|
|
|
109
109
|
controller="/katello/api/v2/host_bootc_images"
|
|
110
110
|
>
|
|
111
111
|
<>
|
|
112
|
-
<Table variant="compact" ouiaId="booted-containers-table" isStriped>
|
|
112
|
+
<Table variant="compact" ouiaId="booted-containers-table" isStriped className="katello-pf4-table">
|
|
113
113
|
<Thead>
|
|
114
114
|
<Tr ouiaId="table-header">
|
|
115
115
|
<>
|
|
@@ -165,7 +165,7 @@ const BootedContainerImagesPage = () => {
|
|
|
165
165
|
<Td />
|
|
166
166
|
<Td colSpan={3}>
|
|
167
167
|
<ExpandableRowContent>
|
|
168
|
-
<Table variant="compact" isStriped ouiaId={`table-composable-expanded-${rowIndex}`}>
|
|
168
|
+
<Table variant="compact" isStriped ouiaId={`table-composable-expanded-${rowIndex}`} className="katello-pf4-table">
|
|
169
169
|
<Thead>
|
|
170
170
|
<Tr ouiaId={`table-row-inner-expandable-${rowIndex}`}>
|
|
171
171
|
<Th width={55}>{__('Image digest')}</Th>
|
|
@@ -3,8 +3,7 @@ import { useHistory, useLocation } from 'react-router-dom';
|
|
|
3
3
|
import {
|
|
4
4
|
Title,
|
|
5
5
|
PageSection,
|
|
6
|
-
|
|
7
|
-
StackItem,
|
|
6
|
+
PageSectionVariants,
|
|
8
7
|
Tabs,
|
|
9
8
|
Tab,
|
|
10
9
|
TabTitleText,
|
|
@@ -30,57 +29,65 @@ const ContainerImagesPage = () => {
|
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
return (
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</Popover>
|
|
48
|
-
</Title>
|
|
49
|
-
</StackItem>
|
|
50
|
-
<StackItem>
|
|
51
|
-
<Tabs
|
|
52
|
-
activeKey={activeTabKey}
|
|
53
|
-
onSelect={handleTabClick}
|
|
54
|
-
ouiaId="container-images-tabs"
|
|
32
|
+
<>
|
|
33
|
+
<PageSection
|
|
34
|
+
id="container-images-title-section"
|
|
35
|
+
variant={PageSectionVariants.light}
|
|
36
|
+
>
|
|
37
|
+
<Title headingLevel="h1" size="2xl" ouiaId="container-images-title">
|
|
38
|
+
{__('Container Images')}
|
|
39
|
+
<Popover
|
|
40
|
+
headerContent={<div>{__('Container Images')}</div>}
|
|
41
|
+
bodyContent={
|
|
42
|
+
<div>
|
|
43
|
+
{__('View container images in the local registry using the Synced tab. View container images booted by image mode hosts using the Booted tab. The Booted tab also shows images outside of the local container registry.')}
|
|
44
|
+
</div>
|
|
45
|
+
}
|
|
55
46
|
>
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
47
|
+
<Button variant="plain" aria-label="Help" isInline icon={<OutlinedQuestionCircleIcon size="sm" />} ouiaId="container-images-help-button" />
|
|
48
|
+
</Popover>
|
|
49
|
+
</Title>
|
|
50
|
+
</PageSection>
|
|
51
|
+
<PageSection
|
|
52
|
+
id="container-images-tabs-section"
|
|
53
|
+
variant={PageSectionVariants.light}
|
|
54
|
+
>
|
|
55
|
+
<Tabs
|
|
56
|
+
activeKey={activeTabKey}
|
|
57
|
+
onSelect={handleTabClick}
|
|
58
|
+
ouiaId="container-images-tabs"
|
|
59
|
+
>
|
|
60
|
+
<Tab
|
|
61
|
+
eventKey={0}
|
|
62
|
+
title={
|
|
63
|
+
<>
|
|
64
|
+
<TabTitleIcon><SyncAltIcon /></TabTitleIcon>
|
|
65
|
+
<TabTitleText>{__('Synced')}</TabTitleText>
|
|
66
|
+
</>
|
|
67
|
+
}
|
|
68
|
+
ouiaId="container-images-synced-tab"
|
|
69
|
+
/>
|
|
70
|
+
<Tab
|
|
71
|
+
eventKey={1}
|
|
72
|
+
title={
|
|
73
|
+
<>
|
|
74
|
+
<TabTitleIcon><FontAwesomeImageModeIcon /></TabTitleIcon>
|
|
75
|
+
<TabTitleText>{__('Booted')}</TabTitleText>
|
|
76
|
+
</>
|
|
77
|
+
}
|
|
78
|
+
ouiaId="container-images-booted-tab"
|
|
79
|
+
/>
|
|
80
|
+
</Tabs>
|
|
81
|
+
</PageSection>
|
|
82
|
+
<PageSection
|
|
83
|
+
id="container-images-content-section"
|
|
84
|
+
variant={PageSectionVariants.light}
|
|
85
|
+
className="container-images-page"
|
|
86
|
+
>
|
|
87
|
+
{activeTabKey === 0 && <SyncedContainerImagesPage />}
|
|
88
|
+
{activeTabKey === 1 && <BootedContainerImagesPage />}
|
|
89
|
+
</PageSection>
|
|
90
|
+
</>
|
|
84
91
|
);
|
|
85
92
|
};
|
|
86
93
|
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
#container-images-title-section {
|
|
2
|
+
padding-block: 24px 16px;
|
|
3
|
+
|
|
4
|
+
.pf-v5-c-title {
|
|
5
|
+
margin: 0;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
#container-images-tabs-section {
|
|
10
|
+
padding-block: 0;
|
|
11
|
+
|
|
12
|
+
.pf-v5-c-tabs__list {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#container-images-content-section {
|
|
18
|
+
padding-top: 0;
|
|
19
|
+
|
|
20
|
+
.table-index-page #page-layout-title-section {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.table-index-page #page-layout-toolbar-section,
|
|
25
|
+
.table-index-page #page-layout-content-section {
|
|
26
|
+
padding-left: 0;
|
|
27
|
+
padding-right: 0;
|
|
5
28
|
}
|
|
6
29
|
}
|
|
@@ -249,7 +249,7 @@ const SyncedContainerImagesPage = () => {
|
|
|
249
249
|
ouiaId="synced-container-images-table-index"
|
|
250
250
|
>
|
|
251
251
|
<>
|
|
252
|
-
<Table variant="compact" ouiaId="synced-container-images-table">
|
|
252
|
+
<Table variant="compact" ouiaId="synced-container-images-table" isStriped className="katello-pf4-table">
|
|
253
253
|
<Thead>
|
|
254
254
|
<Tr ouiaId="table-header">
|
|
255
255
|
<Th />
|
|
@@ -14,7 +14,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
14
14
|
docker_manifest_list_count: dockerManifestListCount = 0,
|
|
15
15
|
docker_tag_count: dockerTagCount = 0,
|
|
16
16
|
file_count: fileCount = 0,
|
|
17
|
-
module_stream_count: moduleStreamCount = 0,
|
|
18
17
|
ansible_collection_count: ansibleCollectionCount = 0,
|
|
19
18
|
} = cvVersion;
|
|
20
19
|
|
|
@@ -36,7 +35,7 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
36
35
|
|
|
37
36
|
const noCounts =
|
|
38
37
|
!Number(debCount) && !Number(dockerManifestCount) && !Number(dockerTagCount) &&
|
|
39
|
-
!Number(fileCount) && !Number(
|
|
38
|
+
!Number(fileCount) && !Number(ansibleCollectionCount) &&
|
|
40
39
|
!Number(dockerManifestListCount) && !contentConfigTypes?.length;
|
|
41
40
|
|
|
42
41
|
if (noCounts) {
|
|
@@ -45,13 +44,6 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
|
45
44
|
|
|
46
45
|
return (
|
|
47
46
|
<>
|
|
48
|
-
{moduleStreamCount > 0 &&
|
|
49
|
-
<>
|
|
50
|
-
<Link to={`/versions/${versionId}/moduleStreams`}>
|
|
51
|
-
{`${moduleStreamCount} Module streams`}
|
|
52
|
-
</Link><br />
|
|
53
|
-
</>
|
|
54
|
-
}
|
|
55
47
|
{debCount > 0 &&
|
|
56
48
|
<>
|
|
57
49
|
<Link to={`/versions/${versionId}/debPackages`}>
|
|
@@ -100,7 +92,6 @@ ContentViewVersionContent.propTypes = {
|
|
|
100
92
|
docker_manifest_list_count: PropTypes.number,
|
|
101
93
|
docker_tag_count: PropTypes.number,
|
|
102
94
|
file_count: PropTypes.number,
|
|
103
|
-
module_stream_count: PropTypes.number,
|
|
104
95
|
ansible_collection_count: PropTypes.number,
|
|
105
96
|
}),
|
|
106
97
|
};
|
|
@@ -113,7 +104,6 @@ ContentViewVersionContent.defaultProps = {
|
|
|
113
104
|
docker_manifest_count: 0,
|
|
114
105
|
docker_tag_count: 0,
|
|
115
106
|
file_count: 0,
|
|
116
|
-
module_stream_count: 0,
|
|
117
107
|
ansible_collection_count: 0,
|
|
118
108
|
},
|
|
119
109
|
};
|
data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js
CHANGED
|
@@ -28,7 +28,7 @@ const CVVersionRemoveReview = () => {
|
|
|
28
28
|
'Changes listed below will be effective after clicking Remove.');
|
|
29
29
|
|
|
30
30
|
const matchedCVResults = cvVersions?.results?.filter(cv => cv.id === versionIdToRemove) || [];
|
|
31
|
-
const
|
|
31
|
+
const selectedCvEnv = matchedCVResults
|
|
32
32
|
.flatMap(cv => cv.content_view_environments || [])
|
|
33
33
|
.filter(env => selectedEnvSet.has(env.environment_id));
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ const CVVersionRemoveReview = () => {
|
|
|
63
63
|
<p style={{ marginBottom: '0.5em' }}>{versionDeleteInfo}</p>
|
|
64
64
|
</Alert>}
|
|
65
65
|
{!(deleteFlow || removeDeletionFlow) && <WizardHeader description={removalNotice} />}
|
|
66
|
-
{(
|
|
66
|
+
{(selectedCvEnv?.length !== 0) &&
|
|
67
67
|
<>
|
|
68
68
|
<h3>{__('Environments')}</h3>
|
|
69
69
|
<Flex>
|
|
@@ -71,7 +71,7 @@ const CVVersionRemoveReview = () => {
|
|
|
71
71
|
<FlexItem style={{ marginBottom: '0.5em' }}>{__('This version will be removed from:')}</FlexItem>
|
|
72
72
|
</Flex>
|
|
73
73
|
<Flex>
|
|
74
|
-
{
|
|
74
|
+
{selectedCvEnv?.map(({ environment_name: name, environment_id: id }) =>
|
|
75
75
|
<FlexItem key={name}><Label color="purple" href={`/lifecycle_environments/${id}`}>{name}</Label></FlexItem>)}
|
|
76
76
|
</Flex>
|
|
77
77
|
</>}
|
|
@@ -113,14 +113,14 @@ const CVVersionRemoveReview = () => {
|
|
|
113
113
|
id="environment.plural"
|
|
114
114
|
defaultMessage="{count, plural, one {{envSingular}} other {{envPlural}}}"
|
|
115
115
|
values={{
|
|
116
|
-
count:
|
|
116
|
+
count: selectedCvEnv?.length,
|
|
117
117
|
envSingular: __('Content view environment'),
|
|
118
118
|
envPlural: __('Content view environments'),
|
|
119
119
|
}}
|
|
120
120
|
/>
|
|
121
121
|
),
|
|
122
|
-
envCV:
|
|
123
|
-
?.map(
|
|
122
|
+
envCV: selectedCvEnv
|
|
123
|
+
?.map(cvEnv => cvEnv.label)
|
|
124
124
|
.join(', '),
|
|
125
125
|
hostCount: multiCVHostsCount,
|
|
126
126
|
hostSingular: __('multi-environment host'),
|
|
@@ -183,14 +183,14 @@ const CVVersionRemoveReview = () => {
|
|
|
183
183
|
id="environment.plural"
|
|
184
184
|
defaultMessage="{count, plural, one {{envSingular}} other {{envPlural}}}"
|
|
185
185
|
values={{
|
|
186
|
-
count:
|
|
186
|
+
count: selectedCvEnv?.length,
|
|
187
187
|
envSingular: __('Content view environment'),
|
|
188
188
|
envPlural: __('Content view environments'),
|
|
189
189
|
}}
|
|
190
190
|
/>
|
|
191
191
|
),
|
|
192
|
-
envCV:
|
|
193
|
-
?.map(
|
|
192
|
+
envCV: selectedCvEnv
|
|
193
|
+
?.map(cvEnv => cvEnv.label)
|
|
194
194
|
.join(', '),
|
|
195
195
|
akCount: multiCVActivationKeysCount,
|
|
196
196
|
keySingular: __('multi-environment activation key'),
|
data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
getDockerTags,
|
|
17
17
|
getErrata,
|
|
18
18
|
getFiles,
|
|
19
|
-
getModuleStreams,
|
|
20
19
|
getPackageGroups,
|
|
21
20
|
getRepositories,
|
|
22
21
|
getRPMPackages,
|
|
@@ -33,8 +32,6 @@ import {
|
|
|
33
32
|
selectFilesStatus,
|
|
34
33
|
selectErrata,
|
|
35
34
|
selectErrataStatus,
|
|
36
|
-
selectModuleStreams,
|
|
37
|
-
selectModuleStreamsStatus,
|
|
38
35
|
selectRepositories,
|
|
39
36
|
selectRepositoriesStatus,
|
|
40
37
|
selectRPMPackageGroups,
|
|
@@ -255,31 +252,6 @@ export default ({ cvId, versionId }) => [
|
|
|
255
252
|
},
|
|
256
253
|
],
|
|
257
254
|
},
|
|
258
|
-
{
|
|
259
|
-
name: __('Module Streams'),
|
|
260
|
-
route: 'moduleStreams',
|
|
261
|
-
repoType: 'yum',
|
|
262
|
-
getCountKey: item => item?.module_stream_count,
|
|
263
|
-
responseSelector: state => selectModuleStreams(state),
|
|
264
|
-
statusSelector: state => selectModuleStreamsStatus(state),
|
|
265
|
-
autocompleteEndpoint: '/katello/api/v2/module_streams',
|
|
266
|
-
autocompleteQueryParams: { content_view_version_id: versionId },
|
|
267
|
-
bookmarkController: 'katello_content_view_components',
|
|
268
|
-
fetchItems: params => getModuleStreams({ content_view_version_id: versionId, ...params }),
|
|
269
|
-
columnHeaders: [
|
|
270
|
-
{
|
|
271
|
-
title: __('Name'),
|
|
272
|
-
getProperty: item => (
|
|
273
|
-
<a href={urlBuilder(`content/module_streams/${item?.id}`, '')}>
|
|
274
|
-
{item?.name}
|
|
275
|
-
</a>),
|
|
276
|
-
},
|
|
277
|
-
{ title: __('Stream'), getProperty: item => item?.stream },
|
|
278
|
-
{ title: __('Version'), getProperty: item => item?.version },
|
|
279
|
-
{ title: __('Context'), getProperty: item => item?.context },
|
|
280
|
-
{ title: __('Arch'), getProperty: item => item?.arch },
|
|
281
|
-
],
|
|
282
|
-
},
|
|
283
255
|
{
|
|
284
256
|
name: __('Deb Packages'),
|
|
285
257
|
route: 'debPackages',
|
|
@@ -165,7 +165,7 @@ const testConfig = [
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
name: 'Module Streams',
|
|
168
|
-
countKey: '
|
|
168
|
+
countKey: 'modulemd_count',
|
|
169
169
|
autoCompleteUrl: '/module_streams/auto_complete_search',
|
|
170
170
|
dataUrl: api.getApiUrl('/module_streams'),
|
|
171
171
|
data: ContentViewVersionModuleStreamsData,
|
|
@@ -260,6 +260,51 @@ testConfig.forEach(({
|
|
|
260
260
|
done();
|
|
261
261
|
}));
|
|
262
262
|
|
|
263
|
+
test('Does not duplicate Module Streams tab when both count keys are present', async () => {
|
|
264
|
+
const { version } = ContentViewVersionDetailsData;
|
|
265
|
+
const autocompleteScope = mockAutocomplete(
|
|
266
|
+
nockInstance,
|
|
267
|
+
'/module_streams/auto_complete_search',
|
|
268
|
+
autocompleteQuery('Module Streams'),
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
const scope = nockInstance
|
|
272
|
+
.get(cvVersions)
|
|
273
|
+
.query(true)
|
|
274
|
+
.reply(200, {
|
|
275
|
+
...getTabSpecificData('modulemd_count'),
|
|
276
|
+
module_stream_count: ContentViewVersionDetailsCounts.module_stream_count,
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
const tabScope = nockInstance
|
|
280
|
+
.get(api.getApiUrl('/module_streams'))
|
|
281
|
+
.query(queryParams('Module Streams'))
|
|
282
|
+
.reply(200, ContentViewVersionModuleStreamsData);
|
|
283
|
+
|
|
284
|
+
const { getByText, queryByText, getAllByRole } = renderWithRedux(
|
|
285
|
+
withCVRoute(<ContentViewVersionDetails cvId={3} details={cvDetailData} />),
|
|
286
|
+
renderOptions,
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
expect(queryByText(`Version ${version}`)).toBeNull();
|
|
290
|
+
await patientlyWaitFor(() => {
|
|
291
|
+
expect(getByText(`Version ${version}`)).toBeTruthy();
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
await patientlyWaitFor(() => {
|
|
295
|
+
const moduleStreamTabs = getAllByRole('tab', { name: /Module Streams/ });
|
|
296
|
+
expect(moduleStreamTabs).toHaveLength(1);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
await new Promise((resolve) => {
|
|
300
|
+
assertNockRequest(autocompleteScope, () => {
|
|
301
|
+
assertNockRequest(scope, () => {
|
|
302
|
+
assertNockRequest(tabScope, resolve);
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
263
308
|
test('Can change repository selector', async (done) => {
|
|
264
309
|
const {
|
|
265
310
|
countKey,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { renderWithRedux } from 'react-testing-lib-wrapper';
|
|
3
|
+
import ContentViewVersionContent from '../ContentViewVersionContent';
|
|
4
|
+
|
|
5
|
+
const renderContent = cvVersion =>
|
|
6
|
+
renderWithRedux(<ContentViewVersionContent
|
|
7
|
+
cvId={3}
|
|
8
|
+
versionId={73}
|
|
9
|
+
cvVersion={cvVersion}
|
|
10
|
+
/>);
|
|
11
|
+
|
|
12
|
+
test('Shows no content when version has no counts', () => {
|
|
13
|
+
const { getByText } = renderContent({});
|
|
14
|
+
|
|
15
|
+
expect(getByText('No content')).toBeInTheDocument();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('Shows module streams once from the generic content config', () => {
|
|
19
|
+
const { getByText, getAllByText } = renderContent({ modulemd_count: 14 });
|
|
20
|
+
|
|
21
|
+
expect(getAllByText('14 Module streams')).toHaveLength(1);
|
|
22
|
+
expect(getByText('14 Module streams').closest('a'))
|
|
23
|
+
.toHaveAttribute('href', expect.stringContaining('moduleStreams'));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('Does not duplicate module streams when both count keys are present', () => {
|
|
27
|
+
const { getAllByText, queryByText } = renderContent({
|
|
28
|
+
modulemd_count: 14,
|
|
29
|
+
module_stream_count: 14,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
expect(getAllByText('14 Module streams')).toHaveLength(1);
|
|
33
|
+
expect(queryByText('No content')).not.toBeInTheDocument();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('Does not show module streams from the legacy count key alone', () => {
|
|
37
|
+
const { getByText, queryByText } = renderContent({ module_stream_count: 14 });
|
|
38
|
+
|
|
39
|
+
expect(queryByText(/Module streams/i)).not.toBeInTheDocument();
|
|
40
|
+
expect(getByText('No content')).toBeInTheDocument();
|
|
41
|
+
});
|
|
@@ -21,13 +21,13 @@ export const getFormData = (hostIds, search) => (post({
|
|
|
21
21
|
export const changeContentSource =
|
|
22
22
|
(assignments, contentSourceId, hostIds, handleSuccess, successToast) => {
|
|
23
23
|
// Build CVEnv labels from assignments
|
|
24
|
-
const
|
|
24
|
+
const cvEnvLabels = assignments.map(buildContentViewEnvironmentLabel).filter(Boolean);
|
|
25
25
|
|
|
26
26
|
return put({
|
|
27
27
|
key: CHANGE_CONTENT_SOURCE,
|
|
28
28
|
url: foremanUrl('/api/v2/hosts/bulk/change_content_source'),
|
|
29
29
|
params: {
|
|
30
|
-
content_view_environments:
|
|
30
|
+
content_view_environments: cvEnvLabels,
|
|
31
31
|
content_source_id: contentSourceId,
|
|
32
32
|
host_ids: hostIds,
|
|
33
33
|
},
|