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
@@ -1,13 +1,15 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useContext, useState } from 'react';
2
2
  import { useSelector } from 'react-redux';
3
- import { Alert, Flex, FlexItem, Label } from '@patternfly/react-core';
3
+ import { Alert, Flex, FlexItem, Label, AlertActionCloseButton } from '@patternfly/react-core';
4
4
  import { ExclamationTriangleIcon } from '@patternfly/react-icons';
5
5
  import { translate as __ } from 'foremanReact/common/I18n';
6
6
  import { selectCVActivationKeys, selectCVHosts } from '../../../ContentViewDetailSelectors';
7
7
  import DeleteContext from '../DeleteContext';
8
8
  import { pluralize } from '../../../../../../utils/helpers';
9
+ import WizardHeader from '../../../../components/WizardHeader';
9
10
 
10
11
  const CVVersionRemoveReview = () => {
12
+ const [alertDismissed, setAlertDismissed] = useState(false);
11
13
  const {
12
14
  cvId, versionNameToRemove, versionEnvironments, selectedEnvSet,
13
15
  selectedEnvForAK, selectedCVNameForAK, selectedCVNameForHosts,
@@ -20,16 +22,21 @@ const CVVersionRemoveReview = () => {
20
22
  const selectedEnv = versionEnvironments.filter(env => selectedEnvSet.has(env.id));
21
23
  const versionDeleteInfo = __(`Version ${versionNameToRemove} will be deleted from all environments. It will no longer be available for promotion.`);
22
24
  const removalNotice = __(`Version ${versionNameToRemove} will be removed from the environments listed below, and will remain available for later promotion. ` +
23
- 'Changes listed below will be effective after clicking Remove.');
25
+ 'Changes listed below will be effective after clicking Remove.');
24
26
 
25
27
  return (
26
28
  <>
27
- <h2>{__('Review Details')}</h2>
28
- {(deleteFlow || removeDeletionFlow) &&
29
- <Alert variant="warning" isInline title={__('Warning')}>
30
- <p style={{ marginBottom: '0.5em' }}>{versionDeleteInfo}</p>
31
- </Alert>}
32
- {!(deleteFlow || removeDeletionFlow) && removalNotice}
29
+ <WizardHeader title={__('Review Details')} />
30
+ {!alertDismissed && (deleteFlow || removeDeletionFlow) &&
31
+ <Alert
32
+ variant="warning"
33
+ isInline
34
+ title={__('Warning')}
35
+ actionClose={<AlertActionCloseButton onClose={() => setAlertDismissed(true)} />}
36
+ >
37
+ <p style={{ marginBottom: '0.5em' }}>{versionDeleteInfo}</p>
38
+ </Alert>}
39
+ {!(deleteFlow || removeDeletionFlow) && <WizardHeader description={removalNotice} />}
33
40
  {(selectedEnv.length !== 0) &&
34
41
  <>
35
42
  <h3>{__('Environments')}</h3>
@@ -52,14 +59,14 @@ const CVVersionRemoveReview = () => {
52
59
  </Flex>
53
60
  </>}
54
61
  {affectedActivationKeys &&
55
- <>
56
- <h3>{__('Activation keys')}</h3>
57
- <Flex>
58
- <FlexItem><ExclamationTriangleIcon /></FlexItem>
59
- <FlexItem><p>{__(`${pluralize(akResponse.length, 'activation key')} will be moved to content view ${selectedCVNameForAK} in `)}</p></FlexItem>
60
- <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForAK[0].id}`}>{selectedEnvForAK[0].name}</Label></FlexItem>
61
- </Flex>
62
- </>}
62
+ <>
63
+ <h3>{__('Activation keys')}</h3>
64
+ <Flex>
65
+ <FlexItem><ExclamationTriangleIcon /></FlexItem>
66
+ <FlexItem><p>{__(`${pluralize(akResponse.length, 'activation key')} will be moved to content view ${selectedCVNameForAK} in `)}</p></FlexItem>
67
+ <FlexItem><Label isTruncated color="purple" href={`/lifecycle_environments/${selectedEnvForAK[0].id}`}>{selectedEnvForAK[0].name}</Label></FlexItem>
68
+ </Flex>
69
+ </>}
63
70
  </>
64
71
  );
65
72
  };
@@ -242,7 +242,6 @@
242
242
  "srpm_count": 0,
243
243
  "module_stream_count": 0,
244
244
  "package_count": 8,
245
- "ostree_branch_count": null,
246
245
  "ansible_collection_repository_count": 0,
247
246
  "deb_repository_count": 0,
248
247
  "docker_repository_count": 0,
@@ -403,7 +402,6 @@
403
402
  "srpm_count": 0,
404
403
  "module_stream_count": 0,
405
404
  "package_count": 8,
406
- "ostree_branch_count": null,
407
405
  "ansible_collection_repository_count": 0,
408
406
  "deb_repository_count": 0,
409
407
  "docker_repository_count": 0,
@@ -562,7 +560,6 @@
562
560
  "srpm_count": 0,
563
561
  "module_stream_count": 0,
564
562
  "package_count": 8,
565
- "ostree_branch_count": null,
566
563
  "ansible_collection_repository_count": 0,
567
564
  "deb_repository_count": 0,
568
565
  "docker_repository_count": 0,
@@ -580,4 +577,4 @@
580
577
  }
581
578
  }
582
579
  ]
583
- }
580
+ }
@@ -8,6 +8,7 @@ import {
8
8
  GridItem,
9
9
  } from '@patternfly/react-core';
10
10
  import InactiveText from '../../../components/InactiveText';
11
+ import ContentConfig from '../../../../Content/ContentConfig';
11
12
 
12
13
  const ContentViewVersionRepositoryCell = ({
13
14
  data: {
@@ -49,9 +50,6 @@ const ContentViewVersionRepositoryCell = ({
49
50
  name: __('Module streams'),
50
51
  url: `products/${id}/repositories/${libraryInstanceId}/content/module_streams`,
51
52
  },
52
- ostree_branch: {
53
- name: __('OStree branches'),
54
- },
55
53
  package: {
56
54
  name: __('Packages'),
57
55
  url: `products/${id}/repositories/${libraryInstanceId}/content/packages`,
@@ -69,6 +67,13 @@ const ContentViewVersionRepositoryCell = ({
69
67
  },
70
68
  };
71
69
 
70
+ ContentConfig().forEach((type) => {
71
+ CONTENT_COUNTS[type.names.singularLabel] = {
72
+ name: type.names.pluralLowercase,
73
+ url: `products/${id}/repositories/${libraryInstanceId}/content/${type.names.pluralLabel}`,
74
+ };
75
+ });
76
+
72
77
  const getContentSpan = (num) => {
73
78
  switch (true) {
74
79
  case num < 4:
@@ -242,7 +242,6 @@
242
242
  "srpm_count": 0,
243
243
  "module_stream_count": 14,
244
244
  "package_count": 22,
245
- "ostree_branch_count": null,
246
245
  "component_view_count": 0,
247
246
  "ansible_collection_repository_count": 1,
248
247
  "deb_repository_count": 0,
@@ -445,7 +444,6 @@
445
444
  "srpm_count": 0,
446
445
  "module_stream_count": 0,
447
446
  "package_count": 0,
448
- "ostree_branch_count": null,
449
447
  "component_view_count": 0,
450
448
  "ansible_collection_repository_count": 0,
451
449
  "deb_repository_count": 1,
@@ -732,7 +730,6 @@
732
730
  "srpm_count": 0,
733
731
  "module_stream_count": 0,
734
732
  "package_count": 0,
735
- "ostree_branch_count": null,
736
733
  "component_view_count": 0,
737
734
  "ansible_collection_repository_count": 0,
738
735
  "deb_repository_count": 0,
@@ -750,4 +747,4 @@
750
747
  }
751
748
  }
752
749
  ]
753
- }
750
+ }
@@ -138,7 +138,6 @@
138
138
  "srpm_count": 0,
139
139
  "module_stream_count": 0,
140
140
  "package_count": 0,
141
- "ostree_branch_count": null,
142
141
  "component_view_count": 0,
143
142
  "ansible_collection_repository_count": 0,
144
143
  "deb_repository_count": 0,
@@ -155,4 +154,4 @@
155
154
  "permissions": {
156
155
  "deletable": true
157
156
  }
158
- }
157
+ }
@@ -12,7 +12,6 @@
12
12
  "srpm_count": 0,
13
13
  "module_stream_count": 14,
14
14
  "package_count": 22,
15
- "ostree_branch_count": null,
16
15
  "component_view_count": 3,
17
16
  "ansible_collection_repository_count": 1,
18
17
  "deb_repository_count": 1,
@@ -70,4 +69,4 @@
70
69
  "library_instance_id": 22
71
70
  }
72
71
  ]
73
- }
72
+ }
@@ -52,7 +52,6 @@
52
52
  },
53
53
  "content_label": "Default_Organization_Nemero_Uno_Producto_Ansible_Collection_uno",
54
54
  "content_counts": {
55
- "ostree_branch": 0,
56
55
  "docker_manifest": 0,
57
56
  "docker_manifest_list": 0,
58
57
  "docker_tag": 0,
@@ -110,7 +109,6 @@
110
109
  },
111
110
  "content_label": "rhel-7-server-ansible-tower-3.3-rpms",
112
111
  "content_counts": {
113
- "ostree_branch": 0,
114
112
  "docker_manifest": 0,
115
113
  "docker_manifest_list": 0,
116
114
  "docker_tag": 0,
@@ -168,7 +166,6 @@
168
166
  },
169
167
  "content_label": "rhel-7-server-ansible-tower-3.4-rpms",
170
168
  "content_counts": {
171
- "ostree_branch": 0,
172
169
  "docker_manifest": 0,
173
170
  "docker_manifest_list": 0,
174
171
  "docker_tag": 0,
@@ -226,7 +223,6 @@
226
223
  },
227
224
  "content_label": "rhel-7-server-ansible-tower-3.5-rpms",
228
225
  "content_counts": {
229
- "ostree_branch": 0,
230
226
  "docker_manifest": 0,
231
227
  "docker_manifest_list": 0,
232
228
  "docker_tag": 0,
@@ -284,7 +280,6 @@
284
280
  },
285
281
  "content_label": "rhel-7-server-ansible-tower-3.6-rpms",
286
282
  "content_counts": {
287
- "ostree_branch": 0,
288
283
  "docker_manifest": 0,
289
284
  "docker_manifest_list": 0,
290
285
  "docker_tag": 0,
@@ -342,7 +337,6 @@
342
337
  },
343
338
  "content_label": "rhel-7-server-ansible-tower-3.8-textonly-rpms",
344
339
  "content_counts": {
345
- "ostree_branch": 0,
346
340
  "docker_manifest": 0,
347
341
  "docker_manifest_list": 0,
348
342
  "docker_tag": 0,
@@ -400,7 +394,6 @@
400
394
  },
401
395
  "content_label": "Default_Organization_Nemero_Uno_Producto_Deb_distro_Uno",
402
396
  "content_counts": {
403
- "ostree_branch": 0,
404
397
  "docker_manifest": 0,
405
398
  "docker_manifest_list": 0,
406
399
  "docker_tag": 0,
@@ -458,7 +451,6 @@
458
451
  },
459
452
  "content_label": "Default_Organization_Nemero_Uno_Producto_Docker_Repo_Dos",
460
453
  "content_counts": {
461
- "ostree_branch": 0,
462
454
  "docker_manifest": 407,
463
455
  "docker_manifest_list": 76,
464
456
  "docker_tag": 162,
@@ -516,7 +508,6 @@
516
508
  },
517
509
  "content_label": "Default_Organization_Nemero_Uno_Producto_Docker_Repo_Uno",
518
510
  "content_counts": {
519
- "ostree_branch": 0,
520
511
  "docker_manifest": 1,
521
512
  "docker_manifest_list": 0,
522
513
  "docker_tag": 1,
@@ -574,7 +565,6 @@
574
565
  },
575
566
  "content_label": "Default_Organization_Nemero_Uno_Producto_File_Repo_Uno",
576
567
  "content_counts": {
577
- "ostree_branch": 0,
578
568
  "docker_manifest": 0,
579
569
  "docker_manifest_list": 0,
580
570
  "docker_tag": 0,
@@ -632,7 +622,6 @@
632
622
  },
633
623
  "content_label": "a-mq-clients-1-for-rhel-5-server-rpms",
634
624
  "content_counts": {
635
- "ostree_branch": 0,
636
625
  "docker_manifest": 0,
637
626
  "docker_manifest_list": 0,
638
627
  "docker_tag": 0,
@@ -690,7 +679,6 @@
690
679
  },
691
680
  "content_label": "a-mq-clients-1-for-rhel-6-server-rpms",
692
681
  "content_counts": {
693
- "ostree_branch": 0,
694
682
  "docker_manifest": 0,
695
683
  "docker_manifest_list": 0,
696
684
  "docker_tag": 0,
@@ -748,7 +736,6 @@
748
736
  },
749
737
  "content_label": "a-mq-clients-1-for-rhel-6-server-rpms",
750
738
  "content_counts": {
751
- "ostree_branch": 0,
752
739
  "docker_manifest": 0,
753
740
  "docker_manifest_list": 0,
754
741
  "docker_tag": 0,
@@ -806,7 +793,6 @@
806
793
  },
807
794
  "content_label": "a-mq-clients-1-for-rhel-7-server-rpms",
808
795
  "content_counts": {
809
- "ostree_branch": 0,
810
796
  "docker_manifest": 0,
811
797
  "docker_manifest_list": 0,
812
798
  "docker_tag": 0,
@@ -864,7 +850,6 @@
864
850
  },
865
851
  "content_label": "Default_Organization_Nemero_Uno_Producto_Module_Stream_Uno",
866
852
  "content_counts": {
867
- "ostree_branch": 0,
868
853
  "docker_manifest": 0,
869
854
  "docker_manifest_list": 0,
870
855
  "docker_tag": 0,
@@ -922,7 +907,6 @@
922
907
  },
923
908
  "content_label": "Default_Organization_Nemero_Uno_Producto_Zoo_Repo_Dos",
924
909
  "content_counts": {
925
- "ostree_branch": 0,
926
910
  "docker_manifest": 0,
927
911
  "docker_manifest_list": 0,
928
912
  "docker_tag": 0,
@@ -980,7 +964,6 @@
980
964
  },
981
965
  "content_label": "Default_Organization_Nemero_Uno_Producto_Zoo_Repo_Uno",
982
966
  "content_counts": {
983
- "ostree_branch": 0,
984
967
  "docker_manifest": 0,
985
968
  "docker_manifest_list": 0,
986
969
  "docker_tag": 0,
@@ -997,4 +980,4 @@
997
980
  "last_sync_words": null
998
981
  }
999
982
  ]
1000
- }
983
+ }
@@ -288,7 +288,8 @@
288
288
  "srpm_count": 0,
289
289
  "module_stream_count": 0,
290
290
  "package_count": 8,
291
- "ostree_branch_count": 0,
291
+ "ostree_ref_count": 2,
292
+ "python_package_count": 80,
292
293
  "errata_counts": {
293
294
  "security": 5,
294
295
  "bugfix": 3,
@@ -442,7 +443,6 @@
442
443
  "srpm_count": 0,
443
444
  "module_stream_count": 0,
444
445
  "package_count": 8,
445
- "ostree_branch_count": 0,
446
446
  "errata_counts": {
447
447
  "security": null,
448
448
  "bugfix": 0,
@@ -582,7 +582,6 @@
582
582
  "srpm_count": 0,
583
583
  "module_stream_count": 0,
584
584
  "package_count": 8,
585
- "ostree_branch_count": 0,
586
585
  "errata_counts": {
587
586
  "security": null,
588
587
  "bugfix": 0,
@@ -713,7 +712,8 @@
713
712
  "srpm_count": 0,
714
713
  "module_stream_count": 0,
715
714
  "package_count": 0,
716
- "ostree_branch_count": 0,
715
+ "ostree_ref_count": 0,
716
+ "python_package_count": 0,
717
717
  "errata_counts": {
718
718
  "security": null,
719
719
  "bugfix": 0,
@@ -725,4 +725,4 @@
725
725
  }
726
726
  }
727
727
  ]
728
- }
728
+ }
@@ -152,6 +152,7 @@ test('Can show additional content and link to list page', async () => {
152
152
  .toHaveAttribute('href', '/content_views/5#/versions/11/files/');
153
153
  expect(getByText('1 Deb packages').closest('a'))
154
154
  .toHaveAttribute('href', '/versions/11/debPackages');
155
+ expect(getByText(/80 Python packages\s*2 OSTree refs/)).toBeInTheDocument();
155
156
  });
156
157
 
157
158
  assertNockRequest(autocompleteScope);
@@ -550,7 +550,6 @@
550
550
  "srpm_count": 0,
551
551
  "module_stream_count": 0,
552
552
  "package_count": 0,
553
- "ostree_branch_count": null,
554
553
  "errata_counts": {
555
554
  "security": null,
556
555
  "bugfix": 0,
@@ -698,7 +697,6 @@
698
697
  "srpm_count": 0,
699
698
  "module_stream_count": 0,
700
699
  "package_count": 8,
701
- "ostree_branch_count": null,
702
700
  "errata_counts": {
703
701
  "security": null,
704
702
  "bugfix": 0,
@@ -710,4 +708,4 @@
710
708
  }
711
709
  }
712
710
  ]
713
- }
711
+ }
@@ -1,7 +1,3 @@
1
- .foreman-spaced-icon {
2
- margin: 0px 10px;
3
- }
4
-
5
1
  // Keeps spacing in the list even despite contents
6
2
  .foreman-spaced-list {
7
3
  min-height: 40px;
@@ -1,80 +1,93 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { translate as __ } from 'foremanReact/common/I18n';
4
- import { Alert, Switch, Flex, FlexItem, TextContent, Text, TextVariants, Form, FormGroup, TextArea } from '@patternfly/react-core';
4
+ import {
5
+ Alert, Switch, TextContent, Text,
6
+ TextVariants, Form, FormGroup, TextArea, AlertActionCloseButton,
7
+ } from '@patternfly/react-core';
5
8
  import { EnterpriseIcon, RegistryIcon } from '@patternfly/react-icons';
6
9
  import EnvironmentPaths from '../components/EnvironmentPaths/EnvironmentPaths';
7
10
  import ComponentEnvironments from '../Details/ComponentContentViews/ComponentEnvironments';
8
11
  import './cvPublishForm.scss';
12
+ import WizardHeader from '../components/WizardHeader';
9
13
 
10
14
  const CVPublishForm = ({
11
15
  description,
12
16
  setDescription,
13
- details,
17
+ details: {
18
+ name, composite, next_version: nextVersion,
19
+ },
14
20
  userCheckedItems,
15
21
  setUserCheckedItems,
16
22
  promote,
17
23
  setPromote,
18
24
  forcePromote,
19
25
  }) => {
20
- const {
21
- name, composite, next_version: nextVersion,
22
- } = details;
26
+ const [alertDismissed, setAlertDismissed] = useState(false);
23
27
 
28
+ const checkPromote = (checked) => {
29
+ if (!checked) {
30
+ setUserCheckedItems([]);
31
+ }
32
+ setPromote(checked);
33
+ };
24
34
  return (
25
35
  <>
26
- <>
27
- <TextContent>
28
- <Text style={{ marginBottom: '1em' }} component={TextVariants.h1}>{__('Publish')}</Text>
29
- </TextContent>
30
- <Flex flex={{ default: 'inlineFlex' }}>
31
- <FlexItem>{__('A new version of ')}<b>{composite ? <RegistryIcon /> : <EnterpriseIcon />} {name}</b>
36
+ <WizardHeader
37
+ title={__('Publish')}
38
+ description={
39
+ <>{__('A new version of ')}<b>{composite ? <RegistryIcon /> : <EnterpriseIcon />} {name}</b>
32
40
  {__(' will be created and automatically promoted to the ' +
33
- 'Library environment. You can promote to other environments as well. ')}
34
- </FlexItem>
35
- </Flex>
36
- <TextContent>
37
- <Text style={{ marginTop: '1em', marginBottom: '1em' }} component={TextVariants.h3}>{__('Publish new version - ')}{nextVersion || '1.0'}</Text>
38
- </TextContent>
39
- <Form>
40
- <FormGroup label="Description" fieldId="description">
41
- <TextArea
42
- isRequired
43
- type="text"
44
- id="description"
45
- aria-label="input_description"
46
- name="description"
47
- value={description}
48
- onChange={value => setDescription(value)}
49
- />
50
- </FormGroup>
51
- <FormGroup label="Promote" fieldId="promote" style={{ marginBottom: '2em', outlineStyle: 'none' }}>
52
- <Switch
53
- id="promote-switch"
54
- aria-label="promote-switch"
55
- isChecked={promote}
56
- onChange={checked => setPromote(checked)}
57
- />
58
- </FormGroup>
59
- </Form>
60
- </>
61
- <>
62
- {forcePromote.length > 0 && (
63
- <Alert variant="info" isInline title="Force Promotion">
64
- <p>{__('Selected environments are out of the environment order. ' +
65
- 'The recommended practice is to promote to the next environment in the path.')}
66
- </p>
67
- <ComponentEnvironments environments={forcePromote} />
68
- </Alert>
69
- )
70
- }
71
- {promote &&
41
+ 'Library environment. You can promote to other environments as well. ')
42
+ }
43
+ </>}
44
+ />
45
+ <TextContent>
46
+ <Text component={TextVariants.h3}>{__('Publish new version - ')}{nextVersion || '1.0'}</Text>
47
+ </TextContent>
48
+ <Form>
49
+ <FormGroup label="Description" fieldId="description">
50
+ <TextArea
51
+ isRequired
52
+ type="text"
53
+ id="description"
54
+ aria-label="input_description"
55
+ name="description"
56
+ value={description}
57
+ onChange={setDescription}
58
+ />
59
+ </FormGroup>
60
+ <FormGroup label="Promote" fieldId="promote">
61
+ <Switch
62
+ id="promote-switch"
63
+ aria-label="promote-switch"
64
+ isChecked={promote}
65
+ onChange={checkPromote}
66
+ />
67
+ </FormGroup>
68
+ </Form>
69
+ {!alertDismissed && promote && forcePromote.length > 0 && (
70
+ <Alert
71
+ variant="info"
72
+ isInline
73
+ title={__('Force promotion')}
74
+ actionClose={<AlertActionCloseButton onClose={() => setAlertDismissed(true)} />}
75
+ >
76
+ <TextContent>
77
+ {forcePromote.length > 1 ? __('Selected environments ') : __('Selected environment ')}
78
+ <ComponentEnvironments environments={forcePromote} />
79
+ {forcePromote.length > 1 ?
80
+ __(' are out of the environment path order. The recommended practice is to promote the next environment in the path.') :
81
+ __(' is out of the environment path order. The recommended practice is to promote the next environment in the path.')
82
+ }
83
+ </TextContent>
84
+ </Alert>)}
85
+ {promote &&
72
86
  <EnvironmentPaths
73
87
  userCheckedItems={userCheckedItems}
74
88
  setUserCheckedItems={setUserCheckedItems}
75
89
  />
76
- }
77
- </>
90
+ }
78
91
  </>
79
92
  );
80
93
  };
@@ -1,16 +1,23 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import PropTypes from 'prop-types';
4
- import { TableComposable, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
4
+ import {
5
+ TableComposable, Thead, Tbody, Tr, Th,
6
+ Td,
7
+ } from '@patternfly/react-table';
8
+ import { EnterpriseIcon, RegistryIcon } from '@patternfly/react-icons';
5
9
  import { translate as __ } from 'foremanReact/common/I18n';
6
10
  import { STATUS } from 'foremanReact/constants';
7
11
  import ContentViewIcon from '../components/ContentViewIcon';
8
12
  import InactiveText from '../components/InactiveText';
9
13
  import ComponentEnvironments from '../Details/ComponentContentViews/ComponentEnvironments';
10
14
  import { selectEnvironmentPaths, selectEnvironmentPathsStatus } from '../components/EnvironmentPaths/EnvironmentPathSelectors';
15
+ import WizardHeader from '../components/WizardHeader';
11
16
 
12
17
  const CVPublishReview = ({
13
- details,
18
+ details: {
19
+ name, composite, next_version: nextVersion,
20
+ },
14
21
  userCheckedItems,
15
22
  }) => {
16
23
  const environmentPathResponse = useSelector(selectEnvironmentPaths);
@@ -26,33 +33,38 @@ const CVPublishReview = ({
26
33
  return [];
27
34
  }, [environmentPathResponse, environmentPathLoading, userCheckedItems]);
28
35
 
29
- const {
30
- name, composite, next_version: nextVersion,
31
- } = details;
32
-
33
36
  return (
34
- <TableComposable aria-label="Review Table">
35
- <Thead>
36
- <Tr>
37
- <Th>{__('Content view')}</Th>
38
- <Th>{__('Version')}</Th>
39
- <Th>{__('Environments')}</Th>
40
- </Tr>
41
- </Thead>
42
- <Tbody>
43
- <Tr>
44
- <Td>
45
- <><ContentViewIcon composite={composite} description={name} /><InactiveText text={__('Newly published')} /></>
46
- </Td>
47
- <Td>
48
- {__('Version')} {nextVersion}
49
- </Td>
50
- <Td>
51
- <ComponentEnvironments environments={promotedToEnvironments} />
52
- </Td>
53
- </Tr>
54
- </Tbody>
55
- </TableComposable>
37
+ <>
38
+ <WizardHeader
39
+ title={__('Review details')}
40
+ description={
41
+ <>
42
+ {__('Review your currently selected changes for ')}<b>{composite ? <RegistryIcon /> : <EnterpriseIcon />} {name}.</b>
43
+ </>}
44
+ />
45
+ <TableComposable aria-label="Review Table">
46
+ <Thead>
47
+ <Tr>
48
+ <Th>{__('Content view name')}</Th>
49
+ <Th>{__('Version')}</Th>
50
+ <Th>{__('Environments')}</Th>
51
+ </Tr>
52
+ </Thead>
53
+ <Tbody>
54
+ <Tr>
55
+ <Td>
56
+ <><ContentViewIcon composite={composite} description={name} /><InactiveText text={__('Newly published')} /></>
57
+ </Td>
58
+ <Td>
59
+ {__('Version')} {nextVersion}
60
+ </Td>
61
+ <Td>
62
+ <ComponentEnvironments environments={promotedToEnvironments} />
63
+ </Td>
64
+ </Tr>
65
+ </Tbody>
66
+ </TableComposable>
67
+ </>
56
68
  );
57
69
  };
58
70