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
@@ -108,17 +108,6 @@ angular.module('Bastion.environments').config(['$stateProvider', function ($stat
|
|
108
108
|
parent: 'environment.details'
|
109
109
|
}
|
110
110
|
})
|
111
|
-
.state('environment.ostree', {
|
112
|
-
url: '/ostree?repositoryId&contentViewId',
|
113
|
-
reloadOnSearch: false,
|
114
|
-
permission: 'view_lifecycle_environments',
|
115
|
-
controller: 'EnvironmentContentController',
|
116
|
-
templateUrl: 'environments/details/views/environment-ostree.html',
|
117
|
-
ncyBreadcrumb: {
|
118
|
-
label: '{{ "OSTree Branches" | translate }}',
|
119
|
-
parent: 'environment.details'
|
120
|
-
}
|
121
|
-
})
|
122
111
|
.state('environment.content-views', {
|
123
112
|
url: '/content-views',
|
124
113
|
reloadOnSearch: false,
|
@@ -4,6 +4,7 @@
|
|
4
4
|
*
|
5
5
|
* @requires $scope
|
6
6
|
* @requires $location
|
7
|
+
* @requires $uibModal
|
7
8
|
* @requires Notification
|
8
9
|
* @requires translate
|
9
10
|
* @requires ApiErrorHandler
|
@@ -18,8 +19,8 @@
|
|
18
19
|
* Provides the functionality for manipulating repositories attached to a product.
|
19
20
|
*/
|
20
21
|
angular.module('Bastion.products').controller('ProductRepositoriesController',
|
21
|
-
['$scope', '$state', '$location', 'Notification', 'translate', 'ApiErrorHandler', 'Product', 'Repository', 'RepositoryBulkAction', 'CurrentOrganization', 'Nutupane', 'RepositoryTypesService',
|
22
|
-
function ($scope, $state, $location, Notification, translate, ApiErrorHandler, Product, Repository, RepositoryBulkAction, CurrentOrganization, Nutupane, RepositoryTypesService) {
|
22
|
+
['$scope', '$state', '$location', '$uibModal', 'Notification', 'translate', 'ApiErrorHandler', 'Product', 'Repository', 'RepositoryBulkAction', 'CurrentOrganization', 'Nutupane', 'RepositoryTypesService',
|
23
|
+
function ($scope, $state, $location, $uibModal, Notification, translate, ApiErrorHandler, Product, Repository, RepositoryBulkAction, CurrentOrganization, Nutupane, RepositoryTypesService) {
|
23
24
|
var repositoriesNutupane = new Nutupane(Repository, {
|
24
25
|
'product_id': $scope.$stateParams.productId,
|
25
26
|
'search': $location.search().search || "",
|
@@ -82,6 +83,17 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
|
|
82
83
|
});
|
83
84
|
};
|
84
85
|
|
86
|
+
$scope.openReclaimSpaceModal = function () {
|
87
|
+
$uibModal.open({
|
88
|
+
templateUrl: 'products/details/repositories/views/product-repositories-reclaim-space-modal.html',
|
89
|
+
controller: 'ProductRepositoriesReclaimSpaceModalController',
|
90
|
+
size: 'lg',
|
91
|
+
resolve: {
|
92
|
+
reclaimParams: getParams()
|
93
|
+
}
|
94
|
+
});
|
95
|
+
};
|
96
|
+
|
85
97
|
$scope.genericContentTypesFor = function(contentTypeLabel) {
|
86
98
|
return RepositoryTypesService.genericContentTypes(contentTypeLabel);
|
87
99
|
};
|
@@ -10,7 +10,6 @@
|
|
10
10
|
* @requires CurrentOrganization
|
11
11
|
* @requires Checksum
|
12
12
|
* @requires DownloadPolicy
|
13
|
-
* @requires OstreeUpstreamSyncPolicy
|
14
13
|
* @requires Architecture
|
15
14
|
* @requires HttpProxyPolicy
|
16
15
|
* @requires OSVersions
|
@@ -20,8 +19,8 @@
|
|
20
19
|
* Provides the functionality for the repository details info page.
|
21
20
|
*/
|
22
21
|
angular.module('Bastion.repositories').controller('RepositoryDetailsInfoController',
|
23
|
-
['$scope', '$q', 'translate', 'Notification', 'ContentCredential', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', '
|
24
|
-
function ($scope, $q, translate, Notification, ContentCredential, CurrentOrganization, Checksum, DownloadPolicy,
|
22
|
+
['$scope', '$q', 'translate', 'Notification', 'ContentCredential', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', 'Architecture', 'HttpProxy', 'HttpProxyPolicy', 'OSVersions', 'RepositoryTypesService',
|
23
|
+
function ($scope, $q, translate, Notification, ContentCredential, CurrentOrganization, Checksum, DownloadPolicy, Architecture, HttpProxy, HttpProxyPolicy, OSVersions, RepositoryTypesService) {
|
25
24
|
$scope.organization = CurrentOrganization;
|
26
25
|
|
27
26
|
$scope.progress = {uploading: false};
|
@@ -199,7 +198,6 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
|
|
199
198
|
|
200
199
|
$scope.checksums = Checksum.checksums;
|
201
200
|
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
202
|
-
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
203
201
|
|
204
202
|
$scope.checksumTypeDisplay = function (checksum) {
|
205
203
|
return Checksum.checksumType(checksum);
|
@@ -1,13 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* @ngdoc object
|
3
|
-
* @name Bastion.repositories.controller:OstreeUpstreamSyncPolicyFilter
|
4
|
-
*
|
5
|
-
* @requires translate
|
6
|
-
* @requires OstreeUpstreamSyncPolicy
|
7
|
-
* @requires YumContentUnits
|
8
|
-
* @requires HttpProxyPolicy
|
9
|
-
**/
|
10
|
-
|
11
1
|
angular.module('Bastion.components.formatters').filter('upstreamPasswordFilter', [function () {
|
12
2
|
return function (displayValue, repository) {
|
13
3
|
if (repository["upstream_auth_exists"]) {
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.repositories.controller:RepositoryDetailsReclaimSpaceModalController
|
4
|
+
*
|
5
|
+
* @requires $scope
|
6
|
+
* @requires $state
|
7
|
+
* @requires translate
|
8
|
+
* @requires Notification
|
9
|
+
* @requires Repository
|
10
|
+
* @requires $uibModalInstance
|
11
|
+
* @requires reclaimParams
|
12
|
+
*
|
13
|
+
* @description
|
14
|
+
* A controller for the modal that warns about reclaiming on demand repository space
|
15
|
+
*/
|
16
|
+
angular.module('Bastion.repositories').controller('RepositoryDetailsReclaimSpaceModalController',
|
17
|
+
['$scope', '$state', 'translate', 'Notification', 'Repository', '$uibModalInstance', 'reclaimParams',
|
18
|
+
function ($scope, $state, translate, Notification, Repository, $uibModalInstance, reclaimParams) {
|
19
|
+
var errorHandler = function errorHandler(response) {
|
20
|
+
angular.forEach(response.data.errors, function (error) {
|
21
|
+
Notification.setErrorMessage(error);
|
22
|
+
});
|
23
|
+
};
|
24
|
+
|
25
|
+
$scope.ok = function () {
|
26
|
+
Repository.reclaimSpace({id: reclaimParams.repository.id}, function (task) {
|
27
|
+
$state.go('product.repository.tasks.details', {taskId: task.id});
|
28
|
+
}, errorHandler);
|
29
|
+
$uibModalInstance.close();
|
30
|
+
};
|
31
|
+
|
32
|
+
$scope.cancel = function () {
|
33
|
+
$uibModalInstance.dismiss('cancel');
|
34
|
+
};
|
35
|
+
}]
|
36
|
+
);
|
@@ -1,11 +1,12 @@
|
|
1
1
|
(function () {
|
2
|
-
function RepositoryDetailsController($scope, $state, translate, Repository, Product, ApiErrorHandler, Notification) {
|
2
|
+
function RepositoryDetailsController($scope, $state, $uibModal, translate, Repository, Product, ApiErrorHandler, Notification) {
|
3
3
|
/**
|
4
4
|
* @ngdoc object
|
5
5
|
* @name Bastion.repositories.controller:RepositoryDetailsController
|
6
6
|
*
|
7
7
|
* @requires $scope
|
8
8
|
* @requires $state
|
9
|
+
* @requires $uibModal
|
9
10
|
* @requires translate
|
10
11
|
* @requires Repository
|
11
12
|
* @requires ApiErrorHandler
|
@@ -89,6 +90,19 @@
|
|
89
90
|
}, errorHandler);
|
90
91
|
};
|
91
92
|
|
93
|
+
$scope.openReclaimSpaceModal = function (repository) {
|
94
|
+
$uibModal.open({
|
95
|
+
templateUrl: 'products/details/repositories/details/views/repository-details-reclaim-space-modal.html',
|
96
|
+
controller: 'RepositoryDetailsReclaimSpaceModalController',
|
97
|
+
size: 'lg',
|
98
|
+
resolve: {
|
99
|
+
reclaimParams: function() {
|
100
|
+
return { repository: repository };
|
101
|
+
}
|
102
|
+
}
|
103
|
+
});
|
104
|
+
};
|
105
|
+
|
92
106
|
$scope.republishRepository = function (repository) {
|
93
107
|
Repository.republish({id: repository.id}, function (task) {
|
94
108
|
$state.go('product.repository.tasks.details', {taskId: task.id});
|
@@ -132,5 +146,5 @@
|
|
132
146
|
|
133
147
|
angular.module('Bastion.repositories').controller('RepositoryDetailsController', RepositoryDetailsController);
|
134
148
|
|
135
|
-
RepositoryDetailsController.$inject = ['$scope', '$state', 'translate', 'Repository', 'Product', 'ApiErrorHandler', 'Notification'];
|
149
|
+
RepositoryDetailsController.$inject = ['$scope', '$state', '$uibModal', 'translate', 'Repository', 'Product', 'ApiErrorHandler', 'Notification'];
|
136
150
|
})();
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div data-extend-template="components/views/bst-modal.html">
|
2
|
+
<h4 data-block="modal-header">Reclaim Space</h4>
|
3
|
+
<div data-block="modal-body">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-sm-12">
|
6
|
+
<div bst-global-notification></div>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<span translate>
|
10
|
+
Warning: reclaiming space for an "On Demand" repository will delete all cached content units. Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
|
11
|
+
</span>
|
12
|
+
</div>
|
13
|
+
<span data-block="modal-confirm-button">
|
14
|
+
<button class="btn btn-primary" ng-click="ok()">
|
15
|
+
<span translate>Reclaim Space</span>
|
16
|
+
</button>
|
17
|
+
</span>
|
18
|
+
</div>
|
@@ -38,6 +38,19 @@
|
|
38
38
|
</a>
|
39
39
|
</li>
|
40
40
|
|
41
|
+
<li role="menuitem" ng-hide="hideSyncButton(repository, false)" ng-class="{disabled: disableSyncLink()}">
|
42
|
+
<a ng-click="openReclaimSpaceModal(repository)" disable-link="disableSyncLink()" translate>
|
43
|
+
Reclaim Space
|
44
|
+
</a>
|
45
|
+
|
46
|
+
<span class="disabled" ng-show="syncInProgress(repository.last_sync)" translate>
|
47
|
+
Cannot clean Repository, a sync is already in progress.
|
48
|
+
</span>
|
49
|
+
|
50
|
+
<span class="disabled" ng-show="denied('sync_products', product)" translate>
|
51
|
+
Cannot clean Repository without the proper permissions.
|
52
|
+
</span>
|
53
|
+
</li>
|
41
54
|
<li role="menuitem" ng-hide="syncInProgress(repository.last_sync) || denied('edit_products', product)">
|
42
55
|
<span class="disabled" ng-show="syncInProgress(repository.last_sync)" translate>
|
43
56
|
Cannot republish Repository, a sync is already in progress.
|
@@ -262,7 +262,7 @@
|
|
262
262
|
<dd translate>Yes</dd>
|
263
263
|
|
264
264
|
<span ng-hide="repository.content_type === 'docker' || repository.content_type === 'ansible_collection'">
|
265
|
-
<dt translate>
|
265
|
+
<dt translate>Unprotected</dt>
|
266
266
|
<dd bst-edit-checkbox="repository.unprotected"
|
267
267
|
formatter="booleanToYesNo"
|
268
268
|
on-save="save(repository)"
|
@@ -14,7 +14,6 @@
|
|
14
14
|
* @requires BastionConfig
|
15
15
|
* @requires Checksum
|
16
16
|
* @requires DownloadPolicy
|
17
|
-
* @requires OstreeUpstreamSyncPolicy
|
18
17
|
* @requires Architecture
|
19
18
|
* @requires RepositoryTypesService
|
20
19
|
* @requires OSVersions
|
@@ -24,8 +23,8 @@
|
|
24
23
|
* Controls the creation of an empty Repository object for use by sub-controllers.
|
25
24
|
*/
|
26
25
|
angular.module('Bastion.repositories').controller('NewRepositoryController',
|
27
|
-
['$scope', '$sce', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'DownloadPolicy', '
|
28
|
-
function ($scope, $sce, Repository, Product, ContentCredential, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, DownloadPolicy,
|
26
|
+
['$scope', '$sce', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'DownloadPolicy', 'Architecture', 'RepositoryTypesService', 'HttpProxy', 'HttpProxyPolicy', 'OSVersions',
|
27
|
+
function ($scope, $sce, Repository, Product, ContentCredential, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, DownloadPolicy, Architecture, RepositoryTypesService, HttpProxy, HttpProxyPolicy, OSVersions) {
|
29
28
|
|
30
29
|
function success() {
|
31
30
|
Notification.setSuccessMessage(translate('Repository %s successfully created.').replace('%s', $scope.repository.name));
|
@@ -63,8 +62,7 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
63
62
|
|
64
63
|
$scope.repository = new Repository({'product_id': $scope.$stateParams.productId, unprotected: true,
|
65
64
|
'checksum_type': null, 'mirror_on_sync': true, 'verify_ssl_on_sync': true,
|
66
|
-
'download_policy': BastionConfig.defaultDownloadPolicy, 'arch': null
|
67
|
-
'ostree_upstream_sync_policy': 'latest'});
|
65
|
+
'download_policy': BastionConfig.defaultDownloadPolicy, 'arch': null});
|
68
66
|
|
69
67
|
$scope.product = Product.get({id: $scope.$stateParams.productId}, function () {
|
70
68
|
$scope.page.loading = false;
|
@@ -78,7 +76,6 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
78
76
|
|
79
77
|
$scope.checksums = Checksum.checksums;
|
80
78
|
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
81
|
-
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
82
79
|
|
83
80
|
$scope.$watch('repository.name', function () {
|
84
81
|
if ($scope.repositoryForm && $scope.repositoryForm.name) {
|
@@ -332,8 +332,11 @@
|
|
332
332
|
<div class="checkbox" ng-hide="repository.content_type === 'docker' || repository.content_type === 'ansible_collection'">
|
333
333
|
<label>
|
334
334
|
<input id="unprotected" name="unprotected" ng-model="repository.unprotected" type="checkbox"/>
|
335
|
-
<span translate>
|
335
|
+
<span translate>Unprotected</span>
|
336
336
|
</label>
|
337
|
+
<p class="help-block" translate>
|
338
|
+
Do not require a subscription entitlement certificate for accessing this repository.
|
339
|
+
</p>
|
337
340
|
</div>
|
338
341
|
|
339
342
|
<div bst-form-group label="{{ 'GPG Key' | translate }}" ng-show="repository.content_type === 'yum' || repository.content_type === 'deb'">
|
@@ -14,6 +14,7 @@ angular
|
|
14
14
|
this.getOSVersionsOptions = function () {
|
15
15
|
return [
|
16
16
|
{ name: 'No restriction', id: '' },
|
17
|
+
{ name: 'Red Hat Enterprise Linux 9 ', id: 'rhel-9' },
|
17
18
|
{ name: 'Red Hat Enterprise Linux 8 ', id: 'rhel-8' },
|
18
19
|
{ name: 'Red Hat Enterprise Linux 7 ', id: 'rhel-7' },
|
19
20
|
{ name: 'Red Hat Enterprise Linux 6 ', id: 'rhel-6' }
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.repositories.controller:ProductRepositoriesReclaimSpaceModalController
|
4
|
+
*
|
5
|
+
* @requires $scope
|
6
|
+
* @requires $state
|
7
|
+
* @requires translate
|
8
|
+
* @requires Notification
|
9
|
+
* @requires RepositoryBulkAction
|
10
|
+
* @requires $uibModalInstance
|
11
|
+
* @requires reclaimParams
|
12
|
+
*
|
13
|
+
* @description
|
14
|
+
* A controller for the modal that warns about reclaiming on demand repository space
|
15
|
+
*/
|
16
|
+
angular.module('Bastion.repositories').controller('ProductRepositoriesReclaimSpaceModalController',
|
17
|
+
['$scope', '$state', 'translate', 'Notification', 'RepositoryBulkAction', '$uibModalInstance', 'reclaimParams',
|
18
|
+
function ($scope, $state, translate, Notification, RepositoryBulkAction, $uibModalInstance, reclaimParams) {
|
19
|
+
$scope.ok = function () {
|
20
|
+
RepositoryBulkAction.reclaimSpaceFromRepositories(reclaimParams, function (task) {
|
21
|
+
$state.go('product.tasks.details', {taskId: task.id});
|
22
|
+
},
|
23
|
+
function (response) {
|
24
|
+
angular.forEach(response.data.errors, function (error) {
|
25
|
+
Notification.setErrorMessage(error);
|
26
|
+
});
|
27
|
+
});
|
28
|
+
$uibModalInstance.close();
|
29
|
+
};
|
30
|
+
|
31
|
+
$scope.cancel = function () {
|
32
|
+
$uibModalInstance.dismiss('cancel');
|
33
|
+
};
|
34
|
+
}]
|
35
|
+
);
|
@@ -126,15 +126,6 @@
|
|
126
126
|
parent: 'product.repository.info'
|
127
127
|
}
|
128
128
|
})
|
129
|
-
.state('product.repository.manage-content.ostree-branches', {
|
130
|
-
url: '/ostree_branches',
|
131
|
-
permission: 'view_products',
|
132
|
-
templateUrl: 'products/details/repositories/details/views/repository-manage-ostree-branches.html',
|
133
|
-
ncyBreadcrumb: {
|
134
|
-
label: "{{'OSTree Branches' | translate }}",
|
135
|
-
parent: 'product.repository.info'
|
136
|
-
}
|
137
|
-
})
|
138
129
|
.state('product.repository.manage-content.module-streams', {
|
139
130
|
url: '/module_streams',
|
140
131
|
permission: 'view_products',
|
@@ -18,6 +18,7 @@ angular.module('Bastion.repositories').factory('Repository',
|
|
18
18
|
update: { method: 'PUT' },
|
19
19
|
sync: { method: 'POST', params: { action: 'sync' } },
|
20
20
|
verifyChecksum: { method: 'POST', params: { action: 'verify_checksum' }},
|
21
|
+
reclaimSpace: { method: 'POST', params: { action: 'reclaim_space' }},
|
21
22
|
removePackages: { method: 'PUT', params: { action: 'remove_packages'}},
|
22
23
|
removeContent: { method: 'PUT', params: { action: 'remove_content'}},
|
23
24
|
autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
|
@@ -47,7 +48,8 @@ angular.module('Bastion.repositories').factory('RepositoryBulkAction',
|
|
47
48
|
{'organization_id': CurrentOrganization},
|
48
49
|
{
|
49
50
|
removeRepositories: {method: 'PUT', params: {action: 'destroy'}},
|
50
|
-
syncRepositories: {method: 'POST', params: {action: 'sync'}}
|
51
|
+
syncRepositories: {method: 'POST', params: {action: 'sync'}},
|
52
|
+
reclaimSpaceFromRepositories: {method: 'POST', params: {action: 'reclaim_space'}}
|
51
53
|
}
|
52
54
|
);
|
53
55
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div data-extend-template="components/views/bst-modal.html">
|
2
|
+
<h4 data-block="modal-header">Reclaim Space</h4>
|
3
|
+
<div data-block="modal-body">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-sm-12">
|
6
|
+
<div bst-global-notification></div>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<span translate>
|
10
|
+
Warning: reclaiming space for an "On Demand" repository will delete all cached content units. Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
|
11
|
+
</span>
|
12
|
+
</div>
|
13
|
+
<span data-block="modal-confirm-button">
|
14
|
+
<button class="btn btn-primary" ng-click="ok()">
|
15
|
+
<span translate>Reclaim Space</span>
|
16
|
+
</button>
|
17
|
+
</span>
|
18
|
+
</div>
|
@@ -28,6 +28,13 @@
|
|
28
28
|
</span>
|
29
29
|
</button>
|
30
30
|
|
31
|
+
<button type="button" class="btn btn-default"
|
32
|
+
ng-click="openReclaimSpaceModal()"
|
33
|
+
ng-hide="denied('sync_products', product)"
|
34
|
+
ng-disabled="syncInProgress || table.numSelected == 0">
|
35
|
+
<span translate>Reclaim Space</span>
|
36
|
+
</button>
|
37
|
+
|
31
38
|
<div bst-modal="removeSelectedRepositories()" model="table">
|
32
39
|
<div data-block="modal-header"
|
33
40
|
translate
|
@@ -156,14 +163,6 @@
|
|
156
163
|
</div>
|
157
164
|
</span>
|
158
165
|
|
159
|
-
<span ng-show="repository.content_type == 'ostree'">
|
160
|
-
<div>
|
161
|
-
<span translate>
|
162
|
-
{{ repository.content_counts.ostree_branch || 0 }} OSTree Branches
|
163
|
-
</span>
|
164
|
-
</div>
|
165
|
-
</span>
|
166
|
-
|
167
166
|
<span ng-show="repository.content_type == 'file'">
|
168
167
|
<div>
|
169
168
|
<span translate>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.pulp-primary.controller:PulpPrimaryController
|
4
|
+
*
|
5
|
+
* @requires $scope
|
6
|
+
* @requires $urlMatcherFactory
|
7
|
+
* @requires $location
|
8
|
+
* @requires PulpPrimary
|
9
|
+
* @requires Notification
|
10
|
+
*
|
11
|
+
* @description
|
12
|
+
* Provides the functionality for the pulp primary page.
|
13
|
+
*/
|
14
|
+
angular.module('Bastion.pulp-primary').controller('PulpPrimaryController',
|
15
|
+
['$scope', '$urlMatcherFactory', '$location', 'PulpPrimary', 'Notification',
|
16
|
+
function ($scope, $urlMatcherFactory, $location, PulpPrimary, Notification) {
|
17
|
+
|
18
|
+
var urlMatcher = $urlMatcherFactory.compile("/smart_proxies/:capsuleId");
|
19
|
+
var capsuleId = urlMatcher.exec($location.path()).capsuleId;
|
20
|
+
|
21
|
+
var errorHandler = function errorHandler(response) {
|
22
|
+
angular.forEach(response.data.errors, function (error) {
|
23
|
+
Notification.setErrorMessage(error);
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
$scope.smartProxyId = capsuleId;
|
28
|
+
|
29
|
+
$scope.reclaimSpace = function () {
|
30
|
+
PulpPrimary.reclaimSpace({id: capsuleId}, function () {
|
31
|
+
Notification.setSuccessMessage("Space reclamation task started in the background.");
|
32
|
+
}, errorHandler);
|
33
|
+
};
|
34
|
+
}]
|
35
|
+
);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc service
|
3
|
+
* @name Bastion.pulp-primary.factory:PulpPrimary
|
4
|
+
*
|
5
|
+
* @requires BastionResource
|
6
|
+
*
|
7
|
+
* @description
|
8
|
+
* Provides a BastionResource for pulp primary.
|
9
|
+
*/
|
10
|
+
angular.module('Bastion.pulp-primary').factory('PulpPrimary',
|
11
|
+
['BastionResource', function (BastionResource) {
|
12
|
+
|
13
|
+
return BastionResource('katello/api/capsules/:id/content/:action', {id: '@id'}, {
|
14
|
+
reclaimSpace: {method: 'post', isArray: false, params: {action: 'reclaim_space'}}
|
15
|
+
});
|
16
|
+
|
17
|
+
}]
|
18
|
+
);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc module
|
3
|
+
* @name Bastion.pulp-primary
|
4
|
+
*
|
5
|
+
* @description
|
6
|
+
* Module for Pulp Primary Smart Proxy related functionality.
|
7
|
+
*/
|
8
|
+
angular.module('Bastion.pulp-primary', [
|
9
|
+
'ngResource',
|
10
|
+
'ui.router',
|
11
|
+
'Bastion',
|
12
|
+
'Bastion.i18n',
|
13
|
+
'Bastion.components'
|
14
|
+
]);
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.pulp-primary.config
|
4
|
+
*
|
5
|
+
* @requires $stateProvider
|
6
|
+
* @requires $urlRouterProvider
|
7
|
+
*
|
8
|
+
* @description
|
9
|
+
* Used for systems level configuration such as setting up the ui state machine.
|
10
|
+
*/
|
11
|
+
angular.module('Bastion.pulp-primary').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
|
12
|
+
//Catch the url to prevent the router to perform redirect.
|
13
|
+
$urlRouterProvider.when('/smart_proxies/:proxyId', [function () {
|
14
|
+
return true;
|
15
|
+
}]);
|
16
|
+
}]);
|
@@ -53,7 +53,7 @@ module Katello
|
|
53
53
|
@plugin.permission :manage_capsule_content,
|
54
54
|
{
|
55
55
|
'katello/api/v2/capsule_content' => [:add_lifecycle_environment, :remove_lifecycle_environment,
|
56
|
-
:sync, :cancel_sync],
|
56
|
+
:sync, :reclaim_space, :cancel_sync],
|
57
57
|
'katello/api/v2/capsules' => [:index, :show]
|
58
58
|
},
|
59
59
|
:resource_type => 'SmartProxy'
|
@@ -254,7 +254,6 @@ module Katello
|
|
254
254
|
:compare,
|
255
255
|
:repositories],
|
256
256
|
'katello/api/v2/file_units' => [:index, :show, :auto_complete_search, :compare],
|
257
|
-
'katello/api/v2/ostree_branches' => [:index, :show, :auto_complete_search, :compare],
|
258
257
|
'katello/api/v2/errata' => [:index, :show, :auto_complete_search, :compare],
|
259
258
|
'katello/api/v2/module_streams' => [:index, :show, :auto_complete_search, :compare, :auto_complete_name],
|
260
259
|
'katello/api/v2/ansible_collections' => [:index, :show, :auto_complete_search, :compare],
|
@@ -291,7 +290,7 @@ module Katello
|
|
291
290
|
@plugin.permission :edit_products,
|
292
291
|
{
|
293
292
|
'katello/api/v2/products' => [:update],
|
294
|
-
'katello/api/v2/repositories' => [:create, :update, :remove_content, :import_uploads, :upload_content, :republish, :verify_checksum],
|
293
|
+
'katello/api/v2/repositories' => [:create, :update, :remove_content, :import_uploads, :upload_content, :republish, :verify_checksum, :reclaim_space],
|
295
294
|
'katello/api/v2/products_bulk_actions' => [:update_sync_plans, :update_http_proxy, :verify_checksum_products],
|
296
295
|
'katello/api/v2/content_uploads' => [:create, :update, :destroy],
|
297
296
|
'katello/api/v2/organizations' => [:repo_discover, :cancel_repo_discover],
|
@@ -314,7 +313,7 @@ module Katello
|
|
314
313
|
'katello/api/v2/products' => [:sync],
|
315
314
|
'katello/api/v2/repositories' => [:sync],
|
316
315
|
'katello/api/v2/products_bulk_actions' => [:sync_products],
|
317
|
-
'katello/api/v2/repositories_bulk_actions' => [:sync_repositories],
|
316
|
+
'katello/api/v2/repositories_bulk_actions' => [:sync_repositories, :reclaim_space_from_repositories],
|
318
317
|
'katello/api/v2/sync' => [:index],
|
319
318
|
'katello/sync_management' => [:index, :sync_status, :product_status, :sync, :destroy]
|
320
319
|
},
|
data/lib/katello/plugin.rb
CHANGED
@@ -121,16 +121,6 @@ Foreman::Plugin.register :katello do
|
|
121
121
|
:turbolinks => false,
|
122
122
|
:if => lambda { ::Katello::RepositoryTypeManager.enabled?(::Katello::Repository::FILE_TYPE) }
|
123
123
|
|
124
|
-
menu :top_menu,
|
125
|
-
:ostree_branches,
|
126
|
-
:caption => N_('OSTree Branches'),
|
127
|
-
:url => '/ostree_branches',
|
128
|
-
:url_hash => {:controller => 'katello/api/v2/ostree_branches',
|
129
|
-
:action => 'index'},
|
130
|
-
:engine => Katello::Engine,
|
131
|
-
:turbolinks => false,
|
132
|
-
:if => lambda { ::Katello::RepositoryTypeManager.enabled?(::Katello::Repository::OSTREE_TYPE) }
|
133
|
-
|
134
124
|
menu :top_menu,
|
135
125
|
:packages,
|
136
126
|
:caption => N_('Packages'),
|
@@ -256,6 +246,10 @@ Foreman::Plugin.register :katello do
|
|
256
246
|
:name => _("Content Sync"),
|
257
247
|
:partial => "foreman/smart_proxies/content_sync",
|
258
248
|
:onlyif => proc { |proxy| proxy.pulp_mirror? }
|
249
|
+
context.add_pagelet :details_content,
|
250
|
+
:name => _("Reclaim Space"),
|
251
|
+
:partial => "foreman/smart_proxies/reclaim_space",
|
252
|
+
:onlyif => proc { |proxy| proxy.pulp_primary? }
|
259
253
|
end
|
260
254
|
|
261
255
|
::Katello::HostStatusManager::STATUSES.each do |status_class|
|
@@ -25,7 +25,9 @@ Katello::RepositoryTypeManager.register('ostree') do
|
|
25
25
|
pulp3_api: PulpOstreeClient::ContentRefsApi,
|
26
26
|
pulp3_service_class: Katello::Pulp3::GenericContentUnit,
|
27
27
|
model_name: lambda { |pulp_unit| pulp_unit["name"] },
|
28
|
-
model_version: lambda { |pulp_unit| pulp_unit["
|
28
|
+
model_version: lambda { |pulp_unit| pulp_unit["checksum"] },
|
29
|
+
uploadable: true,
|
30
|
+
repository_import_on_upload: true
|
29
31
|
|
30
32
|
import_attribute :ref, :content_type => 'ostree_ref',
|
31
33
|
:api_param => :ostree_ref,
|
@@ -15,9 +15,9 @@ namespace :katello do
|
|
15
15
|
system("sudo runuser - postgres -c 'createdb pulpcore'")
|
16
16
|
|
17
17
|
Dir.chdir("/tmp") do
|
18
|
-
fail "\e[31mCannot migrate Pulp3 database\e[0m\n\n" unless system("sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings'
|
18
|
+
fail "\e[31mCannot migrate Pulp3 database\e[0m\n\n" unless system("sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' pulpcore-manager migrate --no-input")
|
19
19
|
puts "\e[33mRecreating Admin User\e[0m\n\n"
|
20
|
-
system("sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings'
|
20
|
+
system("sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' pulpcore-manager reset-admin-password --password password")
|
21
21
|
end
|
22
22
|
|
23
23
|
SERVICES.each { |s| system(service_start.gsub("%s", s)) }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
namespace :katello do
|
2
|
+
namespace :upgrades do
|
3
|
+
namespace '4.3' do
|
4
|
+
desc "change urls with username and password in the url to use basic auth parameters in pulp3"
|
5
|
+
task :fix_url_auth => ["environment"] do
|
6
|
+
User.current = User.anonymous_admin
|
7
|
+
|
8
|
+
Katello::Repository.all.each do |repo|
|
9
|
+
upstream_url = repo.root.url
|
10
|
+
uri = URI(repo.root.url)
|
11
|
+
if uri.userinfo
|
12
|
+
user, password = uri.userinfo.split(':')
|
13
|
+
upstream_url.slice!(uri.userinfo + "@")
|
14
|
+
repo_params = {
|
15
|
+
upstream_username: user,
|
16
|
+
upstream_password: password,
|
17
|
+
url: upstream_url
|
18
|
+
}
|
19
|
+
ForemanTasks.sync_task(Actions::Katello::Repository::Update, repo.root, repo_params)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|