katello 3.7.1.1 → 3.8.0.rc1

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

Potentially problematic release.


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

Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -7
  3. data/app/assets/javascripts/katello/common/index.js +0 -1
  4. data/app/assets/javascripts/katello/sync_management/index.js +0 -1
  5. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +477 -0
  6. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  7. data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -2
  8. data/app/controllers/katello/api/v2/api_controller.rb +3 -1
  9. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +15 -1
  12. data/app/controllers/katello/api/v2/environments_controller.rb +5 -2
  13. data/app/controllers/katello/api/v2/errata_controller.rb +48 -34
  14. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
  15. data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
  16. data/app/controllers/katello/api/v2/host_packages_controller.rb +5 -1
  17. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
  18. data/app/controllers/katello/api/v2/packages_controller.rb +33 -22
  19. data/app/controllers/katello/api/v2/products_controller.rb +1 -1
  20. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -5
  21. data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -10
  22. data/app/controllers/katello/api/v2/sync_plans_controller.rb +1 -1
  23. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +20 -12
  24. data/app/controllers/katello/remote_execution_controller.rb +6 -6
  25. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +9 -37
  26. data/app/lib/actions/katello/content_view/promote.rb +6 -2
  27. data/app/lib/actions/katello/content_view_version/after_promote_hook.rb +11 -0
  28. data/app/lib/actions/katello/content_view_version/before_promote_hook.rb +11 -0
  29. data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
  30. data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -12
  31. data/app/lib/actions/pulp/consumer/content_install.rb +1 -1
  32. data/app/lib/actions/pulp/consumer/content_uninstall.rb +1 -1
  33. data/app/lib/actions/pulp/consumer/content_update.rb +1 -1
  34. data/app/lib/katello/resources/registry.rb +40 -0
  35. data/app/lib/katello/util/package.rb +9 -4
  36. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
  37. data/app/models/katello/content_view.rb +4 -12
  38. data/app/models/katello/content_view_version.rb +26 -0
  39. data/app/models/katello/glue/candlepin/owner.rb +8 -0
  40. data/app/models/katello/glue/candlepin/pool.rb +11 -11
  41. data/app/models/katello/glue/candlepin/repository.rb +1 -1
  42. data/app/models/katello/glue/pulp/repos.rb +1 -0
  43. data/app/models/katello/host/content_facet.rb +1 -2
  44. data/app/models/katello/kt_environment.rb +6 -0
  45. data/app/models/katello/product_content.rb +1 -4
  46. data/app/models/katello/repository.rb +2 -0
  47. data/app/models/katello/rpm.rb +118 -14
  48. data/app/services/katello/puppet_class_importer_extensions.rb +17 -20
  49. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +1 -3
  50. data/app/views/katello/api/v2/common/copy.json.rabl +3 -0
  51. data/app/views/katello/api/v2/environments/show.json.rabl +1 -1
  52. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
  53. data/app/views/katello/api/v2/repositories/show.json.rabl +4 -2
  54. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +3 -2
  55. data/config/katello.yaml +89 -0
  56. data/config/routes.rb +0 -1
  57. data/config/routes/api/registry.rb +29 -0
  58. data/config/routes/api/v2.rb +1 -1
  59. data/db/migrate/20180612163403_add_foreign_key_to_hypervisor_id.rb +0 -3
  60. data/db/migrate/20180614184822_add_unauthenticated_pull.rb +9 -0
  61. data/db/migrate/20180618195941_add_description_to_repository.rb +5 -0
  62. data/db/seeds.d/75-job_templates.rb +2 -5
  63. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +3 -4
  64. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -4
  65. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
  66. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +1 -1
  67. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
  68. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
  69. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +1 -0
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js +32 -18
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +1 -1
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-docker.html +2 -0
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +32 -23
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -0
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +8 -0
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +1 -1
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +1 -1
  78. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +0 -5
  79. data/lib/katello/engine.rb +1 -0
  80. data/lib/katello/permission_creator.rb +2 -0
  81. data/lib/katello/permissions/registry_permissions.rb +20 -0
  82. data/lib/katello/plugin.rb +1 -0
  83. data/lib/katello/tasks/clean_backend_objects.rake +3 -12
  84. data/lib/katello/version.rb +1 -1
  85. data/package.json +7 -10
  86. data/webpack/components/Search/Search.test.js +1 -3
  87. data/webpack/containers/Application/config.js +2 -9
  88. data/webpack/containers/Application/index.js +2 -4
  89. data/webpack/mockRequest.js +3 -3
  90. data/webpack/move_to_foreman/common/helpers.js +8 -45
  91. data/webpack/move_to_foreman/components/common/{EmptyState → emptyState}/index.js +3 -16
  92. data/webpack/move_to_foreman/components/common/table/components/Table.js +1 -1
  93. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +2 -2
  94. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionCell.test.js.snap +1 -1
  95. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +1 -1
  96. data/webpack/move_to_pf/LoadingState/LoadingState.js +14 -27
  97. data/webpack/move_to_pf/LoadingState/LoadingState.test.js +4 -8
  98. data/webpack/move_to_pf/react-bootstrap-select/index.js +1 -12
  99. data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -0
  100. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
  101. data/webpack/redux/actions/RedHatRepositories/sets.js +1 -1
  102. data/webpack/redux/consts.js +0 -6
  103. data/webpack/redux/reducers/index.js +0 -2
  104. data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +23 -14
  105. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +1 -1
  106. data/webpack/scenes/RedHatRepositories/components/SearchBar.js +0 -1
  107. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +1 -3
  108. data/webpack/scenes/RedHatRepositories/index.js +3 -7
  109. data/webpack/scenes/RedHatRepositories/index.scss +0 -1
  110. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +8 -3
  111. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +1 -30
  112. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +28 -111
  113. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js +1 -3
  114. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +1 -6
  115. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +424 -519
  116. data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +4 -7
  117. data/webpack/scenes/Subscriptions/Details/index.js +3 -5
  118. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +34 -78
  119. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +24 -5
  120. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -9
  121. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +0 -3
  122. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +8 -20
  123. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +1 -3
  124. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +7 -34
  125. data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +16 -9
  126. data/webpack/scenes/Subscriptions/Manifest/index.js +0 -1
  127. data/webpack/scenes/Subscriptions/SubscriptionActions.js +26 -5
  128. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -1
  129. data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
  130. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +4 -11
  131. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +36 -31
  132. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +12 -3
  133. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +27 -57
  134. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +3 -2
  135. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +5 -10
  136. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +5 -10
  137. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +4 -49
  138. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +3 -8
  139. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +11 -21
  140. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +8 -5
  141. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -2
  142. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +3 -9
  143. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -14
  144. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +17 -11
  145. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +5 -8
  146. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +58 -45
  147. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +4 -11
  148. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
  149. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +3 -16
  150. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +365 -392
  151. data/webpack/scenes/Subscriptions/index.js +0 -1
  152. data/webpack/services/api/fixtures.js +353 -0
  153. data/webpack/services/api/index.js +1 -17
  154. data/webpack/test_setup.js +0 -2
  155. metadata +16 -37
  156. data/config/katello.yml +0 -59
  157. data/webpack/__mocks__/foremanReact/components/BreadcrumbBar.js +0 -3
  158. data/webpack/__mocks__/foremanReact/redux.js +0 -3
  159. data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +0 -8
  160. data/webpack/components/SelectOrg/SelectOrg.scss +0 -3
  161. data/webpack/components/SelectOrg/SelectOrgAction.js +0 -41
  162. data/webpack/components/SelectOrg/SelectOrgReducer.js +0 -33
  163. data/webpack/components/SelectOrg/SetOrganization.js +0 -116
  164. data/webpack/components/WithOrganization/withOrganization.js +0 -28
  165. data/webpack/global_test_setup.js +0 -6
  166. data/webpack/helpers/caret.js +0 -6
  167. data/webpack/move_to_pf/Select/Select.js +0 -40
  168. data/webpack/scenes/Products/ProductActions.js +0 -24
  169. data/webpack/scenes/Products/ProductConstants.js +0 -3
  170. data/webpack/scenes/Products/__tests__/ProductActions.test.js +0 -40
  171. data/webpack/scenes/Products/__tests__/products.fixtures.js +0 -90
  172. data/webpack/scenes/RedHatRepositories/components/EnabledRepositoryContent.js +0 -34
  173. data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepository.test.js +0 -36
  174. data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepositoryContent.test.js +0 -27
  175. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepository.test.js.snap +0 -25
  176. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepositoryContent.test.js.snap +0 -47
  177. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailEnabledProducts.js +0 -54
  178. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js +0 -29
  179. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.scss +0 -9
  180. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailEnabledProducts.test.js +0 -18
  181. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailProduct.test.js +0 -13
  182. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailEnabledProducts.test.js.snap +0 -45
  183. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProduct.test.js.snap +0 -67
  184. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +0 -110
  185. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -228
  186. data/webpack/scenes/Tasks/helpers.js +0 -52
  187. data/webpack/services/api/testHelpers.js +0 -28
