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
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.content-views').factory('Rule',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/v2/content_view_filters/:filterId/rules/:ruleId',
13
+ return BastionResource('katello/api/v2/content_view_filters/:filterId/rules/:ruleId',
14
14
  {ruleId: '@id', filterId: '@content_view_filter_id'},
15
15
  {
16
16
  update: {method: 'PUT'}
@@ -12,7 +12,7 @@ angular.module('Bastion.content-views').factory('ContentViewHistory',
12
12
  ['BastionResource', 'CurrentOrganization',
13
13
  function (BastionResource, CurrentOrganization) {
14
14
 
15
- return BastionResource('/katello/api/v2/content_views/:contentViewId/history/:action',
15
+ return BastionResource('katello/api/v2/content_views/:contentViewId/history/:action',
16
16
  {id: '@id', contentViewId: '@contentViewId', 'organization_id': CurrentOrganization},
17
17
  {
18
18
  autocomplete: {method: 'GET', isArray: true, params: {action: 'auto_complete_search'}}
@@ -7,14 +7,14 @@
7
7
  * @requires Nutupane
8
8
  * @requires ContentView
9
9
  * @requires ContentViewPuppetModule
10
- * @requires GlobalNotification
10
+ * @requires Notification
11
11
  *
12
12
  * @description
13
13
  * Provides the ability to select a version of a Puppet Module for a Content View.
14
14
  */
15
15
  angular.module('Bastion.content-views').controller('ContentViewPuppetModuleVersionsController',
16
- ['$scope', 'translate', 'Nutupane', 'ContentView', 'ContentViewPuppetModule', 'GlobalNotification',
17
- function ($scope, translate, Nutupane, ContentView, ContentViewPuppetModule, GlobalNotification) {
16
+ ['$scope', 'translate', 'Nutupane', 'ContentView', 'ContentViewPuppetModule', 'Notification',
17
+ function ($scope, translate, Nutupane, ContentView, ContentViewPuppetModule, Notification) {
18
18
  var success, error, nutupane, params;
19
19
 
20
20
  params = {
@@ -49,12 +49,12 @@ angular.module('Bastion.content-views').controller('ContentViewPuppetModuleVersi
49
49
  success = function () {
50
50
  $scope.transitionTo('content-view.puppet-modules.list',
51
51
  {contentViewId: $scope.$stateParams.contentViewId});
52
- GlobalNotification.setSuccessMessage(translate('Puppet module added to Content View'));
52
+ Notification.setSuccessMessage(translate('Puppet module added to Content View'));
53
53
  };
54
54
 
55
55
  error = function (response) {
56
56
  angular.forEach(response.data.errors, function (errorMessage) {
57
- GlobalNotification.setErrorMessage(translate("An error occurred updating the Content View: ") + errorMessage);
57
+ Notification.setErrorMessage(translate("An error occurred updating the Content View: ") + errorMessage);
58
58
  });
59
59
  };
60
60
  }]
@@ -12,7 +12,7 @@ angular.module('Bastion.content-views').factory('ContentViewPuppetModule',
12
12
  ['BastionResource', 'CurrentOrganization',
13
13
  function (BastionResource, CurrentOrganization) {
14
14
 
15
- return BastionResource('/katello/api/v2/content_views/:contentViewId/content_view_puppet_modules/:id/:action',
15
+ return BastionResource('katello/api/v2/content_views/:contentViewId/content_view_puppet_modules/:id/:action',
16
16
  {id: '@id', contentViewId: '@contentViewId', 'organization_id': CurrentOrganization},
17
17
  {
18
18
  update: {method: 'PUT'},
@@ -6,14 +6,14 @@
6
6
  * @requires translate
7
7
  * @requires Nutupane
8
8
  * @requires ContentViewPuppetModule
9
- * @requires GlobalNotification
9
+ * @requires Notification
10
10
  *
11
11
  * @description
12
12
  * Provides functionality to the Content View existing Puppet Modules list.
13
13
  */
14
14
  angular.module('Bastion.content-views').controller('ContentViewPuppetModulesController',
15
- ['$scope', 'translate', 'Nutupane', 'ContentViewPuppetModule', 'GlobalNotification',
16
- function ($scope, translate, Nutupane, ContentViewPuppetModule, GlobalNotification) {
15
+ ['$scope', 'translate', 'Nutupane', 'ContentViewPuppetModule', 'Notification',
16
+ function ($scope, translate, Nutupane, ContentViewPuppetModule, Notification) {
17
17
  var nutupane = new Nutupane(ContentViewPuppetModule, {
18
18
  contentViewId: $scope.$stateParams.contentViewId
19
19
  });
@@ -49,14 +49,14 @@ angular.module('Bastion.content-views').controller('ContentViewPuppetModulesCont
49
49
  var success, error;
50
50
 
51
51
  success = function () {
52
- GlobalNotification.setSuccessMessage(translate('Module %s removed from Content View.')
52
+ Notification.setSuccessMessage(translate('Module %s removed from Content View.')
53
53
  .replace('%s', module.name));
54
54
  nutupane.removeRow(module.id);
55
55
  };
56
56
 
57
57
  error = function (response) {
58
58
  angular.forEach(response.data.errors, function (errorMessage) {
59
- GlobalNotification.setErrorMessage(translate("An error occurred updating the Content View: ") + errorMessage);
59
+ Notification.setErrorMessage(translate("An error occurred updating the Content View: ") + errorMessage);
60
60
  });
61
61
  };
62
62
 
@@ -11,7 +11,7 @@
11
11
  angular.module('Bastion.content-views.versions').factory('ContentViewVersion',
12
12
  ['BastionResource', function (BastionResource) {
13
13
 
14
- return BastionResource('/katello/api/v2/content_view_versions/:id/:action',
14
+ return BastionResource('katello/api/v2/content_view_versions/:id/:action',
15
15
  {id: '@id'},
16
16
  {
17
17
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
@@ -9,7 +9,7 @@
9
9
  * Provides a BastionResource for interacting with Docker Manifests
10
10
  */
11
11
  function DockerManifest(BastionResource) {
12
- return BastionResource('/katello/api/v2/docker_manifests/:id',
12
+ return BastionResource('katello/api/v2/docker_manifests/:id',
13
13
  {'id': '@id'}
14
14
  );
15
15
  }
@@ -14,9 +14,6 @@
14
14
  angular.module('Bastion.docker-tags').controller('DockerTagDetailsController',
15
15
  ['$scope', '$location', 'Nutupane', 'DockerTag', 'CurrentOrganization', 'ApiErrorHandler',
16
16
  function ($scope, $location, Nutupane, DockerTag, CurrentOrganization, ApiErrorHandler) {
17
- $scope.successMessages = [];
18
- $scope.errorMessages = [];
19
-
20
17
  $scope.panel = {
21
18
  error: false,
22
19
  loading: true
@@ -1,8 +1,6 @@
1
1
  <span page-title ng-model="tag">{{ 'Details for Docker Tag:' | translate }} {{ tag.full_name }}</span>
2
2
 
3
3
  <div data-extend-template="layouts/details-page-with-breadcrumbs.html">
4
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
6
4
  <header data-block="header">
7
5
  <h2>{{ tag.full_name }}</h2>
8
6
  </header>
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.docker-tags').factory('DockerTag',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/v2/docker_tags/:id/',
13
+ return BastionResource('katello/api/v2/docker_tags/:id/',
14
14
  {id: '@id'},
15
15
  {
16
16
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
@@ -8,11 +8,9 @@
8
8
  * @description
9
9
  * Enter a description!
10
10
  */
11
- function EnvironmentController($scope, Environment, translate, ContentService, ApiErrorHandler) {
11
+ function EnvironmentController($scope, Environment, translate, ContentService, ApiErrorHandler, Notification) {
12
12
 
13
13
  $scope.contentTypes = ContentService.contentTypes;
14
- $scope.errorMessages = [];
15
- $scope.successMessages = [];
16
14
  $scope.panel = {
17
15
  error: false,
18
16
  loading: true
@@ -29,12 +27,12 @@
29
27
  var promise;
30
28
 
31
29
  function success() {
32
- $scope.successMessages.push(translate('Environment saved'));
30
+ Notification.setSuccessMessage(translate('Environment saved'));
33
31
  }
34
32
 
35
33
  function error(response) {
36
34
  angular.forEach(response.data.errors, function (errorMessage) {
37
- $scope.errorMessages.push(translate("An error occurred saving the Environment: ") + errorMessage);
35
+ Notification.setErrorMessage((translate("An error occurred saving the Environment: ") + errorMessage));
38
36
  });
39
37
  }
40
38
 
@@ -48,12 +46,12 @@
48
46
  var promise;
49
47
 
50
48
  function success() {
51
- $scope.successMessages.push(translate('Remove Successful.'));
49
+ Notification.setSuccessMessage(translate('Remove Successful.'));
52
50
  $scope.transitionTo('environments');
53
51
  }
54
52
 
55
53
  function error(response) {
56
- $scope.errorMessages.push(translate("An error occurred removing the environment: ") +
54
+ Notification.setErrorMessage(translate("An error occurred removing the environment: ") +
57
55
  response.data.displayMessage);
58
56
  }
59
57
 
@@ -12,7 +12,7 @@ angular.module('Bastion.environments').factory('Environment',
12
12
  ['BastionResource', 'CurrentOrganization',
13
13
  function (BastionResource, CurrentOrganization) {
14
14
 
15
- return BastionResource('/katello/api/v2/environments/:id/:action',
15
+ return BastionResource('katello/api/v2/environments/:id/:action',
16
16
  {id: '@id', 'organization_id': CurrentOrganization},
17
17
  {
18
18
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
@@ -8,7 +8,7 @@
8
8
  * @description
9
9
  * Handles creating a new environment.
10
10
  */
11
- function NewEnvironmentController($scope, Environment, FormUtils) {
11
+ function NewEnvironmentController($scope, Environment, FormUtils, Notification) {
12
12
 
13
13
  function success() {
14
14
  $scope.transitionTo('environments');
@@ -21,14 +21,11 @@
21
21
  $scope.environmentForm[field].$setValidity('server', false);
22
22
  $scope.environmentForm[field].$error.messages = errors;
23
23
  } else {
24
- $scope.errorMessages.push(errors);
24
+ Notification.setErrorMessage(errors);
25
25
  }
26
26
  });
27
27
  }
28
28
 
29
- $scope.errorMessages = [];
30
- $scope.successMessages = [];
31
-
32
29
  $scope.loading = true;
33
30
  $scope.environment = new Environment();
34
31
  $scope.priorEnvironment = Environment.get({id: $scope.$stateParams.priorId});
@@ -55,6 +52,6 @@
55
52
  .module('Bastion.environments')
56
53
  .controller('NewEnvironmentController', NewEnvironmentController);
57
54
 
58
- NewEnvironmentController.$inject = ['$scope', 'Environment', 'FormUtils'];
55
+ NewEnvironmentController.$inject = ['$scope', 'Environment', 'FormUtils', 'Notification'];
59
56
 
60
57
  })();
@@ -18,8 +18,6 @@
18
18
  <h1 translate>New Environment</h1>
19
19
  </header>
20
20
 
21
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
22
-
23
21
  <div ng-show="priorEnvironment.successor && !loading">
24
22
  <p translate>Lifecycle Environment "{{ priorEnvironment.name }}" exists within the middle of a path. New Lifecycle Environments can only be added to the end of a path.</p>
25
23
  </div>
@@ -8,13 +8,14 @@
8
8
  * @requires ContentHostBulkAction
9
9
  * @requires ContentViewVersion
10
10
  * @requires CurrentOrganization
11
+ * @requires Notification
11
12
  *
12
13
  * @description
13
14
  * Display confirmation screen and apply Errata.
14
15
  */
15
16
  angular.module('Bastion.errata').controller('ApplyErrataController',
16
- ['$scope', 'translate', 'IncrementalUpdate', 'HostBulkAction', 'ContentViewVersion', 'CurrentOrganization',
17
- function ($scope, translate, IncrementalUpdate, HostBulkAction, ContentViewVersion, CurrentOrganization) {
17
+ ['$scope', 'translate', 'IncrementalUpdate', 'HostBulkAction', 'ContentViewVersion', 'CurrentOrganization', 'Notification',
18
+ function ($scope, translate, IncrementalUpdate, HostBulkAction, ContentViewVersion, CurrentOrganization, Notification) {
18
19
  var applyErrata, incrementalUpdate;
19
20
 
20
21
  function transitionToTask(task) {
@@ -86,7 +87,9 @@ angular.module('Bastion.errata').controller('ApplyErrataController',
86
87
  }
87
88
 
88
89
  error = function (response) {
89
- $scope.errorMessages = response.data.errors;
90
+ angular.forEach(response.data.errors, function (responseError) {
91
+ Notification.setErrorMessage(responseError);
92
+ });
90
93
  $scope.applyingErrata = false;
91
94
  };
92
95
 
@@ -103,7 +106,9 @@ angular.module('Bastion.errata').controller('ApplyErrataController',
103
106
  params['organization_id'] = CurrentOrganization;
104
107
 
105
108
  error = function (response) {
106
- $scope.errorMessages = response.data.errors;
109
+ angular.forEach(response.data.errors, function (responseError) {
110
+ Notification.setErrorMessage(responseError);
111
+ });
107
112
  $scope.applyingErrata = false;
108
113
  };
109
114
 
@@ -19,9 +19,6 @@ angular.module('Bastion.errata').controller('ErratumContentHostsController',
19
19
  'overrideAutoLoad': true
20
20
  };
21
21
 
22
- $scope.successMessages = [];
23
- $scope.errorMessages = [];
24
-
25
22
  $scope.restrictInstallable = false;
26
23
 
27
24
  params = {
@@ -10,7 +10,7 @@
10
10
  angular.module('Bastion.errata').factory('Erratum',
11
11
  ['BastionResource', function (BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/v2/errata/:id/',
13
+ return BastionResource('katello/api/v2/errata/:id/',
14
14
  {id: '@id', 'sort_by': 'issued', 'sort_order': 'DESC'},
15
15
  {
16
16
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
@@ -1,7 +1,5 @@
1
1
  <span page-title>{{ 'Apply Errata' | translate }}</span>
2
2
 
3
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
4
-
5
3
  <section class="col-md-4" ng-hide="selectedContentHosts">
6
4
  <p bst-alert="warning">
7
5
  <span translate>You must select at least one Content Host in order to apply Errata.</span>
@@ -8,9 +8,6 @@
8
8
  * Provides the functionality for the files details action pane.
9
9
  */
10
10
  function FileController($scope, File, ApiErrorHandler) {
11
- $scope.successMessages = [];
12
- $scope.errorMessages = [];
13
-
14
11
  $scope.panel = {
15
12
  error: false,
16
13
  loading: true
@@ -10,7 +10,7 @@
10
10
  */
11
11
  function File(BastionResource) {
12
12
 
13
- return BastionResource('/katello/api/v2/files/:id',
13
+ return BastionResource('katello/api/v2/files/:id',
14
14
  {'id': '@id'},
15
15
  {
16
16
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}}
@@ -5,12 +5,13 @@
5
5
  * @requires $scope
6
6
  * @requires GPGKey
7
7
  * @requires translate
8
+ * @requires Notification
8
9
  *
9
10
  * @description
10
11
  * Provides the functionality for the gpgKey details action pane.
11
12
  */
12
13
  angular.module('Bastion.gpg-keys').controller('GPGKeyDetailsInfoController',
13
- ['$scope', 'GPGKey', 'translate', function ($scope, GPGKey, translate) {
14
+ ['$scope', 'GPGKey', 'translate', 'Notification', function ($scope, GPGKey, translate, Notification) {
14
15
 
15
16
  $scope.panel = $scope.panel || {loading: false};
16
17
  $scope.progress = {uploading: false};
@@ -20,17 +21,17 @@ angular.module('Bastion.gpg-keys').controller('GPGKeyDetailsInfoController',
20
21
  });
21
22
 
22
23
  $scope.gpgKey.$promise.then(function () {
23
- $scope.uploadURL = '/katello/api/v2/gpg_keys/' + $scope.gpgKey.id + '/content';
24
+ $scope.uploadURL = 'katello/api/v2/gpg_keys/' + $scope.gpgKey.id + '/content';
24
25
  });
25
26
 
26
27
  $scope.uploadContent = function (content) {
27
28
  if (content && (content !== "Please wait...")) {
28
29
  if (content.status === 'success') {
29
- $scope.$parent.successMessages = [translate('GPG Key successfully uploaded')];
30
+ Notification.setSuccessMessage(translate('GPG Key successfully uploaded'));
30
31
  $scope.uploadStatus = 'success';
31
32
  $scope.gpgKey.$get();
32
33
  } else {
33
- $scope.$parent.errorMessages = [content.displayMessage];
34
+ Notification.setErrorMessage(content.displayMessage);
34
35
  $scope.uploadStatus = 'error';
35
36
  }
36
37
 
@@ -44,7 +45,7 @@ angular.module('Bastion.gpg-keys').controller('GPGKeyDetailsInfoController',
44
45
  } else {
45
46
  error = content;
46
47
  }
47
- $scope.$parent.errorMessages = [translate('Error during upload: ') + error];
48
+ Notification.setErrorMessage(translate('Error during upload: ') + error);
48
49
  $scope.uploadStatus = 'error';
49
50
  $scope.progress.uploading = false;
50
51
  };
@@ -7,15 +7,13 @@
7
7
  * @requires $q
8
8
  * @requires translate
9
9
  * @requires ApiErrorHandler
10
+ * @requires Notification
10
11
  *
11
12
  * @description
12
13
  * Provides the functionality for the gpgKey details action pane.
13
14
  */
14
15
  angular.module('Bastion.gpg-keys').controller('GPGKeyDetailsController',
15
- ['$scope', 'GPGKey', '$q', 'translate', 'ApiErrorHandler', function ($scope, GPGKey, $q, translate, ApiErrorHandler) {
16
- $scope.errorMessages = [];
17
- $scope.successMessages = [];
18
-
16
+ ['$scope', 'GPGKey', '$q', 'translate', 'ApiErrorHandler', 'Notification', function ($scope, GPGKey, $q, translate, ApiErrorHandler, Notification) {
19
17
  $scope.panel = $scope.panel || {error: false, loading: false};
20
18
 
21
19
  $scope.gpgKey = GPGKey.get({id: $scope.$stateParams.gpgKeyId}, function () {
@@ -31,11 +29,11 @@ angular.module('Bastion.gpg-keys').controller('GPGKeyDetailsController',
31
29
 
32
30
  gpgKey.$update(function (response) {
33
31
  deferred.resolve(response);
34
- $scope.successMessages.push(translate('GPG Key updated'));
32
+ Notification.setSuccessMessage(translate('GPG Key updated'));
35
33
 
36
34
  }, function (response) {
37
35
  deferred.reject(response);
38
- $scope.errorMessages = [response.data.displayMessage];
36
+ Notification.setErrorMessage(response.data.displayMessage);
39
37
  });
40
38
 
41
39
  return deferred.promise;
@@ -11,7 +11,7 @@ angular.module('Bastion.gpg-keys').factory('GPGKey',
11
11
  ['BastionResource', 'CurrentOrganization',
12
12
  function (BastionResource, CurrentOrganization) {
13
13
 
14
- return BastionResource('/katello/api/v2/gpg_keys/:id/:action',
14
+ return BastionResource('katello/api/v2/gpg_keys/:id/:action',
15
15
  {id: '@id', 'organization_id': CurrentOrganization},
16
16
  {
17
17
  autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
@@ -7,31 +7,28 @@
7
7
  * @requires translate
8
8
  * @requires GPGKey
9
9
  * @requires CurrentOrganization
10
- * @requires GlobalNotification
10
+ * @requires Notification
11
11
  *
12
12
  * @description
13
13
  * Controls the creation of an empty GPGKey object for use by sub-controllers.
14
14
  */
15
15
  angular.module('Bastion.gpg-keys').controller('NewGPGKeyController',
16
- ['$scope', '$state', 'translate', 'GPGKey', 'CurrentOrganization', 'GlobalNotification',
17
- function ($scope, $state, translate, GPGKey, CurrentOrganization, GlobalNotification) {
18
- $scope.successMessages = [];
19
- $scope.errorMessages = [];
20
-
16
+ ['$scope', '$state', 'translate', 'GPGKey', 'CurrentOrganization', 'Notification',
17
+ function ($scope, $state, translate, GPGKey, CurrentOrganization, Notification) {
21
18
  $scope.panel = {loading: false};
22
19
  $scope.gpgKey = new GPGKey();
23
20
  $scope.CurrentOrganization = CurrentOrganization;
24
21
  $scope.progress = {uploading: false};
25
- $scope.uploadURL = '/katello/api/v2/gpg_keys?organization_id=' + CurrentOrganization;
22
+ $scope.uploadURL = 'katello/api/v2/gpg_keys?organization_id=' + CurrentOrganization;
26
23
 
27
24
  $scope.uploadContent = function (response) {
28
25
  if (response) {
29
26
  if (angular.isUndefined(response.errors)) {
30
27
  $scope.uploadStatus = 'success';
31
28
  $scope.transitionTo('gpg-key.info', {gpgKeyId: response.id});
32
- GlobalNotification.setSuccessMessage(translate('GPG key %s has been created.').replace('%s', response.name));
29
+ Notification.setSuccessMessage(translate('GPG key %s has been created.').replace('%s', response.name));
33
30
  } else {
34
- $scope.errorMessages = [translate("An error occurred while creating the GPG key: ") + response.displayMessage];
31
+ Notification.setErrorMessage(translate("An error occurred while creating the GPG key: ") + response.displayMessage);
35
32
  $scope.uploadStatus = 'error';
36
33
  }
37
34