katello 3.15.0.rc1.3 → 3.15.0.rc2

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

Potentially problematic release.


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

Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/api_controller.rb +5 -0
  3. data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -0
  4. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
  5. data/app/lib/actions/katello/content_view/destroy.rb +1 -0
  6. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
  7. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +26 -0
  8. data/app/lib/actions/pulp3/orchestration/repository/delete.rb +8 -1
  9. data/app/lib/actions/pulp3/repository/delete_version.rb +20 -0
  10. data/app/lib/katello/concerns/base_template_scope_extensions.rb +23 -1
  11. data/app/lib/katello/errors.rb +2 -0
  12. data/app/models/katello/repository.rb +44 -9
  13. data/app/models/setting/content.rb +8 -2
  14. data/app/services/katello/pulp3/migration.rb +19 -4
  15. data/app/services/katello/pulp3/repository.rb +4 -0
  16. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +13 -0
  17. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +4 -2
  18. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions.html +11 -8
  19. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +8 -0
  20. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -0
  21. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +2 -0
  22. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -0
  23. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -0
  24. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +2 -1
  25. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +4 -2
  26. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +10 -1
  27. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +6 -3
  28. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +4 -2
  29. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +9 -1
  30. data/lib/katello/tasks/pulp3_content_switchover.rake +2 -1
  31. data/lib/katello/version.rb +1 -1
  32. data/webpack/__mocks__/foremanReact/redux/API.js +6 -0
  33. data/webpack/__mocks__/foremanReact/redux/middlewares/IntervalMiddleware/IntervalSelectors.js +6 -0
  34. data/webpack/__mocks__/foremanReact/redux/middlewares/IntervalMiddleware/index.js +11 -0
  35. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +0 -12
  36. data/webpack/scenes/Subscriptions/Manifest/index.js +0 -1
  37. data/webpack/scenes/Subscriptions/SubscriptionActions.js +49 -10
  38. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +10 -5
  39. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +37 -43
  40. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +55 -131
  41. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +2 -5
  42. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +1 -1
  43. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +75 -8
  44. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +35 -8
  45. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +58 -46
  46. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +3 -5
  47. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +85 -9
  48. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -2
  49. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +111 -124
  50. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +2 -12
  51. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +2 -8
  52. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +1 -16
  53. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +1 -6
  54. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UpdateDialog.js +0 -25
  55. data/webpack/scenes/Subscriptions/index.js +2 -5
  56. data/webpack/scenes/Tasks/TaskActions.js +34 -104
  57. data/webpack/scenes/Tasks/TaskSelectors.js +7 -0
  58. data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +17 -154
  59. data/webpack/scenes/Tasks/__tests__/TaskSelectors.test.js +21 -0
  60. data/webpack/scenes/Tasks/__tests__/__snapshots__/TaskActions.test.js.snap +57 -0
  61. data/webpack/scenes/Tasks/__tests__/__snapshots__/TaskSelectors.test.js.snap +9 -0
  62. data/webpack/scenes/Tasks/__tests__/task.fixtures.js +0 -82
  63. data/webpack/scenes/Tasks/helpers.js +13 -6
  64. metadata +12 -3
  65. data/webpack/scenes/Tasks/TaskConstants.js +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a6bd47c5fa7163ee343c23d652b46abc14fdba414c1630b3b56335196aa6941
4
- data.tar.gz: 18829650fef9ffdad3cea5d73a30a7bb31eca9305db9bbbda85d922b3ca93d90
3
+ metadata.gz: 85ee4f1e17bf63eec8c349a58dbe28aea05c1736937fa253c921c997e50247f8
4
+ data.tar.gz: 696c9f65f17d7a2405f4b2c807d6db42a269b728bb30cb10484fe0c6b75a88b5
5
5
  SHA512:
