katello 4.1.0.rc2.2 → 4.1.0

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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -1
  3. data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -1
  4. data/app/controllers/katello/api/v2/content_imports_controller.rb +2 -2
  5. data/app/controllers/katello/api/v2/errata_controller.rb +2 -23
  6. data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -32
  7. data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -1
  8. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +0 -1
  10. data/app/controllers/katello/api/v2/repositories_controller.rb +1 -1
  11. data/app/controllers/katello/concerns/api/v2/host_errata_extensions.rb +41 -0
  12. data/app/controllers/katello/remote_execution_controller.rb +5 -9
  13. data/app/lib/actions/candlepin/abstract_async_task.rb +9 -1
  14. data/app/lib/actions/katello/agent_action.rb +2 -0
  15. data/app/lib/actions/katello/applicability/repository/regenerate.rb +10 -10
  16. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  17. data/app/lib/actions/katello/host/upload_package_profile.rb +1 -6
  18. data/app/lib/actions/katello/host/upload_profiles.rb +2 -41
  19. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
  20. data/app/lib/actions/katello/repository/check_matching_content.rb +13 -14
  21. data/app/lib/actions/katello/repository/sync.rb +3 -14
  22. data/app/lib/actions/katello/repository/verify_checksum.rb +1 -1
  23. data/app/lib/actions/katello/sync_plan/run.rb +7 -2
  24. data/app/lib/actions/pulp3/content_guard/refresh.rb +6 -10
  25. data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
  26. data/app/lib/actions/pulp3/repository/save_version.rb +1 -0
  27. data/app/lib/katello/errors.rb +1 -1
  28. data/app/lib/katello/event_daemon/monitor.rb +1 -0
  29. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +6 -10
  30. data/app/lib/katello/util/hostgroup_facets_helper.rb +126 -0
  31. data/app/models/katello/authorization/content_view.rb +5 -9
  32. data/app/models/katello/authorization/organization.rb +4 -4
  33. data/app/models/katello/concerns/hostgroup_extensions.rb +3 -1
  34. data/app/models/katello/concerns/pulp_database_unit.rb +42 -0
  35. data/app/models/katello/concerns/redhat_extensions.rb +18 -10
  36. data/app/models/katello/erratum.rb +0 -4
  37. data/app/models/katello/glue/pulp/repo.rb +0 -19
  38. data/app/models/katello/host/content_facet.rb +11 -20
  39. data/app/models/katello/host_available_module_stream.rb +4 -4
  40. data/app/models/katello/module_stream.rb +0 -4
  41. data/app/models/katello/ping.rb +2 -9
  42. data/app/models/katello/repository.rb +14 -4
  43. data/app/models/katello/root_repository.rb +4 -0
  44. data/app/models/katello/rpm.rb +0 -4
  45. data/app/services/cert/certs.rb +4 -0
  46. data/app/services/katello/applicable_host_queue.rb +2 -2
  47. data/app/services/katello/pulp/yum_metadata_file.rb +6 -2
  48. data/app/services/katello/pulp3/api/content_guard.rb +39 -5
  49. data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -1
  50. data/app/services/katello/pulp3/repository/yum.rb +1 -0
  51. data/app/services/katello/registration_manager.rb +4 -24
  52. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +1 -0
  53. data/app/views/katello/api/v2/repository_sets/show.json.rabl +9 -5
  54. data/config/katello.yaml.example +0 -13
  55. data/config/routes/api/v2.rb +0 -1
  56. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +15 -1
  57. data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +18 -22
  58. data/db/migrate/20210512170039_add_repo_timestamps.rb +6 -0
  59. data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +11 -0
  60. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +26 -27
  61. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -3
  62. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -5
  63. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +1 -1
  64. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -2
  65. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +7 -2
  66. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +5 -2
  67. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -1
  68. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -1
  69. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -2
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +1 -1
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -2
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +2 -2
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +5 -10
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -5
  75. data/lib/katello.rb +1 -1
  76. data/lib/katello/engine.rb +0 -2
  77. data/lib/katello/permission_creator.rb +7 -14
  78. data/lib/katello/plugin.rb +9 -0
  79. data/lib/katello/tasks/fix_hostgroup_facets.rake +8 -0
  80. data/lib/katello/tasks/upgrades/4.1/update_content_import_export_perms.rake +33 -0
  81. data/lib/katello/version.rb +1 -1
  82. data/locale/action_names.rb +39 -39
  83. data/locale/bn/katello.edit.po +114 -107
  84. data/locale/bn/katello.po +12 -6
  85. data/locale/cs/katello.edit.po +118 -115
  86. data/locale/cs/katello.po +12 -6
  87. data/locale/de/katello.edit.po +126 -136
  88. data/locale/de/katello.po +12 -6
  89. data/locale/en/katello.edit.po +114 -106
  90. data/locale/en/katello.po +12 -6
  91. data/locale/es/katello.edit.po +129 -165
  92. data/locale/es/katello.po +12 -6
  93. data/locale/fr/katello.edit.po +143 -247
  94. data/locale/fr/katello.po +13 -9
  95. data/locale/gu/katello.edit.po +114 -107
  96. data/locale/gu/katello.po +12 -6
  97. data/locale/hi/katello.edit.po +114 -107
  98. data/locale/hi/katello.po +12 -6
  99. data/locale/it/katello.edit.po +121 -131
  100. data/locale/it/katello.po +12 -6
  101. data/locale/ja/katello.edit.po +141 -229
  102. data/locale/ja/katello.po +13 -9
  103. data/locale/katello.pot +124 -114
  104. data/locale/kn/katello.edit.po +114 -107
  105. data/locale/kn/katello.po +12 -6
  106. data/locale/ko/katello.edit.po +126 -136
  107. data/locale/ko/katello.po +12 -6
  108. data/locale/mr/katello.edit.po +114 -107
  109. data/locale/mr/katello.po +12 -6
  110. data/locale/or/katello.edit.po +114 -107
  111. data/locale/or/katello.po +12 -6
  112. data/locale/pa/katello.edit.po +114 -107
  113. data/locale/pa/katello.po +12 -6
  114. data/locale/pt/katello.edit.po +114 -107
  115. data/locale/pt/katello.po +12 -6
  116. data/locale/pt_BR/katello.edit.po +129 -165
  117. data/locale/pt_BR/katello.po +12 -6
  118. data/locale/ru/katello.edit.po +126 -136
  119. data/locale/ru/katello.po +12 -6
  120. data/locale/ta/katello.edit.po +114 -107
  121. data/locale/ta/katello.po +12 -6
  122. data/locale/te/katello.edit.po +114 -107
  123. data/locale/te/katello.po +12 -6
  124. data/locale/zh_CN/katello.edit.po +140 -229
  125. data/locale/zh_CN/katello.po +13 -9
  126. data/locale/zh_TW/katello.edit.po +127 -153
  127. data/locale/zh_TW/katello.po +12 -6
  128. data/webpack/components/react-bootstrap-select/index.js +1 -1
  129. metadata +26 -18
  130. data/app/lib/actions/katello/host/generate_applicability.rb +0 -41
  131. data/app/lib/actions/katello/repository/import_applicability.rb +0 -25
  132. data/app/lib/actions/pulp/consumer.rb +0 -100
  133. data/app/lib/actions/pulp/consumer/create.rb +0 -19
  134. data/app/lib/actions/pulp/consumer/destroy.rb +0 -17
  135. data/app/lib/actions/pulp/consumer/generate_applicability.rb +0 -24
  136. data/app/lib/actions/pulp/consumer/update.rb +0 -20
  137. data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +0 -17
  138. data/app/models/katello/events/import_host_applicability.rb +0 -16
  139. data/app/services/katello/applicable_content_helper.rb +0 -111
  140. data/app/services/katello/pulp/consumer.rb +0 -83
  141. data/app/services/katello/pulp/consumer_group.rb +0 -95
