katello 4.3.0.rc1 → 4.3.0.rc2

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.

Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/api_controller.rb +4 -0
  3. data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -0
  4. data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -0
  5. data/app/controllers/katello/api/v2/host_tracer_controller.rb +4 -0
  6. data/app/controllers/katello/api/v2/repository_sets_controller.rb +2 -2
  7. data/app/controllers/katello/api/v2/root_controller.rb +10 -19
  8. data/app/controllers/katello/concerns/api/v2/bulk_extensions.rb +3 -13
  9. data/app/controllers/katello/remote_execution_controller.rb +1 -1
  10. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -5
  11. data/app/lib/actions/katello/repository/destroy.rb +3 -3
  12. data/app/lib/actions/pulp/repository/sync.rb +0 -2
  13. data/app/lib/actions/pulp3/abstract_async_task.rb +16 -4
  14. data/app/lib/katello/resources/cdn.rb +10 -1
  15. data/app/models/katello/concerns/host_managed_extensions.rb +7 -4
  16. data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -2
  17. data/app/models/katello/content_view_version.rb +1 -6
  18. data/app/models/katello/glue/pulp/repo.rb +1 -2
  19. data/app/models/katello/host_tracer.rb +2 -0
  20. data/app/models/katello/repository.rb +2 -30
  21. data/app/models/katello/root_repository.rb +3 -43
  22. data/app/presenters/katello/host_package_presenter.rb +21 -0
  23. data/app/services/katello/bulk_items_helper.rb +35 -0
  24. data/app/services/katello/smart_proxy_helper.rb +10 -1
  25. data/app/views/foreman/job_templates/install_errata.erb +8 -6
  26. data/app/views/foreman/job_templates/resolve_traces.erb +4 -5
  27. data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +3 -5
  28. data/app/views/foreman/smart_proxies/_content_sync.html.erb +7 -0
  29. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +4 -0
  30. data/app/views/katello/api/v2/{organizations/cdn_configuration.rabl → cdn_configurations/show.json.rabl} +4 -0
  31. data/app/views/katello/api/v2/content_facet/show.json.rabl +8 -0
  32. data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
  33. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  34. data/app/views/katello/api/v2/host_packages/base.json.rabl +2 -0
  35. data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
  36. data/app/views/katello/api/v2/repositories/show.json.rabl +0 -3
  37. data/config/routes/api/v2.rb +0 -10
  38. data/db/migrate/20211115215210_drop_ostree_branches.rb +13 -0
  39. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -2
  40. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
  41. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -10
  42. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
  43. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +0 -10
  44. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
  45. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
  46. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
  47. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
  48. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
  49. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +1 -2
  50. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -4
  51. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +0 -10
  52. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
  53. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -6
  54. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +4 -1
  55. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
  56. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
  57. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -8
  58. data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -1
  59. data/lib/katello/permission_creator.rb +0 -1
  60. data/lib/katello/plugin.rb +0 -10
  61. data/lib/katello/tasks/reset.rake +2 -2
  62. data/lib/katello/version.rb +1 -1
  63. data/webpack/components/Packages/index.js +63 -0
  64. data/webpack/components/Search/Search.js +7 -1
  65. data/webpack/components/SelectAllCheckbox/index.js +2 -2
  66. data/webpack/components/Table/MainTable.scss +7 -1
  67. data/webpack/components/Table/TableHooks.js +10 -19
  68. data/webpack/components/Table/TableWrapper.js +0 -2
  69. data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +3 -3
  70. data/webpack/components/extensions/HostDetails/HostDetailsConstants.js +1 -0
  71. data/webpack/components/extensions/HostDetails/HostDetailsSelectors.js +16 -0
  72. data/webpack/components/extensions/HostDetails/HostErrata/HostErrataConstants.js +2 -0
  73. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +11 -0
  74. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +2 -0
  75. data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesSelectors.js +16 -0
  76. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
  77. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
  78. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab.js +119 -25
  79. data/webpack/components/extensions/HostDetails/Tabs/HostTracesConstants.js +1 -0
  80. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +127 -0
  81. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.scss +11 -0
  82. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +30 -4
  83. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
  84. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +73 -0
  85. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +2 -0
  86. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsSelectors.js +16 -0
  87. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +347 -0
  88. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.scss +7 -0
  89. data/webpack/components/extensions/HostDetails/Tabs/TracesTab.js +38 -31
  90. data/webpack/components/extensions/HostDetails/Tabs/__tests__/bookmarks.fixtures.json +12 -0
  91. data/webpack/components/extensions/HostDetails/Tabs/__tests__/contentOverrides.fixtures.json +227 -0
  92. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +423 -2
  93. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +28 -0
  94. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +91 -0
  95. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySets.fixtures.json +120 -0
  96. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +307 -0
  97. data/webpack/components/extensions/HostDetails/Tabs/__tests__/resolveErrata.fixtures.json +35 -0
  98. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +55 -9
  99. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +28 -14
  100. data/webpack/containers/Application/overrides.scss +31 -9
  101. data/webpack/global_index.js +4 -2
  102. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
  103. data/webpack/scenes/Content/ContentConfig.js +23 -7
  104. data/webpack/scenes/ContentCredentials/ContentCredentialActions.js +18 -0
  105. data/webpack/scenes/ContentCredentials/ContentCredentialConstants.js +2 -0
  106. data/webpack/scenes/ContentCredentials/ContentCredentialSelectors.js +12 -0
  107. data/webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js +73 -0
  108. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -1
  109. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +3 -3
  110. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +7 -2
  111. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.scss +7 -0
  112. data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +9 -9
  113. data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +6 -6
  114. data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +39 -37
  115. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReview.js +35 -33
  116. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +7 -5
  117. data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +2 -6
  118. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +13 -14
  119. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +18 -9
  120. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +3 -2
  121. data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +1 -2
  122. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
  123. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewErrataByDateDetails.fixtures.json +1 -8
  124. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +1 -2
  125. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +3 -8
  126. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvAllRepos.fixtures.json +0 -2
  127. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErratumFilterDetails.fixtures.json +1 -2
  128. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailModuleAffectedRepos.fixtures.json +1 -8
  129. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailWithAffectedRepos.fixtures.json +1 -8
  130. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilterDetails.fixtures.json +1 -2
  131. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +1 -3
  132. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +44 -28
  133. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +2 -1
  134. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +1 -1
  135. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +46 -8
  136. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
  137. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +19 -3
  138. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +2 -2
  139. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +5 -3
  140. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +5 -2
  141. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +7 -4
  142. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +59 -53
  143. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +24 -17
  144. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +1 -4
  145. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +8 -3
  146. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +1 -4
  147. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +1 -2
  148. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsCounts.fixtures.json +1 -2
  149. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionRepositories.fixtures.json +1 -18
  150. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +5 -5
  151. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +1 -0
  152. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +1 -3
  153. data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +0 -4
  154. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +66 -53
  155. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +40 -28
  156. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +3 -3
  157. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +14 -14
  158. data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +6 -0
  159. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +53 -12
  160. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +12 -6
  161. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -6
  162. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +6 -5
  163. data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +2 -2
  164. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +26 -27
  165. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +18 -6
  166. data/webpack/scenes/ContentViews/components/WizardHeader.js +44 -0
  167. data/webpack/scenes/ContentViews/components/contentViewIcon.scss +13 -2
  168. data/webpack/scenes/Organizations/OrganizationActions.js +22 -24
  169. data/webpack/scenes/Organizations/OrganizationConstants.js +1 -3
  170. data/webpack/scenes/Organizations/OrganizationReducer.js +0 -7
  171. data/webpack/scenes/Organizations/OrganizationSelectors.js +16 -0
  172. data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +1 -21
  173. data/webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js +0 -20
  174. data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +34 -23
  175. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +151 -14
  176. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +150 -31
  177. data/webpack/scenes/Subscriptions/Manifest/index.js +14 -3
  178. data/webpack/utils/dateTimeHelpers.js +7 -0
  179. data/webpack/utils/helpers.js +1 -1
  180. metadata +45 -43
  181. data/app/controllers/katello/api/v2/ostree_branches_controller.rb +0 -16
  182. data/app/lib/actions/pulp/repository/presenters/ostree_presenter.rb +0 -91
  183. data/app/models/katello/ostree_branch.rb +0 -12
  184. data/app/models/katello/repository_ostree_branch.rb +0 -7
  185. data/app/services/katello/pulp/ostree_branch.rb +0 -14
  186. data/app/services/katello/pulp/repository/ostree.rb +0 -48
  187. data/app/views/katello/api/v2/ostree_branches/compare.json.rabl +0 -10
  188. data/app/views/katello/api/v2/ostree_branches/index.json.rabl +0 -7
  189. data/app/views/katello/api/v2/ostree_branches/show.json.rabl +0 -5
  190. data/app/views/katello/api/v2/root/resource_list.json.rabl +0 -3
  191. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +0 -26
  192. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +0 -27
  193. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +0 -77
  194. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch.controller.js +0 -31
  195. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +0 -15
  196. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-repositories.html +0 -72
  197. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch.html +0 -30
  198. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +0 -27
  199. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +0 -67
  200. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +0 -15
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +0 -50
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +0 -40
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -40
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/ostree-upstream-sync-policy.service.js +0 -26
  205. data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +0 -12
  206. data/webpack/scenes/Content/Details/ContentCounts.js +0 -42
  207. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -108
  208. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +0 -158
