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
@@ -7,16 +7,14 @@
7
7
  * @requires $uibModal
8
8
  * @requires translate
9
9
  * @requires Product
10
- * @requires GlobalNotification
10
+ * @requires Notification
11
11
  * @requires ApiErrorHandler
12
12
  *
13
13
  * @description
14
14
  * Provides the functionality for the product details action pane.
15
15
  */
16
16
  angular.module('Bastion.products').controller('ProductDetailsController',
17
- ['$scope', '$state', '$uibModal', 'translate', 'Product', 'GlobalNotification', 'ApiErrorHandler', function ($scope, $state, $uibModal, translate, Product, GlobalNotification, ApiErrorHandler) {
18
- $scope.successMessages = [];
19
- $scope.errorMessages = [];
17
+ ['$scope', '$state', '$uibModal', 'translate', 'Product', 'Notification', 'ApiErrorHandler', function ($scope, $state, $uibModal, translate, Product, Notification, ApiErrorHandler) {
20
18
  $scope.page = {
21
19
  error: false,
22
20
  loading: true
@@ -45,7 +43,9 @@ angular.module('Bastion.products').controller('ProductDetailsController',
45
43
  $state.go('product.tasks.details', {taskId: task.id});
46
44
  },
47
45
  function (response) {
48
- $scope.errorMessages = response.data.errors;
46
+ angular.forEach(response.data.errors, function (error) {
47
+ Notification.setErrorMessage(error);
48
+ });
49
49
  });
50
50
  };
51
51
 
@@ -71,7 +71,7 @@ angular.module('Bastion.products').controller('ProductDetailsController',
71
71
 
72
72
  $scope.updateProduct = function () {
73
73
  function success() {
74
- GlobalNotification.setSuccessMessage(translate('Sync Plan created and assigned to product.'));
74
+ Notification.setSuccessMessage(translate('Sync Plan created and assigned to product.'));
75
75
  }
76
76
 
77
77
  function error(response) {
@@ -4,6 +4,8 @@
4
4
  *
5
5
  * @requires $scope
6
6
  * @requires $location
7
+ * @requires Notification
8
+ * @requires translate
7
9
  * @requires ApiErrorHandler
8
10
  * @requires Product
9
11
  * @requires Repository
@@ -16,8 +18,8 @@
16
18
  * Provides the functionality for manipulating repositories attached to a product.
17
19
  */
18
20
  angular.module('Bastion.products').controller('ProductRepositoriesController',
19
- ['$scope', '$state', '$location', 'ApiErrorHandler', 'Product', 'Repository', 'RepositoryBulkAction', 'CurrentOrganization', 'Nutupane',
20
- function ($scope, $state, $location, ApiErrorHandler, Product, Repository, RepositoryBulkAction, CurrentOrganization, Nutupane) {
21
+ ['$scope', '$state', '$location', 'Notification', 'translate', 'ApiErrorHandler', 'Product', 'Repository', 'RepositoryBulkAction', 'CurrentOrganization', 'Nutupane',
22
+ function ($scope, $state, $location, Notification, translate, ApiErrorHandler, Product, Repository, RepositoryBulkAction, CurrentOrganization, Nutupane) {
21
23
  var repositoriesNutupane = new Nutupane(Repository, {
22
24
  'product_id': $scope.$stateParams.productId,
23
25
  'search': $location.search().search || "",
@@ -35,8 +37,6 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
35
37
  };
36
38
  }
37
39
 
38
- $scope.successMessages = [];
39
- $scope.errorMessages = [];
40
40
  $scope.page = $scope.page || {loading: false};
41
41
 
42
42
  $scope.product = Product.get({id: $scope.$stateParams.productId}, function () {
@@ -46,13 +46,6 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
46
46
  ApiErrorHandler.handleGETRequestErrors(response, $scope);
47
47
  });
48
48
 
49
- $scope.close = function(index) {
50
- $scope.removingTasks.splice(index, 1);
51
- };
52
-
53
-
54
- $scope.removingTasks = [];
55
-
56
49
  $scope.table = repositoriesNutupane.table;
57
50
 
58
51
  $scope.syncSelectedRepositories = function () {
@@ -62,7 +55,9 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
62
55
  $state.go('product.tasks.details', {taskId: task.id});
63
56
  },
64
57
  function (response) {
65
- $scope.errorMessages = response.data.errors;
58
+ angular.forEach(response.data.errors, function (error) {
59
+ Notification.setErrorMessage(error);
60
+ });
66
61
  });
67
62
  };
68
63
 
@@ -70,11 +65,17 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
70
65
  var success, error, params = getParams(), removalPromise;
71
66
 
72
67
  success = function (response) {
73
- $scope.removingTasks.push(response.task.id);
68
+ var message = translate('Removal of selected repositories initiated successfully. ');
69
+
70
+ message += translate('<a href="/foreman_tasks/tasks/%taskId">Click here to check the status of the task.</a>').
71
+ replace('%taskId', response.task.id);
72
+ Notification.setSuccessMessage(message);
74
73
  };
75
74
 
76
75
  error = function (response) {
77
- $scope.errorMessages = response.data.errors;
76
+ angular.forEach(response.data.errors, function (errorMessage) {
77
+ Notification.setErrorMessage(errorMessage);
78
+ });
78
79
  };
79
80
 
80
81
  $scope.removingRepositories = true;
@@ -4,16 +4,19 @@
4
4
  *
5
5
  * @requires $scope
6
6
  * @requires $state
7
+ * @requires Notification
7
8
  * @requires Repository
8
9
  *
9
10
  * @description
10
11
  * Provides the functionality for advanced repository syncing
11
12
  */
12
13
  angular.module('Bastion.repositories').controller('RepositoryAdvancedSyncController',
13
- ['$scope', '$state', 'Repository',
14
- function ($scope, $state, Repository) {
14
+ ['$scope', '$state', 'Notification', 'Repository',
15
+ function ($scope, $state, Notification, Repository) {
15
16
  var errorHandler = function errorHandler(response) {
16
- $scope.errorMessages = response.data.errors;
17
+ angular.forEach(response.data.errors, function (error) {
18
+ Notification.setErrorMessage(error);
19
+ });
17
20
  $scope.working = false;
18
21
  };
19
22
 
@@ -5,7 +5,7 @@
5
5
  * @requires $scope
6
6
  * @requires $q
7
7
  * @requires translate
8
- * @requires GlobalNotification
8
+ * @requires Notification
9
9
  * @requires GPGKey
10
10
  * @requires CurrentOrganization
11
11
  * @requires Checksum
@@ -17,14 +17,14 @@
17
17
  * Provides the functionality for the repository details info page.
18
18
  */
19
19
  angular.module('Bastion.repositories').controller('RepositoryDetailsInfoController',
20
- ['$scope', '$q', 'translate', 'GlobalNotification', 'GPGKey', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture',
21
- function ($scope, $q, translate, GlobalNotification, GPGKey, CurrentOrganization, Checksum, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture) {
20
+ ['$scope', '$q', 'translate', 'Notification', 'GPGKey', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture',
21
+ function ($scope, $q, translate, Notification, GPGKey, CurrentOrganization, Checksum, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture) {
22
22
  $scope.organization = CurrentOrganization;
23
23
 
24
24
  $scope.progress = {uploading: false};
25
25
 
26
26
  $scope.repository.$promise.then(function () {
27
- $scope.uploadURL = '/katello/api/v2/repositories/' + $scope.repository.id + '/upload_content';
27
+ $scope.uploadURL = 'katello/api/v2/repositories/' + $scope.repository.id + '/upload_content';
28
28
  });
29
29
 
30
30
  $scope.gpgKeys = function () {
@@ -62,11 +62,11 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
62
62
 
63
63
  repository.$update(function (response) {
64
64
  deferred.resolve(response);
65
- GlobalNotification.setSuccessMessage(translate('Repository Saved.'));
65
+ Notification.setSuccessMessage(translate('Repository Saved.'));
66
66
  }, function (response) {
67
67
  deferred.reject(response);
68
68
  _.each(response.data.errors, function (errorMessage) {
69
- GlobalNotification.setErrorMessage(translate("An error occurred saving the Repository: ") + errorMessage);
69
+ Notification.setErrorMessage(translate("An error occurred saving the Repository: ") + errorMessage);
70
70
  });
71
71
  });
72
72
 
@@ -89,11 +89,11 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
89
89
 
90
90
  if (returnData !== null && returnData.status === 'success') {
91
91
  uploaded = returnData.filenames.join(', ');
92
- GlobalNotification.setSuccessMessage(translate('Successfully uploaded content: ') + uploaded);
92
+ Notification.setSuccessMessage(translate('Successfully uploaded content: ') + uploaded);
93
93
  $scope.repository.$get();
94
94
  } else {
95
95
  error = returnData.displayMessage;
96
- GlobalNotification.setErrorMessage(translate('Error during upload: ') + error);
96
+ Notification.setErrorMessage(translate('Error during upload: ') + error);
97
97
  }
98
98
 
99
99
  $scope.progress.uploading = false;
@@ -106,7 +106,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
106
106
  } else {
107
107
  error = content;
108
108
  }
109
- GlobalNotification.setErrorMessage(translate('Error during upload: ') + error);
109
+ Notification.setErrorMessage(translate('Error during upload: ') + error);
110
110
  $scope.progress.uploading = false;
111
111
  };
112
112
 
@@ -5,6 +5,7 @@
5
5
  * @requires $scope
6
6
  * @requries $state
7
7
  * @requires translate
8
+ * @requires Notification
8
9
  * @requires Nutupane
9
10
  * @requires Repository
10
11
  * @requires Package
@@ -17,8 +18,8 @@
17
18
  * Provides the functionality for the repository details pane.
18
19
  */
19
20
  angular.module('Bastion.repositories').controller('RepositoryManageContentController',
20
- ['$scope', '$state', 'translate', 'Nutupane', 'Repository', 'Package', 'PackageGroup', 'PuppetModule', 'DockerManifest', 'OstreeBranch', 'File',
21
- function ($scope, $state, translate, Nutupane, Repository, Package, PackageGroup, PuppetModule, DockerManifest, OstreeBranch, File) {
21
+ ['$scope', '$state', 'translate', 'Notification', 'Nutupane', 'Repository', 'Package', 'PackageGroup', 'PuppetModule', 'DockerManifest', 'OstreeBranch', 'File',
22
+ function ($scope, $state, translate, Notification, Nutupane, Repository, Package, PackageGroup, PuppetModule, DockerManifest, OstreeBranch, File) {
22
23
  var currentState, contentTypes;
23
24
 
24
25
  function success(response, selected) {
@@ -32,13 +33,13 @@ angular.module('Bastion.repositories').controller('RepositoryManageContentContro
32
33
  } else {
33
34
  message = translate("Successfully removed %s items.").replace('%s', selected.length);
34
35
  }
35
- $scope.successMessages = [message];
36
+ Notification.setSuccessMessage(message);
36
37
  $scope.generationTaskId = response.output['task_id'];
37
38
  }
38
39
 
39
40
  function error(data) {
40
41
  $scope.table.working = true;
41
- $scope.errorMessages = [data.response.displayMessage];
42
+ Notification.setErrorMessage(data.response.displayMessage);
42
43
  }
43
44
 
44
45
  $scope.repository = Repository.get({id: $scope.$stateParams.repositoryId}, function (repository) {
@@ -1,5 +1,5 @@
1
1
  (function () {
2
- function RepositoryDetailsController($scope, $state, translate, Repository, Product, ApiErrorHandler) {
2
+ function RepositoryDetailsController($scope, $state, translate, Repository, Product, ApiErrorHandler, Notification) {
3
3
  /**
4
4
  * @ngdoc object
5
5
  * @name Bastion.repositories.controller:RepositoryDetailsController
@@ -9,18 +9,18 @@
9
9
  * @requires translate
10
10
  * @requires Repository
11
11
  * @requires ApiErrorHandler
12
+ * @requires Notification
12
13
  *
13
14
  * @description
14
15
  * Core functionality for Repository.
15
16
  */
16
17
 
17
18
  var errorHandler = function errorHandler(response) {
18
- $scope.errorMessages = response.data.errors;
19
+ angular.forEach(response.data.errors, function (error) {
20
+ Notification.setErrorMessage(error);
21
+ });
19
22
  };
20
23
 
21
- $scope.successMessages = [];
22
- $scope.errorMessages = [];
23
-
24
24
  $scope.page = {
25
25
  error: false,
26
26
  loading: true
@@ -84,7 +84,7 @@
84
84
 
85
85
  success = function () {
86
86
  $scope.transitionTo('product.repositories', {productId: $scope.$stateParams.productId});
87
- $scope.$parent.successMessages = [translate('Repository "%s" successfully deleted').replace('%s', repositoryName)];
87
+ Notification.setSuccessMessage(translate('Repository "%s" successfully deleted').replace('%s', repositoryName));
88
88
  };
89
89
 
90
90
  repository.$delete(success, errorHandler);
@@ -112,5 +112,5 @@
112
112
 
113
113
  angular.module('Bastion.repositories').controller('RepositoryDetailsController', RepositoryDetailsController);
114
114
 
115
- RepositoryDetailsController.$inject = ['$scope', '$state', 'translate', 'Repository', 'Product', 'ApiErrorHandler'];
115
+ RepositoryDetailsController.$inject = ['$scope', '$state', 'translate', 'Repository', 'Product', 'ApiErrorHandler', 'Notification'];
116
116
  })();
@@ -3,8 +3,6 @@
3
3
  <div>
4
4
  <h3 translate>Advanced Sync</h3>
5
5
 
6
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
7
-
8
6
  <div data-extend-template="products/details/repositories/details/views/repository-advanced-sync-options.html"></div>
9
7
 
10
8
  <div class="control-group buttons">
@@ -270,8 +270,6 @@
270
270
  <h5 translate ng-show="repository.content_type === 'yum'">Upload Package</h5>
271
271
  <h5 translate ng-show="repository.content_type === 'file'">Upload File</h5>
272
272
 
273
- <div bst-alerts success-messages="uploadSuccessMessages" error-messages="uploadErrorMessages"></div>
274
-
275
273
  <form role="form"
276
274
  action="{{ uploadURL }}"
277
275
  ng-upload="uploadContent(content)"
@@ -1,8 +1,6 @@
1
1
  <span page-title ng-model="repository">{{ 'Manage Docker Manifests for Repository:' | translate }} {{ repository.name }}</span>
2
2
 
3
3
  <div data-block="messages">
4
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
6
4
  <div bst-alert="success" ng-hide="generationTaskId === undefined">
7
5
  <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
8
6
  <p translate>
@@ -1,8 +1,6 @@
1
1
  <span page-title ng-model="repository">{{ 'Manage Files for Repository:' | translate }} {{ repository.name }}</span>
2
2
 
3
3
  <div data-block="messages">
4
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
6
4
  <div bst-alert="success" ng-hide="generationTaskId === undefined">
7
5
  <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
8
6
  <p translate>
@@ -1,8 +1,6 @@
1
1
  <span page-title ng-model="repository">{{ 'Manage OSTree Branches for Repository:' | translate }} {{ repository.name }}</span>
2
2
 
3
3
  <div data-block="messages">
4
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
6
4
  <div bst-alert="success" ng-hide="generationTaskId === undefined">
7
5
  <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
8
6
  <p translate>
@@ -1,8 +1,6 @@
1
1
  <span page-title ng-model="repository">{{ 'Manage Packages for Repository:' | translate }} {{ repository.name }}</span>
2
2
 
3
3
  <div data-block="messages">
4
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
6
4
  <div bst-alert="success" ng-hide="generationTaskId === undefined">
7
5
  <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
8
6
  <p translate>
@@ -3,8 +3,6 @@
3
3
  <h3 translate>Manage Puppet Modules for {{ repository.name }}</h3>
4
4
 
5
5
  <div data-block="messages">
6
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
7
-
8
6
  <div bst-alert="success" ng-hide="generationTaskId === undefined">
9
7
  <button type="button" class="close" ng-click="clearTaskId()">&times;</button>
10
8
  <p translate>
@@ -8,7 +8,7 @@
8
8
  * @requires GPGKey
9
9
  * @requires FormUtils
10
10
  * @requires translate
11
- * @requires GlobalNotification
11
+ * @requires Notification
12
12
  * @requires ApiErrorHandler
13
13
  * @requires BastionConfig
14
14
  * @requires Checksum
@@ -20,11 +20,11 @@
20
20
  * Controls the creation of an empty Repository object for use by sub-controllers.
21
21
  */
22
22
  angular.module('Bastion.repositories').controller('NewRepositoryController',
23
- ['$scope', 'Repository', 'Product', 'GPGKey', 'FormUtils', 'translate', 'GlobalNotification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture',
24
- function ($scope, Repository, Product, GPGKey, FormUtils, translate, GlobalNotification, ApiErrorHandler, BastionConfig, Checksum, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture) {
23
+ ['$scope', 'Repository', 'Product', 'GPGKey', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture',
24
+ function ($scope, Repository, Product, GPGKey, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture) {
25
25
 
26
26
  function success() {
27
- GlobalNotification.setSuccessMessage(translate('Repository %s successfully created.').replace('%s', $scope.repository.name));
27
+ Notification.setSuccessMessage(translate('Repository %s successfully created.').replace('%s', $scope.repository.name));
28
28
  $scope.transitionTo('product.repositories', {productId: $scope.$stateParams.productId});
29
29
  }
30
30
 
@@ -48,7 +48,7 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
48
48
  });
49
49
 
50
50
  if (!foundError) {
51
- GlobalNotification.setErrorMessage(response.data.displayMessage);
51
+ Notification.setErrorMessage(response.data.displayMessage);
52
52
  }
53
53
  }
54
54
 
@@ -57,9 +57,6 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
57
57
  loading: true
58
58
  };
59
59
 
60
- $scope.successMessages = [];
61
- $scope.errorMessages = [];
62
-
63
60
  $scope.repository = new Repository({'product_id': $scope.$stateParams.productId, unprotected: true,
64
61
  'checksum_type': null, 'mirror_on_sync': true, 'verify_ssl_on_sync': true,
65
62
  'download_policy': BastionConfig.defaultDownloadPolicy, 'arch': null,
@@ -2,8 +2,6 @@
2
2
 
3
3
  <h3 translate>New Repository</h3>
4
4
 
5
- <div bst-alerts error-messages="errorMessages" success-messages="successMessages"></div>
6
-
7
5
  <div data-block="content" class="row">
8
6
  <form name="repositoryForm" class="col-sm-5" novalidate role="form">
9
7
  <div>
@@ -12,7 +12,7 @@ angular.module('Bastion.repositories').factory('Repository',
12
12
  ['BastionResource', 'CurrentOrganization',
13
13
  function (BastionResource, CurrentOrganization) {
14
14
 
15
- return BastionResource('/katello/api/v2/repositories/:id/:action',
15
+ return BastionResource('katello/api/v2/repositories/:id/:action',
16
16
  {id: '@id', 'organization_id': CurrentOrganization},
17
17
  {
18
18
  update: { method: 'PUT' },
@@ -41,7 +41,7 @@ angular.module('Bastion.repositories').factory('Repository',
41
41
  angular.module('Bastion.repositories').factory('RepositoryBulkAction',
42
42
  ['BastionResource', 'CurrentOrganization', function (BastionResource, CurrentOrganization) {
43
43
 
44
- return BastionResource('/katello/api/v2/repositories/bulk/:action',
44
+ return BastionResource('katello/api/v2/repositories/bulk/:action',
45
45
  {'organization_id': CurrentOrganization},
46
46
  {
47
47
  removeRepositories: {method: 'PUT', params: {action: 'destroy'}},
@@ -1,25 +1,5 @@
1
1
  <span page-title ng-model="product">{{ 'Repositories for Product:' | translate }} {{ product.name }}</span>
2
2
 
3
- <div data-block="messages">
4
- <div bst-alert="success" ng-show="removingTasks.length > 0" close="close($index)" ng-repeat="task in removingTasks">
5
- <div>
6
- <p translate>Removal of selected repositories initiated successfully. </p>
7
- <div><a href="/foreman_tasks/tasks/{{task}}" translate>Click here to check the status of the task.</a></div>
8
- </div>
9
- </div>
10
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
11
- <div bst-alert="danger" ng-show="warningMessages">
12
- <strong translate>There were errors while removing the following Repositories:</strong>
13
- <ol>
14
- <li data-ng-repeat="message in warningMessages">
15
- {{ message }}
16
- </li>
17
- </ol>
18
- <a ui-sref="product.tasks.details({taskId: warningTaskId})" translate>Click here to see the task for the successful removals.</a>
19
- </div>
20
- </div>
21
-
22
-
23
3
  <div data-extend-template="layouts/partials/table.html">
24
4
  <div data-block="list-actions">
25
5
  <button type="button" class="btn btn-default"