@@ -5,6 +5,7 @@ module Katello
5
5
  class << self
6
6
  def deliver!
7
7
  SmartProxy.unscoped.with_content.each do |proxy|
8
+ percentage = proxy.pulp_disk_usage[0]['percentage']
8
9
  if percentage < 90 && notification_already_exists?(proxy)
9
10
  blueprint.notifications.where(subject: proxy).destroy_all
10
11
  elsif update_notifications(proxy).empty? && percentage > 90
@@ -38,16 +38,20 @@ child @resource.repositories => :repositories do
38
38
  end
39
39
 
40
40
  node :override do |pc|
41
- pc.override
41
+ pc.override if pc.respond_to? :override
42
42
  end
43
43
 
44
44
  node :overrides do |pc|
45
- pc.content_overrides.map do |override|
46
- {:name => override.name, :value => override.computed_value}
45
+ if pc.respond_to? :content_overrides
46
+ pc.content_overrides.map do |override|
47
+ {:name => override.name, :value => override.computed_value}
48
+ end
47
49
  end
48
50
  end
49
51
 
50
52
  node :enabled_content_override do |pc|
51
- override = pc.enabled_content_override
52
- override&.computed_value
53
+ if pc.respond_to? :enabled_content_override
54
+ override = pc.enabled_content_override
55
+ override&.computed_value
56
+ end
53
57
  end