data/config/routes.rb CHANGED
@@ -23,5 +23,4 @@ Katello::Engine.routes.draw do
23
23
 
24
24
  match '/xui' => 'react#index', :via => [:get]
25
25
  match '/xui/*page' => 'react#index', :via => [:get]
26
- match '/organization_select' => 'react#index', :via => [:get]
27
26
  end
@@ -0,0 +1,29 @@
1
+ require 'katello/api/mapper_extensions'
2
+
3
+ class ActionDispatch::Routing::Mapper
4
+ include Katello::Routing::MapperExtensions
5
+ end
6
+
7
+ Katello::Engine.routes.draw do
8
+ scope :module => :api do
9
+ scope :module => :registry, :constraints => { :tag => /[0-9a-zA-Z\-_.:]*/, :digest => /[0-9a-zA-Z:]*/ } do
10
+ match '/v2/token' => 'registry_proxies#token', :via => :get
11
+ match '/v2/token' => 'registry_proxies#token', :via => :post
12
+ match '/v2/*repository/manifests/:tag' => 'registry_proxies#pull_manifest', :via => :get
13
+ match '/v2/*repository/manifests/:tag' => 'registry_proxies#push_manifest', :via => :put
14
+ match '/v2/*repository/blobs/:digest' => 'registry_proxies#pull_blob', :via => :get
15
+ match '/v2/*repository/blobs/:digest' => 'registry_proxies#check_blob', :via => :head
16
+ match '/v2/*repository/blobs/uploads' => 'registry_proxies#start_upload_blob', :via => :post
17
+ match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#chunk_upload_blob', :via => :post
18
+ match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#finish_upload_blob', :via => :put
19
+ match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#upload_blob', :via => :patch
20
+ match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#status_upload_blob', :via => :get
21
+ match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#cancel_upload_blob', :via => :delete
22
+ match '/v2/_catalog' => 'registry_proxies#catalog', :via => :get
23
+ match '/v2/*repository/tags/list' => 'registry_proxies#tags_list', :via => :get
24
+ match '/v2' => 'registry_proxies#ping', :via => :get
25
+ match '/v1/_ping' => 'registry_proxies#v1_ping', :via => :get
26
+ match '/v1/search' => 'registry_proxies#v1_search', :via => :get
27
+ end
28
+ end
29
+ end
@@ -109,7 +109,7 @@ Katello::Engine.routes.draw do
109
109
  end
