katello 3.16.2 → 3.17.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.

Files changed (381) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katello/katello.scss +3 -7
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +8 -0
  5. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +10 -4
  6. data/app/controllers/katello/api/v2/host_tracer_controller.rb +33 -8
  7. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +11 -11
  8. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +0 -15
  9. data/app/controllers/katello/api/v2/repositories_controller.rb +5 -11
  10. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +16 -0
  11. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -4
  12. data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +1 -1
  13. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +5 -11
  14. data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +10 -0
  15. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +6 -7
  16. data/app/lib/actions/candlepin/product/content_add.rb +2 -1
  17. data/app/lib/actions/candlepin/product/content_update_enablement.rb +18 -0
  18. data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -6
  19. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
  20. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  21. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +3 -17
  22. data/app/lib/actions/katello/content_view_version/incremental_update.rb +2 -3
  23. data/app/lib/actions/katello/organization/simple_content_access/disable.rb +17 -0
  24. data/app/lib/actions/katello/organization/simple_content_access/enable.rb +17 -0
  25. data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +36 -0
  26. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +13 -0
  27. data/app/lib/actions/katello/product/content_create.rb +3 -3
  28. data/app/lib/actions/katello/product/destroy.rb +4 -25
  29. data/app/lib/actions/katello/repository/content_update.rb +41 -0
  30. data/app/lib/actions/katello/repository/destroy.rb +1 -5
  31. data/app/lib/actions/katello/repository/export.rb +1 -1
  32. data/app/lib/actions/katello/repository/multi_clone_contents.rb +15 -13
  33. data/app/lib/actions/katello/repository/sync.rb +25 -35
  34. data/app/lib/actions/katello/repository/update.rb +19 -30
  35. data/app/lib/actions/katello/repository/update_cv_repo_cert_guard.rb +17 -0
  36. data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +1 -0
  37. data/app/lib/actions/pulp/orchestration/repository/sync.rb +1 -2
  38. data/app/lib/actions/pulp/repository/sync.rb +1 -2
  39. data/app/lib/actions/pulp3/abstract_async_task.rb +0 -1
  40. data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -3
  41. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
  42. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -1
  43. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -3
  44. data/app/lib/actions/pulp3/repository/copy_content.rb +1 -0
  45. data/app/lib/actions/pulp3/repository/delete.rb +1 -1
  46. data/app/lib/actions/pulp3/repository/multi_copy_content.rb +1 -1
  47. data/app/lib/actions/pulp3/repository/save_version.rb +16 -20
  48. data/app/lib/actions/pulp3/repository/sync.rb +1 -1
  49. data/app/lib/actions/pulp3/repository/update_cv_repository_cert_guard.rb +2 -6
  50. data/app/lib/actions/pulp3/repository/upload_file.rb +1 -1
  51. data/app/lib/katello/resources/candlepin/product.rb +11 -0
  52. data/app/lib/katello/resources/cdn.rb +2 -3
  53. data/app/lib/katello/util/cdn_var_substitutor.rb +7 -9
  54. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +11 -11
  55. data/app/models/katello/activation_key.rb +1 -1
  56. data/app/models/katello/concerns/content_facet_host_extensions.rb +7 -0
  57. data/app/models/katello/concerns/host_managed_extensions.rb +39 -0
  58. data/app/models/katello/concerns/hostgroup_extensions.rb +46 -24
  59. data/app/models/katello/concerns/smart_proxy_extensions.rb +5 -19
  60. data/app/models/katello/concerns/widget_extensions.rb +23 -0
  61. data/app/models/katello/content_view.rb +9 -1
  62. data/app/models/katello/content_view_package_filter.rb +1 -1
  63. data/app/models/katello/content_view_version.rb +7 -0
  64. data/app/models/katello/erratum.rb +13 -0
  65. data/app/models/katello/erratum_cve.rb +8 -0
  66. data/app/models/katello/glue/pulp/repo.rb +1 -1
  67. data/app/models/katello/host/content_facet.rb +18 -1
  68. data/app/models/katello/host_collection.rb +6 -0
  69. data/app/models/katello/hostgroup/content_facet.rb +18 -0
  70. data/app/models/katello/installed_package.rb +8 -0
  71. data/app/models/katello/kt_environment.rb +9 -1
  72. data/app/models/katello/model.rb +16 -0
  73. data/app/models/katello/pool.rb +17 -0
  74. data/app/models/katello/product.rb +6 -0
  75. data/app/models/katello/purpose_addons_status.rb +1 -0
  76. data/app/models/katello/purpose_role_status.rb +1 -0
  77. data/app/models/katello/purpose_sla_status.rb +1 -0
  78. data/app/models/katello/purpose_usage_status.rb +1 -0
  79. data/app/models/katello/repository.rb +3 -6
  80. data/app/models/katello/root_repository.rb +24 -16
  81. data/app/models/katello/subscription_status.rb +1 -1
  82. data/app/models/katello/trace_status.rb +1 -1
  83. data/app/models/setting/content.rb +6 -2
  84. data/app/services/cert/certs.rb +2 -10
  85. data/app/services/katello/event_daemon.rb +7 -8
  86. data/app/services/katello/host_status_manager.rb +13 -0
  87. data/app/services/katello/pulp3/migration.rb +1 -1
  88. data/app/services/katello/pulp3/repository/yum.rb +6 -72
  89. data/app/services/katello/pulp3/repository.rb +11 -10
  90. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +1 -1
  91. data/app/services/katello/pulp3/task.rb +3 -3
  92. data/app/services/katello/pulp3/task_group.rb +0 -6
  93. data/app/services/katello/smart_proxy_helper.rb +16 -13
  94. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
  95. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
  96. data/config/routes/api/rhsm.rb +0 -1
  97. data/config/routes/api/v2.rb +8 -2
  98. data/config/routes/overrides.rb +0 -4
  99. data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
  100. data/db/migrate/20180904122343_create_hostgroup_content_facet.katello.rb +16 -0
  101. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +53 -0
  102. data/db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb +9 -0
  103. data/db/migrate/20200701150946_add_auto_enabled_to_root_repository.rb +5 -0
  104. data/db/seeds.d/75-job_templates.rb +2 -2
  105. data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +3 -1
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +5 -2
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +4 -2
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +1 -1
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +4 -1
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +4 -1
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -0
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +4 -3
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +7 -1
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -0
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -0
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +1 -1
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +7 -1
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -2
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +1 -1
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +1 -0
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +14 -6
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +1 -1
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +6 -6
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +5 -2
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +1 -1
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -2
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces-resolve.factory.js +18 -0
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +45 -4
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +1 -1
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +1 -1
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +1 -1
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +1 -1
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +1 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +1 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +1 -1
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +1 -1
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +1 -1
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +1 -1
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +0 -1
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +0 -6
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -7
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +11 -1
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +16 -4
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +0 -1
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +0 -15
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +0 -6
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
  152. data/lib/katello/engine.rb +6 -5
  153. data/lib/katello/permission_creator.rb +3 -3
  154. data/lib/katello/permissions/host_permissions.rb +0 -1
  155. data/lib/katello/plugin.rb +20 -16
  156. data/lib/katello/tasks/pulp3_post_migration_check.rake +1 -2
  157. data/lib/katello/tasks/reimport.rake +1 -1
  158. data/lib/katello/tasks/reports.rake +0 -12
  159. data/lib/katello/tasks/test.rake +15 -0
  160. data/lib/katello/version.rb +1 -1
  161. data/locale/action_names.rb +48 -48
  162. data/locale/bn/katello.po +137 -14
  163. data/locale/cs/katello.po +137 -14
  164. data/locale/de/katello.po +138 -15
  165. data/locale/en/katello.po +137 -14
  166. data/locale/es/katello.po +138 -15
  167. data/locale/fr/katello.po +138 -15
  168. data/locale/gu/katello.po +137 -14
  169. data/locale/hi/katello.po +137 -14
  170. data/locale/it/katello.po +138 -15
  171. data/locale/ja/katello.po +138 -15
  172. data/locale/katello.pot +969 -769
  173. data/locale/kn/katello.po +137 -14
  174. data/locale/ko/katello.po +138 -15
  175. data/locale/mr/katello.po +137 -14
  176. data/locale/or/katello.po +137 -14
  177. data/locale/pa/katello.po +137 -14
  178. data/locale/pt/katello.po +137 -14
  179. data/locale/pt_BR/katello.po +138 -15
  180. data/locale/ru/katello.po +138 -15
  181. data/locale/ta/katello.po +137 -14
  182. data/locale/te/katello.po +137 -14
  183. data/locale/zh_CN/katello.po +138 -15
  184. data/locale/zh_TW/katello.po +138 -15
  185. data/package.json +8 -25
  186. data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +3 -0
  187. data/webpack/components/ActionableDetail.js +63 -0
  188. data/webpack/components/Content/ContentTable.js +2 -2
  189. data/webpack/components/Content/Details/ContentDetailRepositoryTableSchema.js +1 -1
  190. data/webpack/components/Content/Details/ContentDetails.js +1 -1
  191. data/webpack/components/Content/__tests__/ContentTable.test.js +2 -2
  192. data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +1 -1
  193. data/webpack/components/EditableSwitch.js +30 -0
  194. data/webpack/components/EditableTextInput/EditableTextInput.js +120 -0
  195. data/webpack/components/EditableTextInput/__tests__/editableTextInput.test.js +52 -0
  196. data/webpack/components/EditableTextInput/editableTextInput.scss +14 -0
  197. data/webpack/components/EditableTextInput/index.js +3 -0
  198. data/webpack/{scenes/ContentViews/components → components}/Loading.js +8 -5
  199. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.js +0 -0
  200. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.scss +0 -0
  201. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.test.js +0 -0
  202. data/webpack/{move_to_pf → components}/LoadingState/__snapshots__/LoadingState.test.js.snap +0 -0
  203. data/webpack/{move_to_pf → components}/LoadingState/index.js +0 -0
  204. data/webpack/components/MultiSelect/index.js +1 -1
  205. data/webpack/{move_to_pf → components}/OptionTooltip/OptionTooltip.scss +0 -0
  206. data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/OptionTooltip.test.js +0 -0
  207. data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/__snapshots__/OptionTooltip.test.js.snap +0 -0
  208. data/webpack/{move_to_pf → components}/OptionTooltip/index.js +0 -0
  209. data/webpack/components/Search/Search.js +124 -0
  210. data/webpack/components/Search/Search.test.js +2 -1
  211. data/webpack/components/Search/__snapshots__/Search.test.js.snap +2 -0
  212. data/webpack/components/Search/__tests__/search.test.js +124 -0
  213. data/webpack/components/Search/index.js +11 -87
  214. data/webpack/{move_to_pf → components}/Select/Select.js +0 -0
  215. data/webpack/components/SelectOrg/SetOrganization.js +2 -2
  216. data/webpack/components/TabWrapper/TabWrapper.js +26 -0
  217. data/webpack/components/TabWrapper/index.js +3 -0
  218. data/webpack/components/TabbedView/TabbedView.js +38 -0
  219. data/webpack/components/TabbedView/TabbedView.scss +3 -0
  220. data/webpack/components/TabbedView/index.js +3 -0
  221. data/webpack/components/Table/EmptyStateMessage.js +61 -0
  222. data/webpack/{scenes/ContentViews/Table/TableWrapper.js → components/Table/MainTable.js} +23 -12
  223. data/webpack/components/Table/TableWrapper.js +94 -0
  224. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.js +0 -0
  225. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.scss +0 -0
  226. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.test.js +0 -0
  227. data/webpack/{move_to_pf → components}/TooltipButton/__snapshots__/TooltipButton.test.js.snap +0 -0
  228. data/webpack/{move_to_pf → components}/TooltipButton/index.js +0 -0
  229. data/webpack/components/TypeAhead/TypeAhead.js +109 -0
  230. data/webpack/{move_to_pf → components}/TypeAhead/TypeAhead.scss +0 -0
  231. data/webpack/components/TypeAhead/helpers/commonPropTypes.js +35 -0
  232. data/webpack/components/TypeAhead/helpers/helpers.js +32 -0
  233. data/webpack/components/TypeAhead/index.js +3 -0
  234. data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadInput.js +3 -6
  235. data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadItems.js +3 -7
  236. data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +52 -0
  237. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +44 -0
  238. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.scss +11 -0
  239. data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +57 -0
  240. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +66 -0
  241. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.scss +5 -0
  242. data/webpack/components/extensions/about/__tests__/SystemStatuses.test.js +1 -1
  243. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.js +0 -0
  244. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.test.js +0 -0
  245. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.js +0 -0
  246. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.test.js +0 -0
  247. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.js +0 -0
  248. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.test.js +0 -0
  249. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.js +0 -0
  250. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.test.js +0 -0
  251. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableFixtures.js +0 -0
  252. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.js +0 -0
  253. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.test.js +0 -0
  254. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.js +0 -0
  255. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.test.js +0 -0
  256. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +0 -0
  257. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/Table.test.js.snap +0 -0
  258. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBody.test.js.snap +0 -0
  259. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBodyMessage.test.js.snap +0 -0
  260. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionCell.test.js.snap +0 -0
  261. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +0 -0
  262. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/index.js +0 -0
  263. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/EntitlementsInlineEditFormatter.js +1 -1
  264. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/EntitlementsInlineEditFormatter.test.js +0 -0
  265. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -0
  266. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/cellFormatter.js +0 -0
  267. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/collapseableAndSelectionCellFormatter.js +0 -0
  268. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/ellipsisCellFormatter.js +0 -0
  269. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/headerFormatter.js +0 -0
  270. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/index.js +0 -0
  271. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionCellFormatter.js +0 -0
  272. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionHeaderCellFormatter.js +0 -0
  273. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/index.js +0 -0
  274. data/webpack/{move_to_pf → components}/react-bootstrap-select/index.js +0 -0
  275. data/webpack/containers/Application/config.js +5 -0
  276. data/webpack/containers/Application/overrides.scss +5 -0
  277. data/webpack/global_test_setup.js +3 -1
  278. data/webpack/redux/OrganizationProducts/OrganizationProductsActions.js +1 -1
  279. data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsActions.test.js +2 -2
  280. data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -1
  281. data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
  282. data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +1 -1
  283. data/webpack/redux/reducers/index.js +2 -0
  284. data/webpack/scenes/AnsibleCollections/AnsibleCollectionsActions.js +1 -1
  285. data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js +1 -1
  286. data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js +1 -1
  287. data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsActions.test.js +2 -2
  288. data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsTable.test.js +1 -1
  289. data/webpack/scenes/ContentViews/ContentViewSelectors.js +1 -2
  290. data/webpack/scenes/ContentViews/ContentViewsActions.js +4 -4
  291. data/webpack/scenes/ContentViews/ContentViewsConstants.js +4 -1
  292. data/webpack/scenes/ContentViews/ContentViewsPage.js +12 -6
  293. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +44 -0
  294. data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +23 -0
  295. data/webpack/scenes/ContentViews/{details → Details}/ContentViewDetailSelectors.js +3 -0
  296. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +70 -0
  297. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +116 -0
  298. data/webpack/scenes/ContentViews/{details → Details}/DetailsContainer.js +8 -4
  299. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +101 -0
  300. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +106 -0
  301. data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +8 -0
  302. data/webpack/scenes/ContentViews/Details/index.js +7 -0
  303. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +51 -36
  304. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +47 -44
  305. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +31 -0
  306. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +2 -1
  307. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +173 -23
  308. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +26 -0
  309. data/webpack/scenes/ContentViews/components/{contentViewName.scss → contentViewIcon.scss} +0 -0
  310. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +1 -1
  311. data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +1 -1
  312. data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsActions.test.js +2 -2
  313. data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +1 -1
  314. data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +1 -1
  315. data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -1
  316. data/webpack/scenes/Organizations/OrganizationSelectors.js +14 -0
  317. data/webpack/scenes/Products/ProductActions.js +1 -1
  318. data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +1 -1
  319. data/webpack/scenes/Settings/SettingsConstants.js +3 -0
  320. data/webpack/scenes/Settings/SettingsReducer.js +33 -0
  321. data/webpack/scenes/Settings/SettingsSelectors.js +4 -0
  322. data/webpack/scenes/Settings/index.js +2 -1
  323. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +1 -1
  324. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +1 -1
  325. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +59 -73
  326. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +15 -0
  327. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +43 -1
  328. data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +8 -0
  329. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +1 -1
  330. data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +78 -0
  331. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +2 -0
  332. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +56 -1
  333. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +114 -0
  334. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +6 -6
  335. data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +36 -0
  336. data/webpack/scenes/Subscriptions/Manifest/index.js +3 -1
  337. data/webpack/scenes/Subscriptions/SubscriptionActions.js +1 -1
  338. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -0
  339. data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
  340. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +38 -11
  341. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +30 -18
  342. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -3
  343. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +1 -1
  344. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +2 -2
  345. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -1
  346. data/webpack/scenes/Subscriptions/__tests__/SubscriptionHelpers.test.js +0 -11
  347. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +2 -2
  348. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +4 -4
  349. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +26 -1
  350. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +2 -2
  351. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +27 -21
  352. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +6 -2
  353. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
  354. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +3 -3
  355. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +1 -1
  356. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +28 -3
  357. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +5 -10
  358. data/webpack/scenes/Subscriptions/index.js +6 -2
  359. data/webpack/test-utils/nockWrapper.js +39 -5
  360. data/webpack/test-utils/react-testing-lib-wrapper.js +35 -9
  361. data/webpack/{move_to_foreman/common → utils}/helpers.js +12 -8
  362. data/webpack/utils/useEventListener.js +37 -0
  363. metadata +143 -83
  364. data/app/lib/actions/katello/repository/verify_checksum.rb +0 -28
  365. data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +0 -22
  366. data/app/lib/actions/pulp3/repository/presenters/repair_presenter.rb +0 -85
  367. data/app/lib/actions/pulp3/repository/repair.rb +0 -29
  368. data/app/services/katello/host_trace_manager.rb +0 -38
  369. data/vendor/assets/stylesheets/katello/jquery.loadmask.css.scss +0 -40
  370. data/vendor/assets/stylesheets/katello/ui.spinner.css.scss +0 -3
  371. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +0 -2
  372. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalSelectors.js +0 -2
  373. data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +0 -4
  374. data/webpack/__mocks__/foremanReact/components/Settings/SettingsActions.js +0 -4
  375. data/webpack/__mocks__/foremanReact/components/Settings/SettingsConstants.js +0 -2
  376. data/webpack/move_to_pf/TypeAhead/TypeAhead.js +0 -138
  377. data/webpack/move_to_pf/TypeAhead/helpers.js +0 -5
  378. data/webpack/scenes/ContentViews/components/ContentViewName.js +0 -33
  379. data/webpack/scenes/ContentViews/components/EmptyStateMessage.js +0 -43
  380. data/webpack/scenes/ContentViews/details/ContentViewDetailActions.js +0 -12
  381. data/webpack/scenes/ContentViews/expansions/RepositoriesExpansion.js +0 -12