@@ -66,19 +66,6 @@
66
66
  :crane_ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt
67
67
  :allow_push: false # default false if omitted
68
68
 
69
- # Pulp 2 can be preferred over Pulp 3 for the desired content type.
70
- # Default is false.
71
- # :use_pulp_2_for_content_type:
72
- # :ansible_collection: <true/false>
73
- # :deb: <true/false>
74
- # :docker: <true/false>
75
- # :file: <true/false>
76
- # :yum: <true/false>
77
-
78
- # Applicability can be calculated by Katello or Pulp 2.
79
- # Default is Pulp 2 (false).
80
- # :katello_applicability: <true/false>
81
-
82
69
  # Logging configuration can be changed by uncommenting the loggers
83
70
  # section and the logger configuration desired.
84
71
  #
@@ -131,7 +131,6 @@ Katello::Engine.routes.draw do
131
131
  post :promote
132
132
  post :export
133
133
  put :republish_repositories
134
- get :available_errata, :controller => :errata
135
134
  end
136
135
  collection do
137
136
  get :auto_complete_search
@@ -25,6 +25,16 @@ class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
25
25
  end
26
26
  end
27
27
 
28
+ # If an ID is not nil but the associated record does not exist, return false.
29
+ def all_records_exist?(content_source_id, kickstart_repository_id, content_view_id, lifecycle_environment_id)
30
+ return false if content_source_id.present? && ::SmartProxy.where(id: content_source_id).empty?
31
+ return false if kickstart_repository_id.present? && ::Katello::Repository.where(id: kickstart_repository_id).empty?
32
+ return false if content_view_id.present? && ::Katello::ContentView.where(id: content_view_id).empty?
33
+ return false if lifecycle_environment_id.present? && ::Katello::KTEnvironment.where(id: lifecycle_environment_id).empty?
34
+
35
+ true
36
+ end
37
+
28
38
  def copy_data_from_hostgroup
29
39
  hg_table = ::Hostgroup.arel_table
30
40
  hostgroups = ::Hostgroup.unscoped.where(
@@ -41,12 +51,16 @@ class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
41
51
  :content_view_id,
42
52
  :lifecycle_environment_id
43
53
  ).each do |hostgroup_id, content_source_id, kickstart_repository_id, content_view_id, lifecycle_environment_id|