6
- metadata.gz: 7ab1ee973db81ec2f17436659b364cf1e7529aac79616bc7e8f6b7cf4fecad4b0821abafaeaf90077bcbaccaba6882731050719586d05239f6204ecadd506968
7
- data.tar.gz: 3583ab23ec2bdb236ec056f79dd789d2d8455f2e071b93b200f4836845371f6c5aee7616077cb6d7f34b8ed9cd08ee5ec30fdabbaac97f6b6d27f4b7b96c4dd0
6
+ metadata.gz: 882b95014f435cf75227bf1969ce47294f45988d29f757c61d6c5c3a02d43af75d4b4238b8c654609cc03fa1269bed5afbc43bc2590ff49d59fab908c508a812
7
+ data.tar.gz: 9edd9187a9e65364ccd41687adf5a81414a8651eb9a02d20524e7d22fb56ddcd41d817b64d81112ba851ce7b13327eadb9640796e7f8db7e247936f819de9d90
@@ -35,6 +35,11 @@ module Katello
35
35
  @resource_class ||= "Katello::#{resource_name.classify}".constantize
36
36
  end
37
37
 
38
+ def deprecate_katello_agent
39
+ ::Foreman::Deprecation.api_deprecation_warning("Remote actions using katello-agent are deprecated and will be removed in Katello 4.0. " \
40
+ "You may consider switching to Remote Execution.")
41
+ end
42
+
38
43
  def full_result_response(collection)
39
44
  { :results => collection,
40
45
  :total => collection.count,
@@ -6,6 +6,7 @@ module Katello
6
6
  before_action :require_packages_only, :only => [:upgrade]
7
7
  before_action :find_editable_host_with_facet, :except => :index
8
8
  before_action :find_host, :only => :index
9
+ before_action :deprecate_katello_agent, :only => [:install, :remove, :upgrade, :upgrade_all]
9
10
 
10
11
  resource_description do
11
12
  api_version 'v2'
@@ -10,6 +10,7 @@ module Katello
10
10
  before_action :find_deletable_hosts, :only => [:destroy_hosts]
11
11
  before_action :find_readable_hosts, :only => [:applicable_errata, :installable_errata, :available_incremental_updates]
12
12
  before_action :find_errata, :only => [:available_incremental_updates]
13
+ before_action :deprecate_katello_agent, :only => [:install_content, :update_content, :remove_content]
13
14
 
14
15
  before_action :validate_content_action, :only => [:install_content, :update_content, :remove_content]
15
16
 
@@ -118,7 +119,6 @@ module Katello
118
119
  :desc => N_("The type of content. The following types are supported: 'package', 'package_group' and 'errata'."),
119
120
  :required => true
120
121
  param :content, Array, :desc => N_("List of content (e.g. package names, package group names or errata ids)")
121
- param :install_all, :bool, :desc => N_("Only used for errata, but will install all installable errata.")
122
122
  def install_content
123
123
  content_action
124
124
  end
@@ -17,6 +17,7 @@ module Actions
17
17
  end
18
18
  end
19
19
 
20
+ plan_action(Actions::Pulp3::ContentView::DeleteRepositoryReferences, content_view, SmartProxy.pulp_master)
20
21
  plan_self
21
22
  end
22
23
  end
@@ -11,7 +11,7 @@ module Actions
11
11
  errata_ids = options.fetch(:errata_ids, nil)
12
12
 
13
13
  applicable_errata = host.content_facet.applicable_errata
14
- applicable_errata = applicable_errata.with_identifiers(errata_ids) if errata_ids
14
+ applicable_errata = applicable_errata.with_identifiers(errata_ids) unless options[:update_all]
15
15
  plan_action(Actions::Katello::Host::Erratum::Install, host, applicable_errata.pluck(:errata_id))
16
16
  plan_self(:hostname => host.name)
17
17
  end
@@ -0,0 +1,26 @@
1
+ module Actions
2
+ module Pulp3
3
+ module ContentView
4
+ class DeleteRepositoryReferences < Pulp3::AbstractAsyncTask
5
+ def plan(content_view, smart_proxy)
6
+ if content_view.repository_references.any?
7
+ plan_self(:content_view_id => content_view.id, :smart_proxy_id => smart_proxy.id)
8
+ end
9
+ end
10
+
11
+ def invoke_external_task
12
+ tasks = []
13
+ content_view = ::Katello::ContentView.find(input[:content_view_id])
14
+ content_view.repository_references.each do |repository_reference|
15
+ repo = repository_reference.root_repository.library_instance
16
+ #force pulp3 in case we've done migrations, but haven't switched over yet
17
+ tasks << repo.backend_service(smart_proxy, true).delete(repository_reference.repository_href)
18
+ end
19
+ content_view.repository_references.destroy_all
20
+
21
+ output[:pulp_tasks] = tasks
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -7,7 +7,14 @@ module Actions
7
7
  sequence do
8
8
  plan_action(Actions::Pulp3::Repository::DeleteRemote, repository.id, smart_proxy) if repository.remote_href
9
9
  plan_action(Actions::Pulp3::Repository::DeleteDistributions, repository.id, smart_proxy)
10
- plan_action(Actions::Pulp3::Repository::Delete, repository.id, smart_proxy)
10
+
11
+ if repository.content_view.default?
12
+ #we're deleting the library instance, so just delete the whole pulp3 repo
13
+ plan_action(Actions::Pulp3::Repository::Delete, repository.id, smart_proxy)
14
+ elsif repository.environment.nil?
15
+ #we're deleting the archived instance, so delete the version
16
+ plan_action(Actions::Pulp3::Repository::DeleteVersion, repository, smart_proxy)
17
+ end
11
18
  end
12
19
  end
13
20
  end
@@ -0,0 +1,20 @@
1
+ module Actions
2
+ module Pulp3
3
+ module Repository
4
+ class DeleteVersion < Pulp3::AbstractAsyncTask
5
+ def plan(repository, smart_proxy)
6
+ #A version from library might be reused in a composite, or could have been copied
7
+ # from a library repository, so only delete the version if its the last
8
+ if ::Katello::Repository.where(:version_href => repository.version_href).count == 1
9
+ plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
10
+ end
11
+ end
12
+
13
+ def invoke_external_task
14
+ repo = ::Katello::Repository.find(input[:repository_id])
15
+ output[:response] = repo.backend_service(smart_proxy).delete_version
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -7,7 +7,8 @@ module Katello
7
7
  def allowed_helpers
8
8
  super + [:errata, :host_subscriptions, :host_applicable_errata_ids, :host_applicable_errata_filtered,
9
9
  :host_latest_applicable_rpm_version, :load_pools, :load_errata_applications, :host_content_facet,
10
- :host_sla, :host_products, :sub_name, :sub_sku, :registered_through, :last_checkin]
10
+ :host_sla, :host_products, :sub_name, :sub_sku, :registered_through, :last_checkin, :host_collections,
11
+ :host_subscriptions_names, :host_subscriptions, :host_products_names, :host_collections_names]
11
12
  end