@@ -62,7 +62,7 @@ const ContentViewDeleteWizard =
62
62
 
63
63
  const environmentSelectionStep = {
64
64
  id: 1,
65
- name: __('Remove from environments'),
65
+ name: __('Remove versions from environments'),
66
66
  component: <CVDeleteEnvironmentSelection />,
67
67
  };
68
68
  const affectedHostsStep = {
@@ -78,7 +78,7 @@ const ContentViewDeleteWizard =
78
78
  };
79
79
  const reviewStep = {
80
80
  id: 4,
81
- name: __('Review'),
81
+ name: __('Review details'),
82
82
  component: <CVDeletionReview />,
83
83
  canJumpTo: canReview,
84
84
  nextButtonText: __('Delete'),
@@ -135,7 +135,7 @@ const ContentViewDeleteWizard =
135
135
  setSelectedCVNameForHosts,
136
136
  affectedActivationKeys,
137
137
  affectedHosts,
138
- }}
138
+ }}
139
139
  >
140
140
  <Wizard
141
141
  title={__('Delete content view')}
@@ -143,9 +143,9 @@ const ContentViewDeleteWizard =
143
143
  steps={steps}
144
144
  startAtStep={currentStep}
145
145
  onClose={() => {
146
- setIsOpen(false);
147
- setCurrentStep(0);
148
- }}
146
+ setIsOpen(false);
147
+ setCurrentStep(0);
148
+ }}
149
149
  isOpen={show}
