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
@@ -0,0 +1,347 @@
|
|
1
|
+
import React, { useCallback, useState, useEffect } from 'react';
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
3
|
+
import PropTypes from 'prop-types';
|
4
|
+
import { useSelector, useDispatch } from 'react-redux';
|
5
|
+
import { Skeleton, ToggleGroup, ToggleGroupItem, Label, Tooltip, Alert, AlertActionCloseButton } from '@patternfly/react-core';
|
6
|
+
import {
|
7
|
+
TableVariant,
|
8
|
+
Thead,
|
9
|
+
Tbody,
|
10
|
+
Tr,
|
11
|
+
Th,
|
12
|
+
Td,
|
13
|
+
} from '@patternfly/react-table';
|
14
|
+
import { FlagIcon } from '@patternfly/react-icons';
|
15
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
16
|
+
import { propsToCamelCase } from 'foremanReact/common/helpers';
|
17
|
+
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
|
18
|
+
import { STATUS } from 'foremanReact/constants';
|
19
|
+
import TableWrapper from '../../../../../components/Table/TableWrapper';
|
20
|
+
import { enableRepoSetRepo, disableRepoSetRepo, resetRepoSetRepo, getHostRepositorySets } from './RepositorySetsActions';
|
21
|
+
import { selectRepositorySetsStatus } from './RepositorySetsSelectors';
|
22
|
+
import { selectHostDetailsStatus } from '../../HostDetailsSelectors.js';
|
23
|
+
import { useBulkSelect } from '../../../../../components/Table/TableHooks';
|
24
|
+
import { REPOSITORY_SETS_KEY } from './RepositorySetsConstants.js';
|
25
|
+
import './RepositorySetsTab.scss';
|
26
|
+
|
27
|
+
const getEnabledValue = ({ enabled, enabledContentOverride }) => {
|
28
|
+
const isOverridden = (enabledContentOverride !== null);
|
29
|
+
return {
|
30
|
+
isOverridden,
|
31
|
+
isEnabled: (isOverridden ? enabledContentOverride : enabled),
|
32
|
+
};
|
33
|
+
};
|
34
|
+
|
35
|
+
const EnabledIcon = ({ isEnabled, isOverridden }) => {
|
36
|
+
const enabledLabel = (
|
37
|
+
<Label
|
38
|
+
color={isEnabled ? 'green' : 'gray'}
|
39
|
+
icon={isOverridden ? <FlagIcon /> : null}
|
40
|
+
className={`${isEnabled ? 'enabled' : 'disabled'}-label${isOverridden ? ' content-override' : ''}`}
|
41
|
+
>
|
42
|
+
{isEnabled ? __('Enabled') : __('Disabled')}
|
43
|
+
</Label>
|
44
|
+
);
|
45
|
+
if (isOverridden) {
|
46
|
+
return (
|
47
|
+
<Tooltip
|
48
|
+
position="right"
|
49
|
+
content={__('Overridden')}
|
50
|
+
>
|
51
|
+
{enabledLabel}
|
52
|
+
</Tooltip>
|
53
|
+
);
|
54
|
+
}
|
55
|
+
return enabledLabel;
|
56
|
+
};
|
57
|
+
|
58
|
+
EnabledIcon.propTypes = {
|
59
|
+
isEnabled: PropTypes.bool.isRequired,
|
60
|
+
isOverridden: PropTypes.bool.isRequired,
|
61
|
+
};
|
62
|
+
|
63
|
+
const RepositorySetsTab = () => {
|
64
|
+
const hostDetails = useSelector(state => selectAPIResponse(state, 'HOST_DETAILS'));
|
65
|
+
const {
|
66
|
+
id: hostId,
|
67
|
+
subscription_status: subscriptionStatus,
|
68
|
+
content_facet_attributes: contentFacetAttributes,
|
69
|
+
} = hostDetails;
|
70
|
+
const contentFacet = propsToCamelCase(contentFacetAttributes ?? {});
|
71
|
+
const {
|
72
|
+
contentViewDefault,
|
73
|
+
lifecycleEnvironmentLibrary,
|
74
|
+
contentViewName,
|
75
|
+
lifecycleEnvironmentName,
|
76
|
+
} = contentFacet;
|
77
|
+
const nonLibraryHost = contentViewDefault === false &&
|
78
|
+
lifecycleEnvironmentLibrary === false;
|
79
|
+
const simpleContentAccess = (Number(subscriptionStatus) === 5);
|
80
|
+
const dispatch = useDispatch();
|
81
|
+
const toggleGroupStates = ['noLimit', 'limitToEnvironment'];
|
82
|
+
const [noLimit, limitToEnvironment] = toggleGroupStates;
|
83
|
+
const defaultToggleGroupState = nonLibraryHost ? limitToEnvironment : noLimit;
|
84
|
+
const [toggleGroupState, setToggleGroupState] =
|
85
|
+
useState(defaultToggleGroupState);
|
86
|
+
const [alertShowing, setAlertShowing] = useState(false);
|
87
|
+
const emptyContentTitle = __('No repository sets to show.');
|
88
|
+
const emptyContentBody = __('Repository sets will appear here when available.');
|
89
|
+
const emptySearchTitle = __('No matching repository sets found');
|
90
|
+
const emptySearchBody = __('Try changing your search query.');
|
91
|
+
const columnHeaders = [
|
92
|
+
__('Repository'),
|
93
|
+
__('Product'),
|
94
|
+
__('Repository path'),
|
95
|
+
__('Status'),
|
96
|
+
];
|
97
|
+
const fetchItems = useCallback(
|
98
|
+
params => (hostId ?
|
99
|
+
getHostRepositorySets({
|
100
|
+
content_access_mode_env: toggleGroupState === limitToEnvironment,
|
101
|
+
content_access_mode_all: simpleContentAccess,
|
102
|
+
host_id: hostId,
|
103
|
+
...params,
|
104
|
+
}) : null),
|
105
|
+
[hostId, toggleGroupState, limitToEnvironment, simpleContentAccess],
|
106
|
+
);
|
107
|
+
|
108
|
+
const response = useSelector(state => selectAPIResponse(state, REPOSITORY_SETS_KEY));
|
109
|
+
const { results, ...metadata } = response;
|
110
|
+
const status = useSelector(state => selectRepositorySetsStatus(state));
|
111
|
+
const {
|
112
|
+
selectOne, isSelected, searchQuery, selectedCount, isSelectable,
|
113
|
+
updateSearchQuery, selectNone, fetchBulkParams, ...selectAll
|
114
|
+
} = useBulkSelect({
|
115
|
+
results,
|
116
|
+
metadata,
|
117
|
+
isSelectable: () => false,
|
118
|
+
});
|
119
|
+
|
120
|
+
const hostDetailsStatus = useSelector(state => selectHostDetailsStatus(state));
|
121
|
+
|
122
|
+
useEffect(() => {
|
123
|
+
// wait until host details are loaded to set alertShowing
|
124
|
+
if (hostDetailsStatus === STATUS.RESOLVED) {
|
125
|
+
setAlertShowing(nonLibraryHost);
|
126
|
+
}
|
127
|
+
}, [hostDetailsStatus, nonLibraryHost]);
|
128
|
+
|
129
|
+
if (!hostId) return <Skeleton />;
|
130
|
+
|
131
|
+
const updateResults = ({ labels, enabled, newResponse }) => dispatch({
|
132
|
+
type: `${REPOSITORY_SETS_KEY}_SUCCESS`,
|
133
|
+
key: REPOSITORY_SETS_KEY,
|
134
|
+
response: {
|
135
|
+
...response,
|
136
|
+
results: results.map((result) => {
|
137
|
+
if (labels.includes(result.label)) {
|
138
|
+
const isEnabled = enabled === null ?
|
139
|
+
newResponse.results.find(r => r.id === result.id).enabled :
|
140
|
+
enabled;
|
141
|
+
return { ...result, enabled: isEnabled, enabled_content_override: enabled };
|
142
|
+
}
|
143
|
+
return result;
|
144
|
+
}),
|
145
|
+
},
|
146
|
+
});
|
147
|
+
const overrideToEnabled = ({ labels }) =>
|
148
|
+
dispatch(enableRepoSetRepo({ hostId, labels, updateResults }));
|
149
|
+
const overrideToDisabled = ({ labels }) =>
|
150
|
+
dispatch(disableRepoSetRepo({ hostId, labels, updateResults }));
|
151
|
+
const resetToDefault = ({ labels }) =>
|
152
|
+
dispatch(resetRepoSetRepo({ hostId, labels, updateResults }));
|
153
|
+
|
154
|
+
// uncomment (and remove rule disablement) when Select All is added
|
155
|
+
/* eslint-disable max-len */
|
156
|
+
// const dropdownItems = [
|
157
|
+
// <DropdownItem aria-label="bulk_enable" key="bulk_enable" component="button" onClick={overrideToEnabled}>
|
158
|
+
// {__('Override to enabled')}
|
159
|
+
// </DropdownItem>,
|
160
|
+
// <DropdownItem aria-label="bulk_disable" key="bulk_disable" component="button" onClick={overrideToDisabled}>
|
161
|
+
// {__('Override to disabled')}
|
162
|
+
// </DropdownItem>,
|
163
|
+
// <DropdownItem aria-label="bulk_disable" key="bulk_disable" component="button" onClick={resetToDefault}>
|
164
|
+
// {__('Reset to default')}
|
165
|
+
// </DropdownItem>,
|
166
|
+
// ];
|
167
|
+
/* eslint-enable max-len */
|
168
|
+
|
169
|
+
let toggleGroup;
|
170
|
+
if (nonLibraryHost) {
|
171
|
+
toggleGroup = (
|
172
|
+
<ToggleGroup aria-label="Repository Set toggle">
|
173
|
+
<ToggleGroupItem
|
174
|
+
text={__('Show all')}
|
175
|
+
buttonId="no-limit-toggle"
|
176
|
+
aria-label="No limit"
|
177
|
+
isSelected={toggleGroupState === noLimit}
|
178
|
+
onChange={() => setToggleGroupState(noLimit)}
|
179
|
+
/>
|
180
|
+
<ToggleGroupItem
|
181
|
+
text={__('Limit to environment')}
|
182
|
+
buttonId="limit-to-env-toggle"
|
183
|
+
aria-label="Limit to environment"
|
184
|
+
isSelected={toggleGroupState === limitToEnvironment}
|
185
|
+
onChange={() => setToggleGroupState(limitToEnvironment)}
|
186
|
+
/>
|
187
|
+
</ToggleGroup>
|
188
|
+
);
|
189
|
+
}
|
190
|
+
|
191
|
+
const hostEnvText = 'the "{contentViewName}" content view and "{lifecycleEnvironmentName}" environment';
|
192
|
+
|
193
|
+
const scaAlert = (toggleGroupState === limitToEnvironment ?
|
194
|
+
`Showing only repositories in ${hostEnvText}.` :
|
195
|
+
'Showing all available repositories.');
|
196
|
+
|
197
|
+
const nonScaAlert = (toggleGroupState === limitToEnvironment ?
|
198
|
+
`Showing repositories in ${hostEnvText} that are available through subscriptions.` :
|
199
|
+
'Showing all repositories available through subscriptions.');
|
200
|
+
|
201
|
+
let alertText;
|
202
|
+
if (simpleContentAccess) {
|
203
|
+
alertText = scaAlert;
|
204
|
+
} else {
|
205
|
+
alertText = nonScaAlert;
|
206
|
+
}
|
207
|
+
|
208
|
+
return (
|
209
|
+
<div>
|
210
|
+
<div id="repo-sets-tab">
|
211
|
+
<div className="content-header">
|
212
|
+
<div className="repo-sets-blurb">
|
213
|
+
<FormattedMessage
|
214
|
+
className="repo-sets-blurb"
|
215
|
+
id="repo-sets-blurb"
|
216
|
+
defaultMessage={__('Below are the repository sets currently available for this content host. For Red Hat subscriptions, additional content can be made available through the {rhrp}. Changing default settings requires subscription-manager 1.10 or newer to be installed on this host.')}
|
217
|
+
values={{
|
218
|
+
rhrp: <a href="/redhat_repositories">{__('Red Hat Repositories page')}</a>,
|
219
|
+
}}
|
220
|
+
/>
|
221
|
+
</div>
|
222
|
+
{alertShowing &&
|
223
|
+
<Alert
|
224
|
+
variant="info"
|
225
|
+
className="repo-sets-alert"
|
226
|
+
isInline
|
227
|
+
title={
|
228
|
+
<FormattedMessage
|
229
|
+
className="repo-sets-alert-title"
|
230
|
+
id="repo-sets-alert-title"
|
231
|
+
defaultMessage={alertText}
|
232
|
+
values={{
|
233
|
+
contentViewName,
|
234
|
+
lifecycleEnvironmentName,
|
235
|
+
}}
|
236
|
+
/>
|
237
|
+
}
|
238
|
+
actionClose={<AlertActionCloseButton onClose={() => setAlertShowing(false)} />}
|
239
|
+
/>
|
240
|
+
}
|
241
|
+
</div>
|
242
|
+
<TableWrapper
|
243
|
+
{...{
|
244
|
+
metadata,
|
245
|
+
emptyContentTitle,
|
246
|
+
emptyContentBody,
|
247
|
+
emptySearchTitle,
|
248
|
+
emptySearchBody,
|
249
|
+
status,
|
250
|
+
searchQuery,
|
251
|
+
updateSearchQuery,
|
252
|
+
selectedCount,
|
253
|
+
selectNone,
|
254
|
+
toggleGroup,
|
255
|
+
}
|
256
|
+
}
|
257
|
+
activeFilters={[toggleGroupState]}
|
258
|
+
defaultFilters={[defaultToggleGroupState]}
|
259
|
+
additionalListeners={[hostId, toggleGroupState]}
|
260
|
+
fetchItems={fetchItems}
|
261
|
+
autocompleteEndpoint="/repository_sets/auto_complete_search"
|
262
|
+
bookmarkController="katello_product_contents" // Katello::ProductContent.table_name
|
263
|
+
rowsCount={results?.length}
|
264
|
+
variant={TableVariant.compact}
|
265
|
+
{...selectAll}
|
266
|
+
displaySelectAllCheckbox={false}
|
267
|
+
>
|
268
|
+
<Thead>
|
269
|
+
<Tr>
|
270
|
+
<Th key="select-all" />
|
271
|
+
{columnHeaders.map(col =>
|
272
|
+
<Th key={col}>{col}</Th>)}
|
273
|
+
<Th />
|
274
|
+
<Th key="action-menu" />
|
275
|
+
</Tr>
|
276
|
+
</Thead>
|
277
|
+
<>
|
278
|
+
{results?.map((repoSet, rowIndex) => {
|
279
|
+
const {
|
280
|
+
id,
|
281
|
+
label,
|
282
|
+
content: { name: repoName },
|
283
|
+
enabled,
|
284
|
+
enabled_content_override: enabledContentOverride,
|
285
|
+
contentUrl: repoPath,
|
286
|
+
product: { name: productName, id: productId },
|
287
|
+
} = repoSet;
|
288
|
+
const { isEnabled, isOverridden } =
|
289
|
+
getEnabledValue({ enabled, enabledContentOverride });
|
290
|
+
return (
|
291
|
+
<Tbody key={`${id}_${repoPath}`}>
|
292
|
+
<Tr>
|
293
|
+
<Td select={{
|
294
|
+
disable: !isSelectable(id),
|
295
|
+
isSelected: isSelected(id),
|
296
|
+
onSelect: (event, selected) => selectOne(selected, id),
|
297
|
+
rowIndex,
|
298
|
+
variant: 'checkbox',
|
299
|
+
}}
|
300
|
+
/>
|
301
|
+
<Td>
|
302
|
+
<span>{repoName}</span>
|
303
|
+
</Td>
|
304
|
+
<Td>
|
305
|
+
<a href={`/products/${productId}`}>{productName}</a>
|
306
|
+
</Td>
|
307
|
+
<Td>
|
308
|
+
<span>{repoPath}</span>
|
309
|
+
</Td>
|
310
|
+
<Td>
|
311
|
+
<span><EnabledIcon key={`enabled-icon-${id}`} {...{ isEnabled, isOverridden }} /></span>
|
312
|
+
</Td>
|
313
|
+
<Td
|
314
|
+
key={`rowActions-${id}`}
|
315
|
+
actions={{
|
316
|
+
items: [
|
317
|
+
{
|
318
|
+
title: __('Override to disabled'),
|
319
|
+
isDisabled: isOverridden && !isEnabled,
|
320
|
+
onClick: () => overrideToDisabled({ labels: [label] }),
|
321
|
+
},
|
322
|
+
{
|
323
|
+
title: __('Override to enabled'),
|
324
|
+
isDisabled: isOverridden && isEnabled,
|
325
|
+
onClick: () => overrideToEnabled({ labels: [label] }),
|
326
|
+
},
|
327
|
+
{
|
328
|
+
title: __('Reset to default'),
|
329
|
+
isDisabled: !isOverridden,
|
330
|
+
onClick: () => resetToDefault({ labels: [label] }),
|
331
|
+
},
|
332
|
+
],
|
333
|
+
}}
|
334
|
+
/>
|
335
|
+
</Tr>
|
336
|
+
</Tbody>
|
337
|
+
);
|
338
|
+
})
|
339
|
+
}
|
340
|
+
</>
|
341
|
+
</TableWrapper>
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
);
|
345
|
+
};
|
346
|
+
|
347
|
+
export default RepositorySetsTab;
|
@@ -7,7 +7,7 @@ import { useSelector, useDispatch } from 'react-redux';
|
|
7
7
|
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
|
8
8
|
import EnableTracerEmptyState from './EnableTracerEmptyState';
|
9
9
|
import TableWrapper from '../../../Table/TableWrapper';
|
10
|
-
import {
|
10
|
+
import { useBulkSelect } from '../../../Table/TableHooks';
|
11
11
|
import { getHostTraces } from './HostTracesActions';
|
12
12
|
import { resolveTraces } from './RemoteExecutionActions';
|
13
13
|
import { selectHostTracesStatus } from './HostTracesSelectors';
|
@@ -15,7 +15,6 @@ import { resolveTraceUrl } from './customizedRexUrlHelpers';
|
|
15
15
|
import './TracesTab.scss';
|
16
16
|
|
17
17
|
const TracesTab = () => {
|
18
|
-
const [searchQuery, updateSearchQuery] = useState('');
|
19
18
|
const hostDetails = useSelector(state => selectAPIResponse(state, 'HOST_DETAILS'));
|
20
19
|
const dispatch = useDispatch();
|
21
20
|
const {
|
@@ -37,34 +36,40 @@ const TracesTab = () => {
|
|
37
36
|
const toggleBulkAction = () => setIsBulkActionOpen(prev => !prev);
|
38
37
|
const response = useSelector(state => selectAPIResponse(state, 'HOST_TRACES'));
|
39
38
|
const { results, ...meta } = response;
|
39
|
+
const tracesSearchQuery = id => `id = ${id}`;
|
40
40
|
const {
|
41
|
-
selectOne,
|
42
|
-
|
43
|
-
|
44
|
-
...selectAll
|
45
|
-
} = useSelectionSet({
|
41
|
+
selectOne, isSelected, searchQuery, selectedCount, isSelectable,
|
42
|
+
updateSearchQuery, selectNone, fetchBulkParams, ...selectAll
|
43
|
+
} = useBulkSelect({
|
46
44
|
results,
|
47
45
|
metadata: meta,
|
48
46
|
isSelectable: result => !!result.restart_command,
|
49
47
|
});
|
50
48
|
|
51
|
-
const onBulkRestartApp = (ids) => {
|
52
|
-
dispatch(resolveTraces({ hostname, ids: [...ids].join(',') }));
|
53
|
-
selectedTraces.clear();
|
54
49
|
|
50
|
+
const onBulkRestartApp = () => {
|
51
|
+
dispatch(resolveTraces({
|
52
|
+
hostname, search: fetchBulkParams(),
|
53
|
+
}));
|
54
|
+
selectNone();
|
55
55
|
const params = { page: meta.page, per_page: meta.per_page, search: meta.search };
|
56
56
|
dispatch(getHostTraces(hostId, params));
|
57
57
|
};
|
58
58
|
|
59
|
-
const
|
59
|
+
const onRestartApp = id => dispatch(resolveTraces({
|
60
|
+
hostname,
|
61
|
+
search: tracesSearchQuery(id),
|
62
|
+
}));
|
60
63
|
|
61
|
-
const
|
64
|
+
const bulkCustomizedRexUrl = () => resolveTraceUrl({
|
65
|
+
hostname, search: (selectedCount > 0) ? fetchBulkParams() : '',
|
66
|
+
});
|
62
67
|
|
63
68
|
const dropdownItems = [
|
64
|
-
<DropdownItem isDisabled={
|
69
|
+
<DropdownItem isDisabled={selectedCount === 0} aria-label="bulk_rex" key="bulk_rex" component="button" onClick={onBulkRestartApp}>
|
65
70
|
{__('Restart via remote execution')}
|
66
71
|
</DropdownItem>,
|
67
|
-
<DropdownItem isDisabled={
|
72
|
+
<DropdownItem isDisabled={selectedCount === 0} aria-label="bulk_rex_customized" key="bulk_rex_customized" component="a" href={bulkCustomizedRexUrl()}>
|
68
73
|
{__('Restart via customized remote execution')}
|
69
74
|
</DropdownItem>,
|
70
75
|
];
|
@@ -76,8 +81,8 @@ const TracesTab = () => {
|
|
76
81
|
<ActionListItem>
|
77
82
|
<Button
|
78
83
|
variant="secondary"
|
79
|
-
isDisabled={
|
80
|
-
onClick={
|
84
|
+
isDisabled={selectedCount === 0}
|
85
|
+
onClick={onBulkRestartApp}
|
81
86
|
>
|
82
87
|
{__('Restart app')}
|
83
88
|
</Button>
|
@@ -96,9 +101,6 @@ const TracesTab = () => {
|
|
96
101
|
|
97
102
|
);
|
98
103
|
const status = useSelector(state => selectHostTracesStatus(state));
|
99
|
-
// const selectAll = () => {
|
100
|
-
// // leaving blank until we can implement selectAll Katello-wide
|
101
|
-
// };
|
102
104
|
if (showEnableTracer) return <EnableTracerEmptyState />;
|
103
105
|
|
104
106
|
if (!hostId) return <Skeleton />;
|
@@ -108,21 +110,26 @@ const TracesTab = () => {
|
|
108
110
|
<div id="traces-tab">
|
109
111
|
<h3>{__('Tracer helps administrators identify applications that need to be restarted after a system is patched.')}</h3>
|
110
112
|
<TableWrapper
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
113
|
+
{...{
|
114
|
+
emptyContentTitle,
|
115
|
+
emptyContentBody,
|
116
|
+
emptySearchTitle,
|
117
|
+
emptySearchBody,
|
118
|
+
status,
|
119
|
+
searchQuery,
|
120
|
+
updateSearchQuery,
|
121
|
+
selectedCount,
|
122
|
+
selectNone,
|
123
|
+
fetchItems,
|
124
|
+
actionButtons,
|
125
|
+
}
|
126
|
+
}
|
127
|
+
metadata={meta}
|
119
128
|
autocompleteEndpoint={`/hosts/${hostId}/traces/auto_complete_search`}
|
120
129
|
foremanApiAutoComplete
|
121
|
-
displaySelectAllCheckbox
|
122
130
|
rowsCount={results?.length}
|
123
131
|
variant={TableVariant.compact}
|
124
|
-
|
125
|
-
metadata={meta}
|
132
|
+
displaySelectAllCheckbox
|
126
133
|
{...selectAll}
|
127
134
|
>
|
128
135
|
<Thead>
|
@@ -146,7 +153,7 @@ const TracesTab = () => {
|
|
146
153
|
let rowDropdownItems = [
|
147
154
|
{ title: 'Restart via remote execution', onClick: () => onRestartApp(id) },
|
148
155
|
{
|
149
|
-
component: 'a', href: resolveTraceUrl({ hostname,
|
156
|
+
component: 'a', href: resolveTraceUrl({ hostname, search: tracesSearchQuery(id) }), title: 'Restart via customized remote execution',
|
150
157
|
},
|
151
158
|
];
|
152
159
|
if (resolveDisabled) {
|