110
110
  end
111
111
 
112
- api_resources :content_view_versions, :except => [:create, :update] do
112
+ api_resources :content_view_versions, :except => [:create] do
113
113
  member do
114
114
  post :promote
115
115
  post :export
@@ -1,8 +1,5 @@
1
1
  class AddForeignKeyToHypervisorId < ActiveRecord::Migration[5.1]
2
2
  def up
3
- # Update all pools that have a hypervisor reference that's not a host before we add the FK
4
- ::Katello::Pool.where.not(hypervisor_id: nil).where.not(hypervisor_id: Host::Managed.all).update_all(hypervisor_id: nil)
5
-
6
3
  add_foreign_key(:katello_pools, :hosts,
7
4
  :name => 'katello_pools_hypervisor_fk', :column => 'hypervisor_id')
8
5
  end
@@ -0,0 +1,9 @@
1
+ class AddUnauthenticatedPull < ActiveRecord::Migration[5.1]
2
+ def up
3
+ add_column :katello_environments, :registry_unauthenticated_pull, :boolean, :default => false
4
+ end
5
+
6
+ def down
7
+ remove_column :katello_environments, :registry_unauthenticated_pull
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddDescriptionToRepository < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :katello_repositories, :description, :text, :null => true
4
+ end
5
+ end
@@ -7,13 +7,10 @@ if Katello.with_remote_execution?
7
7
  sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
