katello 3.16.2 → 3.17.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -6,7 +6,7 @@ class AddHostContentViewEnvironment < ActiveRecord::Migration[4.2]
6
6
  add_column :hostgroups, :content_view_id, :integer, :null => true
7
7
  add_column :hostgroups, :lifecycle_environment_id, :integer, :null => true
8
8
 
9
- [Hostgroup, Host::Managed].each do |model|
9
+ [::Hostgroup, Host::Managed].each do |model|
10
10
  model.find_each do |host|
11
11
  lifecycle_environment = host.environment.try(:lifecycle_environment)
12
12
  content_view = host.environment.try(:content_view)
@@ -0,0 +1,16 @@
1
+ class CreateHostgroupContentFacet < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :katello_hostgroup_content_facets do |t|
4
+ t.column :hostgroup_id, :integer, :null => false
5
+ t.column :kickstart_repository_id, :integer, :null => true
6
+ t.column :content_source_id, :integer, :null => true
7
+ t.column :content_view_id, :integer, :null => true
8
+ t.column :lifecycle_environment_id, :integer, :null => true
9
+ end
10
+ add_foreign_key :katello_hostgroup_content_facets, :katello_repositories, :column => :kickstart_repository_id
11
+ add_foreign_key :katello_hostgroup_content_facets, :hostgroups, :column => :hostgroup_id
12
+ add_foreign_key :katello_hostgroup_content_facets, :katello_content_views, :column => :content_view_id
13
+ add_foreign_key :katello_hostgroup_content_facets, :smart_proxies, :name => "katello_hostgroup_content_facets_content_source_id_fk", :column => "content_source_id"
14
+ add_foreign_key :katello_hostgroup_content_facets, :katello_environments, :column => :lifecycle_environment_id
15
+ end
16
+ end
@@ -0,0 +1,53 @@
1
+ class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
2
+ def up
3
+ if User.where(login: User::ANONYMOUS_ADMIN).exists?
4
+ User.as_anonymous_admin do
5
+ copy_data_from_hostgroup
6
+ end
7
+ end
8
+
9
+ change_table :hostgroups do |table|
10
+ table.remove(
11
+ :content_source_id,
12
+ :kickstart_repository_id,
13
+ :content_view_id,
14
+ :lifecycle_environment_id
15
+ )
16
+ end
17
+ end
18
+
19
+ def down
20
+ change_table :hostgroups do |t|
21
+ t.column :kickstart_repository_id, :integer, :null => true
22
+ t.column :content_source_id, :integer, :null => true
23
+ t.column :content_view_id, :integer, :null => true
24
+ t.column :lifecycle_environment_id, :integer, :null => true
25
+ end
26
+ end
27
+
28
+ def copy_data_from_hostgroup
29
+ hg_table = ::Hostgroup.arel_table
30
+ hostgroups = ::Hostgroup.unscoped.where(
31
+ hg_table[:content_source_id].eq(nil)
32
+ .and(hg_table[:kickstart_repository_id].eq(nil))
33
+ .and(hg_table[:content_view_id].eq(nil))
34
+ .and(hg_table[:lifecycle_environment_id].eq(nil))
35
+ .not)
36
+ hostgroups.in_batches do |batch|
37
+ batch.pluck(
38
+ :id,
39
+ :content_source_id,
40
+ :kickstart_repository_id,
41
+ :content_view_id,
42
+ :lifecycle_environment_id
43
+ ).each do |hostgroup_id, content_source_id, kickstart_repository_id, content_view_id, lifecycle_environment_id|
44
+ content_facet = ::Katello::Hostgroup::ContentFacet.find_or_create_by(hostgroup_id: hostgroup_id)
45
+ content_facet.content_source_id = content_source_id
46
+ content_facet.kickstart_repository_id = kickstart_repository_id
47
+ content_facet.content_view_id = content_view_id
48
+ content_facet.lifecycle_environment_id = lifecycle_environment_id
49
+ content_facet.save!
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,9 @@
1
+ class RemoveAuditsOfRootRepoWithContentId < ActiveRecord::Migration[6.0]
2
+ def change
3
+ audit_records = Audit.where(
4
+ :auditable_type => 'Katello::RootRepository',
5
+ :action => 'update')
6
+ audit_records = audit_records.reject { |ar| ar.audited_changes['content_id'].nil? }
7
+ audit_records.map(&:destroy!)
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddAutoEnabledToRootRepository < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_root_repositories, :auto_enabled, :boolean, default: true
4
+ end
5
+ end
@@ -7,9 +7,9 @@ if Katello.with_remote_execution?
7
7
  sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
