katello 3.14.1 → 3.15.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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  3. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +3 -3
  4. data/app/controllers/katello/api/v2/repositories_controller.rb +1 -1
  5. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -1
  6. data/app/lib/actions/katello/content_view/publish.rb +2 -0
  7. data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -0
  8. data/app/lib/actions/katello/host/reassign.rb +1 -2
  9. data/app/lib/actions/katello/host/update_content_view.rb +1 -1
  10. data/app/lib/actions/katello/host/update_release_version.rb +1 -1
  11. data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -1
  12. data/app/lib/actions/katello/product/update_http_proxy.rb +1 -1
  13. data/app/lib/actions/katello/repository/clone_contents.rb +1 -1
  14. data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -1
  15. data/app/lib/actions/katello/repository/create.rb +1 -1
  16. data/app/lib/actions/katello/repository/metadata_generate.rb +2 -8
  17. data/app/lib/actions/katello/repository/refresh_repository.rb +5 -1
  18. data/app/lib/actions/katello/repository/sync.rb +6 -1
  19. data/app/lib/actions/middleware/execute_if_contents_changed.rb +1 -1
  20. data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +1 -1
  21. data/app/lib/actions/pulp/repository/clear.rb +1 -1
  22. data/app/lib/actions/pulp/repository/remove_units.rb +1 -1
  23. data/app/lib/actions/pulp3/abstract_async_task.rb +1 -2
  24. data/app/lib/actions/pulp3/capsule_content/generate_metadata.rb +1 -1
  25. data/app/lib/actions/pulp3/capsule_content/refresh_distribution.rb +2 -2
  26. data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -1
  27. data/app/lib/actions/pulp3/content_migration.rb +17 -0
  28. data/app/lib/actions/pulp3/import_migration.rb +14 -0
  29. data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +4 -1
  30. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +3 -3
  31. data/app/lib/actions/pulp3/orchestration/repository/create.rb +3 -1
  32. data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +0 -2
  33. data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
  34. data/app/lib/actions/pulp3/orchestration/repository/refresh_if_needed.rb +18 -0
  35. data/app/lib/actions/pulp3/orchestration/repository/refresh_repos.rb +1 -1
  36. data/app/lib/actions/pulp3/orchestration/repository/remove_units.rb +1 -1
  37. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -1
  38. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +1 -1
  39. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_distributions.rb +16 -0
  40. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_remotes.rb +16 -0
  41. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb +1 -6
  42. data/app/lib/actions/pulp3/orphan_cleanup/remove_orphans.rb +15 -0
  43. data/app/lib/actions/pulp3/orphan_cleanup/remove_unneeded_repos.rb +2 -2
  44. data/app/lib/actions/pulp3/repository/create.rb +1 -1
  45. data/app/lib/actions/pulp3/repository/create_publication.rb +1 -1
  46. data/app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb +1 -0
  47. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +4 -2
  48. data/app/lib/actions/pulp3/repository/save_version.rb +12 -8
  49. data/app/lib/actions/pulp3/repository/upload_file.rb +2 -2
  50. data/app/lib/katello/api/v2/rendering.rb +1 -0
  51. data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -1
  52. data/app/lib/katello/http_resource.rb +4 -1
  53. data/app/lib/katello/resources/registry.rb +9 -2
  54. data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -0
  55. data/app/models/katello/concerns/organization_extensions.rb +4 -4
  56. data/app/models/katello/concerns/smart_proxy_extensions.rb +33 -7
  57. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +34 -12
  58. data/app/models/katello/content_view_docker_filter.rb +1 -1
  59. data/app/models/katello/content_view_version.rb +20 -47
  60. data/app/models/katello/glue/candlepin/owner.rb +4 -0
  61. data/app/models/katello/glue/candlepin/product.rb +12 -6
  62. data/app/models/katello/glue/pulp/repos.rb +6 -3
  63. data/app/models/katello/host/subscription_facet.rb +4 -5
  64. data/app/models/katello/ping.rb +3 -4
  65. data/app/models/katello/pool.rb +1 -1
  66. data/app/models/katello/pulp3/distribution_reference.rb +1 -1
  67. data/app/models/katello/repository.rb +14 -0
  68. data/app/models/katello/root_repository.rb +0 -2
  69. data/app/models/katello/subscription_status.rb +7 -0
  70. data/app/models/setting/content.rb +10 -3
  71. data/app/services/katello/candlepin/consumer.rb +1 -0
  72. data/app/services/katello/pulp/repository.rb +1 -1
  73. data/app/services/katello/pulp/repository/deb.rb +2 -0
  74. data/app/services/katello/pulp/repository/docker.rb +2 -0
  75. data/app/services/katello/pulp/repository/file.rb +2 -0
  76. data/app/services/katello/pulp/repository/yum.rb +9 -5
  77. data/app/services/katello/pulp3/ansible_collection.rb +1 -1
  78. data/app/services/katello/pulp3/api/ansible_collection.rb +46 -0
  79. data/app/services/katello/pulp3/api/core.rb +159 -0
  80. data/app/services/katello/pulp3/api/docker.rb +62 -0
  81. data/app/services/katello/pulp3/api/file.rb +54 -0
  82. data/app/services/katello/pulp3/api/yum.rb +54 -0
  83. data/app/services/katello/pulp3/distribution.rb +17 -0
  84. data/app/services/katello/pulp3/docker_blob.rb +1 -1
  85. data/app/services/katello/pulp3/docker_manifest.rb +1 -1
  86. data/app/services/katello/pulp3/docker_manifest_list.rb +1 -1
  87. data/app/services/katello/pulp3/docker_tag.rb +1 -1
  88. data/app/services/katello/pulp3/erratum.rb +109 -0
  89. data/app/services/katello/pulp3/file_unit.rb +1 -1
  90. data/app/services/katello/pulp3/migration.rb +71 -0
  91. data/app/services/katello/pulp3/migration_plan.rb +27 -0
  92. data/app/services/katello/pulp3/module_stream.rb +47 -0
  93. data/app/services/katello/pulp3/package_group.rb +66 -0
  94. data/app/services/katello/pulp3/pulp_content_unit.rb +9 -1
  95. data/app/services/katello/pulp3/repository.rb +118 -348
  96. data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -29
  97. data/app/services/katello/pulp3/repository/docker.rb +23 -43
  98. data/app/services/katello/pulp3/repository/file.rb +1 -37
  99. data/app/services/katello/pulp3/repository/yum.rb +36 -37
  100. data/app/services/katello/pulp3/repository_mirror.rb +171 -0
  101. data/app/services/katello/pulp3/rpm.rb +143 -0
  102. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +92 -0
  103. data/app/services/katello/pulp3/smart_proxy_repository.rb +38 -9
  104. data/app/services/katello/pulp3/srpm.rb +74 -0
  105. data/app/services/katello/pulp3/yum_metadata_file.rb +20 -0
  106. data/app/services/katello/registration_manager.rb +12 -11
  107. data/app/services/katello/repository_type.rb +11 -3
  108. data/app/services/katello/repository_type_manager.rb +11 -0
  109. data/app/views/dashboard/_subscription_widget.html.erb +6 -1
  110. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +4 -11
  111. data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +2 -1
  112. data/app/views/katello/api/v2/docker_manifests/show.json.rabl +2 -1
  113. data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
  114. data/app/views/katello/api/v2/packages/show.json.rabl +2 -1
  115. data/app/views/katello/api/v2/repositories/base.json.rabl +2 -0
  116. data/app/views/katello/api/v2/repositories/show.json.rabl +2 -1
  117. data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +2 -0
  118. data/app/views/katello/api/v2/subscription_facet/show.json.rabl +1 -1
  119. data/app/views/smart_proxies/plugins/_pulp3.html.erb +19 -0
  120. data/app/views/smart_proxies/pulp_status.html.erb +10 -0
  121. data/db/migrate/20190930192813_add_pulp3_hrefs_to_content_types.rb +10 -0
  122. data/db/migrate/20191204020703_migrate_distribution_reference_to_use_repo_id.rb +22 -0
  123. data/db/migrate/20191204214919_add_content_view_version_counts.rb +7 -0
  124. data/db/migrate/20191213161248_add_dmi_uuid_to_katello_subscription_facets.rb +6 -0
  125. data/db/migrate/20200109162354_drop_host_update_lock_setting.rb +5 -0
  126. data/db/seeds.d/104-proxy.rb +1 -1
  127. data/db/seeds.d/111-upgrade_tasks.rb +3 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +3 -2
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +8 -3
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +1 -1
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +1 -1
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-http-proxy-modal.html +3 -3
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +2 -2
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +4 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +1 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
  139. data/lib/katello/engine.rb +25 -25
  140. data/lib/katello/plugin.rb +1 -1
  141. data/lib/katello/repository_types/ansible_collection.rb +1 -0
  142. data/lib/katello/repository_types/docker.rb +2 -1
  143. data/lib/katello/repository_types/file.rb +1 -1
  144. data/lib/katello/repository_types/yum.rb +29 -7
  145. data/lib/katello/tasks/pulp3_content_switchover.rake +21 -0
  146. data/lib/katello/tasks/pulp3_migration.rake +21 -0
  147. data/lib/katello/tasks/reset.rake +43 -16
  148. data/lib/katello/tasks/update_content_default_http_proxy.rake +3 -3
  149. data/lib/katello/tasks/upgrades/3.15/reindex_rpm_modular.rake +23 -0
  150. data/lib/katello/tasks/upgrades/3.15/set_sub_facet_dmi_uuid.rake +16 -0
  151. data/lib/katello/version.rb +1 -1
  152. data/package.json +9 -10
  153. data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +0 -63
  154. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
  155. data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +17 -2
  156. data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +1 -0
  157. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
  158. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +2 -3
  159. data/webpack/scenes/RedHatRepositories/components/__tests__/RepositorySetRepositories.test.js +44 -28
  160. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +77 -45
  161. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -6
  162. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +0 -1
  163. data/webpack/test_setup.js +3 -1
  164. metadata +62 -24
  165. data/app/lib/actions/katello/host/update.rb +0 -84
  166. data/app/lib/actions/pulp3/repository/create_version.rb +0 -19
  167. data/app/views/katello/api/v2/smart_proxies/download_policy.json.rabl +0 -1