@@ -1,11 +1,11 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`manage manifest modal should render 1`] = `
4
- <ForemanModal
4
+ <ConnectedForemanModal
5
5
  id="manageManifestModal"
6
6
  title="Manage Manifest"
7
7
  >
8
- <Uncontrolled(Tabs)
8
+ <ForwardRef
9
9
  id="manifest-history-tabs"
10
10
  >
11
11
  <Tab
@@ -141,8 +141,8 @@ exports[`manage manifest modal should render 1`] = `
141
141
  />
142
142
  </LoadingState>
143
143
  </Tab>
144
- </Uncontrolled(Tabs)>
145
- <mockConstructor>
144
+ </ForwardRef>
145
+ <ForemanModalFooter>
146
146
  <Button
147
147
  active={false}
148
148
  block={false}
@@ -153,6 +153,6 @@ exports[`manage manifest modal should render 1`] = `
153
153
  >
154
154
  Close
155
155
  </Button>
156
- </mockConstructor>
157
- </ForemanModal>
156
+ </ForemanModalFooter>
157
+ </ConnectedForemanModal>
158
158
  `;
@@ -207,3 +207,39 @@ export const deleteManifestFailureActions = [
207
207
  failureAction('DELETE_MANIFEST_FAILURE'),
208
208
  toastErrorAction(),
209
209
  ];