8
8
  # import! was renamed to import_raw! around 1.3.1
9
9
  if JobTemplate.respond_to?('import_raw!')
10
- template = JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
10
+ template = JobTemplate.import_raw!(File.read(template), :default => true, :lock => true, :update => sync)
11
11
  else
12
- template = JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
12
+ template = JobTemplate.import!(File.read(template), :default => true, :lock => true, :update => sync)
13
13
  end
14
14
 
15
15
  template.organizations << Organization.unscoped.all if template&.organizations&.empty?
@@ -295,12 +295,14 @@ angular.module('Bastion.components').factory('Nutupane',
295
295
  },
296
296
  excluded: {
297
297
  ids: []
298
- }
298
+ },
299
+ allResultsSelected: false
299
300
  };
300
301
 
301
302
  if (self.table.allResultsSelected) {
302
303
  selected.included.search = self.table.searchTerm || '';
303
304
  selected.excluded.ids = _.map(self.getDeselected(), identifier);
305
+ selected.allResultsSelected = true;
304
306
  } else {
305
307
  selectedRows = self.table.getSelected();
306
308
  selected.included.ids = _.map(selectedRows, identifier);
@@ -9,13 +9,14 @@
9
9
  * @requires ActivationKey
10
10
  * @requires ContentHostsHelper
11
11
  * @requires CurrentOrganization
12
+ * @requires simpleContentAccessEnabled
12
13
  *
13
14
  * @description
14
15
  * Provides the functionality for activation key associations.
15
16
  */
16
17
  angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsController',
17
- ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization', 'Host',
18
- function ($scope, $location, translate, Nutupane, ActivationKey, ContentHostsHelper, CurrentOrganization, Host) {
18
+ ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization', 'Host', 'simpleContentAccessEnabled',
19
+ function ($scope, $location, translate, Nutupane, ActivationKey, ContentHostsHelper, CurrentOrganization, Host, simpleContentAccessEnabled) {
19
20
  var contentHostsNutupane, nutupaneParams, params = {
20
21
  'organization_id': CurrentOrganization,
21
22
  'search': $location.search().search || "",
@@ -59,5 +60,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsC
59
60
  $scope.getHostStatusIcon = ContentHostsHelper.getHostStatusIcon;
60
61
 
61
62
  $scope.memory = ContentHostsHelper.memory;
63
+
64
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
62
65
  }]
63
66
  );
@@ -11,17 +11,19 @@
11
11
  * @requires Organization
12
12
  * @requires Notification
13
13
  * @requires ApiErrorHandler
14
+ * @requires simpleContentAccessEnabled
14
15
  *
15
16
  * @description
16
17
  * Provides the functionality for the activation key details action pane.
17
18
  */
18
19
  angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsController',
19
- ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'Notification', 'ApiErrorHandler',
20
- function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler) {
20
+ ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'Notification', 'ApiErrorHandler', 'simpleContentAccessEnabled',
21
+ function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler, simpleContentAccessEnabled) {
21
22
  $scope.defaultRoles = ['Red Hat Enterprise Linux Server', 'Red Hat Enterprise Linux Workstation', 'Red Hat Enterprise Linux Compute Node'];
22
23
  $scope.defaultUsages = ['Production', 'Development/Test', 'Disaster Recovery'];
23
24
 
24
25
  $scope.purposeAddonsCount = 0;
26
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
25
27
 
26
28
  $scope.organization = Organization.get({id: CurrentOrganization}, function(org) {
27
29
  $scope.purposeAddonsCount += org.system_purposes.addons.length;
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
 
15
15
  <span data-block="no-rows-message" translate>
16
- You currently don't have any Products to subscribe to, you can add Products after selecting 'Products' under 'Content' in the main menu
16
+ You currently don't have any Products to subscribe to. You can add Products after selecting 'Products' under 'Content' in the main menu.
17
17
  </span>
18
18
 
19
19
  <span data-block="no-search-results-message" translate>
@@ -14,7 +14,7 @@
14
14
  <thead>
15
15
  <tr bst-table-head>
16
16
  <th bst-table-column="name" sortable><span translate>Name</span></th>
17
- <th bst-table-column="status" translate>
17
+ <th bst-table-column="status" ng-if="!simpleContentAccessEnabled" translate>
18
18
  Subscription Status
19
19
  </th>
20
20
  <th bst-table-column="environment" sortable><span translate>Environment</span></th>
@@ -32,7 +32,7 @@
32
32
  {{ host.name }}
33
33
  </a>
34
34
  </td>
35
- <td bst-table-cell>
35
+ <td bst-table-cell ng-if="!simpleContentAccessEnabled">
36
36
  <span ng-class="getHostStatusIcon(host.subscription_global_status)">
37
37
  </span>
38
38
  </td>
@@ -40,7 +40,7 @@
40
40
  </span>
41
41
  </a>
42
42
  </li>
43
- <li ng-class="{active: stateIncludes('activation-key.subscriptions')}">
43
+ <li ng-class="{active: stateIncludes('activation-key.subscriptions')}" ng-hide="simpleContentAccessEnabled">
44
44
  <a ui-sref="activation-key.subscriptions.list">
45
45
  <span translate>
46
46
  Subscriptions
@@ -57,12 +57,15 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
57
57
  $scope.initialLoad = true;
58
58
  $scope.remoteExecutionPresent = BastionConfig.remoteExecutionPresent;
59
59
  $scope.remoteExecutionByDefault = BastionConfig.remoteExecutionByDefault;
60
+ $scope.allHostsSelected = hostIds.allResultsSelected;
60
61
 
61
62
  $scope.errataActionFormValues = {
62
63
  authenticityToken: $window.AUTH_TOKEN.replace(/&quot;/g, '')
63
64
  };
64
65
 
65
- if (hostIds.included.ids) {
66
+ if ($scope.allHostsSelected) {
67
+ $scope.errataActionFormValues.scopedSearch = hostIds.included.search;
68
+ } else if (hostIds.included.ids.length > 0) {
66
69
  $scope.errataActionFormValues.hostIds = hostIds.included.ids.join(',');
67
70
  }
68
71
 
@@ -119,6 +119,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkPackagesModa
119
119
 
120
120
  $scope.content.confirm = false;
121
121
  $scope.packageActionFormValues.customize = customize;
122
+ $scope.allHostsSelected = selectedHosts.allResultsSelected;
122
123
 
123
124
  if (!action) {
124
125
  action = $scope.content.action;
@@ -134,7 +135,9 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkPackagesModa
134
135
  $scope.packageActionFormValues.remoteAction = 'package_' + action;
135
136
  }
136
137
 
137
- if (selectedHosts.included.ids) {
138
+ if ($scope.allHostsSelected) {
139
+ $scope.packageActionFormValues.scopedSearch = selectedHosts.included.search;
140
+ } else if (selectedHosts.included.ids.length > 0) {
138
141
  $scope.packageActionFormValues.hostIds = selectedHosts.included.ids.join(',');
139
142
  }
140
143
 
@@ -30,6 +30,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscription
30
30
  function getBulkSubscriptionParams() {
31
31
  var bulkParams = hostIds;
32
32
  bulkParams.subscriptions = SubscriptionsHelper.getSelectedSubscriptionAmounts($scope.table);
33
+ bulkParams['organization_id'] = CurrentOrganization; // eslint-disable-line camelcase
33
34
  return bulkParams;
34
35
  }
35
36
 
@@ -9,6 +9,7 @@
9
9
  * @requires Nutupane
10
10
  * @requires BastionConfig
11
11
  * @requires hostIds
12
+ * @requires HostTracesResolve
12
13
  * @required ContentHostsHelper
13
14
  * @requires translate
14
15
  *
@@ -17,8 +18,8 @@
17
18
  */
18
19
  /*jshint camelcase:false*/
19
20
  angular.module('Bastion.content-hosts').controller('ContentHostsBulkTracesController',
20
- ['$scope', '$uibModalInstance', 'HostBulkAction', 'Notification', 'Nutupane', 'BastionConfig', 'hostIds', 'ContentHostsHelper', 'translate',
21
- function ($scope, $uibModalInstance, HostBulkAction, Notification, Nutupane, BastionConfig, hostIds, ContentHostsHelper, translate) {
21
+ ['$scope', '$uibModalInstance', 'HostBulkAction', 'Notification', 'Nutupane', 'BastionConfig', 'hostIds', 'HostTracesResolve', 'ContentHostsHelper', 'translate',
22
+ function ($scope, $uibModalInstance, HostBulkAction, Notification, Nutupane, BastionConfig, hostIds, HostTracesResolve, ContentHostsHelper, translate) {
22
23
 
23
24
  var tracesNutupane = new Nutupane(HostBulkAction, hostIds, 'traces');
24
25
  tracesNutupane.enableSelectAllResults();
@@ -45,7 +46,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkTracesContro
45
46
  });
46
47
  };
47
48
  /* eslint-disable camelcase */
48
- HostBulkAction.resolveTraces({trace_ids: traceids}, onSuccess, onFailure);
49
+ HostTracesResolve.resolve({trace_ids: traceids}, onSuccess, onFailure);
49
50
  /* eslint-enable camelcase */
50
51
  };
51
52
 
@@ -3,7 +3,6 @@
3
3
 
4
4
  <div data-block="modal-body">
5
5
  <h4 translate>Assign Lifecycle Environment and Content View</h4>
6
-
7
6
  <div class="row">
8
7
  <div class="col-sm-12">
9
8
  <div bst-global-notification></div>
@@ -56,6 +55,13 @@
56
55
  </button>
57
56
 
58
57
  </form>
58
+ <div class="help-block" style="text-align:left;">
59
+ <p translate>
60
+ Changing the Content View will not affect the Content Hosts until their next checkin.
61
+ To update the Content Hosts immediately run the following command:
62
+ </p>
63
+ <code># subscription-manager refresh</code>
64
+ </div>
59
65
  </div>
60
66
 
61
67
  <div data-block="modal-footer">
@@ -8,6 +8,7 @@
8
8
  <input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
9
9
  <input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
10
10
  <input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
11
+ <input type="hidden" ng-if="allHostsSelected" name="scoped_search" ng-value="errataActionFormValues.scopedSearch"/>
11
12
  </form>
12
13
 
13
14
  <div bst-alert="info" ng-show="showConfirm">
@@ -38,6 +38,7 @@
38
38
  <input type="hidden" name="host_ids" ng-value="packageActionFormValues.hostIds"/>
39
39
  <input type="hidden" name="authenticity_token" ng-value="packageActionFormValues.authenticityToken"/>
40
40
  <input type="hidden" name="customize" ng-value="packageActionFormValues.customize"/>
41
+ <input type="hidden" ng-if="allHostsSelected" name="scoped_search" ng-value="packageActionFormValues.scopedSearch"/>
41
42
  </form>
42
43
 
43
44
  <div ng-form name="systemContentForm" class="form" ng-hide="content.workingMode || denied('edit_hosts')" novalidate>
@@ -13,6 +13,7 @@
13
13
  * @requires Notification
14
14
  * @requires CurrentOrganization
15
15
  * @requires ContentHostsHelper
16
+ * @requires simpleContentAccessEnabled
16
17
  *
17
18
  * @description
18
19
  * Provides the functionality specific to Content Hosts for use with the Nutupane UI pattern.
@@ -20,8 +21,8 @@
20
21
  * within the table.
21
22
  */
22
23
  angular.module('Bastion.content-hosts').controller('ContentHostsController',
23
- ['$scope', '$q', '$state', '$location', '$uibModal', 'translate', 'Nutupane', 'Host', 'HostBulkAction', 'Notification', 'CurrentOrganization', 'ContentHostsHelper', 'ContentHostsModalHelper', '$httpParamSerializer',
24
- function ($scope, $q, $state, $location, $uibModal, translate, Nutupane, Host, HostBulkAction, Notification, CurrentOrganization, ContentHostsHelper, ContentHostsModalHelper, $httpParamSerializer) {
24
+ ['$scope', '$q', '$state', '$location', '$uibModal', 'translate', 'Nutupane', 'Host', 'HostBulkAction', 'Notification', 'CurrentOrganization', 'ContentHostsHelper', 'ContentHostsModalHelper', '$httpParamSerializer', 'simpleContentAccessEnabled',
25
+ function ($scope, $q, $state, $location, $uibModal, translate, Nutupane, Host, HostBulkAction, Notification, CurrentOrganization, ContentHostsHelper, ContentHostsModalHelper, $httpParamSerializer, simpleContentAccessEnabled) {
25
26
  var nutupane, params, query;
26
27
 
27
28
  if ($location.search().search) {
@@ -47,6 +48,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
47
48
 
48
49
  $scope.table = nutupane.table;
49
50
  $scope.nutupane = nutupane;
51
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
50
52
 
51
53
  // @TODO begin hack necessary because of foreman API bug http://projects.theforeman.org/issues/13877
52
54
  $scope.table.sortBy = function (column) {
@@ -134,7 +134,7 @@ angular.module('Bastion.content-hosts').config(['$stateProvider', function ($sta
134
134
  controller: 'ContentHostAddSubscriptionsController',
135
135
  templateUrl: 'content-hosts/details/views/content-host-add-subscriptions.html',
136
136
  ncyBreadcrumb: {
137
- label: "{{ 'Add Subscriptipons' | translate }}",
137
+ label: "{{ 'Add Subscriptions' | translate }}",
138
138
  parent: 'content-host.info'
139
139
  }
140
140
  });
@@ -42,6 +42,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
42
42
  });
43
43
 
44
44
  $scope.showVersionAlert = false;
45
+ $scope.showCVAlert = false;
45
46
  $scope.editContentView = false;
46
47
  $scope.disableEnvironmentSelection = false;
47
48
  $scope.environments = [];
@@ -62,6 +63,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
62
63
  };
63
64
 
64
65
  $scope.cancelContentViewUpdate = function () {
66
+ $scope.showCVAlert = false;
65
67
  if ($scope.editContentView) {
66
68
  $scope.editContentView = false;
67
69
  $scope.host.content_facet_attributes['lifecycle_environment'] = $scope.originalEnvironment;
@@ -76,6 +78,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
76
78
  $scope.originalEnvironment = response.content_facet_attributes.lifecycle_environment;
77
79
  });
78
80
  $scope.disableEnvironmentSelection = false;
81
+ $scope.showCVAlert = false;
79
82
  };
80
83
 
81
84
  $scope.releaseVersions = function () {
@@ -116,14 +119,17 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
116
119
  $scope.saveSubscriptionFacet($scope.host);
117
120
  };
118
121
 
119
- $scope.contentViews = function () {
122
+ $scope.availableContentViews = function () {
120
123
  var deferred = $q.defer();
121
124
 
122
125
  ContentView.queryUnpaged({ 'environment_id': $scope.host.content_facet_attributes.lifecycle_environment.id}, function (response) {
123
126
  deferred.resolve(response.results);
124
127
  $scope.contentViews = response.results;
128
+ $scope.showCVAlert = true;
125
129
  });
126
130
 
131
+ $scope.showCVAlert = true;
132
+
127
133
  return deferred.promise;
128
134
  };
129
135
 
@@ -13,13 +13,14 @@
13
13
  * @requires ApiErrorHandler
14
14
  * @requires deleteHostOnUnregister
15
15
  * @requires ContentHostsHelper
16
+ * @requires simpleContentAccessEnabled
16
17
  *
17
18
  * @description
18
19
  * Provides the functionality for the content host details action pane.
19
20
  */
20
21
  angular.module('Bastion.content-hosts').controller('ContentHostDetailsController',
21
- ['$scope', '$state', '$q', '$location', 'translate', 'Host', 'HostSubscription', 'Organization', 'CurrentOrganization', 'Notification', 'MenuExpander', 'ApiErrorHandler', 'deleteHostOnUnregister', 'ContentHostsHelper',
22
- function ($scope, $state, $q, $location, translate, Host, HostSubscription, Organization, CurrentOrganization, Notification, MenuExpander, ApiErrorHandler, deleteHostOnUnregister, ContentHostsHelper) {
22
+ ['$scope', '$state', '$q', '$location', 'translate', 'Host', 'HostSubscription', 'Organization', 'CurrentOrganization', 'Notification', 'MenuExpander', 'ApiErrorHandler', 'deleteHostOnUnregister', 'ContentHostsHelper', 'simpleContentAccessEnabled',
23
+ function ($scope, $state, $q, $location, translate, Host, HostSubscription, Organization, CurrentOrganization, Notification, MenuExpander, ApiErrorHandler, deleteHostOnUnregister, ContentHostsHelper, simpleContentAccessEnabled) {
23
24
  $scope.menuExpander = MenuExpander;
24
25
 
25
26
  $scope.getHostStatusIcon = ContentHostsHelper.getHostStatusIcon;
@@ -34,6 +35,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsController
34
35
  $scope.defaultServiceLevels = ['Self-Support', 'Standard', 'Premium'];
35
36
 
36
37
  $scope.purposeAddonsCount = 0;
38
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
37
39
 
38
40
  $scope.panel = {
39
41
  error: false,
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
 
31
31
  <span data-block="no-rows-message" translate>
32
- You currently don't have any Products to subscribe to, you can add Products after selecting 'Products' under 'Content' in the main menu
32
+ You currently don't have any Products to subscribe to. You can add Products after selecting 'Products' under 'Content' in the main menu.
33
33
  </span>
34
34
 
35
35
  <span data-block="no-search-results-message" translate>
@@ -69,6 +69,7 @@
69
69
  </a>
70
70
  </li>
71
71
  <li uib-dropdown
72
+ ng-if="!simpleContentAccessEnabled"
72
73
  ng-class="{active: stateIncludes('content-host.subscriptions.list') || stateIncludes('content-host.subscriptions.add')}">
73
74
  <a translate
74
75
  ui-sref="content-host.subscriptions.list">
@@ -94,15 +94,14 @@
94
94
  {{ host.subscription_status_label }}
95
95
  </dd>
96
96
 
97
- <dt translate>Details</dt>
98
- <dd>
97
+ <dt translate ng-if="!simpleContentAccessEnabled">Details</dt>
98
+ <dd ng-if="!simpleContentAccessEnabled">
99
99
  <ul class="compliance-reasons">
100
100
  <li ng-repeat="reason in host.subscription_facet_attributes.compliance_reasons">{{ reason }}</li>
101
101
  </ul>
102
102
  </dd>
103
103
 
104
- <dt translate>Auto-Attach Details</dt>
105
- <dd ng-if="simpleContentAccessEnabled" translate>Not Applicable</dd>
104
+ <dt translate ng-if="!simpleContentAccessEnabled">Auto-Attach Details</dt>
106
105
  <dd ng-if="!simpleContentAccessEnabled"
107
106
  bst-edit-select="host.subscription_facet_attributes.autoheal"
108
107
  selector="host.subscription_facet_attributes.autoheal"
@@ -274,13 +273,22 @@
274
273
  </dd>
275
274
 
276
275
  <dt translate>Content View</dt>
277
- <dd bst-edit-select="host.content_facet_attributes.content_view.name"
276
+ <dd>
277
+ <div bst-edit-select="host.content_facet_attributes.content_view.name"
278
278
  readonly="denied('edit_hosts', host)"
279
279
  selector="host.content_facet_attributes.content_view.id"
280
- options="contentViews()"
280
+ options="availableContentViews()"
281
281
  on-cancel="cancelContentViewUpdate()"
282
282
  on-save="saveContentView(host)"
283
283
  edit-trigger="editContentView">
284
+ </div>
285
+ <div class="help-block" ng-show="showCVAlert">
286
+ <p translate>
287
+ Changing the Content View will not affect the Content Host until its next checkin.
288
+ To update the Content Host immediately run the following command:
289
+ </p>
290
+ <code># subscription-manager refresh</code>
291
+ </div>
284
292
  </dd>
285
293
 
286
294
  <dt bst-feature-flag="lifecycle_environments">
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
 
16
16
  <span data-block="no-rows-message" translate>
17
- You currently don't have any Subscriptions associated with this Content Host, you can add Subscriptions after selecting the 'Add' tab.
17
+ You currently don't have any Subscriptions associated with this Content Host. You can add Subscriptions after selecting the 'Add' tab.
18
18
  </span>
19
19
 
20
20
  <span data-block="no-search-results-message" translate>
@@ -39,7 +39,7 @@
39
39
  <a ng-click="openSetReleaseVersionModal()" disable-link="table.numSelected === 0" translate>Set Release Version</a>
40
40
  </li>
41
41
 
42
- <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
42
+ <li role="menuitem" ng-show="permitted('edit_hosts') && !simpleContentAccessEnabled" ng-class="{disabled: table.numSelected === 0}">
43
43
  <a ng-click="openSubscriptionsModal()" disable-link="table.numSelected === 0" translate>Manage Subscriptions</a>
44
44
  </li>
45
45
 
@@ -78,8 +78,8 @@
78
78
  <thead>
79
79
  <tr bst-table-head row-select>
80
80
  <th bst-table-column="name" sortable><span translate>Name</span></th>
81
- <th bst-table-column="subscription_status" sortable>
82
- {{ "Subscription Status" | translate }}
81
+ <th bst-table-column="subscription_status" ng-hide="simpleContentAccessEnabled" sortable>
82
+ {{ 'Subscription Status' | translate }}
83
83
  </th>
84
84
  <th bst-table-column="status">
85
85
  <span translate>Installable Updates</span>
@@ -102,9 +102,9 @@
102
102
  {{ host.name }}
103
103
  </a>
104
104
  </td>
105
- <td bst-table-cell>
106
- <span ng-class="table.getHostStatusIcon(host.subscription_global_status)">
107
- </span>
105
+ <td bst-table-cell ng-hide="simpleContentAccessEnabled">
106
+ <span ng-class="table.getHostStatusIcon(host.subscription_global_status)">
107
+ </span>
108
108
  </td>
109
109
  <td>
110
110
  <a ui-sref="content-host.errata.index({hostId: host.id})">
@@ -11,13 +11,14 @@
11
11
  * @requires HostCollection
12
12
  * @requires Notification
13
13
  * @requires ApiErrorHandler
14
+ * @requires simpleContentAccessEnabled
14
15
  *
15
16
  * @description
16
17
  * Provides the functionality for the host collection details action pane.
17
18
  */
18
19
  angular.module('Bastion.host-collections').controller('HostCollectionDetailsController',
19
- ['$scope', '$state', '$q', 'translate', 'Host', 'ContentHostsModalHelper', 'HostCollection', 'Notification', 'ApiErrorHandler',
20
- function ($scope, $state, $q, translate, Host, ContentHostsModalHelper, HostCollection, Notification, ApiErrorHandler) {
20
+ ['$scope', '$state', '$q', 'translate', 'Host', 'ContentHostsModalHelper', 'HostCollection', 'Notification', 'ApiErrorHandler', 'simpleContentAccessEnabled',
21
+ function ($scope, $state, $q, translate, Host, ContentHostsModalHelper, HostCollection, Notification, ApiErrorHandler, simpleContentAccessEnabled) {
21
22
  $scope.panel = {
22
23
  error: false,
23
24
  loading: true
@@ -27,6 +28,8 @@ angular.module('Bastion.host-collections').controller('HostCollectionDetailsCont
27
28
  $scope.panel.loading = false;
28
29
  }
29
30
 
31
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
32
+
30
33
  $scope.hostCollection = HostCollection.get({id: $scope.$stateParams.hostCollectionId}, function (hostCollection) {
31
34
  $scope.$broadcast('hostCollection.loaded', hostCollection);
32
35
  $scope.panel.loading = false;
@@ -106,7 +106,7 @@
106
106
  </a>
107
107
  </li>
108
108
 
109
- <li bst-feature-flag="subscription_management">
109
+ <li bst-feature-flag="subscription_management" ng-hide="simpleContentAccessEnabled">
110
110
  <a translate ng-click="openSubscriptionsModal()">
111
111
  Subscription Management
112
112
  </a>
@@ -26,8 +26,7 @@ angular.module('Bastion.hosts').factory('HostBulkAction',
26
26
  releaseVersion: {method: 'PUT', params: {action: 'release_version'}},
27
27
  availableIncrementalUpdates: {method: 'POST', isArray: true, params: {action: 'available_incremental_updates'}},
28
28
  moduleStreams: {method: 'POST', params: {action: 'module_streams'}},
29
- traces: {method: 'POST', params: {action: 'traces'}},
30
- resolveTraces: {method: 'PUT', isArray: true, params: {action: 'resolve_traces'}}
29
+ traces: {method: 'POST', params: {action: 'traces'}}
31
30
  });
32
31
 
33
32
  }]
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @ngdoc service
3
+ * @name Bastion.hosts.factory:HostTracesResolve
4
+ *
5
+ * @requires BastionResource
6
+ *
7
+ * @description
8
+ * Provides a BastionResource for resolving traces on a set of systems.
9
+ */
10
+ angular.module('Bastion.hosts').factory('HostTracesResolve',
11
+ ['BastionResource', function (BastionResource) {
12
+
13
+ return BastionResource('katello/api/v2/traces/:action', {}, {
14
+ resolve: {method: 'PUT', isArray: true, params: {action: 'resolve'}}
15
+ });
16
+
17
+ }]
18
+ );