katello 3.5.0.rc1 → 3.5.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/containers/container.js +6 -6
  3. data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +2 -1
  4. data/app/assets/javascripts/katello/sync_management/sync_management.js +8 -6
  5. data/app/controllers/katello/api/v2/activation_keys_controller.rb +23 -16
  6. data/app/controllers/katello/api/v2/api_controller.rb +7 -2
  7. data/app/controllers/katello/api/v2/capsule_content_controller.rb +10 -2
  8. data/app/controllers/katello/api/v2/content_uploads_controller.rb +5 -5
  9. data/app/controllers/katello/api/v2/content_view_components_controller.rb +9 -9
  10. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +14 -16
  11. data/app/controllers/katello/api/v2/content_view_filters_controller.rb +8 -8
  12. data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +7 -7
  13. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +12 -12
  14. data/app/controllers/katello/api/v2/content_views_controller.rb +5 -5
  15. data/app/controllers/katello/api/v2/errata_controller.rb +2 -2
  16. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +2 -2
  17. data/app/controllers/katello/api/v2/host_collections_controller.rb +7 -7
  18. data/app/controllers/katello/api/v2/host_errata_controller.rb +4 -4
  19. data/app/controllers/katello/api/v2/host_packages_controller.rb +5 -5
  20. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +9 -4
  21. data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
  22. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +9 -1
  23. data/app/controllers/katello/api/v2/organizations_controller.rb +17 -3
  24. data/app/controllers/katello/api/v2/packages_controller.rb +2 -2
  25. data/app/controllers/katello/api/v2/products_controller.rb +3 -3
  26. data/app/controllers/katello/api/v2/repositories_controller.rb +11 -11
  27. data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -10
  28. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +1 -1
  29. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +3 -3
  30. data/app/helpers/katello/providers_helper.rb +4 -1
  31. data/app/lib/actions/candlepin/abstract.rb +1 -0
  32. data/app/lib/actions/katello/host/hypervisors_update.rb +1 -0
  33. data/app/lib/actions/katello/host/update_release_version.rb +29 -0
  34. data/app/lib/actions/katello/product/create.rb +3 -6
  35. data/app/lib/actions/katello/product/reindex_subscriptions.rb +1 -1
  36. data/app/lib/actions/katello/repository/scheduled_sync.rb +15 -0
  37. data/app/lib/actions/katello/repository/upload_files.rb +4 -0
  38. data/app/lib/actions/middleware/keep_session_id.rb +29 -0
  39. data/app/lib/katello/resources/candlepin.rb +22 -5
  40. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +30 -0
  41. data/app/models/katello/activation_key.rb +3 -33
  42. data/app/models/katello/candlepin/product_content.rb +1 -14
  43. data/app/models/katello/concerns/content_facet_host_extensions.rb +5 -1
  44. data/app/models/katello/concerns/content_view_filter_rule_common.rb +13 -0
  45. data/app/models/katello/concerns/hostgroup_extensions.rb +1 -0
  46. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -1
  47. data/app/models/katello/content_view_docker_filter_rule.rb +2 -1
  48. data/app/models/katello/content_view_erratum_filter_rule.rb +2 -1
  49. data/app/models/katello/content_view_package_filter_rule.rb +2 -1
  50. data/app/models/katello/content_view_package_group_filter_rule.rb +2 -1
  51. data/app/models/katello/erratum.rb +4 -5
  52. data/app/models/katello/glue/candlepin/owner.rb +32 -0
  53. data/app/models/katello/glue/pulp/repos.rb +1 -1
  54. data/app/models/katello/host/subscription_facet.rb +16 -0
  55. data/app/models/katello/repository.rb +2 -2
  56. data/app/models/katello/subscription.rb +4 -1
  57. data/app/models/katello/subscription_status.rb +8 -4
  58. data/app/presenters/katello/product_content_presenter.rb +7 -2
  59. data/app/services/katello/candlepin/consumer.rb +0 -28
  60. data/app/services/katello/product_content_finder.rb +37 -0
  61. data/app/views/foreman/smart_proxies/_content_sync.html.erb +0 -2
  62. data/app/views/katello/api/v2/activation_keys/base.json.rabl +34 -0
  63. data/app/views/katello/api/v2/activation_keys/index.json.rabl +4 -1
  64. data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +3 -3
  65. data/app/views/katello/api/v2/activation_keys/show.json.rabl +2 -38
  66. data/app/views/katello/api/v2/common/releases.json.rabl +7 -0
  67. data/config/routes/api/v2.rb +1 -0
  68. data/config/routes/overrides.rb +1 -0
  69. data/db/migrate/20171010170443_add_index_to_katello_content_facet_errata.rb +5 -0
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-key.factory.js +1 -1
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-host-collections.controller.js +8 -8
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +5 -4
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-copy.controller.js +3 -6
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +7 -10
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-host-collections.controller.js +7 -6
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +5 -5
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +5 -4
  78. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-host-collections-table.html +1 -3
  79. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +7 -5
  80. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.factory.js +1 -1
  81. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsules/capsule.factory.js +1 -1
  82. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/api-error-handler.service.js +6 -16
  83. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-environment-modal.controller.js +4 -4
  84. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +5 -5
  85. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +5 -5
  86. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +5 -5
  87. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-release-version-modal.controller.js +62 -0
  88. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +4 -4
  89. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +4 -4
  90. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-release-version-modal.html +56 -0
  91. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
  92. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
  93. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +10 -9
  94. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +6 -4
  95. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +0 -2
  96. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +3 -6
  97. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +5 -4
  98. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +5 -4
  99. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +0 -3
  100. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +8 -9
  101. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +10 -8
  102. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +5 -5
  103. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +5 -4
  104. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +0 -2
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +6 -0
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +1 -1
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-deletion.controller.js +3 -3
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-confirm.controller.js +5 -5
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-component.factory.js +3 -3
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +6 -6
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-promotion.controller.js +5 -5
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +3 -3
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +6 -6
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +5 -5
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +5 -5
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +11 -5
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/docker-tag-filter.controller.js +6 -6
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/edit-filter.controller.js +4 -4
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter-list.controller.js +5 -5
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-repositories.controller.js +6 -6
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter.factory.js +1 -1
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filters.controller.js +4 -4
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +3 -3
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-filter.controller.js +6 -6
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-group-list-filter.controller.js +5 -5
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/rule.factory.js +1 -1
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.factory.js +1 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +5 -5
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +1 -1
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +5 -5
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.factory.js +1 -1
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifest.factory.js +1 -1
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-details.controller.js +0 -3
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +0 -2
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.factory.js +1 -1
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment.controller.js +5 -7
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environment.factory.js +1 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/new-environment.controller.js +3 -6
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/new-environment.html +0 -2
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -4
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +0 -3
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/erratum.factory.js +1 -1
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +0 -2
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file.controller.js +0 -3
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/file.factory.js +1 -1
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details-info.controller.js +6 -5
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +4 -6
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js +1 -1
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +6 -9
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-add-hosts.controller.js +3 -3
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-copy.controller.js +3 -6
  152. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +13 -22
  153. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +6 -5
  154. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +3 -3
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collection.factory.js +1 -1
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-erratum.factory.js +1 -1
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-package.factory.js +1 -1
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +1 -1
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces.factory.js +1 -1
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +1 -1
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +7 -5
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +1 -1
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/package-groups/package-group.factory.js +1 -1
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/package.factory.js +1 -1
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +1 -1
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +5 -5
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-sync-plan-modal.controller.js +6 -6
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details-info.controller.js +5 -8
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +6 -6
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +15 -14
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js +6 -3
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +9 -9
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +5 -4
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -7
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync.html +0 -2
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +0 -2
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +0 -2
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-files.html +0 -2
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -2
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +0 -2
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -2
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +5 -8
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +0 -2
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +2 -2
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -20
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +0 -1
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery-create.controller.js +4 -6
  189. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +5 -8
  190. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-base.html +0 -2
  191. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/product-form.controller.js +3 -3
  192. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/product.factory.js +1 -1
  193. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -7
  194. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -3
  195. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +1 -1
  196. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +1 -1
  197. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js +1 -1
  198. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +0 -3
  199. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -2
  200. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +9 -9
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +0 -2
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.factory.js +4 -4
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-add-products.controller.js +6 -8
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +5 -6
  205. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js +5 -5
  206. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-products.controller.js +8 -8
  207. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +0 -2
  208. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-products.html +0 -2
  209. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +4 -4
  210. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plan.factory.js +1 -1
  211. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task.factory.js +2 -2
  212. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks.module.js +3 -3
  213. data/lib/katello/permission_creator.rb +3 -2
  214. data/lib/katello/permissions/host_permissions.rb +1 -0
  215. data/lib/katello/permissions/organization_permissions.rb +1 -0
  216. data/lib/katello/tasks/clean_installed_packages.rake +20 -3
  217. data/lib/katello/version.rb +1 -1
  218. metadata +17 -6