12
13
  end
13
14
 
@@ -23,6 +24,10 @@ module Katello
23
24
  host.subscriptions
24
25
  end
25
26
 
27
+ def host_subscriptions_names(host)
28
+ host.subscriptions.map(&:name)
29
+ end
30
+
26
31
  def host_content_facet(host)
27
32
  host.content_facet
28
33
  end
@@ -35,6 +40,23 @@ module Katello
35
40
  host_subscription_facet(host)&.installed_products
36
41
  end
37
42
 
43
+ def host_products_names(host)
44
+ products = host_products(host)
45
+ if products
46
+ products.map(&:name)
47
+ else
48
+ []
49
+ end
50
+ end
51
+
52
+ def host_collections(host)
53
+ host.host_collections
54
+ end
55
+
56
+ def host_collections_names(host)
57
+ host.host_collections.map(&:name)
58
+ end
59
+
38
60
  def sub_name(pool)
39
61
  return unless pool
40
62
  pool.subscription&.name
@@ -115,6 +115,8 @@ module Katello
115
115
  end
116
116
  end
117
117
 
118
+ class Pulp3MigrationError < StandardError; end
119
+
118
120
  class PulpError < StandardError
119
121
  def self.from_task(task)
120
122
  if %w(error canceled).include?(task[:state])
@@ -171,8 +171,8 @@ module Katello
171
171
  joins(:root).where("#{RootRepository.table_name}.content_type" => content_type)
172
172
  end
173
173
 
174
- def backend_service(smart_proxy)
175
- if smart_proxy.pulp3_support?(self)
174
+ def backend_service(smart_proxy, force_pulp3 = false)
175
+ if force_pulp3 || smart_proxy.pulp3_support?(self)
176
176
  @service ||= Katello::Pulp3::Repository.instance_for_type(self, smart_proxy)
177
177
  else