150
150
  />
151
151
  </CVDeleteContext.Provider>
@@ -9,6 +9,7 @@ import { pluralize } from '../../../../utils/helpers';
9
9
  import Loading from '../../../../components/Loading';
10
10
  import './CVEnvironmentSelectionForm.scss';
11
11
  import InactiveText from '../../components/InactiveText';
12
+ import WizardHeader from '../../components/WizardHeader';
12
13
 
13
14
  const CVDeleteEnvironmentSelection = () => {
14
15
  const {
@@ -35,25 +36,26 @@ const CVDeleteEnvironmentSelection = () => {
35
36
 
36
37
  return (
37
38
  <>
38
- <h2>{__('Remove versions from environments')}</h2>
39
- {!resolved && <Loading loadingText={__('Loading versions')} />}
40
- {resolved &&
41
- <>
39
+ <WizardHeader
40
+ title={__('Remove versions from environments')}
41
+ description={resolved &&
42
42
  <Flex>
43
- <FlexItem><ExclamationTriangleIcon /></FlexItem>
43
+ <FlexItem style={{ marginRight: '8px' }}><ExclamationTriangleIcon /></FlexItem>
44
44
  {versionCount ?
45
- (
46
- <FlexItem style={{ marginBottom: '0.5em' }}>
47
- {__(`${pluralize(versionCount, 'content view version')} in the environments below will be removed when content view is deleted`)}
48
- </FlexItem>
49
- ) :
50
- (
51
- <FlexItem style={{ marginBottom: '0.5em' }}>
52
- {__('This content view does not have any versions associated.')}
53
- </FlexItem>
54
- )
45
+ <FlexItem>
46
+ {__(`${pluralize(versionCount, 'content view version')} in the environments below will be removed when content view is deleted`)}
47
+ </FlexItem>
48
+ :
49
+ <FlexItem>
50
+ {__('This content view does not have any versions associated.')}
51
+ </FlexItem>
55
52
  }
56
- </Flex>
53
+ </Flex>}
54
+ />
55
+ {!resolved ?
56
+ <Loading loadingText={__('Loading versions')} /> :
57
+ <>
58
+
57
59
  {results?.map((version, index) => (
58
60
  <ExpandableSection
59
61
  key={version.id}
@@ -72,27 +74,27 @@ const CVDeleteEnvironmentSelection = () => {
72
74
  </Thead>
73
75
  <Tbody>
74
76
  {version?.environments?.map((env, rowIndex) => {
75
- const {
76
- id, name, activation_key_count: akCount, host_count: hostCount,
77
- } = env;
78
- return (
79
- <Tr key={`${name}_${id}`}>
80
- <Td
81
- key={`${name}__${id}_select`}
82
- select={{
83
- rowIndex,
84
- isSelected: true,
85
- disable: true,
86
- }}
87
- />
88
- <Td>
89
- {name}
90
- </Td>
91
- <Td>{hostCount}</Td>
92
- <Td>{akCount}</Td>
93
- </Tr>
94
- );
95
- })}
77
+ const {
78
+ id, name, activation_key_count: akCount, host_count: hostCount,
79
+ } = env;
80
+ return (
81
+ <Tr key={`${name}_${id}`}>
82
+ <Td
83
+ key={`${name}__${id}_select`}
84
+ select={{
85
+ rowIndex,
86
+ isSelected: true,
87
+ disable: true,
88
+ }}
89
+ />
90
+ <Td>
91
+ {name}
92
+ </Td>
93
+ <Td>{hostCount}</Td>
94
+ <Td>{akCount}</Td>
95
+ </Tr>
96
+ );
97
+ })}
96
98
  </Tbody>
97
99
  </TableComposable> :
98
100
  <InactiveText text={__('This version is not promoted to any environments.')} />
@@ -6,6 +6,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
6
6
  import CVDeleteContext from '../CVDeleteContext';
7
7
  import { selectCVActivationKeys, selectCVHosts } from '../../Details/ContentViewDetailSelectors';
8
8
  import { pluralize } from '../../../../utils/helpers';
9
+ import WizardHeader from '../../components/WizardHeader';
9
10
 
10
11
  const CVDeletionReview = () => {
11
12
  const {
@@ -19,42 +20,43 @@ const CVDeletionReview = () => {
19
20
  const { results: akResponse } = activationKeysResponse || {};
20
21
  return (
21
22
  <>
22
- <h2>{__('Review Details')}</h2>
23
- {cvEnvironments.length ?
24
- (__('This content view will be deleted along with all versions from the environments listed below. ' +
25
- 'Changes listed below will be effective after clicking Delete.')) :
26
- (__('This content view will be deleted. Changes will be effective after clicking Delete.'))
27
- }
23
+ <WizardHeader
24
+ title={__('Review details')}
25
+ description={cvEnvironments.length ?
26
+ (__('This content view will be deleted along with all versions from the environments listed below. ' +
27
+ 'Changes listed below will be effective after clicking Delete.')) :
28
+ (__('This content view will be deleted. Changes will be effective after clicking Delete.'))}
29
+ />
28
30
  {(cvEnvironments.length !== 0) &&
29
- <>
30
- <h3>{__('Environments')}</h3>
31
- <Flex>
32
- <FlexItem><ExclamationTriangleIcon /></FlexItem>
33
- <FlexItem style={{ marginBottom: '0.5em' }}>{__('All versions will be removed from these environments')}</FlexItem>
34
- </Flex>
35
- <Flex>
36
- {cvEnvironments?.map(({ name, id }) =>
37
- <FlexItem key={name}><Label isTruncated color="purple" href={`/lifecycle_environments/${id}`}>{name}</Label></FlexItem>)}
38
- </Flex>
39
- </>}
31
+ <>
32
+ <h3>{__('Environments')}</h3>
33
+ <Flex>
34
+ <FlexItem><ExclamationTriangleIcon /></FlexItem>
35
+ <FlexItem style={{ marginBottom: '0.5em' }}>{__('All versions will be removed from these environments')}</FlexItem>
36
+ </Flex>
37
+ <Flex>
38
+ {cvEnvironments?.map(({ name, id }) =>
39
+ <FlexItem key={name}><Label isTruncated color="purple" href={`/lifecycle_environments/${id}`}>{name}</Label></FlexItem>)}
40
+ </Flex>
41
+ </>}
40
42
  {affectedHosts &&
41
- <>
42
- <h3>{__('Content hosts')}</h3>
43
- <Flex>
44
- <FlexItem><ExclamationTriangleIcon /></FlexItem>
45
- <FlexItem><p>{__(`${pluralize(hostResponse.length, 'host')} will be moved to content view ${selectedCVNameForHosts} in `)}</p></FlexItem>
46
- <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForHost[0].id}`}>{selectedEnvForHost[0].name}</Label></FlexItem>
47
- </Flex>
48
- </>}
43
+ <>
44
+ <h3>{__('Content hosts')}</h3>
45
+ <Flex>
46
+ <FlexItem><ExclamationTriangleIcon /></FlexItem>
47
+ <FlexItem><p>{__(`${pluralize(hostResponse.length, 'host')} will be moved to content view ${selectedCVNameForHosts} in `)}</p></FlexItem>
48
+ <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForHost[0].id}`}>{selectedEnvForHost[0].name}</Label></FlexItem>
49
+ </Flex>
50
+ </>}
49
51
  {affectedActivationKeys &&
50
- <>
51
- <h3>{__('Activation keys')}</h3>
52
- <Flex>
53
- <FlexItem><ExclamationTriangleIcon /></FlexItem>
54
- <FlexItem><p>{__(`${pluralize(akResponse.length, 'activation key')} will be moved to content view ${selectedCVNameForAK} in `)}</p></FlexItem>
55
- <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForAK[0].id}`}>{selectedEnvForAK[0].name}</Label></FlexItem>
56
- </Flex>
57
- </>}
52
+ <>
53
+ <h3>{__('Activation keys')}</h3>
54
+ <Flex>
55
+ <FlexItem><ExclamationTriangleIcon /></FlexItem>
56
+ <FlexItem><p>{__(`${pluralize(akResponse.length, 'activation key')} will be moved to content view ${selectedCVNameForAK} in `)}</p></FlexItem>
57
+ <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForAK[0].id}`}>{selectedEnvForAK[0].name}</Label></FlexItem>
58
+ </Flex>
59
+ </>}
58
60
  </>
59
61
  );
60
62
  };
@@ -75,7 +75,9 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
75
75
  .query(true)
76
76
  .reply(200, cvDetailsData);
77
77
 
78
- const { getByText, getAllByLabelText, queryByText } =
78
+ const {
79
+ getAllByText, getByText, getAllByLabelText, queryByText,
80
+ } =
79
81
  renderWithRedux(<ContentViewsPage />, renderOptions);
80
82
  expect(queryByText(firstCV.name)).toBeNull();
81
83
  // Assert that the CV name is now showing on the screen, but wait for it to appear.
@@ -84,7 +86,7 @@ test('Can call API for CVs and show Delete Wizard for the row', async (done) =>
84
86
  fireEvent.click(getAllByLabelText('Actions')[0]);
85
87
  expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true');
86
88
  fireEvent.click(getByText('Delete'));
87
- await patientlyWaitFor(() => expect(queryByText('Remove versions from environments')).toBeInTheDocument());
89
+ await patientlyWaitFor(() => expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument());
88
90
 
89
91
  assertNockRequest(scope);
90
92
  assertNockRequest(scopeBookmark);
@@ -132,7 +134,7 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
132
134
  system_environment_id: 9,
133
135
  key_content_view_id: 2,
134
136
  key_environment_id: 9,
135
- id: '20',
137
+ id: 20,
136
138
  };
137
139
 
138
140
  const cvDeleteScope = nockInstance
@@ -166,7 +168,7 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
166
168
  expect(getAllByLabelText('Actions')[0]).toHaveAttribute('aria-expanded', 'true');
167
169
  fireEvent.click(getByText('Delete'));
168
170
  await patientlyWaitFor(() => {
169
- expect(queryByText('Remove versions from environments')).toBeInTheDocument();
171
+ expect(getAllByText('Remove versions from environments')[1]).toBeInTheDocument();
170
172
  expect(queryByText('Version 1.0')).toBeInTheDocument();
171
173
  });
172
174
  fireEvent.click(getByText('Next'));
@@ -210,7 +212,7 @@ test('Can open Delete wizard and delete CV with all steps', async (done) => {
210
212
  // Move to Review
211
213
  fireEvent.click(getByText('Next'));
212
214
  await patientlyWaitFor(() => {
213
- expect(getByText('Review Details')).toBeInTheDocument();
215
+ expect(getAllByText('Review details')[1]).toBeInTheDocument();
214
216
  expect(getByText('Environments')).toBeInTheDocument();
215
217
  expect(getByText('Content hosts')).toBeInTheDocument();
216
218
  expect(getByText('1 host will be moved to content view cv2 in')).toBeInTheDocument();
@@ -246,7 +246,6 @@
246
246
  "srpm_count": 0,
247
247
  "module_stream_count": 14,
248
248
  "package_count": 22,
249
- "ostree_branch_count": null,
250
249
  "component_view_count": 0,
251
250
  "python_repository_count": 1,
252
251
  "deb_repository_count": 0,
@@ -517,8 +516,7 @@
517
516
  "srpm_count": 0,
518
517
  "module_stream_count": 14,
519
518
  "package_count": 22,
520
- "ostree_branch_count": null,
521
- "component_view_count": 0,
519
+ "component_view_count": 0,
522
520
  "python_repository_count": 1,
523
521
  "deb_repository_count": 1,
524
522
  "file_repository_count": 1,
@@ -680,7 +678,6 @@
680
678
  "srpm_count": 0,
681
679
  "module_stream_count": 0,
682
680
  "package_count": 0,
683
- "ostree_branch_count": null,
684
681
  "component_view_count": 0,
685
682
  "python_repository_count": 0,
686
683
  "deb_repository_count": 0,
@@ -843,7 +840,6 @@
843
840
  "srpm_count": 0,
844
841
  "module_stream_count": 0,
845
842
  "package_count": 0,
846
- "ostree_branch_count": null,
847
843
  "component_view_count": 0,
848
844
  "python_repository_count": 0,
849
845
  "deb_repository_count": 0,
@@ -862,4 +858,4 @@
862
858
  }
863
859
  }
864
860
  ]
865
- }
861
+ }
@@ -1,20 +1,19 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Label, Flex, FlexItem } from '@patternfly/react-core';
3
+ import { Label } from '@patternfly/react-core';
4
+
5
+ const ComponentEnvironments = ({ environments }) => environments.map((env, index) => (
6
+ <Label
7
+ key={env.id}
8
+ style={{ margin: `4px 0 4px ${index > 0 ? '4px' : '0'}` }}
9
+ color="purple"
10
+ href={`/lifecycle_environments/${env.id}`}
11
+ isTruncated
12
+ >
13
+ {`${env.name}`}
14
+ </Label>
15
+ ));
4
16
 
5
- const ComponentEnvironments = ({ environments }) => {
6
- const envList = environments.map(env =>
7
- (
8
- <FlexItem key={env.id} style={{ marginTop: '0.25em', marginBottom: '0.25em' }}>
9
- <Label color="purple" href={`/lifecycle_environments/${env.id}`} isTruncated>{`${env.name}`}</Label>
10
- </FlexItem>
11
- ));
12
- return (
13
- <Flex grow={{ default: 'grow' }} spaceItems={{ default: 'spaceItemsSm' }}>
14
- {envList}
15
- </Flex>
16
- );
17
- };
18
17
 
19
18
  ComponentEnvironments.propTypes = {
20
19
  environments: PropTypes.instanceOf(Array),
@@ -62,17 +62,26 @@ export default () => {
62
62
  return (
63
63
  <Grid className="grid-with-margin">
64
64
  <DetailsContainer cvId={cvId}>
65
- <React.Fragment>
65
+ <>
66
66
  <CVBreadCrumb />
67
- <GridItem xl={8} lg={7} sm={12} >
68
- <Flex>
67
+ <GridItem xl={8} lg={7} sm={12} style={{ margin: '10px 0' }}>
68
+ <Flex alignItems={{
69
+ default: 'alignItemsCenter',
70
+ }}
71
+ >
69
72
  <FlexItem>
70
73
  <TextContent>
71
- <Text component={TextVariants.h1}>{`${name} content view`}</Text>
74
+ <Text component={TextVariants.h1}>
75
+ {name} {__('content view')}
76
+ </Text>
72
77
  </TextContent>
73
78
  </FlexItem>
74
- <FlexItem spacer={{ default: 'spacerXl' }}>
75
- <Text component={TextVariants.h1}><ContentViewIcon composite={composite} /></Text>
79
+ <FlexItem>
80
+ <TextContent>
81
+ <Text component={TextVariants.h2}>
82
+ <ContentViewIcon composite={composite} />
83
+ </Text>
84
+ </TextContent>
76
85
  </FlexItem>
77
86
  </Flex>
78
87
  </GridItem>
@@ -110,8 +119,8 @@ export default () => {
110
119
  <GridItem span={12}>
111
120
  <RoutedTabs tabs={tabs} defaultTabIndex={1} />
112
121
  </GridItem>
113
- </React.Fragment>
114
- </DetailsContainer>
115
- </Grid>
122
+ </ >
123
+ </DetailsContainer >
124
+ </Grid >
116
125
  );
117
126
  };
@@ -70,8 +70,9 @@ const ContentViewInfo = ({ cvId, details }) => {
70
70
  </TextListItem>
71
71
  <TextListItem component={TextListItemVariants.dd} className="foreman-spaced-list">
72
72
  <Flex>
73
- <FlexItem spacer={{ default: 'spacerXs' }}><ContentViewIcon composite={composite} /></FlexItem>
74
- <FlexItem>{composite ? 'Composite' : 'Component'}</FlexItem>
73
+ <FlexItem spacer={{ default: 'spacerXs' }}>
74
+ <ContentViewIcon composite={composite} description={composite ? __('Composite') : __('Component')} />
75
+ </FlexItem>
75
76
  </Flex>
76
77
  </TextListItem>
77
78
  <ActionableDetail
@@ -76,7 +76,6 @@
76
76
  "name": "test1"
77
77
  },
78
78
  "content_counts": {
79
- "ostree_branch": 0,
80
79
  "docker_manifest": 0,
81
80
  "docker_tag": 0,
82
81
  "rpm": 8,
@@ -121,4 +120,4 @@
121
120
  "repositories": [],
122
121
  "type": "package_group",
123
122
  "rules": []
124
- }
123
+ }
@@ -83,7 +83,7 @@ test('Can show filter details and package groups on page load', async (done) =>
83
83
  assertNockRequest(cvFilterScope);
84
84
  assertNockRequest(cvFiltersScope);
85
85
  assertNockRequest(cvPackageFilterRulesScope, done);
86
- await act(() => Promise.resolve());
86
+ act(done);
87
87
  });
88
88
 
89
89
  test('Can search for package rules in package filter details', async (done) => {
@@ -141,7 +141,6 @@
141
141
  "name": "test_all_types"
142
142
  },
143
143
  "content_counts": {
144
- "ostree_branch": 0,
145
144
  "docker_manifest": 0,
146
145
  "docker_tag": 0,
147
146
  "rpm": 8,
@@ -161,7 +160,6 @@
161
160
  "name": "test_all_types"
162
161
  },
163
162
  "content_counts": {
164
- "ostree_branch": 0,
165
163
  "docker_manifest": 0,
166
164
  "docker_tag": 0,
167
165
  "rpm": 8,
@@ -181,7 +179,6 @@
181
179
  "name": "test_all_types"
182
180
  },
183
181
  "content_counts": {
184
- "ostree_branch": 0,
185
182
  "docker_manifest": 0,
186
183
  "docker_tag": 0,
187
184
  "rpm": 22,
@@ -201,7 +198,6 @@
201
198
  "name": "test_all_types"
202
199
  },
203
200
  "content_counts": {
204
- "ostree_branch": 0,
205
201
  "docker_manifest": 1,
206
202
  "docker_tag": 1,
207
203
  "rpm": 0,
@@ -221,7 +217,6 @@
221
217
  "name": "test_all_types"
222
218
  },
223
219
  "content_counts": {
224
- "ostree_branch": 0,
225
220
  "docker_manifest": 0,
226
221
  "docker_tag": 0,
227
222
  "rpm": 0,
@@ -241,7 +236,6 @@
241
236
  "name": "test_all_types"
242
237
  },
243
238
  "content_counts": {
244
- "ostree_branch": 0,
245
239
  "docker_manifest": 0,
246
240
  "docker_tag": 0,
247
241
  "rpm": 0,
@@ -261,7 +255,6 @@
261
255
  "name": "test_all_types"
262
256
  },
263
257
  "content_counts": {
264
- "ostree_branch": 0,
265
258
  "docker_manifest": 0,
266
259
  "docker_tag": 0,
267
260
  "rpm": 0,
@@ -356,4 +349,4 @@
356
349
  "updated_at": "2021-10-06 09:50:25 -0400"
357
350
  }
358
351
  ]
359
- }
352
+ }
@@ -41,7 +41,6 @@
41
41
  "name": "prod1"