@@ -1,3 +1,6 @@
1
1
  object false
2
+ extends "katello/api/v2/common/metadata"
2
3
 
3
- extends "katello/api/v2/common/index"
4
+ child @collection[:results] => :results do
5
+ extends "katello/api/v2/activation_keys/base"
6
+ end
@@ -13,17 +13,17 @@ child @collection[:results] => :results do
13
13
  end
14
14
 
15
15
  node :override do |pc|
16
- pc.legacy_content_override(@activation_key)
16
+ pc.legacy_content_override
17
17
  end
18
18
 
19
19
  node :overrides do |pc|
20
- pc.content_overrides(@activation_key).map do |override|
20
+ pc.content_overrides.map do |override|
21
21
  {:name => override.name, :value => override.computed_value}
22
22
  end
23
23
  end
24
24
 
25
25
  node :enabled_content_override do |pc|
26
- override = pc.enabled_content_override(@activation_key)
26
+ override = pc.enabled_content_override
27
27
  override.computed_value if override
28
28
  end
29
29
 
@@ -1,40 +1,4 @@
1
1
  object @resource
2
-
3
- attributes :id, :name, :description, :unlimited_hosts, :auto_attach
4
-
5
- extends 'katello/api/v2/common/org_reference'
6
-
7
- attributes :content_view_id
8
-
9
- child :content_view => :content_view do
10
- attributes :id, :name
11
- end
12
-
13
- child :environment => :environment do
14
- attributes :name, :id
15
- end
16
- attributes :environment_id
17
-
18
- attributes :usage_count, :user_id, :max_hosts, :system_template_id, :release_version,
19
- :service_level, :auto_attach
20
-
21
- child :products => :products do |_product|
22
- attributes :id, :name
23
- end
24
-
25
- node :permissions do |activation_key|
26
- {
27
- :view_activation_keys => activation_key.readable?,
28
- :edit_activation_keys => activation_key.editable?,
29
- :destroy_activation_keys => activation_key.deletable?
30
- }
31
- end
32
-
33
- child :host_collections => :host_collections do
34
- attributes :id
35
- attributes :name
36
- end
37
-
2
+ extends "katello/api/v2/activation_keys/base"
3
+ attributes :service_level
38
4
  attributes :content_overrides