@@ -12,7 +12,9 @@ module Katello
12
12
  end
13
13
  end
14
14
 
15
- def_field :allow_creation_by_user, :service_class, :pulp3_service_class, :pulp3_plugin, :pulp3_skip_publication
15
+ def_field :allow_creation_by_user, :service_class, :pulp3_service_class, :pulp3_plugin,
16
+ :pulp3_skip_publication, :pulp3_api_class
17
+
16
18
  attr_accessor :metadata_publish_matching_check, :index_additional_data_proc
17
19
  attr_reader :id, :unique_content_per_repo
18
20
 
@@ -31,7 +33,12 @@ module Katello
31
33
  end
32
34
 
33
35
  def content_types_to_index
34
- @content_types.select { |type| type.index }
36
+ if SmartProxy.pulp_master.pulp3_repository_type_support?(self)
37
+ # type.index being false supersedes type.index_on_pulp3 being true
38
+ @content_types.select { |type| type.index && type.index_on_pulp3 }
39
+ else
40
+ @content_types.select { |type| type.index }
41
+ end
35
42
  end
36
43
 
37
44
  def default_managed_content_type(model_class = nil)
@@ -68,7 +75,7 @@ module Katello
68
75
  end
69
76
 
70
77
  class ContentType
71
- attr_accessor :model_class, :priority, :pulp2_service_class, :pulp3_service_class, :index, :uploadable, :removable
78
+ attr_accessor :model_class, :priority, :pulp2_service_class, :pulp3_service_class, :index, :uploadable, :removable, :index_on_pulp3
72
79
 