210
+
211
+ export const enableSimpleContentAccessSuccessActions = [
212
+ {
213
+ type: 'ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST',
214
+ },
215
+ {
216
+ response: taskSuccessResponse,
217
+ type: 'ENABLE_SIMPLE_CONTENT_ACCESS_SUCCESS',
218
+ },
219
+ ];
220
+
221
+ export const enableSimpleContentAccessFailureActions = [
222
+ {
223
+ type: 'ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST',
224
+ },
225
+ failureAction('ENABLE_SIMPLE_CONTENT_ACCESS_FAILURE'),
226
+ toastErrorAction(),
227
+ ];
228
+
229
+ export const disableSimpleContentAccessSuccessActions = [
230
+ {
231
+ type: 'DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST',
232
+ },
233
+ {
234
+ response: taskSuccessResponse,
235
+ type: 'DISABLE_SIMPLE_CONTENT_ACCESS_SUCCESS',
236
+ },
237
+ ];
238
+
239
+ export const disableSimpleContentAccessFailureActions = [
240
+ {
241
+ type: 'DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST',
242
+ },
243
+ failureAction('DISABLE_SIMPLE_CONTENT_ACCESS_FAILURE'),
244
+ toastErrorAction(),
245
+ ];
@@ -9,7 +9,7 @@ import * as manifestActions from './ManifestActions';
9
9
  import * as organizationActions from '../../Organizations/OrganizationActions';