8
8
  # import! was renamed to import_raw! around 1.3.1
9
9
  if JobTemplate.respond_to?('import_raw!')
10
- template = JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
10
+ JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
11
11
  else
12
- template = JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
12
+ JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
13
13
  end
14
-
15
- template.organizations << Organization.unscoped.all if template && template.organizations.empty?
16
- template.locations << Location.unscoped.all if template && template.locations.empty?
17
14
  end
18
15
  end
19
16
  end
@@ -28,15 +28,14 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkRepositorySe
28
28
  nutupaneParams = {
29
29
  'organization_id': CurrentOrganization,
30
30
  'offset': 0,
31
+ 'sort_by': 'name',
32
+ 'sort_order': 'ASC',
31
33
  'paged': true
32
34
  };
33
35
 
34
- nutupane = new Nutupane(RepositorySet, nutupaneParams,
35
- 'queryPaged', {disableAutoLoad: true});
36
+ nutupane = new Nutupane(RepositorySet, nutupaneParams, 'queryPaged');
36
37
  $scope.controllerName = 'katello_repository_sets';
37
38
  nutupane.masterOnly = true;
38
- nutupane.setSearchKey('repoSetsSearch');
39
- nutupane.load();
40
39
 
41
40
  $scope.table = nutupane.table;
42
41
 
@@ -44,14 +44,11 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscription
44
44
  });
45
45
  };
46
46
 
47
-
48
- $scope.contentNutupane = new Nutupane(Subscription, params,
49
- 'queryPaged', {disableAutoLoad: true});
47
+ $scope.contentNutupane = new Nutupane(Subscription, params);
50
48
  $scope.controllerName = 'katello_subscriptions';
51
49
  $scope.table = $scope.contentNutupane.table;
52
50
  $scope.contentNutupane.setSearchKey('subscriptionSearch');
53
51
  $scope.contentNutupane.masterOnly = true;
54
- $scope.contentNutupane.load();
55
52
  $scope.groupedSubscriptions = {};
56
53
 
57
54
  $scope.$watch('table.rows', function (rows) {
@@ -65,7 +65,7 @@
65
65
  class="table table-striped table-bordered">
66
66
  <thead>
67
67
  <tr bst-table-head row-select>
68
- <th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
68
+ <th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity (To Add)</span></th>
69
69
  <th bst-table-column="attached" sortable><span translate>Attached</span></th>
70
70
  <th bst-table-column="type"><span translate>Type</span></th>
71
71
  <th bst-table-column="startDate" sortable><span translate>Starts</span></th>
@@ -30,7 +30,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostRegisterControlle
30
30
  $scope.noCapsulesFound = _.isEmpty(data.results);
31
31
  $scope.selectedCapsule = _.isEmpty(defaultCapsule) ? data.results[0] : defaultCapsule[0];
32
32
  });
33
-
33
+ $scope.hideSwitcher = true;
34
34
 