42
42
  },
43
43
  "content_counts": {
44
- "ostree_branch": 0,
45
44
  "docker_manifest": 0,
46
45
  "docker_tag": 0,
47
46
  "rpm": 32,
@@ -86,4 +85,4 @@
86
85
  "updated_at": "2021-02-23 20:57:19 -0500"
87
86
  }
88
87
  ]
89
- }
88
+ }
@@ -44,11 +44,6 @@ afterEach(() => {
44
44
  nock.cleanAll();
45
45
  });
46
46
 
47
- jest.mock('../../../../../utils/useDebounce', () => ({
48
- __esModule: true,
49
- default: value => value,
50
- }));
51
-
52
47
  test('Can show filter details and package groups on page load', async (done) => {
53
48
  const { name: cvFilterName } = cvFilterDetails;
54
49
  const cvFilterScope = nockInstance
@@ -64,7 +59,6 @@ test('Can show filter details and package groups on page load', async (done) =>
64
59
  .query(true)
65
60
  .reply(200, allPackageGroups);
66
61
  const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
67
-
68
62
  const { getByText, queryByText } =
69
63
  renderWithRedux(withCVRoute(<ContentViewFilterDetails
70
64
  cvId={1}
@@ -77,11 +71,12 @@ test('Can show filter details and package groups on page load', async (done) =>
77
71
  await patientlyWaitFor(() => {
78
72
  expect(getByText(cvFilterName)).toBeInTheDocument();
79
73
  });
80
- await act(() => Promise.resolve());
74
+
81
75
  assertNockRequest(autocompleteScope);
82
76
  assertNockRequest(cvFilterScope);
83
77
  assertNockRequest(cvFiltersScope);
84
78
  assertNockRequest(packageGroupsScope, done);
79
+ act(done);
85
80
  });
86
81
 
87
82
  test('Can search for package groups in package group filter', async (done) => {
@@ -137,5 +132,5 @@ test('Can search for package groups in package group filter', async (done) => {
137
132
  assertNockRequest(packageGroupsScope);
138
133
  assertNockRequest(withSearchScope);
139
134
  assertNockRequest(packageGroupSearchScope, done);
140
- await act(() => Promise.resolve());
135
+ act(done);
141
136
  });
@@ -62,7 +62,6 @@
62
62
  },
63
63
  "content_label": "Default_Organization_yums_test",
64
64
  "content_counts": {
65
- "ostree_branch": 0,
66
65
  "docker_manifest": 0,
67
66
  "docker_manifest_list": 0,
68
67
  "docker_tag": 0,
@@ -130,7 +129,6 @@
130
129
  },
131
130
  "content_label": "Default_Organization_test_testYums",
132
131
  "content_counts": {
133
- "ostree_branch": 0,
134
132
  "docker_manifest": 0,
135
133
  "docker_manifest_list": 0,
136
134
  "docker_tag": 0,
@@ -41,7 +41,6 @@
41
41
  "name": "prod1"
42
42
  },
43
43
  "content_counts": {
44
- "ostree_branch": 0,
45
44
  "docker_manifest": 0,
46
45
  "docker_tag": 0,
47
46
  "rpm": 32,
@@ -86,4 +85,4 @@
86
85
  "updated_at": "2013-01-27"
87
86
  }
88
87
  ]
89
- }
88
+ }
@@ -75,7 +75,6 @@
75
75
  "name": "yums"
76
76
  },
77
77
  "content_counts": {
78
- "ostree_branch": 0,
79
78
  "docker_manifest": 0,
80
79
  "docker_tag": 0,
81
80
  "rpm": 22,
@@ -95,7 +94,6 @@
95
94
  "name": "test"
96
95
  },
97
96
  "content_counts": {
98
- "ostree_branch": 0,
99
97
  "docker_manifest": 0,
100
98
  "docker_tag": 0,
101
99
  "rpm": 8,
@@ -115,7 +113,6 @@
115
113
  "name": "test"
116
114
  },
117
115
  "content_counts": {
118
- "ostree_branch": 0,
119
116
  "docker_manifest": 1,
120
117
  "docker_tag": 1,
121
118
  "rpm": 0,
@@ -135,7 +132,6 @@
135
132
  "name": "test"
136
133
  },
137
134
  "content_counts": {
138
- "ostree_branch": 0,
139
135
  "docker_manifest": 0,
140
136
  "docker_tag": 0,
141
137
  "rpm": 0,
@@ -155,7 +151,6 @@
155
151
  "name": "test"
156
152
  },
157
153
  "content_counts": {
158
- "ostree_branch": 0,
159
154
  "docker_manifest": 0,
160
155
  "docker_tag": 0,
161
156
  "rpm": 0,
@@ -268,7 +263,6 @@
268
263
  },
269
264
  "content_label": "Default_Organization_test_testYums",
270
265
  "content_counts": {
271
- "ostree_branch": 0,
272
266
  "docker_manifest": 0,
273
267
  "docker_manifest_list": 0,
274
268
  "docker_tag": 0,
@@ -336,7 +330,6 @@
336
330
  },
337
331
  "content_label": "Default_Organization_yums_test",
338
332
  "content_counts": {
339
- "ostree_branch": 0,
340
333
  "docker_manifest": 0,
341
334
  "docker_manifest_list": 0,
342
335
  "docker_tag": 0,
@@ -380,4 +373,4 @@
380
373
  "updated_at": "2021-09-07 12:51:46 -0400"
381
374
  }
382
375
  ]
383
- }
376
+ }