katello 4.3.0.rc1 → 4.3.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/api_controller.rb +4 -0
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +11 -3
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/generic_content_units_controller.rb +10 -4
- data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -0
- data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -0
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +8 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +35 -3
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +2 -2
- data/app/controllers/katello/api/v2/root_controller.rb +10 -19
- data/app/controllers/katello/concerns/api/v2/bulk_extensions.rb +3 -13
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -9
- data/app/controllers/katello/remote_execution_controller.rb +1 -1
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -5
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/import_upload.rb +12 -2
- data/app/lib/actions/pulp/repository/sync.rb +0 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +16 -4
- data/app/lib/actions/pulp3/capsule_content/generate_metadata.rb +5 -4
- data/app/lib/actions/pulp3/capsule_content/reclaim_space.rb +25 -0
- data/app/lib/actions/pulp3/orchestration/repository/import_repository_upload.rb +36 -0
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
- data/app/lib/actions/pulp3/repository/commit_upload.rb +3 -1
- data/app/lib/actions/pulp3/repository/import_upload.rb +4 -2
- data/app/lib/actions/pulp3/repository/reclaim_space.rb +25 -0
- data/app/lib/actions/pulp3/repository/save_artifact.rb +12 -8
- data/app/lib/katello/resources/cdn.rb +10 -1
- data/app/lib/katello/resources/registry.rb +1 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +7 -4
- data/app/models/katello/concerns/smart_proxy_extensions.rb +21 -9
- data/app/models/katello/content_view_version.rb +1 -6
- data/app/models/katello/glue/pulp/repo.rb +1 -2
- data/app/models/katello/host_tracer.rb +2 -0
- data/app/models/katello/pulp3/repository_reference.rb +7 -0
- data/app/models/katello/repository.rb +2 -30
- data/app/models/katello/root_repository.rb +3 -44
- data/app/models/setting/content.rb +2 -8
- data/app/presenters/katello/host_package_presenter.rb +21 -0
- data/app/services/katello/bulk_items_helper.rb +35 -0
- data/app/services/katello/pulp3/api/core.rb +16 -2
- data/app/services/katello/pulp3/content.rb +4 -2
- data/app/services/katello/pulp3/pulp_content_unit.rb +9 -3
- data/app/services/katello/pulp3/repository.rb +9 -4
- data/app/services/katello/pulp3/repository_mirror.rb +1 -1
- data/app/services/katello/repository_type.rb +2 -1
- data/app/services/katello/smart_proxy_helper.rb +10 -1
- data/app/views/foreman/job_templates/change_content_source.erb +42 -0
- data/app/views/foreman/job_templates/install_errata.erb +8 -6
- data/app/views/foreman/job_templates/resolve_traces.erb +4 -5
- data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +3 -5
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +17 -4
- data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +12 -0
- data/app/views/foreman/smart_proxies/show.html.erb +4 -2
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +6 -0
- data/app/views/katello/api/v2/{organizations/cdn_configuration.rabl → cdn_configurations/show.json.rabl} +4 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +8 -0
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
- data/app/views/katello/api/v2/host_packages/base.json.rabl +2 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +0 -3
- data/config/routes/api/v2.rb +5 -10
- data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +2 -0
- data/db/migrate/20211115215210_drop_ostree_branches.rb +13 -0
- data/db/migrate/20211129200124_remove_dependency_solving_algorithm_setting.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +21 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/sync-state.service.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +14 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-reclaim-space-modal.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +16 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details-reclaim-space-modal.html +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/product-repositories-reclaim-space-modal.controller.js +35 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories-reclaim-space-modal.html +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +7 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.controller.js +35 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.factory.js +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.module.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/pulp-primary/pulp-primary.routes.js +16 -0
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -1
- data/lib/katello/permission_creator.rb +3 -4
- data/lib/katello/plugin.rb +4 -10
- data/lib/katello/repository_types/ostree.rb +3 -1
- data/lib/katello/tasks/reset.rake +2 -2
- data/lib/katello/tasks/upgrades/4.3/fix_url_auth.rake +25 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +1 -0
- data/webpack/components/AddedStatusLabel.js +2 -1
- data/webpack/components/EditableTextInput/EditableTextInput.js +76 -17
- data/webpack/components/EditableTextInput/__tests__/editableTextInput.test.js +82 -0
- data/webpack/components/EditableTextInput/editableTextInput.scss +4 -0
- data/webpack/components/Packages/index.js +63 -0
- data/webpack/components/RoutedTabs/index.js +3 -1
- data/webpack/components/Search/Search.js +7 -1
- data/webpack/components/SelectAllCheckbox/index.js +2 -2
- data/webpack/components/Table/EmptyStateMessage.js +4 -2
- data/webpack/components/Table/MainTable.scss +7 -1
- data/webpack/components/Table/TableHooks.js +10 -19
- data/webpack/components/Table/TableWrapper.js +3 -3
- data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +3 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard.js +24 -30
- data/webpack/components/extensions/HostDetails/HostDetailsConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/HostDetailsSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/HostErrata/HostErrataConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +11 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab.js +119 -25
- data/webpack/components/extensions/HostDetails/Tabs/HostTracesConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +127 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.scss +11 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +30 -4
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +73 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +347 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.scss +7 -0
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab.js +38 -31
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/bookmarks.fixtures.json +12 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/contentOverrides.fixtures.json +227 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +423 -2
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +28 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +91 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySets.fixtures.json +120 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +307 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/resolveErrata.fixtures.json +35 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +55 -9
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +28 -14
- data/webpack/containers/Application/overrides.scss +31 -9
- data/webpack/global_index.js +11 -4
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/Content/ContentConfig.js +23 -7
- data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +2 -0
- data/webpack/scenes/ContentCredentials/ContentCredentialActions.js +18 -0
- data/webpack/scenes/ContentCredentials/ContentCredentialConstants.js +2 -0
- data/webpack/scenes/ContentCredentials/ContentCredentialSelectors.js +12 -0
- data/webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js +73 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +8 -12
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -1
- data/webpack/scenes/ContentViews/Copy/__tests__/copyContentView.test.js +1 -1
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +3 -3
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +7 -2
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.scss +7 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +9 -9
- data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +6 -6
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +39 -37
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionFinish.js +10 -4
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReview.js +35 -33
- data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +12 -7
- data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +2 -6
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +13 -14
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +36 -31
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +8 -8
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +108 -41
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +1 -4
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +6 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +11 -5
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +6 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +5 -8
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +40 -43
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +4 -4
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +6 -8
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +6 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/ContainerTag/AddEditContainerTagRuleModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +16 -22
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +8 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +3 -5
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewErrataByDateDetails.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +5 -9
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvAllRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataDateFilterContent.test.js +1 -9
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +2 -4
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErratumFilterDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailModuleAffectedRepos.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailWithAffectedRepos.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +2 -4
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilterDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +61 -32
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +6 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +5 -8
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +55 -9
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +2 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +48 -29
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +9 -7
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +5 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +38 -9
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveCVVersionWizard.js +4 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +59 -53
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionDeleteFinish.js +14 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +24 -17
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +1 -4
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +134 -32
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +8 -3
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +1 -4
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +21 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsCounts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js +22 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionRepositories.fixtures.json +1 -18
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +5 -5
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +2 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +0 -4
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +66 -53
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +40 -28
- data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +3 -3
- data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +14 -14
- data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +6 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +53 -12
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +12 -6
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -6
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +12 -7
- data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +2 -2
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +26 -27
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +18 -6
- data/webpack/scenes/ContentViews/components/WizardHeader.js +44 -0
- data/webpack/scenes/ContentViews/components/contentViewIcon.scss +13 -2
- data/webpack/scenes/Organizations/OrganizationActions.js +22 -24
- data/webpack/scenes/Organizations/OrganizationConstants.js +1 -3
- data/webpack/scenes/Organizations/OrganizationReducer.js +0 -7
- data/webpack/scenes/Organizations/OrganizationSelectors.js +16 -0
- data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +1 -21
- data/webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js +0 -20
- data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +34 -23
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationForm.js +185 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationForm.scss +3 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +112 -146
- data/webpack/scenes/Subscriptions/Manifest/__tests__/CdnConfigurationForm.test.js +114 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +121 -31
- data/webpack/scenes/Subscriptions/Manifest/index.js +14 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +1 -0
- data/webpack/scenes/Tasks/TaskActions.js +4 -3
- data/webpack/scenes/Tasks/__tests__/__snapshots__/TaskActions.test.js.snap +1 -0
- data/webpack/utils/helpers.js +2 -2
- metadata +62 -43
- data/app/controllers/katello/api/v2/ostree_branches_controller.rb +0 -16
- data/app/lib/actions/pulp/repository/presenters/ostree_presenter.rb +0 -91
- data/app/models/katello/ostree_branch.rb +0 -12
- data/app/models/katello/repository_ostree_branch.rb +0 -7
- data/app/services/katello/pulp/ostree_branch.rb +0 -14
- data/app/services/katello/pulp/repository/ostree.rb +0 -48
- data/app/views/katello/api/v2/ostree_branches/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/ostree_branches/index.json.rabl +0 -7
- data/app/views/katello/api/v2/ostree_branches/show.json.rabl +0 -5
- data/app/views/katello/api/v2/root/resource_list.json.rabl +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +0 -26
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +0 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +0 -77
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch.controller.js +0 -31
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-repositories.html +0 -72
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch.html +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +0 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +0 -67
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +0 -50
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +0 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/ostree-upstream-sync-policy.service.js +0 -26
- data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +0 -12
- data/webpack/scenes/Content/Details/ContentCounts.js +0 -42
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -108
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +0 -158
@@ -10,6 +10,7 @@ import { createContentView } from '../ContentViewsActions';
|
|
10
10
|
import { selectCreateContentViews, selectCreateContentViewStatus, selectCreateContentViewError } from './ContentViewCreateSelectors';
|
11
11
|
import { LabelDependencies, LabelAutoPublish, LabelImportOnly } from './ContentViewFormComponents';
|
12
12
|
import ContentViewIcon from '../components/ContentViewIcon';
|
13
|
+
import './CreateContentViewForm.scss';
|
13
14
|
|
14
15
|
const CreateContentViewForm = ({ setModalOpen }) => {
|
15
16
|
const dispatch = useDispatch();
|
@@ -63,6 +64,8 @@ const CreateContentViewForm = ({ setModalOpen }) => {
|
|
63
64
|
return (<Redirect to={`/content_views/${id}`} />);
|
64
65
|
}
|
65
66
|
|
67
|
+
const submitDisabled = name.length <= 2 || label.length <= 2 || saving;
|
68
|
+
|
66
69
|
return (
|
67
70
|
<Form onSubmit={(e) => {
|
68
71
|
e.preventDefault();
|
@@ -106,6 +109,7 @@ const CreateContentViewForm = ({ setModalOpen }) => {
|
|
106
109
|
<Grid hasGutter>
|
107
110
|
<GridItem span={6}>
|
108
111
|
<Tile
|
112
|
+
style={{ height: '100%' }}
|
109
113
|
isStacked
|
110
114
|
aria-label="component_tile"
|
111
115
|
icon={<ContentViewIcon composite={false} />}
|
@@ -114,11 +118,12 @@ const CreateContentViewForm = ({ setModalOpen }) => {
|
|
114
118
|
onClick={() => { setComponent(true); setComposite(false); }}
|
115
119
|
isSelected={component}
|
116
120
|
>
|
117
|
-
{__('Single content view consisting of repositories')}
|
121
|
+
{__('Single content view consisting of e.g. repositories')}
|
118
122
|
</Tile>
|
119
123
|
</GridItem>
|
120
124
|
<GridItem span={6}>
|
121
125
|
<Tile
|
126
|
+
style={{ height: '100%' }}
|
122
127
|
isStacked
|
123
128
|
aria-label="composite_tile"
|
124
129
|
icon={<ContentViewIcon composite />}
|
@@ -166,7 +171,7 @@ const CreateContentViewForm = ({ setModalOpen }) => {
|
|
166
171
|
<Button
|
167
172
|
aria-label="create_content_view"
|
168
173
|
variant="primary"
|
169
|
-
isDisabled={
|
174
|
+
isDisabled={submitDisabled}
|
170
175
|
type="submit"
|
171
176
|
>
|
172
177
|
{__('Create content view')}
|
@@ -69,9 +69,9 @@ test('Displays dependent fields correctly', () => {
|
|
69
69
|
expect(getByText('Label')).toBeInTheDocument();
|
70
70
|
expect(getByText('Composite content view')).toBeInTheDocument();
|
71
71
|
expect(getByText('Component content view')).toBeInTheDocument();
|
72
|
-
expect(getByText('Solve
|
73
|
-
expect(queryByText('Auto
|
74
|
-
expect(getByText('Import
|
72
|
+
expect(getByText('Solve dependencies')).toBeInTheDocument();
|
73
|
+
expect(queryByText('Auto publish')).not.toBeInTheDocument();
|
74
|
+
expect(getByText('Import only')).toBeInTheDocument();
|
75
75
|
|
76
76
|
// label auto_set
|
77
77
|
fireEvent.change(getByLabelText('input_name'), { target: { value: '123 2123' } });
|
@@ -79,13 +79,13 @@ test('Displays dependent fields correctly', () => {
|
|
79
79
|
|
80
80
|
// display Auto Publish when Composite CV
|
81
81
|
fireEvent.click(getByLabelText('composite_tile'));
|
82
|
-
expect(queryByText('Solve
|
83
|
-
expect(getByText('Auto
|
84
|
-
expect(queryByText('Import
|
82
|
+
expect(queryByText('Solve dependencies')).not.toBeInTheDocument();
|
83
|
+
expect(getByText('Auto publish')).toBeInTheDocument();
|
84
|
+
expect(queryByText('Import only')).not.toBeInTheDocument();
|
85
85
|
|
86
86
|
// display Solve Dependencies when Component CV
|
87
87
|
fireEvent.click(getByLabelText('component_tile'));
|
88
|
-
expect(getByText('Solve
|
89
|
-
expect(queryByText('Auto
|
90
|
-
expect(getByText('Import
|
88
|
+
expect(getByText('Solve dependencies')).toBeInTheDocument();
|
89
|
+
expect(queryByText('Auto publish')).not.toBeInTheDocument();
|
90
|
+
expect(getByText('Import only')).toBeInTheDocument();
|
91
91
|
});
|
@@ -62,7 +62,7 @@ const ContentViewDeleteWizard =
|
|
62
62
|
|
63
63
|
const environmentSelectionStep = {
|
64
64
|
id: 1,
|
65
|
-
name: __('Remove from environments'),
|
65
|
+
name: __('Remove versions from environments'),
|
66
66
|
component: <CVDeleteEnvironmentSelection />,
|
67
67
|
};
|
68
68
|
const affectedHostsStep = {
|
@@ -78,7 +78,7 @@ const ContentViewDeleteWizard =
|
|
78
78
|
};
|
79
79
|
const reviewStep = {
|
80
80
|
id: 4,
|
81
|
-
name: __('Review'),
|
81
|
+
name: __('Review details'),
|
82
82
|
component: <CVDeletionReview />,
|
83
83
|
canJumpTo: canReview,
|
84
84
|
nextButtonText: __('Delete'),
|
@@ -135,7 +135,7 @@ const ContentViewDeleteWizard =
|
|
135
135
|
setSelectedCVNameForHosts,
|
136
136
|
affectedActivationKeys,
|
137
137
|
affectedHosts,
|
138
|
-
|
138
|
+
}}
|
139
139
|
>
|
140
140
|
<Wizard
|
141
141
|
title={__('Delete content view')}
|
@@ -143,9 +143,9 @@ const ContentViewDeleteWizard =
|
|
143
143
|
steps={steps}
|
144
144
|
startAtStep={currentStep}
|
145
145
|
onClose={() => {
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
setIsOpen(false);
|
147
|
+
setCurrentStep(0);
|
148
|
+
}}
|
149
149
|
isOpen={show}
|
150
150
|
/>
|
151
151
|
</CVDeleteContext.Provider>
|
@@ -9,6 +9,7 @@ import { pluralize } from '../../../../utils/helpers';
|
|
9
9
|
import Loading from '../../../../components/Loading';
|
10
10
|
import './CVEnvironmentSelectionForm.scss';
|
11
11
|
import InactiveText from '../../components/InactiveText';
|
12
|
+
import WizardHeader from '../../components/WizardHeader';
|
12
13
|
|
13
14
|
const CVDeleteEnvironmentSelection = () => {
|
14
15
|
const {
|
@@ -35,25 +36,26 @@ const CVDeleteEnvironmentSelection = () => {
|
|
35
36
|
|
36
37
|
return (
|
37
38
|
<>
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
<>
|
39
|
+
<WizardHeader
|
40
|
+
title={__('Remove versions from environments')}
|
41
|
+
description={resolved &&
|
42
42
|
<Flex>
|
43
|
-
<FlexItem><ExclamationTriangleIcon /></FlexItem>
|
43
|
+
<FlexItem style={{ marginRight: '8px' }}><ExclamationTriangleIcon /></FlexItem>
|
44
44
|
{versionCount ?
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
{__('This content view does not have any versions associated.')}
|
53
|
-
</FlexItem>
|
54
|
-
)
|
45
|
+
<FlexItem>
|
46
|
+
{__(`${pluralize(versionCount, 'content view version')} in the environments below will be removed when content view is deleted`)}
|
47
|
+
</FlexItem>
|
48
|
+
:
|
49
|
+
<FlexItem>
|
50
|
+
{__('This content view does not have any versions associated.')}
|
51
|
+
</FlexItem>
|
55
52
|
}
|
56
|
-
</Flex>
|
53
|
+
</Flex>}
|
54
|
+
/>
|
55
|
+
{!resolved ?
|
56
|
+
<Loading loadingText={__('Loading versions')} /> :
|
57
|
+
<>
|
58
|
+
|
57
59
|
{results?.map((version, index) => (
|
58
60
|
<ExpandableSection
|
59
61
|
key={version.id}
|
@@ -72,27 +74,27 @@ const CVDeleteEnvironmentSelection = () => {
|
|
72
74
|
</Thead>
|
73
75
|
<Tbody>
|
74
76
|
{version?.environments?.map((env, rowIndex) => {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
77
|
+
const {
|
78
|
+
id, name, activation_key_count: akCount, host_count: hostCount,
|
79
|
+
} = env;
|
80
|
+
return (
|
81
|
+
<Tr key={`${name}_${id}`}>
|
82
|
+
<Td
|
83
|
+
key={`${name}__${id}_select`}
|
84
|
+
select={{
|
85
|
+
rowIndex,
|
86
|
+
isSelected: true,
|
87
|
+
disable: true,
|
88
|
+
}}
|
89
|
+
/>
|
90
|
+
<Td>
|
91
|
+
{name}
|
92
|
+
</Td>
|
93
|
+
<Td>{hostCount}</Td>
|
94
|
+
<Td>{akCount}</Td>
|
95
|
+
</Tr>
|
96
|
+
);
|
97
|
+
})}
|
96
98
|
</Tbody>
|
97
99
|
</TableComposable> :
|
98
100
|
<InactiveText text={__('This version is not promoted to any environments.')} />
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import React, { useContext, useState } from 'react';
|
2
2
|
import { useSelector, useDispatch } from 'react-redux';
|
3
|
+
import { useHistory } from 'react-router-dom';
|
3
4
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
4
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
6
|
import { STATUS } from 'foremanReact/constants';
|
6
|
-
import {
|
7
|
+
import { removeContentViewVersion } from '../../Details/ContentViewDetailActions';
|
7
8
|
import { selectRemoveCVVersionResponse, selectRemoveCVVersionStatus } from '../../Details/ContentViewDetailSelectors';
|
8
9
|
import getContentViews from '../../ContentViewsActions';
|
9
10
|
import CVDeleteContext from '../CVDeleteContext';
|
@@ -23,14 +24,19 @@ const CVDeletionFinish = () => {
|
|
23
24
|
const removeResolved = removeCVStatus === STATUS.RESOLVED;
|
24
25
|
const dispatch = useDispatch();
|
25
26
|
const [removeDispatched, setRemoveDispatched] = useState(false);
|
27
|
+
const { push } = useHistory();
|
26
28
|
|
27
29
|
useDeepCompareEffect(() => {
|
28
30
|
if (removeResolved && removeDispatched) {
|
31
|
+
dispatch(getContentViews());
|
32
|
+
push('/content_views');
|
29
33
|
setIsOpen(false);
|
30
|
-
dispatch(getContentViewVersions(cvId));
|
31
|
-
dispatch(getContentViews);
|
32
34
|
}
|
33
|
-
|
35
|
+
if (removeCVStatus === STATUS.ERROR) {
|
36
|
+
setIsOpen(false);
|
37
|
+
}
|
38
|
+
}, [removeCVResponse, removeCVStatus, removeResolved,
|
39
|
+
setIsOpen, dispatch, cvId, removeDispatched, push]);
|
34
40
|
|
35
41
|
useDeepCompareEffect(() => {
|
36
42
|
if (!removeDispatched) {
|
@@ -6,6 +6,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
6
6
|
import CVDeleteContext from '../CVDeleteContext';
|
7
7
|
import { selectCVActivationKeys, selectCVHosts } from '../../Details/ContentViewDetailSelectors';
|
8
8
|
import { pluralize } from '../../../../utils/helpers';
|
9
|
+
import WizardHeader from '../../components/WizardHeader';
|
9
10
|
|
10
11
|
const CVDeletionReview = () => {
|
11
12
|
const {
|
@@ -19,42 +20,43 @@ const CVDeletionReview = () => {
|
|
19
20
|
const { results: akResponse } = activationKeysResponse || {};
|
20
21
|
return (
|
21
22
|
<>
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
'
|
26
|
-
|
27
|
-
|
23
|
+
<WizardHeader
|
24
|
+
title={__('Review details')}
|
25
|
+
description={cvEnvironments.length ?
|
26
|
+
(__('This content view will be deleted along with all versions from the environments listed below. ' +
|
27
|
+
'Changes listed below will be effective after clicking Delete.')) :
|
28
|
+
(__('This content view will be deleted. Changes will be effective after clicking Delete.'))}
|
29
|
+
/>
|
28
30
|
{(cvEnvironments.length !== 0) &&
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
31
|
+
<>
|
32
|
+
<h3>{__('Environments')}</h3>
|
33
|
+
<Flex>
|
34
|
+
<FlexItem><ExclamationTriangleIcon /></FlexItem>
|
35
|
+
<FlexItem style={{ marginBottom: '0.5em' }}>{__('All versions will be removed from these environments')}</FlexItem>
|
36
|
+
</Flex>
|
37
|
+
<Flex>
|
38
|
+
{cvEnvironments?.map(({ name, id }) =>
|
39
|
+
<FlexItem key={name}><Label isTruncated color="purple" href={`/lifecycle_environments/${id}`}>{name}</Label></FlexItem>)}
|
40
|
+
</Flex>
|
41
|
+
</>}
|
40
42
|
{affectedHosts &&
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
<>
|
44
|
+
<h3>{__('Content hosts')}</h3>
|
45
|
+
<Flex>
|
46
|
+
<FlexItem><ExclamationTriangleIcon /></FlexItem>
|
47
|
+
<FlexItem><p>{__(`${pluralize(hostResponse.length, 'host')} will be moved to content view ${selectedCVNameForHosts} in `)}</p></FlexItem>
|
48
|
+
<FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForHost[0].id}`}>{selectedEnvForHost[0].name}</Label></FlexItem>
|
49
|
+
</Flex>
|
50
|
+
</>}
|
49
51
|
{affectedActivationKeys &&
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
<>
|
53
|
+
<h3>{__('Activation keys')}</h3>
|
54
|
+
<Flex>
|
55
|
+
<FlexItem><ExclamationTriangleIcon /></FlexItem>
|
56
|
+
<FlexItem><p>{__(`${pluralize(akResponse.length, 'activation key')} will be moved to content view ${selectedCVNameForAK} in `)}</p></FlexItem>
|
57
|
+
<FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForAK[0].id}`}>{selectedEnvForAK[0].name}</Label></FlexItem>
|
58
|
+
</Flex>
|
59
|
+
</>}
|
58
60
|
</>
|
59
61
|
);
|
60
62
|
};
|
@@ -75,7 +75,9 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
|
|
75
75
|
.query(true)
|
76
76
|
.reply(200, cvDetailsData);
|
77
77
|
|
78
|
-
const {
|
78
|
+
const {
|
79
|
+
getAllByText, getByText, getAllByLabelText, queryByText,
|
80
|
+
} =
|
79
81
|
renderWithRedux(<ContentViewsPage />, renderOptions);
|
80
82
|
expect(queryByText(firstCV.name)).toBeNull();
|
81
83
|
// Assert that the CV name is now showing on the screen, but wait for it to appear.
|
@@ -84,7 +86,7 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
|
|
84
86
|
fireEvent.click(getAllByLabelText('Actions')[0]);
|
85
87
|
expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true');
|
86
88
|
fireEvent.click(getByText('Delete'));
|
87
|
-
await patientlyWaitFor(() => expect(
|
89
|
+
await patientlyWaitFor(() => expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument());
|
88
90
|
|
89
91
|
assertNockRequest(scope);
|
90
92
|
assertNockRequest(scopeBookmark);
|
@@ -117,7 +119,6 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
|
|
117
119
|
|
118
120
|
const cvVersionsScope = nockInstance
|
119
121
|
.get(cvVersionsPath)
|
120
|
-
.times(2)
|
121
122
|
.query(true)
|
122
123
|
.reply(200, cvVersionsData);
|
123
124
|
|
@@ -126,13 +127,17 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
|
|
126
127
|
.query(true)
|
127
128
|
.reply(200, cvDetailsData);
|
128
129
|
|
130
|
+
const cvRedirectScope = nockInstance
|
131
|
+
.get(api.getApiUrl('/content_views?organization_id=1&nondefault=true&include_permissions=true'))
|
132
|
+
.reply(200, cvIndexData);
|
133
|
+
|
129
134
|
const cvDeleteParams = {
|
130
135
|
destroy_content_view: true,
|
131
136
|
system_content_view_id: 2,
|
132
137
|
system_environment_id: 9,
|
133
138
|
key_content_view_id: 2,
|
134
139
|
key_environment_id: 9,
|
135
|
-
id:
|
140
|
+
id: 20,
|
136
141
|
};
|
137
142
|
|
138
143
|
const cvDeleteScope = nockInstance
|
@@ -166,7 +171,7 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
|
|
166
171
|
expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true');
|
167
172
|
fireEvent.click(getByText('Delete'));
|
168
173
|
await patientlyWaitFor(() => {
|
169
|
-
expect(
|
174
|
+
expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument();
|
170
175
|
expect(queryByText('Version 1.0')).toBeInTheDocument();
|
171
176
|
});
|
172
177
|
fireEvent.click(getByText('Next'));
|
@@ -210,7 +215,7 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
|
|
210
215
|
// Move to Review
|
211
216
|
fireEvent.click(getByText('Next'));
|
212
217
|
await patientlyWaitFor(() => {
|
213
|
-
expect(
|
218
|
+
expect(getAllByText('Review details')[1]).toBeInTheDocument();
|
214
219
|
expect(getByText('Environments')).toBeInTheDocument();
|
215
220
|
expect(getByText('Content hosts')).toBeInTheDocument();
|
216
221
|
expect(getByText('1 host will be moved to content view cv2 in')).toBeInTheDocument();
|
@@ -237,5 +242,5 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
|
|
237
242
|
assertNockRequest(activationKeysScope);
|
238
243
|
assertNockRequest(cVDropDownOptionsScope);
|
239
244
|
assertNockRequest(cvDeleteScope);
|
240
|
-
assertNockRequest(
|
245
|
+
assertNockRequest(cvRedirectScope, done);
|
241
246
|
});
|
@@ -246,7 +246,6 @@
|
|
246
246
|
"srpm_count": 0,
|
247
247
|
"module_stream_count": 14,
|
248
248
|
"package_count": 22,
|
249
|
-
"ostree_branch_count": null,
|
250
249
|
"component_view_count": 0,
|
251
250
|
"python_repository_count": 1,
|
252
251
|
"deb_repository_count": 0,
|
@@ -517,8 +516,7 @@
|
|
517
516
|
"srpm_count": 0,
|
518
517
|
"module_stream_count": 14,
|
519
518
|
"package_count": 22,
|
520
|
-
|
521
|
-
"component_view_count": 0,
|
519
|
+
"component_view_count": 0,
|
522
520
|
"python_repository_count": 1,
|
523
521
|
"deb_repository_count": 1,
|
524
522
|
"file_repository_count": 1,
|
@@ -680,7 +678,6 @@
|
|
680
678
|
"srpm_count": 0,
|
681
679
|
"module_stream_count": 0,
|
682
680
|
"package_count": 0,
|
683
|
-
"ostree_branch_count": null,
|
684
681
|
"component_view_count": 0,
|
685
682
|
"python_repository_count": 0,
|
686
683
|
"deb_repository_count": 0,
|
@@ -843,7 +840,6 @@
|
|
843
840
|
"srpm_count": 0,
|
844
841
|
"module_stream_count": 0,
|
845
842
|
"package_count": 0,
|
846
|
-
"ostree_branch_count": null,
|
847
843
|
"component_view_count": 0,
|
848
844
|
"python_repository_count": 0,
|
849
845
|
"deb_repository_count": 0,
|
@@ -862,4 +858,4 @@
|
|
862
858
|
}
|
863
859
|
}
|
864
860
|
]
|
865
|
-
}
|
861
|
+
}
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import { Label
|
3
|
+
import { Label } from '@patternfly/react-core';
|
4
|
+
|
5
|
+
const ComponentEnvironments = ({ environments }) => environments.map((env, index) => (
|
6
|
+
<Label
|
7
|
+
key={env.id}
|
8
|
+
style={{ margin: `4px 0 4px ${index > 0 ? '4px' : '0'}` }}
|
9
|
+
color="purple"
|
10
|
+
href={`/lifecycle_environments/${env.id}`}
|
11
|
+
isTruncated
|
12
|
+
>
|
13
|
+
{`${env.name}`}
|
14
|
+
</Label>
|
15
|
+
));
|
4
16
|
|
5
|
-
const ComponentEnvironments = ({ environments }) => {
|
6
|
-
const envList = environments.map(env =>
|
7
|
-
(
|
8
|
-
<FlexItem key={env.id} style={{ marginTop: '0.25em', marginBottom: '0.25em' }}>
|
9
|
-
<Label color="purple" href={`/lifecycle_environments/${env.id}`} isTruncated>{`${env.name}`}</Label>
|
10
|
-
</FlexItem>
|
11
|
-
));
|
12
|
-
return (
|
13
|
-
<Flex grow={{ default: 'grow' }} spaceItems={{ default: 'spaceItemsSm' }}>
|
14
|
-
{envList}
|
15
|
-
</Flex>
|
16
|
-
);
|
17
|
-
};
|
18
17
|
|
19
18
|
ComponentEnvironments.propTypes = {
|
20
19
|
environments: PropTypes.instanceOf(Array),
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
2
2
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
|
-
import {
|
5
|
-
|
4
|
+
import {
|
5
|
+
Bullseye, Split, SplitItem, Button, ActionList,
|
6
|
+
ActionListItem, Dropdown, DropdownItem, KebabToggle,
|
7
|
+
} from '@patternfly/react-core';
|
6
8
|
import { Link } from 'react-router-dom';
|
7
9
|
import { TableVariant, fitContent, TableText } from '@patternfly/react-table';
|
8
10
|
import { PencilAltIcon } from '@patternfly/react-icons';
|
@@ -34,6 +36,8 @@ import '../../../../components/EditableTextInput/editableTextInput.scss';
|
|
34
36
|
import ComponentContentViewAddModal from './ComponentContentViewAddModal';
|
35
37
|
import ComponentContentViewBulkAddModal from './ComponentContentViewBulkAddModal';
|
36
38
|
import { hasPermission } from '../../helpers';
|
39
|
+
import InactiveText from '../../components/InactiveText';
|
40
|
+
|
37
41
|
|
38
42
|
const ContentViewComponents = ({ cvId, details }) => {
|
39
43
|
const response = useSelector(state => selectCVComponents(state, cvId));
|
@@ -136,34 +140,38 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
136
140
|
{ title: <Bullseye><ContentViewIcon composite={false} /></Bullseye> },
|
137
141
|
{ title: <a href={urlBuilder('content_views', '') + id}>{name}</a> },
|
138
142
|
{
|
139
|
-
title:
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
143
|
+
title: (
|
144
|
+
<Split>
|
145
|
+
<SplitItem>
|
146
|
+
<ComponentVersion {...{ componentCV }} />
|
147
|
+
</SplitItem>
|
148
|
+
{hasPermission(permissions, 'edit_content_views') && componentCvId && cvVersion &&
|
149
|
+
<SplitItem>
|
150
|
+
<Button
|
151
|
+
className="foreman-edit-icon"
|
152
|
+
aria-label="edit_version"
|
153
|
+
variant="plain"
|
154
|
+
onClick={() => {
|
151
155
|
onAdd({
|
152
156
|
componentCvId: id, published: cvVersion, added: componentCvId, latest,
|
153
157
|
});
|
154
158
|
}}
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
159
|
+
>
|
160
|
+
<PencilAltIcon />
|
161
|
+
</Button>
|
162
|
+
</SplitItem>}
|
163
|
+
</Split>),
|
160
164
|
},
|
161
|
-
{ title: environments ? <ComponentEnvironments {...{ environments }} /> : __('Not yet published') },
|
165
|
+
{ title: environments ? <ComponentEnvironments {...{ environments }} /> : <InactiveText text={__('Not yet published')} /> },
|
162
166
|
{ title: <Link to={urlBuilder(`content_views/${id}#repositories`, '')}>{repositories ? repositories.length : 0}</Link> },
|
163
167
|
{
|
164
168
|
title: <AddedStatusLabel added={!!componentCvId} />,
|
165
169
|
},
|
166
|
-
{
|
170
|
+
{
|
171
|
+
title: description ?
|
172
|
+
<TableText wrapModifier="truncate">{description}</TableText> :
|
173
|
+
<InactiveText text={__('No description')} />,
|
174
|
+
},
|
167
175
|
];
|
168
176
|
newRows.push({
|
169
177
|
componentCvId: id,
|
@@ -201,9 +209,6 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
201
209
|
];
|
202
210
|
|
203
211
|
const dropdownItems = [
|
204
|
-
<DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!(bulkAddEnabled())} component="button" onClick={addBulk}>
|
205
|
-
{__('Add')}
|
206
|
-
</DropdownItem>,
|
207
212
|
<DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!(bulkRemoveEnabled())} component="button" onClick={removeBulk}>
|
208
213
|
{__('Remove')}
|
209
214
|
</DropdownItem>,
|
@@ -252,7 +257,7 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
252
257
|
<Split hasGutter>
|
253
258
|
<SplitItem>
|
254
259
|
<SelectableDropdown
|
255
|
-
items={[ADDED, NOT_ADDED
|
260
|
+
items={[ALL_STATUSES, ADDED, NOT_ADDED]}
|
256
261
|
title={__('Status')}
|
257
262
|
selected={statusSelected}
|
258
263
|
setSelected={setStatusSelected}
|
@@ -290,12 +295,12 @@ const ContentViewComponents = ({ cvId, details }) => {
|
|
290
295
|
aria-label="edit_component_modal"
|
291
296
|
/>}
|
292
297
|
{bulkAdding &&
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
298
|
+
<ComponentContentViewBulkAddModal
|
299
|
+
cvId={compositeCvEditing}
|
300
|
+
rowsToAdd={selectedComponentsToAdd}
|
301
|
+
onClose={() => setBulkAdding(false)}
|
302
|
+
aria-label="bulk_add_components_modal"
|
303
|
+
/>}
|
299
304
|
</>
|
300
305
|
}
|
301
306
|
/>
|