10
10
  import * as tasksActions from '../../Tasks/TaskActions';
11
11
  import history from './ManifestHistoryReducer';
12
- import { selectSimpleContentAccessEnabled } from '../../Organizations/OrganizationSelectors';
12
+ import { selectSimpleContentAccessEnabled, selectIsManifestImported } from '../../Organizations/OrganizationSelectors';
13
13
 
14
14
  import ManifestModal from './ManageManifestModal';
15
15
 
@@ -20,8 +20,10 @@ const mapStateToProps = state => ({
20
20
  organization: state.katello.organization,
21
21
  manifestHistory: state.katello.manifestHistory,
22
22
  simpleContentAccess: selectSimpleContentAccessEnabled(state),
23
+ isManifestImported: selectIsManifestImported(state),
23
24
  modalOpenState: state.foremanModals.ManageManifestModal,
24
25
  deleteManifestModalIsOpen: selectIsModalOpen(state, DELETE_MANIFEST_MODAL_ID),
26
+ manifestActionInProgress: state.katello.subscriptions.manifestActionInProgress,
25
27
  });
26
28
 
27
29
  // map action dispatchers to props
@@ -31,7 +31,7 @@ import {
31
31
  MANIFEST_DELETE_TASK_LABEL,
32
32
  } from './SubscriptionConstants';
