katello 4.1.4 → 4.2.0.rc1
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/rhsm/candlepin_proxies_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +3 -1
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +33 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +12 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -2
- data/app/controllers/katello/api/v2/products_controller.rb +4 -4
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +3 -11
- data/app/controllers/katello/api/v2/repositories_controller.rb +68 -47
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +0 -28
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +26 -5
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +26 -1
- data/app/lib/actions/candlepin/environment/destroy.rb +2 -0
- data/app/lib/actions/katello/agent_action.rb +2 -2
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +3 -2
- data/app/lib/actions/katello/{gpg_key → content_credential}/update.rb +1 -1
- data/app/lib/actions/katello/content_view/publish.rb +6 -1
- data/app/lib/actions/katello/content_view_version/create_repos.rb +1 -1
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +0 -47
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +1 -7
- data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -7
- data/app/lib/actions/katello/repository/create.rb +4 -8
- data/app/lib/actions/katello/repository/create_root.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +1 -3
- data/app/lib/actions/katello/repository/import_upload.rb +3 -2
- data/app/lib/actions/katello/repository/instance_update.rb +1 -1
- data/app/lib/actions/katello/repository/metadata_generate.rb +2 -8
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +0 -1
- data/app/lib/actions/katello/repository/refresh_repository.rb +1 -4
- data/app/lib/actions/katello/repository/remove_content.rb +6 -4
- data/app/lib/actions/katello/repository/sync.rb +5 -25
- data/app/lib/actions/katello/repository/update.rb +1 -2
- data/app/lib/actions/katello/repository/update_http_proxy_details.rb +2 -5
- data/app/lib/actions/katello/repository/update_redhat_repository.rb +1 -1
- data/app/lib/actions/katello/repository/upload_files.rb +8 -3
- data/app/lib/actions/katello/repository/upload_package_group.rb +2 -11
- data/app/lib/actions/katello/repository/verify_checksum.rb +0 -1
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +2 -2
- data/app/lib/actions/pulp3/repository/create.rb +3 -4
- data/app/lib/actions/pulp3/repository/create_remote.rb +1 -6
- data/app/lib/actions/pulp3/repository/repair.rb +4 -0
- data/app/lib/katello/errors.rb +1 -0
- data/app/lib/katello/http_resource.rb +26 -73
- data/app/lib/katello/qpid/connection.rb +1 -3
- data/app/lib/katello/resources/candlepin/consumer.rb +1 -1
- data/app/lib/katello/resources/candlepin/environment.rb +2 -0
- data/app/lib/katello/resources/registry.rb +7 -20
- data/app/lib/katello/util/http_proxy.rb +0 -3
- data/app/lib/katello/validators/gpg_key_content_validator.rb +1 -1
- data/app/models/katello/authorization/{gpg_key.rb → content_credential.rb} +1 -1
- data/app/models/katello/authorization/product.rb +0 -4
- data/app/models/katello/concerns/host_managed_extensions.rb +2 -16
- data/app/models/katello/concerns/organization_extensions.rb +1 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +13 -5
- data/app/models/katello/concerns/smart_proxy_extensions.rb +45 -41
- data/app/models/katello/{gpg_key.rb → content_credential.rb} +4 -4
- data/app/models/katello/content_view.rb +6 -1
- data/app/models/katello/generic_content_unit.rb +16 -0
- data/app/models/katello/glue/pulp/repos.rb +9 -25
- data/app/models/katello/kt_environment.rb +1 -1
- data/app/models/katello/product.rb +4 -4
- data/app/models/katello/repository.rb +13 -7
- data/app/models/katello/repository_generic_content_unit.rb +7 -0
- data/app/models/katello/root_repository.rb +38 -7
- data/app/models/setting/content.rb +5 -0
- data/app/services/cert/certs.rb +16 -8
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
- data/app/services/katello/candlepin/consumer.rb +6 -0
- data/app/services/katello/component_view_presenter.rb +27 -0
- data/app/services/katello/pulp/repository.rb +1 -1
- data/app/services/katello/pulp/server.rb +2 -2
- data/app/services/katello/pulp3/api/core.rb +4 -0
- data/app/services/katello/pulp3/api/generic.rb +68 -0
- data/app/services/katello/pulp3/generic_content_unit.rb +29 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +5 -1
- data/app/services/katello/pulp3/repository/generic.rb +94 -0
- data/app/services/katello/pulp3/repository/yum.rb +4 -5
- data/app/services/katello/pulp3/repository.rb +27 -12
- data/app/services/katello/pulp3/repository_mirror.rb +2 -2
- data/app/services/katello/pulp3/smart_proxy_repository.rb +4 -4
- data/app/services/katello/registration_manager.rb +18 -7
- data/app/services/katello/repository_type.rb +59 -1
- data/app/services/katello/repository_type_manager.rb +116 -24
- data/app/views/katello/api/v2/content_views/base.json.rabl +4 -4
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
- data/app/views/smart_proxies/plugins/_pulpcore.html.erb +2 -5
- data/app/views/smart_proxies/pulp_status.html.erb +0 -7
- data/config/katello.yaml.example +0 -21
- data/config/routes/api/v2.rb +2 -1
- data/db/functions/deb_version_cmp_v01.sql +200 -0
- data/db/migrate/20171110082124_add_ssl_certs_to_products_and_repos.rb +5 -1
- data/db/migrate/20200402130013_add_repsoitory_docker_meta_tag_f_key.rb +3 -1
- data/db/migrate/20210624221630_katello_generic_content.rb +22 -0
- data/db/migrate/20210625095042_add_retain_package_versions_count.rb +9 -0
- data/db/migrate/20210628182553_add_generic_remote_options_to_root_repository.rb +5 -0
- data/db/migrate/20210714140440_remove_repo_export_permission.rb +5 -0
- data/db/migrate/20210721163730_change_gpg_keys_to_content_credentials.rb +8 -0
- data/db/migrate/20210728130748_create_function_deb_version_cmp.rb +12 -0
- data/db/seeds.d/111-upgrade_tasks.rb +1 -2
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +7 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +25 -33
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +1 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +10 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html +1 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +31 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/aggregate-task.factory.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task.factory.js +1 -1
- data/lib/katello/engine.rb +2 -4
- data/lib/katello/permission_creator.rb +6 -12
- data/lib/katello/plugin.rb +76 -80
- data/lib/katello/repository_types/python.rb +37 -0
- data/lib/katello/tasks/reimport.rake +0 -9
- data/lib/katello/tasks/repository.rake +3 -4
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +28 -29
- data/locale/bn/katello.po +699 -221
- data/locale/cs/katello.po +167 -59
- data/locale/de/katello.po +585 -352
- data/locale/en/katello.po +167 -59
- data/locale/es/katello.po +1388 -1189
- data/locale/fr/katello.po +1740 -1494
- data/locale/gu/katello.po +896 -416
- data/locale/hi/katello.po +892 -415
- data/locale/it/katello.po +371 -170
- data/locale/ja/katello.po +1657 -1439
- data/locale/katello.pot +933 -736
- data/locale/kn/katello.po +894 -416
- data/locale/ko/katello.po +515 -317
- data/locale/mr/katello.po +857 -415
- data/locale/or/katello.po +894 -416
- data/locale/pa/katello.po +874 -411
- data/locale/pt/katello.po +347 -154
- data/locale/pt_BR/katello.po +1398 -1215
- data/locale/ru/katello.po +671 -463
- data/locale/ta/katello.po +697 -221
- data/locale/te/katello.po +891 -415
- data/locale/zh_CN/katello.po +2029 -1845
- data/locale/zh_TW/katello.po +735 -407
- data/package.json +3 -1
- data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
- data/webpack/components/RoutedTabs/RoutedTabs.js +7 -8
- data/webpack/components/Table/TableWrapper.js +19 -11
- data/webpack/components/Table/helpers.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab.js +42 -0
- data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +12 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +4 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/index.js +1 -2
- data/webpack/components/pf3Table/formatters/selectionHeaderCellFormatter.js +2 -1
- data/webpack/fills_index.js +4 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +2 -4
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +4 -1
- data/webpack/scenes/ContentViews/ContentViewsActions.js +16 -1
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +15 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +12 -22
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +4 -3
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +25 -14
- data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +4 -2
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +153 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +21 -10
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +157 -19
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +100 -108
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +140 -16
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +367 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +59 -6
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +43 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +44 -13
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +161 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterAdd.test.js +54 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +124 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +8 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +7 -6
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +4 -3
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +71 -12
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +77 -0
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +13 -12
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +2 -2
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +17 -14
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +3 -3
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +2 -2
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +6 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +61 -20
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewTaskInProgressResponse.fixtures.json +71 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewTaskResponse.fixtures.json +75 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +86 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +713 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
- data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +184 -0
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +104 -0
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +71 -0
- data/webpack/scenes/ContentViews/Publish/ContentViewPublishSelectors.js +17 -0
- data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +145 -0
- data/webpack/scenes/ContentViews/Publish/__tests__/environmentPaths.fixtures.json +352 -0
- data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +184 -0
- data/webpack/scenes/ContentViews/Publish/__tests__/publishResponse.fixture.json +69 -0
- data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +3 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +75 -48
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +15 -2
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -10
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +22 -10
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathActions.js +12 -0
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathConstants.js +2 -0
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathSelectors.js +16 -0
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +72 -0
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +8 -0
- data/webpack/scenes/ContentViews/components/TaskPresenter/TaskPresenter.js +85 -0
- data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +9 -8
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +4 -25
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +4 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +24 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +4 -1
- data/webpack/scenes/Subscriptions/index.js +1 -4
- metadata +74 -39
- data/app/lib/actions/candlepin/environment/create.rb +0 -21
- data/app/lib/actions/foreman/environment/destroy.rb +0 -23
- data/app/lib/actions/katello/content_view/environment_create.rb +0 -21
- data/app/lib/actions/katello/repository/export.rb +0 -85
- data/app/lib/actions/katello/repository/purge_empty_content.rb +0 -16
- data/app/lib/actions/katello/repository/upload_errata.rb +0 -38
- data/app/lib/katello/util/proxy_uri.rb +0 -64
- data/app/models/katello/rhsm_fact_importer.rb +0 -20
- data/app/models/katello/rhsm_fact_name.rb +0 -17
- data/app/models/katello/rhsm_fact_parser.rb +0 -120
@@ -0,0 +1,352 @@
|
|
1
|
+
{
|
2
|
+
"total": 2,
|
3
|
+
"subtotal": 2,
|
4
|
+
"page": null,
|
5
|
+
"per_page": null,
|
6
|
+
"error": null,
|
7
|
+
"search": null,
|
8
|
+
"sort": {
|
9
|
+
"by": null,
|
10
|
+
"order": null
|
11
|
+
},
|
12
|
+
"results": [
|
13
|
+
{
|
14
|
+
"environments": [
|
15
|
+
{
|
16
|
+
"library": true,
|
17
|
+
"registry_name_pattern": null,
|
18
|
+
"registry_unauthenticated_pull": false,
|
19
|
+
"id": 1,
|
20
|
+
"name": "Library",
|
21
|
+
"label": "Library",
|
22
|
+
"description": null,
|
23
|
+
"organization_id": 1,
|
24
|
+
"organization": {
|
25
|
+
"name": "Default Organization",
|
26
|
+
"label": "Default_Organization",
|
27
|
+
"id": 1
|
28
|
+
},
|
29
|
+
"created_at": "2021-05-17 13:33:03 -0400",
|
30
|
+
"updated_at": "2021-05-17 13:33:03 -0400",
|
31
|
+
"prior": null,
|
32
|
+
"successor": null,
|
33
|
+
"counts": {
|
34
|
+
"content_hosts": 0,
|
35
|
+
"content_views": 1,
|
36
|
+
"packages": 0,
|
37
|
+
"module_streams": 0,
|
38
|
+
"errata": {
|
39
|
+
"security": null,
|
40
|
+
"bugfix": 0,
|
41
|
+
"enhancement": 0,
|
42
|
+
"total": null
|
43
|
+
},
|
44
|
+
"yum_repositories": 0,
|
45
|
+
"docker_repositories": 0,
|
46
|
+
"ostree_repositories": 0,
|
47
|
+
"products": 0
|
48
|
+
},
|
49
|
+
"permissions": {
|
50
|
+
"create_lifecycle_environments": true,
|
51
|
+
"view_lifecycle_environments": true,
|
52
|
+
"edit_lifecycle_environments": true,
|
53
|
+
"destroy_lifecycle_environments": false,
|
54
|
+
"promote_or_remove_content_views_to_environments": true
|
55
|
+
}
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"library": false,
|
59
|
+
"registry_name_pattern": null,
|
60
|
+
"registry_unauthenticated_pull": false,
|
61
|
+
"id": 2,
|
62
|
+
"name": "dev1",
|
63
|
+
"label": "dev1",
|
64
|
+
"description": null,
|
65
|
+
"organization_id": 1,
|
66
|
+
"organization": {
|
67
|
+
"name": "Default Organization",
|
68
|
+
"label": "Default_Organization",
|
69
|
+
"id": 1
|
70
|
+
},
|
71
|
+
"created_at": "2021-05-18 07:59:30 -0400",
|
72
|
+
"updated_at": "2021-05-18 07:59:30 -0400",
|
73
|
+
"prior": {
|
74
|
+
"name": "Library",
|
75
|
+
"id": 1
|
76
|
+
},
|
77
|
+
"successor": {
|
78
|
+
"name": "test",
|
79
|
+
"id": 3
|
80
|
+
},
|
81
|
+
"counts": {
|
82
|
+
"content_hosts": 0,
|
83
|
+
"content_views": 1
|
84
|
+
},
|
85
|
+
"permissions": {
|
86
|
+
"create_lifecycle_environments": true,
|
87
|
+
"view_lifecycle_environments": true,
|
88
|
+
"edit_lifecycle_environments": true,
|
89
|
+
"destroy_lifecycle_environments": true,
|
90
|
+
"promote_or_remove_content_views_to_environments": true
|
91
|
+
}
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"library": false,
|
95
|
+
"registry_name_pattern": null,
|
96
|
+
"registry_unauthenticated_pull": false,
|
97
|
+
"id": 3,
|
98
|
+
"name": "test",
|
99
|
+
"label": "test",
|
100
|
+
"description": null,
|
101
|
+
"organization_id": 1,
|
102
|
+
"organization": {
|
103
|
+
"name": "Default Organization",
|
104
|
+
"label": "Default_Organization",
|
105
|
+
"id": 1
|
106
|
+
},
|
107
|
+
"created_at": "2021-05-19 15:25:44 -0400",
|
108
|
+
"updated_at": "2021-05-19 15:25:44 -0400",
|
109
|
+
"prior": {
|
110
|
+
"name": "dev1",
|
111
|
+
"id": 2
|
112
|
+
},
|
113
|
+
"successor": {
|
114
|
+
"name": "test2",
|
115
|
+
"id": 4
|
116
|
+
},
|
117
|
+
"counts": {
|
118
|
+
"content_hosts": 0,
|
119
|
+
"content_views": 1
|
120
|
+
},
|
121
|
+
"permissions": {
|
122
|
+
"create_lifecycle_environments": true,
|
123
|
+
"view_lifecycle_environments": true,
|
124
|
+
"edit_lifecycle_environments": true,
|
125
|
+
"destroy_lifecycle_environments": true,
|
126
|
+
"promote_or_remove_content_views_to_environments": true
|
127
|
+
}
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"library": false,
|
131
|
+
"registry_name_pattern": null,
|
132
|
+
"registry_unauthenticated_pull": false,
|
133
|
+
"id": 4,
|
134
|
+
"name": "test2",
|
135
|
+
"label": "test2",
|
136
|
+
"description": null,
|
137
|
+
"organization_id": 1,
|
138
|
+
"organization": {
|
139
|
+
"name": "Default Organization",
|
140
|
+
"label": "Default_Organization",
|
141
|
+
"id": 1
|
142
|
+
},
|
143
|
+
"created_at": "2021-05-24 10:07:33 -0400",
|
144
|
+
"updated_at": "2021-05-24 10:07:33 -0400",
|
145
|
+
"prior": {
|
146
|
+
"name": "test",
|
147
|
+
"id": 3
|
148
|
+
},
|
149
|
+
"successor": {
|
150
|
+
"name": "prod",
|
151
|
+
"id": 5
|
152
|
+
},
|
153
|
+
"counts": {
|
154
|
+
"content_hosts": 0,
|
155
|
+
"content_views": 0
|
156
|
+
},
|
157
|
+
"permissions": {
|
158
|
+
"create_lifecycle_environments": true,
|
159
|
+
"view_lifecycle_environments": true,
|
160
|
+
"edit_lifecycle_environments": true,
|
161
|
+
"destroy_lifecycle_environments": true,
|
162
|
+
"promote_or_remove_content_views_to_environments": true
|
163
|
+
}
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"library": false,
|
167
|
+
"registry_name_pattern": null,
|
168
|
+
"registry_unauthenticated_pull": false,
|
169
|
+
"id": 5,
|
170
|
+
"name": "prod",
|
171
|
+
"label": "prod",
|
172
|
+
"description": null,
|
173
|
+
"organization_id": 1,
|
174
|
+
"organization": {
|
175
|
+
"name": "Default Organization",
|
176
|
+
"label": "Default_Organization",
|
177
|
+
"id": 1
|
178
|
+
},
|
179
|
+
"created_at": "2021-05-24 10:07:58 -0400",
|
180
|
+
"updated_at": "2021-05-24 10:07:58 -0400",
|
181
|
+
"prior": {
|
182
|
+
"name": "test2",
|
183
|
+
"id": 4
|
184
|
+
},
|
185
|
+
"successor": null,
|
186
|
+
"counts": {
|
187
|
+
"content_hosts": 0,
|
188
|
+
"content_views": 0
|
189
|
+
},
|
190
|
+
"permissions": {
|
191
|
+
"create_lifecycle_environments": true,
|
192
|
+
"view_lifecycle_environments": true,
|
193
|
+
"edit_lifecycle_environments": true,
|
194
|
+
"destroy_lifecycle_environments": true,
|
195
|
+
"promote_or_remove_content_views_to_environments": true
|
196
|
+
}
|
197
|
+
}
|
198
|
+
]
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"environments": [
|
202
|
+
{
|
203
|
+
"library": true,
|
204
|
+
"registry_name_pattern": null,
|
205
|
+
"registry_unauthenticated_pull": false,
|
206
|
+
"id": 1,
|
207
|
+
"name": "Library",
|
208
|
+
"label": "Library",
|
209
|
+
"description": null,
|
210
|
+
"organization_id": 1,
|
211
|
+
"organization": {
|
212
|
+
"name": "Default Organization",
|
213
|
+
"label": "Default_Organization",
|
214
|
+
"id": 1
|
215
|
+
},
|
216
|
+
"created_at": "2021-05-17 13:33:03 -0400",
|
217
|
+
"updated_at": "2021-05-17 13:33:03 -0400",
|
218
|
+
"prior": null,
|
219
|
+
"successor": null,
|
220
|
+
"counts": {
|
221
|
+
"content_hosts": 0,
|
222
|
+
"content_views": 1,
|
223
|
+
"packages": 0,
|
224
|
+
"module_streams": 0,
|
225
|
+
"errata": {
|
226
|
+
"security": null,
|
227
|
+
"bugfix": 0,
|
228
|
+
"enhancement": 0,
|
229
|
+
"total": null
|
230
|
+
},
|
231
|
+
"yum_repositories": 0,
|
232
|
+
"docker_repositories": 0,
|
233
|
+
"ostree_repositories": 0,
|
234
|
+
"products": 0
|
235
|
+
},
|
236
|
+
"permissions": {
|
237
|
+
"create_lifecycle_environments": true,
|
238
|
+
"view_lifecycle_environments": true,
|
239
|
+
"edit_lifecycle_environments": true,
|
240
|
+
"destroy_lifecycle_environments": false,
|
241
|
+
"promote_or_remove_content_views_to_environments": true
|
242
|
+
}
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"library": false,
|
246
|
+
"registry_name_pattern": null,
|
247
|
+
"registry_unauthenticated_pull": false,
|
248
|
+
"id": 6,
|
249
|
+
"name": "dev2",
|
250
|
+
"label": "dev2",
|
251
|
+
"description": null,
|
252
|
+
"organization_id": 1,
|
253
|
+
"organization": {
|
254
|
+
"name": "Default Organization",
|
255
|
+
"label": "Default_Organization",
|
256
|
+
"id": 1
|
257
|
+
},
|
258
|
+
"created_at": "2021-05-24 11:14:56 -0400",
|
259
|
+
"updated_at": "2021-05-24 11:14:56 -0400",
|
260
|
+
"prior": {
|
261
|
+
"name": "Library",
|
262
|
+
"id": 1
|
263
|
+
},
|
264
|
+
"successor": {
|
265
|
+
"name": "qa2",
|
266
|
+
"id": 7
|
267
|
+
},
|
268
|
+
"counts": {
|
269
|
+
"content_hosts": 0,
|
270
|
+
"content_views": 0
|
271
|
+
},
|
272
|
+
"permissions": {
|
273
|
+
"create_lifecycle_environments": true,
|
274
|
+
"view_lifecycle_environments": true,
|
275
|
+
"edit_lifecycle_environments": true,
|
276
|
+
"destroy_lifecycle_environments": true,
|
277
|
+
"promote_or_remove_content_views_to_environments": true
|
278
|
+
}
|
279
|
+
},
|
280
|
+
{
|
281
|
+
"library": false,
|
282
|
+
"registry_name_pattern": null,
|
283
|
+
"registry_unauthenticated_pull": false,
|
284
|
+
"id": 7,
|
285
|
+
"name": "qa2",
|
286
|
+
"label": "qa2",
|
287
|
+
"description": null,
|
288
|
+
"organization_id": 1,
|
289
|
+
"organization": {
|
290
|
+
"name": "Default Organization",
|
291
|
+
"label": "Default_Organization",
|
292
|
+
"id": 1
|
293
|
+
},
|
294
|
+
"created_at": "2021-05-24 11:15:07 -0400",
|
295
|
+
"updated_at": "2021-05-24 11:15:07 -0400",
|
296
|
+
"prior": {
|
297
|
+
"name": "dev2",
|
298
|
+
"id": 6
|
299
|
+
},
|
300
|
+
"successor": {
|
301
|
+
"name": "prod2",
|
302
|
+
"id": 8
|
303
|
+
},
|
304
|
+
"counts": {
|
305
|
+
"content_hosts": 0,
|
306
|
+
"content_views": 0
|
307
|
+
},
|
308
|
+
"permissions": {
|
309
|
+
"create_lifecycle_environments": true,
|
310
|
+
"view_lifecycle_environments": true,
|
311
|
+
"edit_lifecycle_environments": true,
|
312
|
+
"destroy_lifecycle_environments": true,
|
313
|
+
"promote_or_remove_content_views_to_environments": true
|
314
|
+
}
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"library": false,
|
318
|
+
"registry_name_pattern": null,
|
319
|
+
"registry_unauthenticated_pull": false,
|
320
|
+
"id": 8,
|
321
|
+
"name": "prod2",
|
322
|
+
"label": "prod2",
|
323
|
+
"description": null,
|
324
|
+
"organization_id": 1,
|
325
|
+
"organization": {
|
326
|
+
"name": "Default Organization",
|
327
|
+
"label": "Default_Organization",
|
328
|
+
"id": 1
|
329
|
+
},
|
330
|
+
"created_at": "2021-05-24 11:15:17 -0400",
|
331
|
+
"updated_at": "2021-05-24 11:15:17 -0400",
|
332
|
+
"prior": {
|
333
|
+
"name": "qa2",
|
334
|
+
"id": 7
|
335
|
+
},
|
336
|
+
"successor": null,
|
337
|
+
"counts": {
|
338
|
+
"content_hosts": 0,
|
339
|
+
"content_views": 0
|
340
|
+
},
|
341
|
+
"permissions": {
|
342
|
+
"create_lifecycle_environments": true,
|
343
|
+
"view_lifecycle_environments": true,
|
344
|
+
"edit_lifecycle_environments": true,
|
345
|
+
"destroy_lifecycle_environments": true,
|
346
|
+
"promote_or_remove_content_views_to_environments": true
|
347
|
+
}
|
348
|
+
}
|
349
|
+
]
|
350
|
+
}
|
351
|
+
]
|
352
|
+
}
|
@@ -0,0 +1,184 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import * as reactRedux from 'react-redux';
|
3
|
+
import { renderWithRedux, patientlyWaitFor, fireEvent } from 'react-testing-lib-wrapper';
|
4
|
+
|
5
|
+
import { nockInstance, assertNockRequest } from '../../../../test-utils/nockWrapper';
|
6
|
+
import api from '../../../../services/api';
|
7
|
+
import PublishContentViewWizard from '../PublishContentViewWizard';
|
8
|
+
|
9
|
+
const cvDetailData = require('../../Details/__tests__/contentViewDetails.fixtures.json');
|
10
|
+
|
11
|
+
const cvPublishPath = api.getApiUrl('/content_views/1/publish');
|
12
|
+
const publishResponseData = require('./publishResponse.fixture.json');
|
13
|
+
|
14
|
+
const environmentPathsPath = api.getApiUrl('/organizations/1/environments/paths');
|
15
|
+
const environmentPathsData = require('./environmentPaths.fixtures.json');
|
16
|
+
|
17
|
+
test('Can call API and show Wizard', async (done) => {
|
18
|
+
const scope = nockInstance
|
19
|
+
.get(environmentPathsPath)
|
20
|
+
.query(true)
|
21
|
+
.reply(200, environmentPathsData);
|
22
|
+
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
23
|
+
useSelectorMock.mockReturnValue(environmentPathsData);
|
24
|
+
|
25
|
+
const { getByText } = renderWithRedux(<PublishContentViewWizard
|
26
|
+
details={cvDetailData}
|
27
|
+
show
|
28
|
+
setIsOpen={() => {}}
|
29
|
+
currentStep={1}
|
30
|
+
setCurrentStep={() => {}}
|
31
|
+
/>);
|
32
|
+
|
33
|
+
await patientlyWaitFor(() => expect(getByText('Publish new version - 6.0')).toBeInTheDocument());
|
34
|
+
useSelectorMock.mockClear();
|
35
|
+
assertNockRequest(scope, done);
|
36
|
+
});
|
37
|
+
|
38
|
+
test('Can show Wizard and show environment paths', async (done) => {
|
39
|
+
const scope = nockInstance
|
40
|
+
.get(environmentPathsPath)
|
41
|
+
.query(true)
|
42
|
+
.reply(200, environmentPathsData);
|
43
|
+
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
44
|
+
useSelectorMock.mockReturnValue(environmentPathsData);
|
45
|
+
|
46
|
+
const { getByText, getByLabelText } = renderWithRedux(<PublishContentViewWizard
|
47
|
+
details={cvDetailData}
|
48
|
+
show
|
49
|
+
setIsOpen={() => {}}
|
50
|
+
currentStep={1}
|
51
|
+
setCurrentStep={() => {}}
|
52
|
+
/>);
|
53
|
+
|
54
|
+
await patientlyWaitFor(() => expect(getByText('Publish new version - 6.0')).toBeInTheDocument());
|
55
|
+
const checkboxLabel = /promote-switch/;
|
56
|
+
await patientlyWaitFor(() => expect(getByLabelText(checkboxLabel)).toBeInTheDocument());
|
57
|
+
expect(getByLabelText(checkboxLabel).checked).toBeFalsy();
|
58
|
+
fireEvent.click(getByLabelText(checkboxLabel));
|
59
|
+
await patientlyWaitFor(() => {
|
60
|
+
expect(getByLabelText(checkboxLabel).checked).toBeTruthy();
|
61
|
+
expect(getByText('dev1')).toBeTruthy();
|
62
|
+
});
|
63
|
+
useSelectorMock.mockClear();
|
64
|
+
assertNockRequest(scope, done);
|
65
|
+
});
|
66
|
+
|
67
|
+
test('Can show and hide force promotion alert', async (done) => {
|
68
|
+
const scope = nockInstance
|
69
|
+
.get(environmentPathsPath)
|
70
|
+
.query(true)
|
71
|
+
.reply(200, environmentPathsData);
|
72
|
+
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
73
|
+
useSelectorMock.mockReturnValue(environmentPathsData);
|
74
|
+
|
75
|
+
const {
|
76
|
+
getByText, getByLabelText, queryByText, getAllByText,
|
77
|
+
} = renderWithRedux(<PublishContentViewWizard
|
78
|
+
details={cvDetailData}
|
79
|
+
show
|
80
|
+
setIsOpen={() => {}}
|
81
|
+
currentStep={1}
|
82
|
+
setCurrentStep={() => {}}
|
83
|
+
/>);
|
84
|
+
|
85
|
+
await patientlyWaitFor(() => expect(getByText('Publish new version - 6.0')).toBeInTheDocument());
|
86
|
+
const promoteSwitch = /promote-switch/;
|
87
|
+
const inOrderEnv = 'dev1';
|
88
|
+
const outOfOrderEnv = 'prod';
|
89
|
+
const outOfOrderEnv2 = 'qa2';
|
90
|
+
await patientlyWaitFor(() => expect(getByLabelText(promoteSwitch)).toBeInTheDocument());
|
91
|
+
fireEvent.click(getByLabelText(promoteSwitch));
|
92
|
+
await patientlyWaitFor(() => {
|
93
|
+
expect(getByLabelText(promoteSwitch).checked).toBeTruthy();
|
94
|
+
expect(getByLabelText(inOrderEnv)).toBeInTheDocument();
|
95
|
+
expect(getByLabelText(outOfOrderEnv)).toBeInTheDocument();
|
96
|
+
});
|
97
|
+
|
98
|
+
// check outOfOrderEnv
|
99
|
+
fireEvent.click(getByLabelText(outOfOrderEnv));
|
100
|
+
expect(getByText('Force Promotion')).toBeInTheDocument();
|
101
|
+
expect(getAllByText(outOfOrderEnv)[0].closest('a'))
|
102
|
+
.toHaveAttribute('href', '/lifecycle_environments/5');
|
103
|
+
|
104
|
+
// check outOfOrder env in 2nd path
|
105
|
+
fireEvent.click(getByLabelText(outOfOrderEnv2));
|
106
|
+
expect(getByText('Force Promotion')).toBeInTheDocument();
|
107
|
+
expect(getAllByText(outOfOrderEnv2)[0].closest('a'))
|
108
|
+
.toHaveAttribute('href', '/lifecycle_environments/7');
|
109
|
+
|
110
|
+
// uncheck outOfOrderEnv
|
111
|
+
fireEvent.click(getByLabelText(outOfOrderEnv));
|
112
|
+
fireEvent.click(getByLabelText(outOfOrderEnv2));
|
113
|
+
expect(queryByText('Force Promotion')).not.toBeInTheDocument();
|
114
|
+
|
115
|
+
// Check inOrderEnv
|
116
|
+
fireEvent.click(getByLabelText(inOrderEnv));
|
117
|
+
expect(queryByText('Force Promotion')).not.toBeInTheDocument();
|
118
|
+
|
119
|
+
useSelectorMock.mockClear();
|
120
|
+
assertNockRequest(scope, done);
|
121
|
+
});
|
122
|
+
|
123
|
+
|
124
|
+
test('Can show Wizard form and move to review', async (done) => {
|
125
|
+
const scope = nockInstance
|
126
|
+
.get(environmentPathsPath)
|
127
|
+
.query(true)
|
128
|
+
.reply(200, environmentPathsData);
|
129
|
+
|
130
|
+
const { getByText } = renderWithRedux(<PublishContentViewWizard
|
131
|
+
details={cvDetailData}
|
132
|
+
show
|
133
|
+
setIsOpen={() => {}}
|
134
|
+
currentStep={1}
|
135
|
+
setCurrentStep={() => {}}
|
136
|
+
/>);
|
137
|
+
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
138
|
+
useSelectorMock.mockReturnValue(environmentPathsData);
|
139
|
+
await patientlyWaitFor(() => expect(getByText('Publish new version - 6.0')).toBeInTheDocument());
|
140
|
+
await patientlyWaitFor(() => expect(getByText('Next')).toBeInTheDocument());
|
141
|
+
fireEvent.click(getByText('Next'));
|
142
|
+
// Test the review page
|
143
|
+
await patientlyWaitFor(() => {
|
144
|
+
expect(getByText('Newly published')).toBeInTheDocument();
|
145
|
+
expect(getByText('Version 6.0')).toBeInTheDocument();
|
146
|
+
expect(getByText('Library')).toBeTruthy();
|
147
|
+
});
|
148
|
+
useSelectorMock.mockClear();
|
149
|
+
assertNockRequest(scope, done);
|
150
|
+
});
|
151
|
+
|
152
|
+
test('Can move to Finish step and publish CV', async (done) => {
|
153
|
+
const scope = nockInstance
|
154
|
+
.get(environmentPathsPath)
|
155
|
+
.query(true)
|
156
|
+
.reply(200, environmentPathsData);
|
157
|
+
|
158
|
+
const cvPublishParams = {
|
159
|
+
id: 1, versionCount: 5, description: '', environment_ids: [], is_force_promote: false,
|
160
|
+
};
|
161
|
+
|
162
|
+
const publishScope = nockInstance
|
163
|
+
.post(cvPublishPath, cvPublishParams)
|
164
|
+
.reply(202, publishResponseData);
|
165
|
+
|
166
|
+
const { getByText } = renderWithRedux(<PublishContentViewWizard
|
167
|
+
details={cvDetailData}
|
168
|
+
show
|
169
|
+
setIsOpen={() => {}}
|
170
|
+
currentStep={1}
|
171
|
+
setCurrentStep={() => {}}
|
172
|
+
/>);
|
173
|
+
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
174
|
+
useSelectorMock.mockReturnValue(environmentPathsData);
|
175
|
+
fireEvent.click(getByText('Next'));
|
176
|
+
// Test the review page
|
177
|
+
await patientlyWaitFor(() => {
|
178
|
+
expect(getByText('Finish')).toBeInTheDocument();
|
179
|
+
});
|
180
|
+
fireEvent.click(getByText('Finish'));
|
181
|
+
useSelectorMock.mockClear();
|
182
|
+
assertNockRequest(scope);
|
183
|
+
assertNockRequest(publishScope, done);
|
184
|
+
});
|
@@ -0,0 +1,69 @@
|
|
1
|
+
{
|
2
|
+
"id": "867e37fa-a3d7-42b9-8823-9ac2773ef5da",
|
3
|
+
"label": "Actions::Katello::ContentView::Publish",
|
4
|
+
"pending": true,
|
5
|
+
"action": "Publish content view 'test'; organization 'Default Organization'",
|
6
|
+
"username": "admin",
|
7
|
+
"started_at": "2021-05-26 11:52:52 -0400",
|
8
|
+
"ended_at": null,
|
9
|
+
"state": "planned",
|
10
|
+
"result": "pending",
|
11
|
+
"progress": 0,
|
12
|
+
"input": {
|
13
|
+
"content_view": {
|
14
|
+
"id": 2,
|
15
|
+
"name": "test",
|
16
|
+
"label": "test"
|
17
|
+
},
|
18
|
+
"organization": {
|
19
|
+
"id": 1,
|
20
|
+
"name": "Default Organization",
|
21
|
+
"label": "Default_Organization"
|
22
|
+
},
|
23
|
+
"services_checked": [
|
24
|
+
"candlepin",
|
25
|
+
"candlepin_auth"
|
26
|
+
],
|
27
|
+
"history_id": 20,
|
28
|
+
"content_view_id": 2,
|
29
|
+
"auto_publish_composite_ids": [],
|
30
|
+
"content_view_version_name": "test 17.0",
|
31
|
+
"content_view_version_id": 19,
|
32
|
+
"environment_id": 1,
|
33
|
+
"user_id": 4,
|
34
|
+
"skip_promotion": null,
|
35
|
+
"current_request_id": "fc50dedd-cc3e-4b9d-b636-20c7309cedae",
|
36
|
+
"current_timezone": "America/New_York",
|
37
|
+
"current_organization_id": 1,
|
38
|
+
"current_location_id": 2,
|
39
|
+
"current_user_id": 4
|
40
|
+
},
|
41
|
+
"output": {},
|
42
|
+
"humanized": {
|
43
|
+
"action": "Publish",
|
44
|
+
"input": [
|
45
|
+
[
|
46
|
+
"content_view",
|
47
|
+
{
|
48
|
+
"text": "content view 'test'",
|
49
|
+
"link": "/content_views/2/versions"
|
50
|
+
}
|
51
|
+
],
|
52
|
+
[
|
53
|
+
"organization",
|
54
|
+
{
|
55
|
+
"text": "organization 'Default Organization'",
|
56
|
+
"link": "/organizations/1/edit"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
],
|
60
|
+
"output": "",
|
61
|
+
"errors": []
|
62
|
+
},
|
63
|
+
"cli_example": null,
|
64
|
+
"start_at": "2021-05-26 11:52:52 -0400",
|
65
|
+
"available_actions": {
|
66
|
+
"cancellable": false,
|
67
|
+
"resumable": false
|
68
|
+
}
|
69
|
+
}
|