73
80
  def initialize(options)
74
81
  self.model_class = options[:model_class]
@@ -76,6 +83,7 @@ module Katello
76
83
  self.pulp2_service_class = options[:pulp2_service_class]
77
84
  self.pulp3_service_class = options[:pulp3_service_class]
78
85
  self.index = options[:index].nil? ? true : options[:index]
86
+ self.index_on_pulp3 = options[:index_on_pulp3].nil? ? true : options[:index_on_pulp3]
79
87
  self.uploadable = options[:uploadable] || false
80
88
  self.removable = options[:removable] || false
81
89
  end
@@ -28,6 +28,13 @@ module Katello
28
28
  list.flatten
29
29
  end
30
30
 
31
+ def indexable_content_types
32
+ repository_types.
33
+ values.
34
+ map(&:content_types_to_index).
35
+ flatten
36
+ end
37
+
31
38
  def creatable_by_user?(repository_type)
32
39
  return false unless (type = find(repository_type))
33
40
  type.allow_creation_by_user
@@ -51,6 +58,10 @@ module Katello
51
58
  repository_types[repository_type.to_s]
52
59
  end
53
60
 
61
+ def find_by(attribute, value)
62
+ repository_types.values.find { |type| type.try(attribute) == value }
63
+ end
64
+
54
65
  def find_repository_type(katello_label)