54
+ unless all_records_exist?(content_source_id, kickstart_repository_id, content_view_id, lifecycle_environment_id)
55
+ Rails.logger.warn("Unable to save content facet hostgroup for #{Hostgroup.find(hostgroup_id).inspect} due to bad hostgroup data.")
56
+ next
57
+ end
44
58
  content_facet = ::Katello::Hostgroup::ContentFacet.find_or_create_by(hostgroup_id: hostgroup_id)
45
59
  content_facet.content_source_id = content_source_id
46
60
  content_facet.kickstart_repository_id = kickstart_repository_id
47
61
  content_facet.content_view_id = content_view_id
48
62
  content_facet.lifecycle_environment_id = lifecycle_environment_id
49
- unless content_facet.save
63
+ unless content_facet.save(validate: false)
50
64
  Rails.logger.warn("Unable to save content facet hostgroup for #{content_facet.inspect} ")
51
65
  Rails.logger.warn(content_facet.errors.full_messages.join("\n"))
52
66
  end
@@ -32,28 +32,24 @@ class DeletePuppetAndOstreeRepos < ActiveRecord::Migration[6.0]
32
32
  end
33
33
 
34
34
  def up
35
- if Katello::Repository.ostree_type.any? || puppet_repositories.any?
36
- User.as_anonymous_admin do
37
- FakeContentViewPuppetModule.delete_all
38
- FakeContentViewPuppetEnvironmentPuppetModule.delete_all
39
- FakeRepositoryPuppetModule.delete_all
40
-
41
- FakeContentViewPuppetEnvironment.delete_all
42
- FakePuppetModule.delete_all
43
-
44
- ::Katello::Repository.delete(puppet_repositories)
45
-
46
- FakeRepositoryOstreeBranch.delete_all
47
- FakeOstreeBranch.delete_all
48
- Katello::Repository.ostree_type.where.not(:library_instance_id => nil, :environment_id => nil).destroy_all #CV LCE repos
49
- Katello::Repository.ostree_type.where.not(:library_instance_id => nil).destroy_all # archive repos
50
- Katello::Repository.ostree_type.destroy_all #all the rest (should just be library repos)
51
-
52
- Katello::ContentViewVersion.where.not(:content_counts => nil).each do |version|
53
- version.content_counts.except!('ostree', 'puppet_module')
54
- version.save
55
- end
56
- end
35
+ FakeContentViewPuppetModule.delete_all
36
+ FakeContentViewPuppetEnvironmentPuppetModule.delete_all
37
+ FakeRepositoryPuppetModule.delete_all
38
+
39
+ FakeContentViewPuppetEnvironment.delete_all
40
+ FakePuppetModule.delete_all
41
+
42
+ ::Katello::Repository.delete(puppet_repositories) if puppet_repositories.any?
43
+
44
+ FakeRepositoryOstreeBranch.delete_all
45
+ FakeOstreeBranch.delete_all
46
+ Katello::Repository.ostree_type.where.not(:library_instance_id => nil, :environment_id => nil).destroy_all #CV LCE repos
47
+ Katello::Repository.ostree_type.where.not(:library_instance_id => nil).destroy_all # archive repos
48
+ Katello::Repository.ostree_type.destroy_all #all the rest (should just be library repos)
49
+
50
+ Katello::ContentViewVersion.where.not(:content_counts => nil).each do |version|
51
+ version.content_counts.except!('ostree', 'puppet_module')
52
+ version.save
57
53
  end
58
54
  end
59
55
 