39
-
40
- extends 'katello/api/v2/common/timestamps'
@@ -0,0 +1,7 @@
1
+ object false
2
+
3
+ extends "katello/api/v2/common/metadata"
4
+
5
+ node :results do
6
+ @collection[:results]
7
+ end
@@ -170,6 +170,7 @@ Katello::Engine.routes.draw do
170
170
  post :autoattach_subscriptions
171
171
  get :download_debug_certificate
172
172
  get :redhat_provider
173
+ get :releases
173
174
  end
174
175
  api_resources :products, :only => [:index]
175
176
  api_resources :repositories, :only => [:index]
@@ -74,6 +74,7 @@ Foreman::Application.routes.draw do
74
74
  match '/bulk/remove_content' => 'hosts_bulk_actions#remove_content', :via => :put
75
75
  match '/bulk/destroy' => 'hosts_bulk_actions#destroy_hosts', :via => :put
76
76
  match '/bulk/environment_content_view' => 'hosts_bulk_actions#environment_content_view', :via => :put
77
+ match '/bulk/release_version' => 'hosts_bulk_actions#release_version', :via => :put
77
78
  match '/bulk/available_incremental_updates' => 'hosts_bulk_actions#available_incremental_updates', :via => :post
78
79
  match '/subscriptions/' => 'host_subscriptions#create', :via => :post