55
66
  repository_types.values.each do |repo_type|
56
67
  repo_type.content_types.each do |content_type|
@@ -2,8 +2,13 @@
2
2
  <%= _("Host Subscription Status") %>
3
3
  </h4>
4
4
 
5
- <% unless Organization.current.present? %>
5
+ <% if Organization.current.blank? %>
6
6
  <p class="ca"><%= _("Please select an organization to view subscription status.") %></p>
7
+ <% elsif Organization.current.golden_ticket?%>
8
+ <div class="bastion alert alert-info">
9
+ <span translate>This organization has Simple Content Access enabled. Hosts can consume from all repositories in their Content View regardless of subscription status.
10
+ </span>
11
+ </div>
7
12
  <% else %>
8
13
  <% total_count = total_host_count() %>
9
14
  <% partial_consumer_count = partial_consumer_count() %>
@@ -8,17 +8,10 @@ attributes :published_in_composite_content_view_ids
8
8
  attributes :content_view_id
9
9
  attributes :default
10
10
  attributes :description
11
- attributes :package_count
12
- attributes :module_stream_count
13
- attributes :srpm_count
14
- attributes :file_count
15
- attributes :package_group_count
16
- attributes :puppet_module_count
17
- attributes :docker_manifest_count
18
- attributes :docker_manifest_list_count
19
- attributes :docker_tag_count
20
- attributes :ostree_branch_count
21
- attributes :deb_count
11
+
12
+ node do |version|
13
+ version.content_counts_map
14
+ end
22
15
 
23
16
  node :errata_counts do |version|
24
17
  partial('katello/api/v2/errata/counts', :object => Katello::RelationPresenter.new(version.errata))
@@ -4,7 +4,8 @@ attributes :id, :schema_version, :digest, :manifest_type
4
4
 
5
5
  child :docker_tags => :tags do
6
6
  attributes :associated_meta_tag_identifier => :id
7
- attributes :repository_id, :name
7
+ attributes :repository => :repository_id
8
+ attributes :name
8
9
  end
9
10
 
10
11
  child :docker_manifests => :manifests do
@@ -4,7 +4,8 @@ attributes :id, :schema_version, :digest, :manifest_type
4
4
 
5
5
  child :docker_tags => :tags do
6
6
  attributes :associated_meta_tag_identifier => :id
7
- attributes :repository_id, :name
7
+ attributes :repository => :repository_id
8
+ attributes :name
8
9
  end
9
10
 
10
11
  child :docker_manifest_lists => :manifest_lists do
@@ -1,4 +1,4 @@
1
1
  object @resource
2
2
 
3
3
  extends "katello/api/v2/package_groups/base"