178
178
  @service ||= Katello::Pulp::Repository.instance_for_type(self, smart_proxy)
@@ -301,17 +301,52 @@ module Katello
301
301
  group("#{errata}.id").count
302
302
  end
303
303
 
304
+ def self.errata_with_module_stream_counts(repo)
305
+ repository_errata = Katello::RepositoryErratum.table_name
306
+ errata = Katello::Erratum.table_name
307
+ erratum_package = Katello::ErratumPackage.table_name
308
+ repository_module_stream = Katello::RepositoryModuleStream.table_name
309
+ msep = ::Katello::ModuleStreamErratumPackage.table_name
310
+ ::Katello::Erratum.joins(
311
+ "INNER JOIN #{erratum_package} on #{erratum_package}.erratum_id = #{errata}.id",
312
+ "INNER JOIN #{msep} on #{msep}.erratum_package_id = #{erratum_package}.id",
313
+ "INNER JOIN #{repository_errata} on #{repository_errata}.erratum_id = #{errata}.id",
314
+ "INNER JOIN #{repository_module_stream} on #{repository_module_stream}.module_stream_id = #{msep}.module_stream_id").
315
+ where("#{repository_module_stream}.repository_id" => repo.id).
316
+ where("#{repository_errata}.repository_id" => repo.id).
317
+ group("#{errata}.id").count
318
+ end
319
+
320
+ def fetch_package_errata_to_keep
321
+ errata_counts = ::Katello::Repository.errata_with_package_counts(self)
322
+ if errata_counts.any?
323
+ errata_counts_in_library = ::Katello::Repository.errata_with_package_counts(library_instance)
324
+ errata_counts.keep_if { |id| errata_counts[id] == errata_counts_in_library[id] }
325
+ errata_counts.keys
326
+ else
327
+ []
328
+ end
329
+ end
330
+
331
+ def fetch_module_errata_to_filter
332
+ errata_counts = ::Katello::Repository.errata_with_module_stream_counts(self)
333
+ errata_counts_in_library = ::Katello::Repository.errata_with_module_stream_counts(library_instance)
334
+ if errata_counts_in_library.any?
335
+ errata_counts_in_library.keep_if { |id| errata_counts[id] != errata_counts_in_library[id] }
336
+ errata_counts_in_library.keys
337
+ else
338
+ []
339
+ end
340
+ end
341
+
304
342
  def partial_errata
305
343
  return [] if library_instance?
306
344
 
307
- errata_with_package_counts = ::Katello::Repository.errata_with_package_counts(self)
308
345
  partial_errata = self.errata
309
- if errata_with_package_counts.any?
310
- errata_with_packages_in_library = ::Katello::Repository.errata_with_package_counts(library_instance)
311
- errata_with_package_counts.keep_if { |id| errata_with_package_counts[id] == errata_with_packages_in_library[id] }
312
- unless errata_with_package_counts.empty?
313
- partial_errata = self.errata.where("#{Katello::Erratum.table_name}.id NOT IN (?)", errata_with_package_counts.keys)
314
- end
346
+ errata_to_keep = fetch_package_errata_to_keep - fetch_module_errata_to_filter
347
+
348
+ if errata_to_keep.any?
349
+ partial_errata = self.errata.where("#{Katello::Erratum.table_name}.id NOT IN (?)", errata_to_keep)
315
350
  end
316
351
 
317
352
  partial_errata
@@ -10,9 +10,15 @@ class Setting::Content < Setting
10
10
  Hash[parameters.map { |p| [p, p] }]
11
11
  end
12
12
 
13
+ def self.deprecate_background(policies_hash)
14
+ policies_hash['background'] = 'background (deprecated)'
15
+ policies_hash
16
+ end
17
+
13
18
  def self.default_settings
14
- download_policies = proc { hashify_parameters(::Runcible::Models::YumImporter::DOWNLOAD_POLICIES) }
15
- proxy_download_policies = proc { hashify_parameters(::SmartProxy::DOWNLOAD_POLICIES) }
19
+ download_policies = proc { deprecate_background(hashify_parameters(::Runcible::Models::YumImporter::DOWNLOAD_POLICIES)) }
20
+
21
+ proxy_download_policies = proc { deprecate_background(hashify_parameters(::SmartProxy::DOWNLOAD_POLICIES)) }
16
22
  dependency_solving_options = proc { hashify_parameters(['conservative', 'greedy']) }