79
80
  end
@@ -0,0 +1,5 @@
1
+ class AddIndexToKatelloContentFacetErrata < ActiveRecord::Migration
2
+ def change
3
+ add_index :katello_content_facet_errata, :content_facet_id, using: 'btree'
4
+ end
5
+ end
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.activation-keys').factory('ActivationKey',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/v2/activation_keys/:id/:action/:action2', {id: '@id'}, {
13
+ return BastionResource('katello/api/v2/activation_keys/:id/:action/:action2', {id: '@id'}, {
14
14
  get: {method: 'GET', params: {fields: 'full'}},
15
15
  update: {method: 'PUT'},
16
16
  copy: {method: 'POST', params: {action: 'copy'}},
@@ -8,18 +8,16 @@
8
8
  * @requires translate
9
9
  * @requires ActivationKey
10
10
  * @requires Nutupane
11
+ * @requires Notification
11
12
  *
12
13
  * @description
13
14
  * Provides the functionality for adding host collections to an activation key.
14
15
  */
15
16
  angular.module('Bastion.activation-keys').controller('ActivationKeyAddHostCollectionsController',
16
- ['$scope', '$q', '$location', 'translate', 'ActivationKey', 'Nutupane',
17
- function ($scope, $q, $location, translate, ActivationKey, Nutupane) {
17
+ ['$scope', '$q', '$location', 'translate', 'ActivationKey', 'Nutupane', 'Notification',
18
+ function ($scope, $q, $location, translate, ActivationKey, Nutupane, Notification) {
18
19
  var hostCollectionsPane, params;
19
20
 
20
- $scope.successMessages = [];
21
- $scope.errorMessages = [];
22
-
23
21
  params = {
24
22
  'search': $location.search().search || "",
25
23
  'sort_by': 'name',
@@ -46,9 +44,11 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAddHostCollec
46
44
  };
47
45
 
48
46
  success = function (response) {
49
- $scope.successMessages = [translate('Added %x host collections to activation key "%y".')
47
+ var message = translate('Added %x host collections to activation key "%y".')
50
48
  .replace('%x', $scope.table.numSelected)
51
- .replace('%y', $scope.activationKey.name)];
49
+ .replace('%y', $scope.activationKey.name);
50
+
51
+ Notification.setSuccessMessage(message);
52
52
  $scope.table.working = false;
53
53
  $scope.table.selectAll(false);
54
54
  hostCollectionsPane.refresh();
@@ -58,7 +58,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAddHostCollec
58
58
 
59
59
  error = function (response) {
60
60
  deferred.reject(response.data.errors);
61
- $scope.errorMessages = response.data.errors.base;
61
+ Notification.setErrorMessage(response.data.errors.base);
62
62
  $scope.table.working = false;
63
63
  };
64
64
 
@@ -11,13 +11,14 @@
11
11
  * @requires Subscription
12
12
  * @requires ActivationKey
13
13
  * @requires SubscriptionsHelper
14
+ * @requires Notification
14
15
  *
15
16
  * @description
16
17
  * Provides the functionality for the activation key add subscriptions pane.
17
18
  */
18
19
  angular.module('Bastion.activation-keys').controller('ActivationKeyAddSubscriptionsController',
19
- ['$scope', '$state', '$location', 'translate', 'Nutupane', 'CurrentOrganization', 'Subscription', 'ActivationKey', 'SubscriptionsHelper',
20
- function ($scope, $state, $location, translate, Nutupane, CurrentOrganization, Subscription, ActivationKey, SubscriptionsHelper) {
20
+ ['$scope', '$state', '$location', 'translate', 'Nutupane', 'CurrentOrganization', 'Subscription', 'ActivationKey', 'SubscriptionsHelper', 'Notification',
21
+ function ($scope, $state, $location, translate, Nutupane, CurrentOrganization, Subscription, ActivationKey, SubscriptionsHelper, Notification) {
21
22
 
22
23
  var params;
23
24
 
@@ -51,11 +52,11 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAddSubscripti
51
52
 
52
53
  $scope.isAdding = true;
53
54
  ActivationKey.addSubscriptions({id: $scope.activationKey.id, 'subscriptions': selected}, function () {
54
- $scope.successMessages.push(translate("Successfully added %s subscriptions.").replace('%s', selected.length));
55
+ Notification.setErrorMessage(translate("Successfully added %s subscriptions.").replace('%s', selected.length));
55
56
  $scope.isAdding = false;
56
57
  $scope.contentNutupane.refresh();
57
58
  }, function (response) {
58
- $scope.errorMessages.push(response.data.displayMessage);
59
+ Notification.setErrorMessage(response.data.displayMessage);
59
60
  $scope.isAdding = false;
60
61
  $scope.contentNutupane.refresh();
61
62
  });
@@ -8,15 +8,12 @@
8
8
  * @description
9
9
  * For copying a host collection.
10
10
  */
11
- function ActivationKeyCopyController($scope, ActivationKey) {
12
- $scope.successMessages = [];
13
- $scope.errorMessages = [];
14
-
11
+ function ActivationKeyCopyController($scope, ActivationKey, Notification) {
15
12
  $scope.copy = function (newName) {
16
13
  ActivationKey.copy({id: $scope.activationKey.id, 'new_name': newName}, function (response) {
17
14
  $scope.transitionTo('activation-key.info', {activationKeyId: response.id});
18
15
  }, function (response) {
19
- $scope.copyErrorMessages.push(response.data.displayMessage);
16
+ Notification.setErrorMessage(response.data.displayMessage);
20
17
  });
21
18
  };
22
19
  }
@@ -25,6 +22,6 @@
25
22
  .module('Bastion.activation-keys')
26
23
  .controller('ActivationKeyCopyController', ActivationKeyCopyController);
27
24
 
28
- ActivationKeyCopyController.$inject = ['$scope', 'ActivationKey'];
25
+ ActivationKeyCopyController.$inject = ['$scope', 'ActivationKey', 'Notification'];
29
26
 
30
27
  })();
@@ -9,18 +9,15 @@
9
9
  * @requires ActivationKey
10
10
  * @requires CurrentOrganization
11
11
  * @requires Organization
12
- * @requires GlobalNotification
12
+ * @requires Notification
13
13
  * @requires ApiErrorHandler
14
14
  *
15
15
  * @description
16
16
  * Provides the functionality for the activation key details action pane.
17
17
  */
18
18
  angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsController',
19
- ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'GlobalNotification', 'ApiErrorHandler',
20
- function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, GlobalNotification, ApiErrorHandler) {
21
- $scope.successMessages = [];
22
- $scope.errorMessages = [];
23
- $scope.copyErrorMessages = [];
19
+ ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'Notification', 'ApiErrorHandler',
20
+ function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler) {
24
21
  $scope.panel = {
25
22
  error: false,
26
23
  loading: true
@@ -43,10 +40,10 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsContro
43
40
 
44
41
  activationKey.$update(function (response) {
45
42
  deferred.resolve(response);
46
- $scope.successMessages.push(translate('Activation Key updated'));
43
+ Notification.setSuccessMessage(translate('Activation Key updated'));
47
44
  }, function (response) {
48
45
  deferred.reject(response);
49
- $scope.errorMessages.push(translate("An error occurred saving the Activation Key: ") + response.data.displayMessage);
46
+ Notification.setErrorMessage(translate("An error occurred saving the Activation Key: ") + response.data.displayMessage);
50
47
  });
51
48
  return deferred.promise;
52
49
  };
@@ -58,9 +55,9 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsContro
58
55
  $scope.removeActivationKey = function (activationKey) {
59
56
  activationKey.$delete(function () {
60
57
  $scope.transitionTo('activation-keys');
61
- GlobalNotification.setSuccessMessage(translate('Activation Key removed.'));
58
+ Notification.setSuccessMessage(translate('Activation Key removed.'));
62
59
  }, function (response) {
63
- GlobalNotification.setErrorMessage(translate("An error occurred removing the Activation Key: ") + response.data.displayMessage);
60
+ Notification.setErrorMessage(translate("An error occurred removing the Activation Key: ") + response.data.displayMessage);
64
61
  });
65
62
  };
66
63
 
@@ -17,9 +17,6 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyHostCollectio
17
17
  function ($scope, $q, $location, translate, ActivationKey, Nutupane) {
18
18
  var hostCollectionsPane, params;
19
19
 
20
- $scope.successMessages = [];
21
- $scope.errorMessages = [];
22
-
23
20
  params = {
24
21
  'id': $scope.$stateParams.activationKeyId,
25
22
  'search': $location.search().search || "",
@@ -46,9 +43,11 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyHostCollectio
46
43
  };
47
44
 
48
45
  success = function (response) {
49
- $scope.successMessages = [translate('Removed %x host collections from activation key "%y".')
46
+ var message = translate('Removed %x host collections from activation key "%y".')
50
47
  .replace('%x', $scope.table.numSelected)
51
- .replace('%y', $scope.activationKey.name)];
48
+ .replace('%y', $scope.activationKey.name);
49
+
50
+ Notification.setSuccessMessage(message);
52
51
  $scope.table.working = false;
53
52
  $scope.table.selectAll(false);
54
53
  hostCollectionsPane.refresh();
@@ -58,7 +57,9 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyHostCollectio
58
57
 
59
58
  error = function (response) {
60
59
  deferred.reject(response.data.errors);
61
- $scope.errorMessages = response.data.errors;
60
+ angular.forEach(response.data.errors, function (responseError) {
61
+ Notification.setErrorMessage(responseError);
62
+ });
62
63
  $scope.table.working = false;
63
64
  };
64
65
 
@@ -7,15 +7,15 @@
7
7
  * @requires Nutupane
8
8
  * @requires ActivationKey
9
9
  * @requires ContentOverrideHelper
10
- * @requires GlobalNotification
10
+ * @requires Notification
11
11
  * @requires CurrentOrganization
12
12
  *
13
13
  * @description
14
14
  * Provides the functionality for the activation-key products action pane.
15
15
  */
16
16
  angular.module('Bastion.activation-keys').controller('ActivationKeyRepositorySetsController',
17
- ['$scope', 'translate', 'Nutupane', 'ActivationKey', 'ContentOverrideHelper', 'GlobalNotification', 'CurrentOrganization',
18
- function ($scope, translate, Nutupane, ActivationKey, ContentOverrideHelper, GlobalNotification, CurrentOrganization) {
17
+ ['$scope', 'translate', 'Nutupane', 'ActivationKey', 'ContentOverrideHelper', 'Notification', 'CurrentOrganization',
18
+ function ($scope, translate, Nutupane, ActivationKey, ContentOverrideHelper, Notification, CurrentOrganization) {
19
19
  var params, saveContentOverride, success, error;
20
20
 
21
21
  params = {
@@ -42,13 +42,13 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyRepositorySet
42
42
 
43
43
  success = function () {
44
44
  $scope.table.working = false;
45
- GlobalNotification.setSuccessMessage(translate('Repository Sets settings saved successfully.'));
45
+ Notification.setSuccessMessage(translate('Repository Sets settings saved successfully.'));
46
46
  $scope.nutupane.refresh();
47
47
  };
48
48
 
49
49
  error = function (response) {
50
50
  $scope.table.working = false;
51
- GlobalNotification.setErrorMessage(response.data.errors);
51
+ Notification.setErrorMessage(response.data.errors);
52
52
  };
53
53
 
54
54
  saveContentOverride = function (contentOverrides) {
@@ -8,13 +8,14 @@
8
8
  * @requires Nutupane
9
9
  * @requires ActivationKey
10
10
  * @requires SubscriptionsHelper
11
+ * @requires Notification
11
12
  *
12
13
  * @description
13
14
  * Provides the functionality for the activation key subscriptions details action pane.
14
15
  */
15
16
  angular.module('Bastion.activation-keys').controller('ActivationKeySubscriptionsController',
16
- ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'Subscription', 'SubscriptionsHelper',
17
- function ($scope, $location, translate, Nutupane, ActivationKey, Subscription, SubscriptionsHelper) {
17
+ ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'Subscription', 'SubscriptionsHelper', 'Notification',
18
+ function ($scope, $location, translate, Nutupane, ActivationKey, Subscription, SubscriptionsHelper, Notification) {
18
19
  var params;
19
20
 
20
21
  params = {
@@ -48,11 +49,11 @@ angular.module('Bastion.activation-keys').controller('ActivationKeySubscriptions
48
49
  ActivationKey.removeSubscriptions({id: $scope.activationKey.id, 'subscriptions': selected}, function () {
49
50
  $scope.contentNutupane.table.selectAll(false);
50
51
  $scope.contentNutupane.refresh();
51
- $scope.successMessages.push(translate("Successfully removed %s subscriptions.").replace('%s', selected.length));
52
+ Notification.setSuccessMessage(translate("Successfully removed %s subscriptions.").replace('%s', selected.length));
52
53
  $scope.isRemoving = false;
53
54
  }, function (response) {
54
55
  $scope.isRemoving = false;
55
- $scope.errorMessages.push(translate("An error occurred removing the subscriptions.") + response.data.displayMessage);
56
+ Notification.setErrorMessage(translate("An error occurred removing the subscriptions.") + response.data.displayMessage);
56
57
  });
57
58
  };
58
59
 
@@ -1,6 +1,4 @@
1
- <section class="nutupane-sub-section">
2
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
3
-
1
+ <section>
4
2
  <div data-extend-template="layouts/partials/table.html">
5
3
  <div data-block="search">
6
4
  <input type="text"
@@ -8,13 +8,16 @@
8
8
  * @requires translate
9
9
  * @requires CapsuleContent
10
10
  * @requires AggregateTask
11
+ * @requires CurrentOrganization
12
+ * @requires syncState
13
+ * @requires Notification
11
14
  *
12
15
  * @description
13
16
  * Provides the functionality for the capsule-content page.
14
17
  */
15
18
  angular.module('Bastion.capsule-content').controller('CapsuleContentController',
16
- ['$scope', '$urlMatcherFactory', '$location', 'translate', 'CapsuleContent', 'AggregateTask', 'CurrentOrganization', 'syncState',
17
- function ($scope, $urlMatcherFactory, $location, translate, CapsuleContent, AggregateTask, CurrentOrganization, syncState) {
19
+ ['$scope', '$urlMatcherFactory', '$location', 'translate', 'CapsuleContent', 'AggregateTask', 'CurrentOrganization', 'syncState', 'Notification',
20
+ function ($scope, $urlMatcherFactory, $location, translate, CapsuleContent, AggregateTask, CurrentOrganization, syncState, Notification) {
18
21
 
19
22
  var refreshSyncStatus;
20
23
  var urlMatcher = $urlMatcherFactory.compile("/smart_proxies/:capsuleId");
@@ -22,7 +25,7 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
22
25
 
23
26
  function processError(response) {
24
27
  if (response.data && response.data.displayMessage) {
25
- $scope.syncErrorMessages = [response.data.displayMessage];
28
+ Notification.setErrorMessage(response.data.displayMessage);
26
29
  }
27
30
  }
28
31
 
@@ -95,7 +98,7 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
95
98
  } else if (errorCount > 1) {
96
99
  errorMessage += " " + translate("Plus 1 more error");
97
100
  }
98
- $scope.syncErrorMessages = [errorMessage];
101
+ Notification.setErrorMessage(errorMessage);
99
102
  }
100
103
  }
101
104
  $scope.syncState.set(stateFromTask($scope.syncTask));
@@ -125,7 +128,6 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
125
128
  $scope.syncCapsule = function (skipMetadataCheck) {
126
129
  if (!$scope.syncState.is(syncState.SYNCING)) {
127
130
 
128
- $scope.syncErrorMessages = [];
129
131
  $scope.syncState.set(syncState.SYNC_TRIGGERED);
130
132
 
131
133
  CapsuleContent.sync({id: capsuleId, 'skip_metadata_check': skipMetadataCheck}).$promise.then(function (task) {
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.capsule-content').factory('CapsuleContent',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/capsules/:id/content/:action', {id: '@id'}, {
13
+ return BastionResource('katello/api/capsules/:id/content/:action', {id: '@id'}, {
14
14
  syncStatus: {method: 'GET', isArray: false, params: {action: 'sync'}},
15
15
  sync: {method: 'post', isArray: false, params: {action: 'sync'}},
16
16
  cancelSync: {method: 'delete', isArray: false, params: {action: 'sync'}}
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.capsules').factory('Capsule',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/capsules/:id/:action', {id: '@id'}, {
13
+ return BastionResource('katello/api/capsules/:id/:action', {id: '@id'}, {
14
14
  });
15
15
 
16
16
  }]
@@ -8,24 +8,14 @@
8
8
  * @description
9
9
  * Provides common functionality in handling Katello/Foreman API Errors.
10
10
  */
11
- function ApiErrorHandler(translate, GlobalNotification) {
11
+ function ApiErrorHandler(translate, Notification) {
12
12
  function handleError(response, $scope, defaultErrorMessage) {
13
- var hasScopeErrorMessages = $scope && $scope.hasOwnProperty('errorMessages');
14
-
15
13
  if (response.hasOwnProperty('data') && response.data.hasOwnProperty('errors')) {
16
- if (hasScopeErrorMessages) {
17
- $scope.errorMessages = response.data.errors;
18
- } else {
19
- angular.forEach(response.data.errors, function (error) {
20
- GlobalNotification.setErrorMessage(error);
21
- });
22
- }
14
+ angular.forEach(response.data.errors, function (error) {
15
+ Notification.setErrorMessage(error);
16
+ });
23
17
  } else {
24
- if (hasScopeErrorMessages) {
25
- $scope.errorMessages = [defaultErrorMessage];
26
- } else {
27
- GlobalNotification.setErrorMessage(defaultErrorMessage);
28
- }
18
+ Notification.setErrorMessage(defaultErrorMessage);
29
19
  }
30
20
 
31
21
  if ($scope && $scope.hasOwnProperty('panel')) {
@@ -45,5 +35,5 @@
45
35
  }
46
36
 
47
37
  angular.module('Bastion.common').service('ApiErrorHandler', ApiErrorHandler);
48
- ApiErrorHandler.$inject = ['translate', 'GlobalNotification'];
38
+ ApiErrorHandler.$inject = ['translate', 'Notification'];
49
39
  })();