4
- extends "katello/api/v2/package_groups/backend", :object => Katello::Pulp::PackageGroup.new(@resource.pulp_id)
4
+ extends "katello/api/v2/package_groups/backend", :object => SmartProxy.pulp_master.pulp3_repository_type_support?('yum') ? Katello::Pulp3::PackageGroup.new(@resource.pulp_id) : Katello::Pulp::PackageGroup.new(@resource.pulp_id)
@@ -1,4 +1,5 @@
1
1
  object @resource
2
2
 
3
3
  extends "katello/api/v2/packages/base"
4
- extends "katello/api/v2/packages/backend", :object => Katello::Pulp::Rpm.new(@resource.pulp_id)
4
+ extends "katello/api/v2/packages/backend",
5
+ :object => SmartProxy.pulp_master!.content_service("rpm").new(@resource.pulp_id)
@@ -49,6 +49,8 @@ end
49
49
  node :last_sync_words do |object|
50
50
  if (object.latest_dynflow_sync.respond_to?('ended_at') && object.latest_dynflow_sync.ended_at)
51
51
  time_ago_in_words(Time.parse(object.latest_dynflow_sync.ended_at.to_s))
52
+ elsif (audit = object.latest_sync_audit)
53
+ time_ago_in_words(audit.created_at)
52
54
  end
53
55
  end
54
56
 
@@ -26,9 +26,10 @@ glue(@resource.root) do
26
26
  attributes :deb_releases, :deb_components, :deb_architectures
27
27
  attributes :http_proxy_policy
28
28
  attributes :http_proxy_id
29
+ attributes :http_proxy_name
29
30
 
30
31
  node :http_proxy do
31
- attributes :id => @resource.root&.http_proxy_id, :name => @resource.root&.http_proxy&.name
32
+ attributes :id => @resource.root&.http_proxy&.id, :name => @resource.root&.http_proxy&.name, :policy => @resource.root&.http_proxy_policy
32
33
  end
33
34
 
34
35
  attributes :ignorable_content
@@ -0,0 +1,2 @@
1
+ attributes :download_policy
2
+ attributes :supported_pulp_types
@@ -22,5 +22,5 @@ child :subscription_facet => :subscription_facet_attributes do |_facet|
22
22
  attributes :id, :name
23
23
  end
24
24
 
25
- attributes :host_type, :dmi_system_uuid
25
+ attributes :host_type, :dmi_uuid
26
26
  end
@@ -0,0 +1,19 @@
1
+ <div class="row">
2
+ <h3><%= _('Pulpcore') %></h3>
3
+ </div>
4
+ <%= show_feature_version('pulpcore') %>
5
+ <div class="row">
6
+ <div class="col-md-4">
7
+ <strong><%= _('Supported Content Types') %></strong>
8
+ </div>
9
+ <div class="col-md-8">
10
+ <ul style="list-style-type: none; padding: 0">
11
+ <% @smart_proxy.supported_pulp_types[:pulp3][:supported_types].each do |content_type| %>
12
+ <li><%= content_type %></li>
13
+ <% end %>
14
+ <% @smart_proxy.supported_pulp_types[:pulp3][:overriden_to_pulp2].each do |content_type| %>
15
+ <li><%= content_type + " (supported, but overridden to use Pulp 2)" %></li>
16
+ <% end %>
17
+ </ul>
18
+ </div>
19
+ </div>
@@ -22,3 +22,13 @@
22
22
  <div class="col-md-8">
23
23
  <%= @pulp_status['known_workers'].size %><br />
24
24
  </div>