17
23
  http_proxy_select = [{
18
24
  name: _("HTTP Proxies"),
@@ -11,9 +11,19 @@ module Katello
11
11
  Katello::Repository::DOCKER_TYPE
12
12
  ].freeze
13
13
 
14
+ MUTABLE_CONTENT_TYPES = [
15
+ Katello::DockerTag,
16
+ Katello::Erratum
17
+ ].freeze
18
+
14
19
  def initialize(smart_proxy, repository_types = REPOSITORY_TYPES)
15
- @smart_proxy = smart_proxy
20
+ if (repository_types - smart_proxy.supported_pulp_types[:pulp3][:overriden_to_pulp2]).any?
21
+ fail ::Katello::Errors::Pulp3MigrationError, _("Pulp 3 migration cannot run. Types %s have already been migrated.") %
22
+ (repository_types - smart_proxy.supported_pulp_types[:pulp3][:overriden_to_pulp2]).join(', ')
23
+ end
24
+
16
25
  @repository_types = repository_types
26
+ @smart_proxy = smart_proxy
17
27
  end
18
28
 
19
29
  def api_client
@@ -36,8 +46,8 @@ module Katello
36
46
  create_migrations.map { |href| start_migration(href) }
37
47
  end
38
48
 
39
- def self.content_types_for_migration
40
- content_types = REPOSITORY_TYPES.collect do |repository_type_label|
49
+ def content_types_for_migration
50
+ content_types = @repository_types.collect do |repository_type_label|
41
51
  Katello::RepositoryTypeManager.repository_types[repository_type_label].content_types_to_index
42
52
  end
43
53
 
@@ -111,7 +121,12 @@ module Katello
111
121
  end
112
122
 
113
123
  def import_content_type(content_type)
114
- content_type.model_class.where(:migrated_pulp3_href => nil).select(:id, :pulp_id).find_in_batches(batch_size: GET_QUERY_ID_LENGTH) do |needing_hrefs|
124
+ unmigrated_units = content_type.model_class
125
+ #mutable content types have to be completely re-indexed every time
126
+ unless MUTABLE_CONTENT_TYPES.include?(content_type.model_class)
127
+ unmigrated_units = unmigrated_units.where(:migrated_pulp3_href => nil)
128
+ end
129
+ unmigrated_units.select(:id, :pulp_id).find_in_batches(batch_size: GET_QUERY_ID_LENGTH) do |needing_hrefs|
115
130
  migrated_units = pulp2_content_api.list(pulp2_id__in: needing_hrefs.map { |unit| unit.pulp_id }.join(','))
116
131
  migrated_units.results.each do |migrated_unit|
117
132
  matching_record = needing_hrefs.find { |db_unit| db_unit.pulp_id == migrated_unit.pulp2_id }
@@ -231,6 +231,10 @@ module Katello
231
231
  create_version(:base_version => from_repository.version_href)
232
232
  end
233
233
 
234
+ def delete_version
235
+ api.repository_versions_api.delete(repo.version_href)
236
+ end
237
+
234
238
  def create_version(options = {})
235
239
  api.repositories_api.modify(repository_reference.repository_href, options)
236
240
  end
@@ -36,6 +36,19 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsContro
36
36
  $scope.panel.loading = false;
37
37
  }
38
38
 