@@ -0,0 +1,6 @@
1
+ class AddRepoTimestamps < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_repositories, :last_contents_changed, :datetime, :default => Time.at(0).to_datetime
4
+ add_column :katello_repositories, :last_applicability_regen, :datetime, :default => Time.at(0).to_datetime
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ class FixRedHatRootRepositoryArch < ActiveRecord::Migration[6.0]
2
+ def up
3
+ ::Katello::RootRepository.
4
+ joins("INNER JOIN katello_contents ON katello_contents.cp_content_id = katello_root_repositories.content_id").
5
+ where.not(arch: 'noarch').where.not("katello_contents.content_url ILIKE '%$basearch%'").update(arch: 'noarch')
6
+ end
7
+
8
+ def down
9
+ fail ActiveRecord::IrreversibleMigration
10
+ end
11
+ end
@@ -23,14 +23,12 @@
23
23
  angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalController',
24
24
  ['$scope', '$http', '$location', '$window', '$timeout', '$uibModalInstance', 'HostBulkAction', 'HostCollection', 'Nutupane', 'CurrentOrganization', 'Erratum', 'Notification', 'BastionConfig', 'hostIds',
25
25
  function ($scope, $http, $location, $window, $timeout, $uibModalInstance, HostBulkAction, HostCollection, Nutupane, CurrentOrganization, Erratum, Notification, BastionConfig, hostIds) {
26
- var nutupane;
27
-
28
26
  function installParams() {
29
27
  var params = hostIds;
30
28
  params['content_type'] = 'errata';
31
29
  params.content = _.map($scope.table.getSelected(), 'errata_id');
32
30
 
33
- if (nutupane.table.allResultsSelected) {
31
+ if ($scope.nutupane.table.allResultsSelected) {
34
32
  params['install_all'] = true;
35
33
  } else {
36
34
  params['install_all'] = false;
@@ -44,20 +42,19 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
44
42
  $scope.erratum = Erratum.get({id: errataId, 'organization_id': CurrentOrganization});
45
43
  }
46
44
 
47
- nutupane = new Nutupane(HostBulkAction, hostIds, 'installableErrata');
48
- nutupane.enableSelectAllResults();
45
+ $scope.nutupane = new Nutupane(HostBulkAction, hostIds, 'installableErrata');
46
+ $scope.nutupane.enableSelectAllResults();
49
47
 
50
48
  $scope.controllerName = 'katello_errata';
51
- nutupane.primaryOnly = true;
49
+ $scope.nutupane.primaryOnly = true;
52
50
  $scope.showErrata = false;
53
51
  $scope.showHosts = false;
54
- $scope.table = nutupane.table;
52
+ $scope.table = $scope.nutupane.table;
55
53
  $scope.table.errataFilterTerm = "";
56
54
  $scope.table.initialLoad = false;
57
55
  $scope.initialLoad = true;
58
56
  $scope.remoteExecutionPresent = BastionConfig.remoteExecutionPresent;
59
57
  $scope.remoteExecutionByDefault = BastionConfig.remoteExecutionByDefault;
60
- $scope.katelloAgentPresent = BastionConfig.katelloAgentPresent;
61
58
  $scope.allHostsSelected = hostIds.allResultsSelected;
62
59
  $scope.hostToolingEnabled = BastionConfig.hostToolingEnabled;
63
60
 
@@ -65,11 +62,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
65
62
  authenticityToken: $window.AUTH_TOKEN.replace(/&quot;/g, '')
66
63
  };
67
64
 
68
- if ($scope.allHostsSelected) {
69
- $scope.errataActionFormValues.scopedSearch = hostIds.included.search;
70
- } else if (hostIds.included.ids.length > 0) {
71
- $scope.errataActionFormValues.hostIds = hostIds.included.ids.join(',');
72
- }
65
+ $scope.errataActionFormValues.bulkHostIds = angular.toJson(hostIds);
73
66
 
74
67
  $scope.showTable = function () {
75
68
  return (!$scope.showErrata && !$scope.showHosts);
@@ -78,10 +71,10 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
78
71
  $scope.fetchErrata = function () {
79
72
  var params = hostIds;
80
73
  params['organization_id'] = CurrentOrganization;
81
- nutupane.setParams(params);
74
+ $scope.nutupane.setParams(params);
82
75
  $scope.table.working = true;
83
76
  if ($scope.table.numSelected > 0) {
84
- nutupane.refresh().then(function () {
77
+ $scope.nutupane.refresh().then(function () {
85
78
  $scope.table.working = false;
86
79
  });
87
80
  } else {
@@ -98,6 +91,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
98
91
  $scope.installErrata = function () {
99
92
  if ($scope.remoteExecutionByDefault) {
100
93
  $scope.installErrataViaRemoteExecution();
94
+
101
95
  } else {
102
96
  $scope.installErrataViaKatelloAgent(false);
103
97
  }
@@ -106,23 +100,28 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
106
100
  $scope.installErrataViaKatelloAgent = function () {
107
101
  var params = installParams();
108
102
  HostBulkAction.installContent(params,
109
- function (data) {
110
- nutupane.invalidate();
111
- $scope.ok();
112
- $scope.transitionTo('content-hosts.bulk-task', {taskId: data.id});
113
- },
114
- function (response) {
115
- angular.forEach(response.data.errors, function (error) {
116
- Notification.setErrorMessage(error);
117
- });
118
- });
103
+ function (data) {
104
+ $scope.nutupane.invalidate();
105
+ $scope.ok();
106
+ $scope.transitionTo('content-hosts.bulk-task', {taskId: data.id});
107
+ },
108
+ function (response) {
109
+ angular.forEach(response.data.errors, function (error) {
110
+ Notification.setErrorMessage(error);
111
+ });
112
+ });
113
+ };
114
+
115
+ $scope.selectedErrataIds = function () {
116
+ return $scope.nutupane.getAllSelectedResults('errata_id');
119
117
  };
120
118
 
121
119
  $scope.installErrataViaRemoteExecution = function(customize) {
122
- var errataIds = _.map($scope.table.getSelected(), 'errata_id');
120
+ var errataIds = $scope.selectedErrataIds();
121
+
122
+ $scope.errataActionFormValues.bulkErrataIds = angular.toJson(errataIds);
123
123
 
124
124
  $scope.errataActionFormValues.remoteAction = 'errata_install';
125
- $scope.errataActionFormValues.errata = errataIds.join(',');
126
125
  $scope.errataActionFormValues.customize = customize;
127
126
 
128
127
  $timeout(function () {
@@ -41,9 +41,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkModuleStream
41
41
  remoteAction: 'module_stream_action'
42
42
  };
43
43
 
44
- if (hostIds.included.ids) {
45
- $scope.moduleStreamActionFormValues.hostIds = hostIds.included.ids.join(',');
46
- }
44
+ $scope.moduleStreamActionFormValues.bulkHostIds = angular.toJson(hostIds);
47
45
 
48
46
  $scope.performViaRemoteExecution = function(moduleSpec, actionType) {
49
47
  $scope.working = true;
@@ -137,11 +137,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkPackagesModa
137
137
  $scope.packageActionFormValues.remoteAction = 'package_' + action;
138
138
  }
139
139
 
140
- if ($scope.allHostsSelected) {
141
- $scope.packageActionFormValues.scopedSearch = selectedHosts.included.search;
142
- } else if (selectedHosts.included.ids.length > 0) {
143
- $scope.packageActionFormValues.hostIds = selectedHosts.included.ids.join(',');
144
- }
140
+ $scope.packageActionFormValues.bulkHostIds = angular.toJson(selectedHosts);
145
141
 
146
142
  $timeout(function () {
147
143
  angular.element('#packageActionForm').submit();
@@ -9,7 +9,7 @@
9
9
  <input type="hidden" name="remote_action" ng-value="moduleStreamActionFormValues.remoteAction"/>
10
10
  <input type="hidden" name="module_stream_action" ng-value="moduleStreamActionFormValues.moduleStreamAction"/>
11
11
  <input type="hidden" name="module_spec" ng-value="moduleStreamActionFormValues.moduleSpec"/>
12
- <input type="hidden" name="host_ids" ng-value="moduleStreamActionFormValues.hostIds"/>
12
+ <input type="hidden" name="bulk_host_ids" ng-value="moduleStreamActionFormValues.bulkHostIds"/>
13
13
  <input type="hidden" name="customize" ng-value="moduleStreamActionFormValues.customize"/>
14
14
  <input type="hidden" name="authenticity_token" ng-value="moduleStreamActionFormValues.authenticityToken"/>
15
15
  </form>
@@ -3,9 +3,9 @@
3
3
 
4
4
  <div data-block="modal-body">
5
5
  <form id="errataActionForm" name="errataActionForm" class="form" method="post" action="/katello/remote_execution">
6
- <input type="hidden" name="name" ng-value="errataActionFormValues.errata"/>
7
6
  <input type="hidden" name="remote_action" ng-value="errataActionFormValues.remoteAction"/>
8
- <input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
7
+ <input type="hidden" name="bulk_host_ids" ng-value="errataActionFormValues.bulkHostIds"/>
8
+ <input type="hidden" name="bulk_errata_ids" ng-value="errataActionFormValues.bulkErrataIds"/>
9
9
  <input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
10
10
  <input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
11
11
  <input type="hidden" ng-if="allHostsSelected" name="scoped_search" ng-value="errataActionFormValues.scopedSearch"/>
@@ -15,6 +15,11 @@
15
15
  Performing host package actions is disabled because Katello is not configured for Remote Execution or Katello Agent.
16
16
  </span>
17
17
  </p>
18
+ <p bst-alert="warning">
19
+ <span translate>
20
+ Group package actions are being deprecated, and will be removed in a future version.
21
+ </span>
22
+ </p>
18
23
  </div>
19
24
 
20
25
  <span uib-dropdown class="input-group-btn">
@@ -42,7 +47,7 @@
42
47
  <form id="packageActionForm" name="packageActionForm" class="form" method="post" action="/katello/remote_execution">
43
48
  <input type="hidden" name="name" ng-value="content.content"/>
44
49
  <input type="hidden" name="remote_action" ng-value="packageActionFormValues.remoteAction"/>
45
- <input type="hidden" name="host_ids" ng-value="packageActionFormValues.hostIds"/>
50
+ <input type="hidden" name="bulk_host_ids" ng-value="packageActionFormValues.bulkHostIds"/>
46
51
  <input type="hidden" name="authenticity_token" ng-value="packageActionFormValues.authenticityToken"/>
47
52
  <input type="hidden" name="customize" ng-value="packageActionFormValues.customize"/>
48
53
  <input type="hidden" ng-if="allHostsSelected" name="scoped_search" ng-value="packageActionFormValues.scopedSearch"/>
@@ -64,7 +69,7 @@
64
69
  ng-change="updatePlaceholder(content.contentType)"
65
70
  ng-disabled="content.confirm"
66
71
  value="package_group"/>
67
- <span translate>Package Group</span>
72
+ <span translate>Package Group (Deprecated)</span>
68
73
  </label>
69
74
  </div>
70
75
 
@@ -135,8 +135,11 @@ angular.module('Bastion.content-hosts').controller('ContentHostErrataController'
135
135
 
136
136
  $scope.performViaRemoteExecution = function(customize) {
137
137
  var errataIds = $scope.selectedErrataIds();
138
- $scope.errataActionFormValues.errata = errataIds.included.ids.join(',');
139
- $scope.errataActionFormValues.hostIds = $scope.host.id;
138
+
139
+ $scope.errataActionFormValues.bulkErrataIds = angular.toJson(errataIds);
140
+ $scope.errataActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
141
+
142
+ $scope.errataActionFormValues.remoteAction = 'errata_install';
140
143
  $scope.errataActionFormValues.customize = customize;
141
144
 
142
145
  $timeout(function () {
@@ -49,7 +49,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostModuleStreamsCont
49
49
  $scope.working = true;
50
50
  $scope.moduleStreamActionFormValues.moduleSpec = moduleSpec;
51
51
  $scope.moduleStreamActionFormValues.moduleStreamAction = actionType;
52
- $scope.moduleStreamActionFormValues.hostIds = $scope.host.id;
52
+ $scope.moduleStreamActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
53
53
 
54
54
  $timeout(function () {
55
55
  angular.element('#moduleStreamActionForm').submit();
@@ -67,7 +67,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostPackagesControlle
67
67
  $scope.working = true;
68
68
  $scope.packageActionFormValues.package = terms.join(' ');
69
69
  $scope.packageActionFormValues.remoteAction = actionType;
70
- $scope.packageActionFormValues.hostIds = $scope.host.id;
70
+ $scope.packageActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
71
71
  $scope.packageActionFormValues.customize = customize;
72
72
 
73
73
  $timeout(function () {
@@ -34,10 +34,10 @@
34
34
  <form id="errataActionForm" method="post" action="/katello/remote_execution">
35
35
  <input type="hidden" name="remote_action" value="errata_install"/>
36
36
  <input type="hidden" name="name" ng-value="errataActionFormValues.errata"/>
37
- <input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
37
+ <input type="hidden" name="bulk_host_ids" ng-value="errataActionFormValues.bulkHostIds"/>
38
+ <input type="hidden" name="bulk_errata_ids" ng-value="errataActionFormValues.bulkErrataIds"/>
38
39
  <input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
39
40
  <input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
40
- <input type="hidden" name="install_all" ng-value="table.allResultsSelected" />
41
41
  </form>
42
42
 
43
43
  <div data-extend-template="layouts/partials/table.html">
@@ -13,7 +13,7 @@
13
13
  <input type="hidden" name="remote_action" ng-value="moduleStreamActionFormValues.remoteAction"/>
14
14
  <input type="hidden" name="module_stream_action" ng-value="moduleStreamActionFormValues.moduleStreamAction"/>
15
15
  <input type="hidden" name="module_spec" ng-value="moduleStreamActionFormValues.moduleSpec"/>
16
- <input type="hidden" name="host_ids" ng-value="moduleStreamActionFormValues.hostIds"/>
16
+ <input type="hidden" name="bulk_host_ids" ng-value="moduleStreamActionFormValues.hostHostIds"/>
17
17
  <input type="hidden" name="customize" ng-value="moduleStreamActionFormValues.customize"/>
18
18
  <input type="hidden" name="authenticity_token" ng-value="moduleStreamActionFormValues.authenticityToken"/>
19
19
  </form>
@@ -8,6 +8,11 @@
8
8
  Performing host package actions is disabled because Katello is not configured for Remote Execution or Katello Agent.
9
9
  </span>
10
10
  </p>
11
+ <p bst-alert="warning">
12
+ <span translate>
13
+ Group package actions are being deprecated, and will be removed in a future version.
14
+ </span>
15
+ </p>
11
16
  <section>
12
17
  <div class="row">
13
18
  <form ng-submit="performPackageAction(packageAction.actionType, packageAction.term)" role="form">
@@ -17,8 +22,8 @@
17
22
  <option value="packageInstall" translate>Package Install</option>
18
23
  <option value="packageUpdate" translate>Package Update</option>
19
24
  <option value="packageRemove" translate>Package Remove</option>
20
- <option value="groupInstall" translate>Group Install</option>
21
- <option value="groupRemove" translate>Group Remove</option>
25
+ <option value="groupInstall" translate>Group Install (Deprecated)</option>
26
+ <option value="groupRemove" translate>Group Remove (Deprecated)</option>
22
27
  </select>
23
28
  </div>
24
29