25
+ <div class="col-md-4">
26
+ <strong><%= _('Supported Content Types') %></strong>
27
+ </div>
28
+ <div class="col-md-8">
29
+ <ul style="list-style-type: none; padding: 0">
30
+ <% @smart_proxy.supported_pulp_types[:pulp2][:supported_types].each do |content_type| %>
31
+ <li><%= content_type %></li>
32
+ <% end %>
33
+ </ul>
34
+ </div>
@@ -0,0 +1,10 @@
1
+ class AddPulp3HrefsToContentTypes < ActiveRecord::Migration[5.2]
2
+ def change
3
+ content_models = [Katello::Rpm, Katello::ModuleStream, Katello::Erratum, Katello::PackageGroup, Katello::YumMetadataFile,
4
+ Katello::Srpm, Katello::FileUnit, Katello::DockerManifestList, Katello::DockerManifest, Katello::DockerTag]
5
+
6
+ content_models.each do |model|
7
+ add_column model.table_name, :migrated_pulp3_href, :string, :default => nil, :null => true
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,22 @@
1
+ class MigrateDistributionReferenceToUseRepoId < ActiveRecord::Migration[5.2]
2
+ class DistributionReference < Katello::Model
3
+ self.table_name = 'katello_distribution_references'
4
+ end
5
+
6
+ def up
7
+ #this was done before being deployed in production, so this should be okay,
8
+ # although existing pulp3 repos will not work properly
9
+ DistributionReference.destroy_all
10
+
11
+ #work around sqlite add_column with non_null issue
12
+ add_column :katello_distribution_references, :repository_id, :integer, :index => true
13
+ change_column :katello_distribution_references, :repository_id, :integer, :null => false
14
+
15
+ remove_column :katello_distribution_references, :root_repository_id
16
+ add_foreign_key :katello_distribution_references, :katello_repositories, :column => :repository_id, :primary_key => :id
17
+ end
18
+
19
+ def down
20
+ fail ActiveRecord::IrreversibleMigration
21
+ end
22
+ end
@@ -0,0 +1,7 @@
1
+ class AddContentViewVersionCounts < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :katello_content_view_versions, :content_counts, :text
4
+ Katello::ContentViewVersion.reset_column_information
5
+ Katello::ContentViewVersion.all.each(&:update_content_counts!)
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ class AddDmiUuidToKatelloSubscriptionFacets < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :katello_subscription_facets, :dmi_uuid, :string
4
+ add_index :katello_subscription_facets, :dmi_uuid
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class DropHostUpdateLockSetting < ActiveRecord::Migration[5.2]
2
+ def up
3
+ Setting.where(name: 'host_update_lock').delete_all
4
+ end
5
+ end
@@ -16,7 +16,7 @@ User.as(::User.anonymous_api_admin.login) do
16
16
  fail "Unable to create proxy feature: #{format_errors feature}"
17
17
  end
18
18
 
19
- ["Pulp", "Pulp Node", "Pulp3"].each do |input|
19
+ ["Pulp", "Pulp Node", "Pulpcore"].each do |input|
20
20
  f = Feature.where(:name => input).first_or_create
21
21
  fail "Unable to create proxy feature: #{format_errors f}" if f.nil? || f.errors.any?
22
22
  end
@@ -10,6 +10,8 @@ UpgradeTask.define_tasks(:katello) do
10
10
  {:name => 'katello:upgrades:3.11:update_puppet_repos'},
11
11
  {:name => 'katello:upgrades:3.11:clear_checksum_type', :task_name => 'katello:upgrades:3.8:clear_checksum_type'},
12
12
  {:name => 'katello:upgrades:3.12:remove_pulp2_notifier'},
13
- {:name => 'katello:upgrades:3.13:republish_deb_metadata'}
13
+ {:name => 'katello:upgrades:3.13:republish_deb_metadata'},
14
+ {:name => 'katello:upgrades:3.15:set_sub_facet_dmi_uuid'},
15
+ {:name => 'katello:upgrades:3.15:reindex_rpm_modular'}
14
16
  ]
15
17
  end
@@ -17,8 +17,8 @@
17
17
  * A controller for providing bulk action functionality to the content hosts page.
18
18
  */
19
19
  angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscriptionsModalController',