39
+ $scope.autoAttachOptions = function () {
40
+ return [
41
+ {
42
+ id: true,
43
+ name: translate("Yes")
44
+ },
45
+ {
46
+ id: false,
47
+ name: translate("No")
48
+ }
49
+ ];
50
+ };
51
+
39
52
  $scope.activationKey = ActivationKey.get({id: $scope.$stateParams.activationKeyId}, function (activationKey) {
40
53
  $scope.$broadcast('activationKey.loaded', activationKey);
41
54
  $scope.panel.loading = false;
@@ -9,13 +9,14 @@
9
9
  * @requires ActivationKey
10
10
  * @requires SubscriptionsHelper
11
11
  * @requires Notification
12
+ * @requires simpleContentAccessEnabled
12
13
  *
13
14
  * @description
14
15
  * Provides the functionality for the activation key subscriptions details action pane.
15
16
  */
16
17
  angular.module('Bastion.activation-keys').controller('ActivationKeySubscriptionsController',
17
- ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'Subscription', 'SubscriptionsHelper', 'Notification',
18
- function ($scope, $location, translate, Nutupane, ActivationKey, Subscription, SubscriptionsHelper, Notification) {
18
+ ['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'Subscription', 'SubscriptionsHelper', 'Notification', 'simpleContentAccessEnabled',
19
+ function ($scope, $location, translate, Nutupane, ActivationKey, Subscription, SubscriptionsHelper, Notification, simpleContentAccessEnabled) {
19
20
  var params;
20
21
 
21
22
  params = {
@@ -32,6 +33,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeySubscriptions
32
33
  $scope.contentNutupane.setSearchKey('subscriptionSearch');
33
34
  $scope.isRemoving = false;
34
35
  $scope.contextAdd = false;
36
+ $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
35
37
 
36
38
  $scope.groupedSubscriptions = {};
37
39
  $scope.$watch('table.rows', function (rows) {
@@ -1,21 +1,24 @@
1
1
  <span page-title ng-model="activationKey">{{ 'Subscriptions for Activation Key:' | translate }} {{ activationKey.name }}</span>
2
2
 
3
3
  <section>
4
- <h4 translate>Activation Key Type:</h4>
5
-
4
+ <h4 translate>Subscription Details</h4>
6
5
  <div class="details">
7
6
  <span class="info-label" translate>Auto-Attach</span>
7
+ <span class="info-value" ng-if="simpleContentAccessEnabled" translate>Not Applicable</span>
8
8
  <span class="info-value"
9
- bst-edit-checkbox="activationKey.auto_attach"
10
- formatter="booleanToYesNo"
11
- readonly="denied('edit_activation_keys', activationKey)"
12
- on-save="save(activationKey)">
9
+ ng-if="!simpleContentAccessEnabled"
10
+ bst-edit-select="activationKey.auto_attach"
11
+ selector="activationKey.auto_attach"
12
+ options="autoAttachOptions()"
13
+ formatter="booleanToYesNo"
14
+ readonly="denied('edit_activation_keys', activationKey)"
15
+ on-save="save(activationKey)">
13
16
  </span>
14
17
  </div>
15
- <p bst-alert="info" ng-hide="!activationKey.auto_attach">
18
+ <p bst-alert="info" ng-hide="simpleContentAccessEnabled || !activationKey.auto_attach">
16
19
  <span>When Auto Attach is enabled, registering systems will be attached to all associated custom products and only associated Red Hat subscriptions required to satisfy the system's installed products.</span>
17
20
  </p>
18
- <p bst-alert="info" ng-hide="activationKey.auto_attach">
21
+ <p bst-alert="info" ng-hide="simpleContentAccessEnabled || activationKey.auto_attach">
19
22
  <span translate>When Auto Attach is disabled, registering systems will be attached to all associated subscriptions.</span>
20
23
  </p>
21
24
  </section>
@@ -0,0 +1,8 @@
1
+ <section>
2
+ <p bst-alert="warning" >
3
+ <span translate>
4
+ Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.
5
+ </span>
6
+ </p>
7
+ </section>
8
+
@@ -26,6 +26,8 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
+ <div data-extend-template="common/views/katello-agent-notice.html"></div>
30
+
29
31
  <div ng-show="showTable()" data-extend-template="layouts/partials/table.html">
30
32
  <div data-block="list-actions">
31
33
  <button class="btn btn-default" type="button"
@@ -8,6 +8,8 @@
8
8
  </div>
9
9
  </div>
10
10
 
11
+ <div data-extend-template="common/views/katello-agent-notice.html"></div>
12
+
11
13
  <span uib-dropdown class="input-group-btn">
12
14
  <button class="btn btn-default"
13
15
  type="button"
@@ -5,6 +5,8 @@
5
5
  <h3 translate ng-show="selectedErrataOption === 'current'">Installable Errata</h3>
6
6
  </div>
7
7
 
8
+ <div data-extend-template="common/views/katello-agent-notice.html"></div>
9
+
8
10
  <div ng-hide="host.hasContent()">
9
11
  <div data-extend-template="common/views/registration.html"></div>
10
12
  </div>