33
33
  import { selectSubscriptionsQuantitiesFromResponse } from './SubscriptionHelpers.js';
34
- import { apiError } from '../../move_to_foreman/common/helpers.js';
34
+ import { apiError } from '../../utils/helpers.js';
35
35
  import {
36
36
  startPollingTask,
37
37
  stopPollingTask,
@@ -37,6 +37,8 @@ export const SUBSCRIPTIONS_CLOSE_DELETE_MODAL = 'SUBSCRIPTIONS_CLOSE_DELETE_MODA
37
37
  export const SUBSCRIPTIONS_DISABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_DISABLE_DELETE_BUTTON';
38
38
  export const SUBSCRIPTIONS_ENABLE_DELETE_BUTTON = 'SUBSCRIPTIONS_ENABLE_DELETE_BUTTON';
39
39
 
40
+ export const SUBSCRIPTION_WATCH_URL = 'https://cloud.redhat.com/subscriptions/rhel-sw/all';
41
+
40
42
  export const MANIFEST_DELETE_TASK_LABEL = 'Actions::Katello::Organization::ManifestDelete';
41
43
 
42
44
  export const BLOCKING_FOREMAN_TASK_TYPES = [
@@ -47,6 +49,8 @@ export const BLOCKING_FOREMAN_TASK_TYPES = [
47
49
  'Actions::Katello::UpstreamSubscriptions::UpdateEntitlement',
48
50
  'Actions::Katello::UpstreamSubscriptions::RemoveEntitlements',
49
51
  'Actions::Katello::UpstreamSubscriptions::UpdateEntitlements',
52
+ 'Actions::Katello::Organization::SimpleContentAccess::Enable',
53
+ 'Actions::Katello::Organization::SimpleContentAccess::Disable',
50
54
  ];
51
55
 
52
56
  export const SUBSCRIPTION_TABLE_NAME = 'Katello::Subscriptions';
@@ -3,9 +3,6 @@ export const filterRHSubscriptions = subscriptions =>
3
3
  subscriptions.filter(sub =>
4
4
  sub.available >= 0 && sub.upstream_pool_id);
5
5
 
6
- export const manifestExists = organization =>
7
- organization.owner_details && organization.owner_details.upstreamConsumer;
8
-
9
6
  export const selectSubscriptionsQuantitiesFromResponse = ({ results }) => {
10
7
  const quantityMap = {};
11
8
 
@@ -1,6 +1,5 @@
1
1
  import Immutable from 'seamless-immutable';
2
2
  import { get } from 'lodash';
3
- import { GET_SETTING_SUCCESS } from 'foremanReact/components/Settings/SettingsConstants';
4
3
  import { initialApiState } from '../../services/api';
5
4
 
6
5
  import {
@@ -30,6 +29,18 @@ import {
30
29
  DELETE_MANIFEST_SUCCESS,
31
30
  UPLOAD_MANIFEST_SUCCESS,
32
31
  REFRESH_MANIFEST_SUCCESS,
32
+ REFRESH_MANIFEST_FAILURE,
33
+ ENABLE_SIMPLE_CONTENT_ACCESS_FAILURE,
34
+ DISABLE_SIMPLE_CONTENT_ACCESS_FAILURE,
35
+ REFRESH_MANIFEST_REQUEST,
36
+ DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST,
37
+ ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST,
38
+ ENABLE_SIMPLE_CONTENT_ACCESS_SUCCESS,
39
+ DISABLE_SIMPLE_CONTENT_ACCESS_SUCCESS,
40
+ UPLOAD_MANIFEST_FAILURE,
41
+ UPLOAD_MANIFEST_REQUEST,
42
+ DELETE_MANIFEST_FAILURE,
43
+ DELETE_MANIFEST_REQUEST,
33
44
  } from './Manifest/ManifestConstants';
34
45
 
35
46
  import {
@@ -48,6 +59,7 @@ const initialState = Immutable({
48
59
  tableColumns: [],
49
60
  selectedTableColumns: [],
50
61
  hasUpstreamConnection: false,
62
+ manifestActionInProgress: false,
51
63
  });
52
64
 
53
65
  export default (state = initialState, action) => {
@@ -142,15 +154,38 @@ export default (state = initialState, action) => {
142
154
  return state.merge({
143
155
  task: action.response,
144
156
  hasUpstreamConnection: false,
157
+ manifestActionInProgress: false,
145
158
  });
146
159
 
147
- case UPLOAD_MANIFEST_SUCCESS:
148
- case REFRESH_MANIFEST_SUCCESS:
149
160
  case UPDATE_QUANTITY_SUCCESS:
150
161
  case SUBSCRIPTIONS_POLL_TASK_SUCCESS:
151
162
  return state
152
163
  .set('task', action.response);
153
164
 
165
+ case UPLOAD_MANIFEST_SUCCESS:
166
+ case REFRESH_MANIFEST_SUCCESS:
167
+ case ENABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
168
+ case DISABLE_SIMPLE_CONTENT_ACCESS_SUCCESS:
169
+ return state
170
+ .set('task', action.response)
171
+ .set('manifestActionInProgress', false);
172
+
173
+ case ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
174
+ case DISABLE_SIMPLE_CONTENT_ACCESS_REQUEST:
175
+ case REFRESH_MANIFEST_REQUEST:
176
+ case UPLOAD_MANIFEST_REQUEST:
177
+ case DELETE_MANIFEST_REQUEST:
178
+ return state
179
+ .set('manifestActionInProgress', true);
180
+
181
+ case ENABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
182
+ case DISABLE_SIMPLE_CONTENT_ACCESS_FAILURE:
183
+ case REFRESH_MANIFEST_FAILURE:
184
+ case UPLOAD_MANIFEST_FAILURE:
185
+ case DELETE_MANIFEST_FAILURE:
186
+ return state
187
+ .set('manifestActionInProgress', false);
188
+
154
189
  case DELETE_SUBSCRIPTIONS_SUCCESS:
155
190
  return state
156
191
  .set('task', action.response)
@@ -162,14 +197,6 @@ export default (state = initialState, action) => {
162
197
  return state
163
198
  .set('task', null);
164
199
 
165
- case GET_SETTING_SUCCESS: {
166
- if (action.response.name === 'content_disconnected') {
167
- return state.set('disconnected', action.response.value);
168
- }
169
-
170
- return state;
171
- }
172
-
173
200
  case SUBSCRIPTIONS_UPDATE_SEARCH_QUERY:
174
201
  return state.set('searchQuery', action.payload);
175
202
 
@@ -11,13 +11,12 @@ import ManageManifestModal from './Manifest/';
11
11
  import { MANAGE_MANIFEST_MODAL_ID } from './Manifest/ManifestConstants';
12
12
  import { SubscriptionsTable } from './components/SubscriptionsTable';
13
13
  import SubscriptionsToolbar from './components/SubscriptionsToolbar';
14
- import { filterRHSubscriptions, manifestExists } from './SubscriptionHelpers';
14
+ import { filterRHSubscriptions } from './SubscriptionHelpers';
15
15
  import api, { orgId } from '../../services/api';
16
+ import { CONTENT_DISCONNECTED } from '../Settings/SettingsConstants';
16
17
 
17
18
  import { createSubscriptionParams } from './SubscriptionActions.js';
18
- import {
19
- SUBSCRIPTION_TABLE_NAME,
20
- } from './SubscriptionConstants';
19
+ import { SUBSCRIPTION_TABLE_NAME, SUBSCRIPTION_WATCH_URL } from './SubscriptionConstants';
21
20
  import './SubscriptionsPage.scss';
22
21
 
23
22
  class SubscriptionsPage extends Component {
@@ -47,12 +46,14 @@ class SubscriptionsPage extends Component {
47
46
  hasUpstreamConnection,
48
47
  loadAvailableQuantities,
49
48
  organization,
49
+ isManifestImported,
50
50
  pingUpstreamSubscriptions,
51
+ settings,
51
52
  subscriptions,
52
53
  task,
53
54
  } = this.props;
54
55
 
55
- const { disconnected } = subscriptions;
56
+ const { disconnected } = settings;
56
57
 
57
58
  if (task) {
58
59
  if (isPollingTask) {
@@ -69,8 +70,8 @@ class SubscriptionsPage extends Component {
69
70
  this.loadData();
70
71
  }
71
72
 
72
- if (disconnected === false && disconnected !== prevProps.subscriptions.disconnected) {
73
- if (manifestExists(organization)) {
73
+ if (disconnected === false && disconnected !== prevProps.settings.disconnected) {
74
+ if (isManifestImported) {
74
75
  pingUpstreamSubscriptions();
75
76
  this.state.availableQuantitiesLoaded = false;
76
77
  }
@@ -97,10 +98,10 @@ class SubscriptionsPage extends Component {
97
98
  const {
98
99
  hasUpstreamConnection,
99
100
  task,
100
- subscriptions,
101
- organization,
101
+ settings,
102
+ isManifestImported,
102
103
  } = this.props;
103
- const { disconnected } = subscriptions;
104
+ const { disconnected } = settings;
104
105
  let disabledReason = null;
105
106
 
106
107
  if (disconnected) {
@@ -109,7 +110,7 @@ class SubscriptionsPage extends Component {
109
110
  disabledReason = __('This is disabled because a manifest related task is in progress.');
110
111
  } else if (deleteButton && !disabledReason) {
111
112
  disabledReason = __('This is disabled because no subscriptions are selected.');
112
- } else if (!manifestExists(organization)) {
113
+ } else if (!isManifestImported) {
113
114
  disabledReason = __('This is disabled because no manifest has been uploaded.');
114
115
  } else if (!hasUpstreamConnection) {
115
116
  disabledReason = __('This is disabled because no connection could be made to the upstream Subscription Allocation.');
@@ -133,7 +134,7 @@ class SubscriptionsPage extends Component {
133
134
  } = this.props;
134
135
 
135
136
  pollTasks();
136
- loadSetting('content_disconnected');
137
+ loadSetting(CONTENT_DISCONNECTED);
137
138
  loadSubscriptions();
138
139
  await loadTables();
139
140
  loadTableColumns(subscriptionTableSettings);
@@ -144,8 +145,8 @@ class SubscriptionsPage extends Component {
144
145
  const {
145
146
  deleteModalOpened, openDeleteModal, closeDeleteModal,
146
147
  deleteButtonDisabled, disableDeleteButton, enableDeleteButton,
147
- searchQuery, updateSearchQuery, simpleContentAccess, hasUpstreamConnection,
148
- task, activePermissions, subscriptions, subscriptionTableSettings,
148
+ searchQuery, updateSearchQuery, simpleContentAccess, settings, hasUpstreamConnection,
149
+ task, activePermissions, subscriptions, subscriptionTableSettings, isManifestImported,
149
150
  } = this.props;
150
151
  // Basic permissions - should we even show this page?
151
152
  if (subscriptions.missingPermissions && subscriptions.missingPermissions.length > 0) {
@@ -159,7 +160,7 @@ class SubscriptionsPage extends Component {
159
160
  canImportManifest,
160
161
  canEditOrganizations,
161
162
  } = permissions;
162
- const { disconnected } = subscriptions;
163
+ const { disconnected } = settings;
163
164
  const disableManifestActions = !!task || disconnected || !hasUpstreamConnection;
164
165
 
165
166
  const openManageManifestModal = () => this.props.setModalOpen({ id: MANAGE_MANIFEST_MODAL_ID });
@@ -233,6 +234,7 @@ class SubscriptionsPage extends Component {
233
234
 
234
235
  <SubscriptionsToolbar
235
236
  canManageSubscriptionAllocations={canManageSubscriptionAllocations}
237
+ isManifestImported={isManifestImported}
236
238
  disableManifestActions={disableManifestActions}
237
239
  disableManifestReason={this.getDisabledReason()}
238
240
  disableDeleteButton={deleteButtonDisabled}
@@ -259,14 +261,17 @@ class SubscriptionsPage extends Component {
259
261
  upload={this.props.uploadManifest}
260
262
  delete={this.props.deleteManifest}
261
263
  refresh={this.props.refreshManifest}
264
+ key={task?.id}
262
265
  />
263
266
 
264
267
  <div id="subscriptions-table" className="modal-container">
265
268
  {simpleContentAccess && (
266
269
  <Alert type="info">
267
- This organization has Simple Content Access enabled. <br />
270
+ This organization has Simple Content Access enabled.
268
271
  Hosts can consume from all repositories in their Content View regardless of
269
- subscription status.
272
+ subscription status. <br />
273
+ Learn more about your overall subscription usage at
274
+ {' '}<a href={SUBSCRIPTION_WATCH_URL} target="_blank" rel="noreferrer">Subscription Watch</a>.
270
275
  </Alert>
271
276
  )}
272
277
  <SubscriptionsTable
@@ -309,8 +314,11 @@ SubscriptionsPage.propTypes = {
309
314
  updateQuantity: PropTypes.func.isRequired,
310
315
  loadTableColumns: PropTypes.func.isRequired,
311
316
  simpleContentAccess: PropTypes.bool,
312
- subscriptions: PropTypes.shape({
317
+ isManifestImported: PropTypes.bool,
318
+ settings: PropTypes.shape({
313
319
  disconnected: PropTypes.bool,
320
+ }),
321
+ subscriptions: PropTypes.shape({
314
322
  // Disabling rule as existing code failed due to an eslint-plugin-react update
315
323
  /* eslint-disable react/forbid-prop-types */
316
324
  tableColumns: PropTypes.array,
@@ -376,11 +384,15 @@ SubscriptionsPage.defaultProps = {
376
384
  deleteButtonDisabled: true,
377
385
  subscriptionTableSettings: {},
378
386
  simpleContentAccess: false,
387
+ isManifestImported: false,
379
388
  hasUpstreamConnection: false,
380
389
  activePermissions: {
381
390
  can_import_manifest: false,
382
391
  can_manage_subscription_allocations: false,
383
392
  },
393
+ settings: {
394
+ disconnected: true,
395
+ },
384
396
  };
385
397
 
386
398
  export default SubscriptionsPage;
@@ -24,8 +24,5 @@ export const selectIsTaskPending = (state) => {
24
24
  return false;
25
25
  };
26
26
 
27
- export const selectTableSettings = (state, tableName) =>
28
- state.katello.settings.tables[tableName] || undefined;
29
-
30
27
  export const selectHasUpstreamConnection = state =>
31
28
  selectSubscriptionsState(state).hasUpstreamConnection;
@@ -1,7 +1,7 @@
1
1
  import { propsToSnakeCase } from 'foremanReact/common/helpers';
2
2
 
3
3
  import api, { orgId } from '../../../services/api';
4
- import { apiError } from '../../../move_to_foreman/common/helpers.js';
4
+ import { apiError } from '../../../utils/helpers.js';
5
5
 
6
6
  import {
7
7
  UPSTREAM_SUBSCRIPTIONS_REQUEST,
@@ -8,8 +8,8 @@ import BreadcrumbsBar from 'foremanReact/components/BreadcrumbBar';
8
8
  import { Button } from 'patternfly-react';
9
9
  import { stringIsPositiveNumber } from 'foremanReact/common/helpers';
10
10
  import { urlBuilder } from 'foremanReact/common/urlHelpers';
11
- import { LoadingState } from '../../../move_to_pf/LoadingState';
12
- import { Table } from '../../../move_to_foreman/components/common/table';
11
+ import { LoadingState } from '../../../components/LoadingState';
12
+ import { Table } from '../../../components/pf3Table';
13
13
  import { columns } from './UpstreamSubscriptionsTableSchema';
14
14
 
15
15
  class UpstreamSubscriptionsPage extends Component {
@@ -4,7 +4,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
4
4
  import {
5
5
  headerFormatter,
6
6
  cellFormatter,
7
- } from '../../../move_to_foreman/components/common/table';
7
+ } from '../../../components/pf3Table';
8
8
 
9
9
  export const columns = controller => [
10
10
  {
@@ -4,7 +4,6 @@ import {
4
4
  } from './subscriptions.fixtures';
5
5
  import {
6
6
  filterRHSubscriptions,
7
- manifestExists,
8
7
  selectSubscriptionsQuantitiesFromResponse,
9
8
  } from '../SubscriptionHelpers';
10
9
 
@@ -65,16 +64,6 @@ describe('Subscription helper', () => {
65
64
  expect(filteredSubscriptions).toMatchSnapshot();
66
65
  });
67
66
 
68
- it('should check if manifest exists in an organization', () => {
69
- const upstreamConsumer = 'some-upstream-consumer';
70
-
71
- expect(manifestExists({
72
- owner_details: { upstreamConsumer },
73
- })).toBe(upstreamConsumer);
74
-
75
- expect(manifestExists({})).toBeFalsy();
76
- });
77
-
78
67
  it('should select subscriptions-quantities from api response', () => {
79
68
  const quantities =
80
69
  selectSubscriptionsQuantitiesFromResponse(quantitiesRequestSuccessResponse);
@@ -63,7 +63,7 @@ Array [
63
63
  "payload": Object {
64
64
  "key": "SUBSCRIPTIONS_TASK_SEARCH",
65
65
  "params": Object {
66
- "search": "organization_id=1 and result=pending and label=Actions::Katello::Organization::ManifestImport or Actions::Katello::Organization::ManifestRefresh or Actions::Katello::Organization::ManifestDelete or Actions::Katello::UpstreamSubscriptions::BindEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlement or Actions::Katello::UpstreamSubscriptions::RemoveEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlements",
66
+ "search": "organization_id=1 and result=pending and label=Actions::Katello::Organization::ManifestImport or Actions::Katello::Organization::ManifestRefresh or Actions::Katello::Organization::ManifestDelete or Actions::Katello::UpstreamSubscriptions::BindEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlement or Actions::Katello::UpstreamSubscriptions::RemoveEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlements or Actions::Katello::Organization::SimpleContentAccess::Enable or Actions::Katello::Organization::SimpleContentAccess::Disable",
67
67
  },
68
68
  "url": "/foreman_tasks/api/tasks",
69
69
  },
@@ -98,7 +98,7 @@ Object {
98
98
  "payload": Object {
99
99
  "key": "SUBSCRIPTIONS_TASK_SEARCH",
100
100
  "params": Object {
101
- "search": "organization_id=1 and result=pending and label=Actions::Katello::Organization::ManifestImport or Actions::Katello::Organization::ManifestRefresh or Actions::Katello::Organization::ManifestDelete or Actions::Katello::UpstreamSubscriptions::BindEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlement or Actions::Katello::UpstreamSubscriptions::RemoveEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlements",
101
+ "search": "organization_id=1 and result=pending and label=Actions::Katello::Organization::ManifestImport or Actions::Katello::Organization::ManifestRefresh or Actions::Katello::Organization::ManifestDelete or Actions::Katello::UpstreamSubscriptions::BindEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlement or Actions::Katello::UpstreamSubscriptions::RemoveEntitlements or Actions::Katello::UpstreamSubscriptions::UpdateEntitlements or Actions::Katello::Organization::SimpleContentAccess::Enable or Actions::Katello::Organization::SimpleContentAccess::Disable",
102
102
  },
103
103
  "url": "/foreman_tasks/api/tasks",
104
104
  },
@@ -40,11 +40,11 @@ exports[`subscriptions page should render 1`] = `
40
40
  canManageSubscriptionAllocations={false}
41
41
  disableAddButton={true}
42
42
  disableDeleteButton={true}
43
- disableDeleteReason="This is disabled because no subscriptions are selected."
43
+ disableDeleteReason="This is disabled because disconnected mode is enabled."
44
44
  disableManifestActions={true}
45
- disableManifestReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
45
+ disableManifestReason="This is disabled because disconnected mode is enabled."
46
46
  getAutoCompleteParams={[Function]}
47
- initialInputValue=""
47
+ isManifestImported={false}
48
48
  onDeleteButtonClick={[Function]}
49
49
  onExportCsvButtonClick={[Function]}
50
50
  onManageManifestButtonClick={[Function]}
@@ -58,7 +58,7 @@ exports[`subscriptions page should render 1`] = `
58
58
  canImportManifest={false}
59
59
  delete={[Function]}
60
60
  disableManifestActions={true}
61
- disabledReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
61
+ disabledReason="This is disabled because disconnected mode is enabled."
62
62
  refresh={[Function]}
63
63
  taskInProgress={false}
64
64
  upload={[Function]}