20
- ['$scope', '$location', '$uibModalInstance', 'Nutupane', 'CurrentOrganization', 'HostBulkAction', 'Subscription', 'SubscriptionsHelper', 'Notification', 'hostIds',
21
- function ($scope, $location, $uibModalInstance, Nutupane, CurrentOrganization, HostBulkAction, Subscription, SubscriptionsHelper, Notification, hostIds) {
20
+ ['$scope', '$location', '$uibModalInstance', 'Nutupane', 'CurrentOrganization', 'HostBulkAction', 'Subscription', 'SubscriptionsHelper', 'Notification', 'hostIds', 'contentAccessMode',
21
+ function ($scope, $location, $uibModalInstance, Nutupane, CurrentOrganization, HostBulkAction, Subscription, SubscriptionsHelper, Notification, hostIds, contentAccessMode) {
22
22
  var success, error, params = {
23
23
  'organization_id': CurrentOrganization,
24
24
  'sort_order': 'ASC',
@@ -53,6 +53,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscription
53
53
  $scope.contentNutupane.masterOnly = true;
54
54
  $scope.contentNutupane.load();
55
55
  $scope.groupedSubscriptions = {};
56
+ $scope.contentAccessMode = contentAccessMode;
56
57
 
57
58
  $scope.$watch('table.rows', function (rows) {
58
59
  $scope.groupedSubscriptions = SubscriptionsHelper.groupByProductName(rows);
@@ -7,14 +7,19 @@
7
7
 
8
8
  <div class="row">
9
9
  <div class="col-sm-12">
10
- <button type="button" class="btn btn-default" ng-click="autoAttach()" ng-disabled="table.numSelected > 0">
10
+ <button type="button" class="btn btn-default" ng-click="autoAttach()" ng-disabled="table.numSelected > 0 || contentAccessMode === 'org_environment'">
11
11
  <span translate>Auto-Attach</span>
12
12
  </button>
13
- <p class="help-text" ng-show="table.numSelected === 0">
13
+
14
+ <p class="help-text" ng-show="table.numSelected === 0 && contentAccessMode != 'org_environment'">
14
15
  Auto-attach available subscriptions to all selected hosts.
15
16
  </p>
16
17
 
17
- <p class="help-text" ng-show="table.numSelected > 0">
18
+ <p>
19
+ <div content-access-mode-banner/>
20
+ </p>
21
+
22
+ <p class="help-text" ng-show="table.numSelected > 0 && contentAccessMode != 'org_environment'">
18
23
  Auto-attach uses all available subscriptions, not a selected subset.
19
24
  </p>
20
25
  </div>
@@ -19,8 +19,8 @@
19
19
  <dt translate>Subscription UUID</dt>
20
20
  <dd>{{ host.subscription_facet_attributes.uuid }}</dd>
21
21
 
22
- <dt translate>Bios UUID</dt>
23
- <dd>{{ host.subscription_facet_attributes.dmi_system_uuid }}</dd>
22
+ <dt translate>BIOS UUID</dt>
23
+ <dd>{{ host.subscription_facet_attributes.dmi_uuid }}</dd>
24
24
 
25
25
  <dt translate>Description</dt>
26
26
  <dd bst-edit-textarea="host.comment"
@@ -52,7 +52,7 @@
52
52
  ng-if="componentContentView.versions.length > 0"
53
53
  ng-model="componentContentView.versionId"
54
54
  ng-selected="latest"
55
- ng-options="cvv.id as cvv.version for cvv in availableVersions | orderBy: '-version'">
55
+ ng-options="cvv.id as cvv.version for cvv in availableVersions | orderBy: '-id'">
56
56
  </select>
57
57
  <span ng-if="componentContentView.versions.length === 0" ng-model="componentContentView.version" translate>Always Use Latest (Currently no versions)</span>
58
58
  </td>
@@ -44,7 +44,7 @@
44
44
  readonly="denied('edit_content_views', contentView)"
45
45
  selector="contentViewComponent.versionId"
46
46
  options="getAvailableVersions(contentViewComponent.content_view)"
47
- options-format="option.id as option.version for option in options | orderBy: '-version'"
47
+ options-format="option.id as option.version for option in options | orderBy: '-id'"
48
48
  on-save="saveContentViewComponent(contentViewComponent)"
49
49
  ng-if="contentViewComponent.content_view.version_count > 0">
50
50
  </span>
@@ -1,5 +1,5 @@
1
1
  <div data-extend-template="components/views/bst-modal.html">
2
- <h4 data-block="modal-header">Http Proxy Management</h4>
2
+ <h4 data-block="modal-header">HTTP Proxy Management</h4>
3
3
 
4
4
  <div data-block="modal-body">
5
5
  <div class="row">
@@ -21,7 +21,7 @@
21
21
  <form name="proxyForm" class="col-sm-5" novalidate role="form">
22
22
 
23
23
  <div class="form-group">
24
- <label translate>Http Proxy Policy:</label>
24
+ <label translate>HTTP Proxy Policy:</label>
25
25
  <select required
26
26
  id="http_proxy_policy"
27
27
  name="http_proxy_policy"
@@ -32,7 +32,7 @@
32
32
 
33
33
  <span ng-show="proxyOptions.httpProxyPolicy === 'use_selected_http_proxy'">
34
34
  <div class="form-group">
35
- <label translate>Http Proxy:</label>
35
+ <label translate>HTTP Proxy:</label>
36
36
  <span translate ng-show="proxies.length == 0">
37
37
  No HTTP Proxies found
38
38
  </span>
@@ -151,7 +151,7 @@
151
151
  </span>
152
152
 
153
153
  <span>
154
- <dt translate>Http Proxy</dt>
154
+ <dt translate>HTTP Proxy</dt>
155
155
  <dd bst-edit-custom="repository.http_proxy_policy"
156
156
  readonly="denied('edit_products', product)"
157
157
  on-save="save(repository)"
@@ -169,7 +169,7 @@
169
169
  </form>
170
170
 
171
171
  <span ng-show="repository.http_proxy_policy === 'use_selected_http_proxy'">
172
- <div translate>Http Proxy</div>
172
+ <div translate>HTTP Proxy</div>
173
173
  <span translate ng-show="proxies.length == 0">
174
174
  No HTTP Proxies found
175
175
  </span>
@@ -219,7 +219,7 @@
219
219
  </p>
220
220
  </div>
221
221
 
222
- <div bst-form-group label="{{ 'Http Proxy Policy' | translate }}">
222
+ <div bst-form-group label="{{ 'HTTP Proxy Policy' | translate }}">
223
223
  <select required
224
224
  id="http_proxy_policy"
225
225
  name="http_proxy_policy"
@@ -228,7 +228,7 @@
228
228
  </select>
229
229
  </div>
230
230
  <span ng-show="repository.http_proxy_policy === 'use_selected_http_proxy'">
231
- <div bst-form-group label="{{ 'Http Proxy' | translate }}">
231
+ <div bst-form-group label="{{ 'HTTP Proxy' | translate }}">
232
232
  <span translate ng-show="proxies.length == 0">
233
233
  No HTTP Proxies found
234
234
  </span>
@@ -88,9 +88,12 @@
88
88
  <td bst-table-cell>{{ repository.content_type }}</td>
89
89
  <td bst-table-cell>
90
90
  <span ng-show="repository.url">
91
- <span ng-show="repository.last_sync == null" translate>
91
+ <span ng-show="repository.last_sync == null && repository.last_sync_words == null" translate>
92
92
  Not Synced
93
93
  </span>
94
+ <span ng-show="repository.last_sync == null && repository.last_sync_words" translate>
95
+ Completed {{ repository.last_sync_words }} ago
96
+ </span>
94
97
  <span ng-show="repository.last_sync !== null && repository.last_sync.ended_at == null" translate>
95
98
  <a href="/foreman_tasks/tasks/{{repository.last_sync.id}}">{{ repository.last_sync.result | capitalize}}</a>
96
99
  </span>
@@ -44,7 +44,7 @@
44
44
 
45
45
  <li role="menuitem" ng-show="permitted('edit_products')" ng-class="{disabled: table.numSelected === 0}">
46
46
  <a ng-click="openHttpProxyModal()" disable-link="table.numSelected === 0" translate>
47
- Manage Http Proxy
47
+ Manage HTTP Proxy
48
48
  </a>
49
49
  </li>
50
50