35
35
  $scope.hostname = function (url) {
36
36
  if (url) {
@@ -18,7 +18,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostPackagesInstalled
18
18
  var packagesNutupane;
19
19
 
20
20
  $scope.removeSelectedPackages = function () {
21
- var selected = _.map($scope.table.getSelected(), 'name');
21
+ var selected = $scope.table.getSelected();
22
22
 
23
23
  if (!$scope.working) {
24
24
  $scope.working = true;
@@ -39,7 +39,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostAddSubscriptionsC
39
39
  $scope.groupedSubscriptions = SubscriptionsHelper.groupByProductName(rows);
40
40
  });
41
41
 
42
- $scope.getAmountSelectorValues = SubscriptionsHelper.getAmountSelectorValues;
42
+ $scope.amountSelectorValues = SubscriptionsHelper.getAmountSelectorValues;
43
43
  $scope.showMatchHost = false;
44
44
  $scope.showMatchInstalled = false;
45
45
  $scope.showNoOverlap = false;
@@ -63,6 +63,7 @@ angular.module('Bastion.content-views').config(['$stateProvider', function ($sta
63
63
  .state('content-view.version.details', {
64
64
  url: '',
65
65
  permission: 'view_content_views',
66
+ controller: 'ContentViewVersionController',
66
67
  templateUrl: 'content-views/versions/views/content-view-version-details.html',
67
68
  ncyBreadcrumb: {
68
69
  label: '{{ version.name }}',
@@ -1,15 +1,22 @@
1
- (function () {
2
- 'use strict';
3
-
4
- /**
5
- * @ngdoc controller
6
- * @name Bastion.content-views.versions.controller:ContentViewVersion
7
- *
8
- * @description
9
- * Handles fetching of a content view version based on the route ID and putting it
10
- * on the scope.
11
- */
12
- function ContentViewVersionController($scope, ContentViewVersion) {
1
+ /**
2
+ * @ngdoc controller
3
+ * @name Bastion.content-views.versions.controller:ContentViewVersion
4
+ *
5
+ * @requires $scope
6
+ * @requires $state
7
+ * @requires $q
8
+ * @requires translate
9
+ * @requires ContentViewVersion
10
+ * @requires Notification
11
+ *
12
+ * @description
13
+ * Handles fetching of a content view version based on the route ID and putting it
14
+ * on the scope.
15
+ */
16
+
17
+ angular.module('Bastion.content-views.versions').controller('ContentViewVersionController',
18
+ ['$scope', '$state', '$q', 'translate', 'ContentViewVersion', 'Notification',
19
+ function ($scope, $state, $q, translate, ContentViewVersion, Notification) {
13
20
 
14
21
  $scope.version = ContentViewVersion.get({id: $scope.$stateParams.versionId});
15
22
 
@@ -34,12 +41,19 @@
34
41
  return found;
35
42
  };
36
43
 
37
- }
44
+ $scope.save = function (version) {
45
+ var deferred = $q.defer();
38
46
 
39
- angular
40
- .module('Bastion.content-views.versions')
41
- .controller('ContentViewVersionController', ContentViewVersionController);
47
+ version.$update(function (response) {
48
+ deferred.resolve(response);
49
+ Notification.setSuccessMessage(translate('Content View version updated'));
42
50
 
43
- ContentViewVersionController.$inject = ['$scope', 'ContentViewVersion'];
51
+ }, function (response) {
52
+ deferred.reject(response);
53
+ Notification.setErrorMessage(response.data.displayMessage);
54
+ });
44
55
 
45
- })();
56
+ return deferred.promise;
57
+ };
58
+ }]
59
+ );
@@ -1,7 +1,7 @@
1
1
  <div class="details">
2
2
  <div class="detail">
3
3
  <span class="info-label" translate>Description</span>
4
- <span class="info-value" bst-edit-textarea="version.description" readonly="true"></span>
4
+ <span class="info-value" bst-edit-textarea="version.description" on-save="save(version)"></span>
5
5
  </div>
6
6
 
7
7
  <div class="detail">
@@ -5,6 +5,7 @@
5
5
  <th bst-table-column translate>Name</th>
6
6
  <th bst-table-column translate>Product</th>
7
7
  <th bst-table-column translate>Repository</th>
8
+ <th bst-table-column translate>Container Image Name</th>
8
9
  <th bst-table-column translate>Tags</th>
9
10
  </tr>
10
11
  </thead>
@@ -14,6 +15,7 @@
14
15
  <td bst-table-cell>{{ repository.name }}</td>
15
16
  <td bst-table-cell>{{ repository.product.name }}</td>
16
17
  <td bst-table-cell>{{ repository.relative_path }}</td>
18
+ <td bst-table-cell>{{ repository.container_repository_name }}</td>
17
19
  <td bst-table-cell class="number-cell">{{ repository.content_counts.docker_tag || 0}}</td>
18
20
  </tr>
19
21
  </tbody>
@@ -1,30 +1,39 @@
1
1
  <span page-title ng-model="environment">{{ 'Lifecycle Environment:' | translate }} {{ environment.name }}</span>
2
2
 
3
- <div data-extend-template="layouts/two-column-details.html">
4
- <div data-block="left-column">
5
- <h4 translate>Basic Information</h4>
3
+ <div data-block="left-column">
4
+ <h4 translate>Basic Information</h4>
6
5
 
7
- <dl class="dl-horizontal dl-horizontal-left">
8
- <dt translate>Name</dt>
9
- <dd bst-edit-text="environment.name"
10
- on-save="save(environment)"
11
- readonly="denied('edit_lifecycle_environments', environment) || environment.library">
12
- </dd>
6
+ <dl class="dl-horizontal dl-horizontal-left">
7
+ <dt translate>Name</dt>
8
+ <dd bst-edit-text="environment.name"
9
+ on-save="save(environment)"
10
+ readonly="denied('edit_lifecycle_environments', environment) || environment.library">
11
+ </dd>
13
12
 
14
- <dt translate>Label</dt>
15
- <dd>{{ environment.label }}</dd>
13
+ <dt translate>Label</dt>
14
+ <dd>{{ environment.label }}</dd>
16
15
 
17
- <dt translate>Registry Name Pattern</dt>
18
- <dd bst-edit-textarea="environment.registry_name_pattern"
19
- on-save="save(environment)"
20
- readonly="denied('edit_lifecycle_environments', environment)">
21
- </dd>
16
+ <dt translate>Description</dt>
17
+ <dd bst-edit-textarea="environment.description"
18
+ on-save="save(environment)"
19
+ readonly="denied('edit_lifecycle_environments', environment) || environment.library">
20
+ </dd>
21
+ </dl>
22
+
23
+ <h4 translate>Container Image Registry</h4>
24
+
25
+ <dl class="dl-horizontal dl-horizontal-left">
26
+ <dt translate>Unauthenticated Pull</dt>
27
+ <dd bst-edit-checkbox="environment.registry_unauthenticated_pull"
28
+ formatter="booleanToYesNo"
29
+ on-save="save(environment)"
30
+ readonly="denied('edit_lifecycle_environments', environment)">
31
+ </dd>
32
+ <dt translate>Registry Name Pattern</dt>
33
+ <dd bst-edit-textarea="environment.registry_name_pattern"
34
+ on-save="save(environment)"
35
+ readonly="denied('edit_lifecycle_environments', environment)">
36
+ </dd>
37
+ </dl>
22
38
 
23
- <dt translate>Description</dt>
24
- <dd bst-edit-textarea="environment.description"
25
- on-save="save(environment)"
26
- readonly="denied('edit_lifecycle_environments', environment) || environment.library">
27
- </dd>
28
- </dl>
29
- </div>
30
39
  </div>
@@ -14,6 +14,12 @@
14
14
  <dt translate>Label</dt>
15
15
  <dd>{{ repository.label }}</dd>
16
16
 
17
+ <dt translate>Description</dt>
18
+ <dd bst-edit-text="repository.description"
19
+ on-save="save(repository)"
20
+ readonly="product.redhat || denied('edit_products', product)">
21
+ </dd>
22
+
17
23
  <dt translate>Backend Identifier</dt>
18
24
  <dd>{{ repository.backend_identifier }}</dd>
19
25
 
@@ -22,6 +22,14 @@
22
22
  type="text"
23
23
  required/>
24
24
  </div>
25
+
26
+ <div bst-form-group label="{{ 'Description' | translate }}">
27
+ <input id="description"
28
+ name="description"
29
+ ng-model="repository.description"
30
+ type="text"/>
31
+ </div>
32
+
25
33
  <div bst-form-group label="{{ 'Type' | translate }}">
26
34
  <select required
27
35
  id="content_type"
@@ -32,7 +32,7 @@ angular.module('Bastion.products').controller('DiscoveryController',
32
32
  {id: "yum", name: "Yum Repositories"},
33
33
  {id: "docker", name: "Container Images"}
34
34
  ];
35
-
35
+ $scope.hideSwitcher = true;
36
36
  if (!$scope.table) {
37
37
  $scope.table = {
38
38
  rows: [],
@@ -44,7 +44,7 @@
44
44
 
45
45
  <div bst-form-group ng-show="createRepoChoices.newProduct === 'true' && contentCredentials.length !== 0"
46
46
  label="{{ 'GPG Key' | translate }}">
47
- <select class="form-control" ng-model="createRepoChoices.product.gpg_key_id"
47
+ <select class="form-control" ng-model="createRepoChoices.product.content_credential_id"
48
48
  ng-options="content_credential.id as content_credential.name for content_credential in contentCredentials"/>
49
49
  </div>
50
50
 
@@ -38,8 +38,3 @@
38
38
  .bottom-padded-content {
39
39
  padding-bottom: 10%;
40
40
  }
41
-
42
- .modal-body .uib-time input {
43
- width: 100%;
44
- padding-right: 6px;
45
- }
@@ -103,6 +103,7 @@ module Katello
103
103
  initializer "katello.paths", :before => :sooner_routes_load do |app|
104
104
  app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/v2.rb"
105
105
  app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/rhsm.rb"
106
+ app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/registry.rb"
106
107
  app.routes_reloader.paths.unshift("#{Katello::Engine.root}/config/routes/overrides.rb")
107
108
  end
108
109
 
@@ -73,6 +73,7 @@ module Katello
73
73
  'katello/api/v2/content_view_puppet_modules' => [:index, :show, :auto_complete_search],
74
74
  'katello/api/v2/content_view_versions' => [:index, :show, :auto_complete_search],
75
75
  'katello/api/v2/content_view_components' => [:index, :show],
76
+ 'katello/api/v2/packages' => [:index],
76
77
  'katello/api/v2/package_groups' => [:index, :show, :auto_complete_search, :compare],
77
78
  'katello/api/v2/errata' => [:index, :show, :auto_complete_search, :compare, :available_errata],
78
79
  'katello/api/v2/puppet_modules' => [:index, :show, :auto_complete_search, :compare],
@@ -112,6 +113,7 @@ module Katello
112
113
  @plugin.permission :edit_content_views,
113
114
  {
114
115
  'katello/api/v2/content_views' => [:update],
116
+ 'katello/api/v2/content_view_versions' => [:update],
115
117
  'katello/api/v2/content_view_filters' => [:create, :update, :destroy],
116
118
  'katello/api/v2/content_view_filter_rules' => [:create, :update, :destroy],
117
119
  'katello/api/v2/content_view_puppet_modules' => [:create, :update, :destroy],
@@ -0,0 +1,20 @@
1
+ require 'katello/plugin.rb'
2
+
3
+ Foreman::AccessControl.permission(:create_personal_access_tokens).actions.concat [
4
+ 'katello/api/registry/registry_proxies/token',
5
+ 'katello/api/registry/registry_proxies/v1_ping',
6
+ 'katello/api/registry/registry_proxies/ping',
7
+ 'katello/api/registry/registry_proxies/v1_search',
8
+ 'katello/api/registry/registry_proxies/catalog',
9
+ 'katello/api/registry/registry_proxies/tags_list',
10
+ 'katello/api/registry/registry_proxies/pull_manifest',
11
+ 'katello/api/registry/registry_proxies/push_manifest',
12
+ 'katello/api/registry/registry_proxies/pull_blob',
13
+ 'katello/api/registry/registry_proxies/check_blob',
14
+ 'katello/api/registry/registry_proxies/start_upload_blob',
15
+ 'katello/api/registry/registry_proxies/upload_blob',
16
+ 'katello/api/registry/registry_proxies/chunk_upload_blob',
17
+ 'katello/api/registry/registry_proxies/finish_upload_blob',
18
+ 'katello/api/registry/registry_proxies/status_upload_blob',
19
+ 'katello/api/registry/registry_proxies/cancel_upload_blob'
20
+ ]
@@ -214,6 +214,7 @@ Foreman::Plugin.register :katello do
214
214
  logger :cp_proxy, :enabled => true
215
215
  logger :action, :enabled => true
216
216
  logger :manifest_import_logger, :enabled => true
217
+ logger :registry_proxy, :enabled => true
217
218
 
218
219
  widget 'errata_widget', :name => 'Latest Errata', :sizey => 1, :sizex => 6
219
220
  widget 'content_views_widget', :name => 'Content Views', :sizey => 1, :sizex => 6