katello 3.18.0.rc2 → 3.18.2

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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katello/katello.scss +0 -72
  3. data/app/controllers/katello/api/v2/api_controller.rb +1 -2
  4. data/app/controllers/katello/api/v2/capsule_content_controller.rb +2 -2
  5. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +98 -0
  6. data/app/controllers/katello/api/v2/content_exports_controller.rb +84 -0
  7. data/app/controllers/katello/api/v2/content_imports_controller.rb +59 -0
  8. data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +56 -94
  10. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +2 -1
  11. data/app/controllers/katello/api/v2/repositories_controller.rb +2 -0
  12. data/app/controllers/katello/concerns/api/v2/authorization.rb +14 -1
  13. data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +6 -2
  14. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  15. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -2
  16. data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -1
  17. data/app/lib/actions/katello/content_view/publish.rb +1 -1
  18. data/app/lib/actions/katello/content_view_version/import.rb +2 -1
  19. data/app/lib/actions/katello/content_view_version/import_library.rb +17 -0
  20. data/app/lib/actions/katello/content_view_version/incremental_update.rb +19 -3
  21. data/app/lib/actions/katello/host/update_system_purpose.rb +1 -1
  22. data/app/lib/actions/katello/host/upload_package_profile.rb +1 -1
  23. data/app/lib/actions/katello/host/upload_profiles.rb +1 -1
  24. data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +24 -4
  25. data/app/lib/actions/pulp3/content_migration.rb +10 -0
  26. data/app/lib/actions/pulp3/content_migration_presenter.rb +59 -0
  27. data/app/lib/actions/pulp3/content_migration_reset.rb +22 -0
  28. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
  29. data/app/lib/actions/pulp3/content_view_version/export.rb +3 -2
  30. data/app/lib/actions/pulp3/import_migration.rb +6 -1
  31. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -1
  32. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +17 -13
  33. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +60 -0
  34. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +0 -4
  35. data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +16 -3
  36. data/app/lib/actions/pulp3/repository/copy_content.rb +1 -1
  37. data/app/lib/actions/pulp3/repository/delete.rb +1 -1
  38. data/app/lib/actions/pulp3/repository/save_version.rb +1 -1
  39. data/app/lib/actions/pulp3/repository/upload_tag.rb +18 -0
  40. data/app/models/katello/authorization/content_view_version.rb +25 -2
  41. data/app/models/katello/authorization/content_view_version_export_history.rb +1 -1
  42. data/app/models/katello/authorization/organization.rb +8 -0
  43. data/app/models/katello/concerns/operatingsystem_extensions.rb +2 -0
  44. data/app/models/katello/concerns/pulp_database_unit.rb +19 -0
  45. data/app/models/katello/concerns/redhat_extensions.rb +2 -2
  46. data/app/models/katello/concerns/smart_proxy_extensions.rb +7 -5
  47. data/app/models/katello/content_migration_progress.rb +4 -0
  48. data/app/models/katello/content_view.rb +5 -0
  49. data/app/models/katello/content_view_history.rb +2 -1
  50. data/app/models/katello/content_view_package_filter.rb +1 -1
  51. data/app/models/katello/content_view_version_export_history.rb +6 -1
  52. data/app/models/katello/file_unit.rb +4 -0
  53. data/app/models/katello/host/subscription_facet.rb +4 -0
  54. data/app/models/katello/repository.rb +7 -0
  55. data/app/models/katello/subscription_status.rb +3 -2
  56. data/app/services/katello/applicability/applicable_content_helper.rb +44 -15
  57. data/app/services/katello/pulp3/api/docker.rb +4 -0
  58. data/app/services/katello/pulp3/content_view_version/export.rb +63 -5
  59. data/app/services/katello/pulp3/content_view_version/import.rb +40 -0
  60. data/app/services/katello/pulp3/content_view_version/import_export_common.rb +0 -16
  61. data/app/services/katello/pulp3/content_view_version/import_validator.rb +26 -49
  62. data/app/services/katello/pulp3/docker_manifest.rb +1 -0
  63. data/app/services/katello/pulp3/docker_tag.rb +1 -0
  64. data/app/services/katello/pulp3/erratum.rb +2 -1
  65. data/app/services/katello/pulp3/migration.rb +95 -12
  66. data/app/services/katello/pulp3/migration_plan.rb +2 -2
  67. data/app/services/katello/pulp3/migration_switchover.rb +21 -5
  68. data/app/services/katello/pulp3/repository.rb +10 -5
  69. data/app/services/katello/pulp3/repository/docker.rb +5 -0
  70. data/app/services/katello/pulp3/repository/yum.rb +23 -8
  71. data/app/services/katello/pulp3/task.rb +4 -0
  72. data/app/services/katello/pulp3/task_group.rb +4 -0
  73. data/app/views/katello/api/v2/content_views/show.json.rabl +6 -0
  74. data/app/views/katello/layouts/react.html.erb +3 -2
  75. data/app/views/katello/sync_management/_products.html.erb +1 -1
  76. data/app/views/overrides/activation_keys/_host_tab_pane.html.erb +1 -5
  77. data/config/routes/api/v2.rb +23 -3
  78. data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
  79. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +5 -2
  80. data/db/migrate/20201119211133_pulp3_migration_progress.rb +9 -0
  81. data/db/migrate/20210201165835_add_migration_missing_content.rb +12 -0
  82. data/engines/bastion/app/assets/javascripts/bastion/auth/authorization.service.js +1 -1
  83. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
  84. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +35 -40
  85. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +1 -1
  86. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-activation-keys.controller.js +8 -3
  87. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +9 -3
  88. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +1 -1
  89. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +4 -0
  90. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +78 -7
  91. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +17 -20
  92. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +17 -24
  93. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +1292 -1170
  94. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +17 -20
  95. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +858 -807
  96. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +18 -19
  97. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +17 -24
  98. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +17 -18
  99. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +986 -971
  100. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +19 -20
  101. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -9
  102. data/lib/katello/permission_creator.rb +23 -3
  103. data/lib/katello/tasks/delete_orphaned_content.rake +1 -3
  104. data/lib/katello/tasks/pulp3_content_switchover.rake +3 -1
  105. data/lib/katello/tasks/pulp3_migration.rake +25 -6
  106. data/lib/katello/tasks/pulp3_migration_abort.rake +7 -2
  107. data/lib/katello/tasks/pulp3_migration_approve_corrupted.rake +16 -0
  108. data/lib/katello/tasks/pulp3_migration_reset.rake +26 -0
  109. data/lib/katello/tasks/pulp3_migration_stats.rake +61 -8
  110. data/lib/katello/tasks/pulp3_post_migration_check.rake +1 -3
  111. data/lib/katello/tasks/receptor/extract_orgs.rake +1 -1
  112. data/lib/katello/tasks/reports.rake +4 -1
  113. data/lib/katello/tasks/repository.rake +3 -5
  114. data/lib/katello/version.rb +1 -1
  115. data/locale/action_names.rb +51 -51
  116. data/locale/bn/katello.po +136 -51
  117. data/locale/cs/katello.po +136 -49
  118. data/locale/de/katello.po +136 -48
  119. data/locale/en/katello.po +136 -48
  120. data/locale/es/katello.po +136 -48
  121. data/locale/fr/katello.po +136 -48
  122. data/locale/gu/katello.po +136 -51
  123. data/locale/hi/katello.po +136 -51
  124. data/locale/it/katello.po +136 -48
  125. data/locale/ja/katello.po +136 -48
  126. data/locale/katello.pot +941 -767
  127. data/locale/kn/katello.po +136 -51
  128. data/locale/ko/katello.po +136 -48
  129. data/locale/mr/katello.po +136 -51
  130. data/locale/or/katello.po +136 -51
  131. data/locale/pa/katello.po +136 -51
  132. data/locale/pt/katello.po +136 -51
  133. data/locale/pt_BR/katello.po +136 -48
  134. data/locale/ru/katello.po +136 -48
  135. data/locale/ta/katello.po +136 -51
  136. data/locale/te/katello.po +136 -51
  137. data/locale/zh_CN/katello.po +136 -48
  138. data/locale/zh_TW/katello.po +136 -48
  139. data/webpack/components/TypeAhead/TypeAhead.js +2 -1
  140. data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +2 -1
  141. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +7 -2
  142. data/webpack/scenes/Subscriptions/Manifest/index.js +1 -0
  143. metadata +31 -19
  144. data/lib/katello/tasks/common.rake +0 -7
@@ -21,13 +21,13 @@ module Katello
21
21
  def generate_plugins
22
22
  @repository_types.sort.map do |repository_type|
23
23
  {
24
- type: pulp2_repository_type(repository_type),
24
+ type: self.class.pulp2_repository_type(repository_type),
25
25
  repositories: repository_migrations(repository_type)
26
26
  }
27
27
  end
28
28
  end
29
29
 
30
- def pulp2_repository_type(repository_type)
30
+ def self.pulp2_repository_type(repository_type)
31
31
  if repository_type == 'yum'
32
32
  return 'rpm' #migration plugin uses rpm
33
33
  else
@@ -21,6 +21,7 @@ module Katello
21
21
  Katello::Logging.time("CONTENT_SWITCHOVER - combine_duplicate_content_types") { combine_duplicate_content_types }
22
22
  Katello::Logging.time("CONTENT_SWITCHOVER - combine_duplicate_docker_tags") { combine_duplicate_docker_tags } if docker_migration?
23
23
  Katello::Logging.time("CONTENT_SWITCHOVER - migrate_pulp3_hrefs") { migrate_pulp3_hrefs }
24
+ Katello::Logging.time("CONTENT_SWITCHOVER - remove_missing_content") { remove_missing_content }
24
25
  end
25
26
  end
26
27
 
@@ -106,12 +107,27 @@ module Katello
106
107
  end
107
108
  end
108
109
 
109
- def migrated_content_type_check
110
+ def remove_missing_content
110
111
  content_types.each do |content_type|
111
- if content_type.model_class == Katello::Erratum
112
- migrated_errata_check
113
- elsif content_type.model_class.where(migrated_pulp3_href: nil).any?
114
- fail SwitchOverError, "ERROR: at least one #{content_type.model_class.table_name} record has migrated_pulp3_href NULL value\n"
112
+ if Migration::CORRUPTABLE_CONTENT_TYPES.include?(content_type.model_class)
113
+ content_type.model_class.ignored_missing_migrated_content.destroy_all
114
+ else
115
+ content_type.model_class.unmigrated_content.destroy_all
116
+ end
117
+ end
118
+ end
119
+
120
+ def migrated_content_type_check
121
+ content_classes = content_types.map(&:model_class)
122
+ migrated_errata_check if content_classes.include?(Katello::Erratum)
123
+
124
+ (content_classes & Migration::CORRUPTABLE_CONTENT_TYPES).each do |content_type|
125
+ if content_type.missing_migrated_content.any?
126
+ fail SwitchOverError, "ERROR: at least one #{content_type.table_name} record has been detected as corrupt or missing. Run 'foreman-rake katello:pulp3_migration_stats' for more information.\n"
127
+ end
128
+
129
+ if content_type.unmigrated_content.any?
130
+ fail SwitchOverError, "ERROR: at least one #{content_type.table_name} record was not able to be migrated\n"
115
131
  end
116
132
  end
117
133
  end
@@ -1,7 +1,7 @@
1
1
  require "pulpcore_client"
2
-
3
2
  module Katello
4
3
  module Pulp3
4
+ # rubocop:disable Metrics/ClassLength
5
5
  class Repository
6
6
  include Katello::Util::HttpProxy
7
7
  attr_accessor :repo
@@ -188,8 +188,9 @@ module Katello
188
188
  api.repositories_api.read(repository_reference.try(:repository_href))
189
189
  end
190
190
 
191
- def delete(href = repository_reference.try(:repository_href))
192
- repository_reference.try(:destroy)
191
+ def delete_repository(repo_reference = repository_reference)
192
+ href = repo_reference.try(:repository_href)
193
+ repo_reference.try(:destroy)
193
194
  ignore_404_exception { api.repositories_api.delete(href) } if href
194
195
  end
195
196
 
@@ -257,8 +258,12 @@ module Katello
257
258
  create_version(:base_version => from_repository.version_href)
258
259
  end
259
260
 
261
+ def version_zero?
262
+ repo.version_href.ends_with?('/versions/0/')
263
+ end
264
+
260
265
  def delete_version
261
- ignore_404_exception { api.repository_versions_api.delete(repo.version_href) }
266
+ ignore_404_exception { api.repository_versions_api.delete(repo.version_href) } unless version_zero?
262
267
  end
263
268
 
264
269
  def create_version(options = {})
@@ -300,7 +305,7 @@ module Katello
300
305
  }
301
306
  remote_options[:url] = root.url unless root.url.blank?
302
307
  remote_options[:download_concurrency] = root.download_concurrency unless root.download_concurrency.blank?
303
- if root.upstream_username && root.upstream_password
308
+ if !root.upstream_username.blank? && !root.upstream_password.blank?
304
309
  remote_options.merge!(username: root.upstream_username,
305
310
  password: root.upstream_password)
306
311
  end
@@ -52,6 +52,11 @@ module Katello
52
52
  api.class.recursive_manage_class.new(content_units: options[:remove_content_units]))
53
53
  end
54
54
 
55
+ def tag_manifest(name, digest)
56
+ api.repositories_api.tag(repository_reference.repository_href,
57
+ api.class.tag_image_class.new(tag: name, digest: digest))
58
+ end
59
+
55
60
  def add_content(content_unit_href)
56
61
  content_unit_href = [content_unit_href] unless content_unit_href.is_a?(Array)
57
62
  api.repositories_api.add(repository_reference.repository_href, content_units: content_unit_href)
@@ -14,7 +14,16 @@ module Katello
14
14
  url, sles_token = extract_sles_token
15
15
  options = common_remote_options
16
16
  options.merge!(sles_auth_token: sles_token) if sles_token
17
- options.merge!(url: url, policy: root.download_policy)
17
+
18
+ options.merge!(url: url, policy: translated_download_policy)
19
+ end
20
+
21
+ def translated_download_policy
22
+ if root.download_policy == ::Runcible::Models::YumImporter::DOWNLOAD_BACKGROUND
23
+ ::Runcible::Models::YumImporter::DOWNLOAD_IMMEDIATE
24
+ else
25
+ root.download_policy
26
+ end
18
27
  end
19
28
 
20
29
  def extract_sles_token
@@ -207,14 +216,20 @@ module Katello
207
216
  tasks
208
217
  end
209
218
 
210
- def copy_all(source_repository)
211
- data = PulpRpmClient::Copy.new
212
- data.config = [{
213
- source_repo_version: source_repository.version_href,
214
- dest_repo: repository_reference.repository_href
215
- }]
219
+ def copy_all(source_repository, mirror: false)
220
+ if mirror
221
+ data = PulpRpmClient::RepositoryAddRemoveContent.new(
222
+ base_version: source_repository.version_href)
216
223
 
217
- [api.copy_api.copy_content(data)]
224
+ [api.repositories_api.modify(repository_reference.repository_href, data)]
225
+ else
226
+ data = PulpRpmClient::Copy.new
227
+ data.config = [{
228
+ source_repo_version: source_repository.version_href,
229
+ dest_repo: repository_reference.repository_href
230
+ }]
231
+ [api.copy_api.copy_content(data)]
232
+ end
218
233
  end
219
234
 
220
235
  def remove_all_content_from_repo(repo_href)
@@ -68,6 +68,10 @@ module Katello
68
68
  task_data[:finish_time] || FINISHED_STATES.include?(task_data[:state])
69
69
  end
70
70
 
71
+ def progress_reports
72
+ task_data['progress_reports']
73
+ end
74
+
71
75
  def poll
72
76
  task_data(true)
73
77
  self
@@ -53,6 +53,10 @@ module Katello
53
53
  task_group_data['all_tasks_dispatched'] == true && IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
54
54
  end
55
55
 
56
+ def group_progress_reports
57
+ task_group_data['group_progress_reports']
58
+ end
59
+
56
60
  def poll
57
61
  clear_task_group_data
58
62
  task_group_data
@@ -4,6 +4,12 @@ extends "katello/api/v2/content_views/base"
4
4
 
5
5
  attributes :content_host_count
6
6
 
7
+ node :errors do
8
+ unless @resource.valid?
9
+ attribute :messages => @resource.errors.full_messages
10
+ end
11
+ end
12
+
7
13
  child :duplicate_repositories_to_publish => :duplicate_repositories_to_publish do
8
14
  attributes :id, :name
9
15
  node :components do |repo|
@@ -10,7 +10,8 @@
10
10
  <%= notifications %>
11
11
  <div id="organization-id" data-id="<%= Organization.current.id if Organization.current %>" ></div>
12
12
  <div id="user-id" data-id="<%= User.current.id if User.current %>" ></div>
13
- <div id="reactRoot"></div>
14
- <%= mount_react_component('katello', '#reactRoot') %>
13
+ <div id="reactRoot">
14
+ <%= react_component('katello') %>
15
+ </div>
15
16
  <% end %>
16
17
  <%= render file: "layouts/base" %>
@@ -42,5 +42,5 @@
42
42
  </tbody>
43
43
  </table>
44
44
 
45
- <%= submit_tag _('Synchronize Now'), :class => 'button fr', :id => 'sync_button' %>
45
+ <%= submit_tag _('Synchronize Now'), :class => 'btn btn-default fr', :id => 'sync_button' %>
46
46
  <% end %>
@@ -9,13 +9,9 @@
9
9
 
10
10
  <%= field(f, _("Activation Keys"),
11
11
  :help_inline => _("The value will be available in templates as @host.params['#{kt_ak_label}']")) do
12
- tag.div id: :kt_activation_keys
12
+ react_component('TypeAheadSelect', { id: 'kt_activation_keys', multiple: true, allowNew: true })
13
13
  end %>
14
14
 
15
- <%= mount_react_component('TypeAheadSelect', '#kt_activation_keys',
16
- {id: 'kt_activation_keys', multiple: true, allowNew: true}.to_json,
17
- { flatten_data: true }) %>
18
-
19
15
  <div class="alert alert-info">
20
16
  <p><b><%= _('Subscriptions information based on selected activation keys:') %></b></p>
21
17
  <ul id="ak-subscriptions-info"></ul>
@@ -113,6 +113,22 @@ Katello::Engine.routes.draw do
113
113
  end
114
114
  end
115
115
 
116
+ api_resources :content_exports, :only => [] do
117
+ collection do
118
+ post :version
119
+ post :library
120
+ get :index
121
+ get :api_status
122
+ end
123
+ end
124
+
125
+ api_resources :content_export_incrementals, :only => [] do
126
+ collection do
127
+ post :version
128
+ post :library
129
+ end
130
+ end
131
+
116
132
  api_resources :content_view_versions, :except => [:create] do
117
133
  member do
118
134
  post :promote
@@ -121,11 +137,15 @@ Katello::Engine.routes.draw do
121
137
  get :available_errata, :controller => :errata
122
138
  end
123
139
  collection do
124
- get :export_histories
125
- get :export_api_status
126
140
  get :auto_complete_search
127
141
  post :incremental_update
128
- post :import
142
+ end
143
+ end
144
+
145
+ api_resources :content_imports, :only => [] do
146
+ collection do
147
+ post :version
148
+ post :library
129
149
  end
130
150
  end
131
151
 
@@ -329,7 +329,7 @@ class MigrateContentHosts < ActiveRecord::Migration[4.2]
329
329
  # rubocop:disable Metrics/MethodLength
330
330
  # rubocop:disable Metrics/AbcSize
331
331
  def up
332
- if User.where(:login => User::ANONYMOUS_API_ADMIN).first.nil?
332
+ unless User.unscoped.where(:login => User::ANONYMOUS_API_ADMIN).exists?
333
333
  logger.warn("Foreman anonymous admin does not exist, skipping content host migration.")
334
334
  return
335
335
  end
@@ -1,6 +1,6 @@
1
1
  class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
2
2
  def up
3
- if User.where(login: User::ANONYMOUS_ADMIN).exists?
3
+ if User.unscoped.where(login: User::ANONYMOUS_ADMIN).exists?
4
4
  User.as_anonymous_admin do
5
5
  copy_data_from_hostgroup
6
6
  end
@@ -46,7 +46,10 @@ class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
46
46
  content_facet.kickstart_repository_id = kickstart_repository_id
47
47
  content_facet.content_view_id = content_view_id
48
48
  content_facet.lifecycle_environment_id = lifecycle_environment_id
49
- content_facet.save!
49
+ unless content_facet.save
50
+ Rails.logger.warn("Unable to save content facet hostgroup for #{content_facet.inspect} ")
51
+ Rails.logger.warn(content_facet.errors.full_messages.join("\n"))
52
+ end
50
53
  end
51
54
  end
52
55
  end
@@ -0,0 +1,9 @@
1
+ class Pulp3MigrationProgress < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :katello_content_migration_progresses do |t|
4
+ t.string :progress_message
5
+ t.boolean :canceled, null: false, default: false
6
+ t.string :task_id, null: false, index: {name: 'katello_content_migration_progress_task_id', unique: true }
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ class AddMigrationMissingContent < ActiveRecord::Migration[6.0]
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
+ Katello::Deb]
6
+
7
+ content_models.each do |model|
8
+ add_column model.table_name, :missing_from_migration, :bool, :default => false, :null => false
9
+ add_column model.table_name, :ignore_missing_from_migration, :bool, :default => false, :null => false
10
+ end
11
+ end
12
+ end
@@ -20,7 +20,7 @@ angular.module('Bastion.auth').service('Authorization', ['CurrentUser', 'Permiss
20
20
  allowedTo = model.permissions[permissionName];
21
21
  } else {
22
22
  angular.forEach(Permissions, function (permission) {
23
- if (permission.permission.name === permissionName) {
23
+ if (permission.name === permissionName) {
24
24
  allowedTo = true;
25
25
  }
26
26
  });
@@ -1,7 +1,7 @@
1
1
  <section>
2
2
  <p bst-alert="warning" >
3
3
  <span translate>
4
- Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.
4
+ Katello-agent is deprecated and will be removed in a future release.
5
5
  </span>
6
6
  </p>
7
7
  </section>
@@ -1,8 +1,7 @@
1
1
  <div data-extend-template="components/views/bst-modal.html">
2
- <h4 data-block="modal-header" translate>Content Host System Purpose</h4>
2
+ <h2 data-block="modal-header" translate>Assign System Purpose</h2>
3
3
 
4
4
  <div data-block="modal-body">
5
- <h4 translate>Assign System Purpose:</h4>
6
5
 
7
6
  <div class="row">
8
7
  <div class="col-sm-12">
@@ -10,67 +9,63 @@
10
9
  </div>
11
10
  </div>
12
11
 
12
+ <div bst-alert="info">
13
+ <span translate>
14
+ This change will be applied to <b>{{ hostCount }} systems.</b>
15
+ </span>
16
+ </div>
17
+ <br />
18
+
13
19
  <form name="contentHostContentForm" class="form" ng-hide="content.workingMode">
14
- <div>
15
- <label translate>Service Level:</label>
20
+ <div><b>
21
+ <dl class="dl-horizontal dl-horizontal-left">
22
+ <dt><label translate>Service Level (SLA):</label></dt>
16
23
 
17
- <select type="select"
18
- ng-options="item for item in defaultServiceLevels"
19
- ng-model="selectedServiceLevels">
20
- </select>
21
- <br /><br />
24
+ <dd><select type="select"
25
+ ng-options="item for item in defaultServiceLevels"
26
+ ng-model="selectedServiceLevels">
27
+ </select></dd>
28
+ <br /><br />
22
29
 
23
- <label translate>Usage Type:</label>
30
+ <dt style="margin-left: -50px;"><label translate>Usage Type:</label></dt>
24
31
 
25
- <select type="select"
32
+ <dd><select type="select"
26
33
  ng-options="item for item in defaultUsages"
27
34
  ng-model="selectedRoles">
28
- </select>
35
+ </select></dd>
29
36
  <br /><br />
30
37
 
31
- <label translate>Role:</label>
38
+ <dt style="margin-left: -98px;"><label translate>Role:</label></dt>
32
39
 
33
- <select type="select"
40
+ <dd><select type="select"
34
41
  ng-options="item for item in defaultRoles"
35
42
  ng-model="selectedUsages">
36
- </select>
43
+ </select></dd>
37
44
  <br /><br />
38
45
 
39
- <label ng-hide="!purposeAddonsList().length" translate>Add ons:</label>
40
- <div class="help-block" style="text-align:left;">
41
- <p translate>ctrl-click or shift-click to select multiple Add ons</p>
42
- </div>
46
+ <dt style="margin-left: -75px;"><label ng-hide="!purposeAddonsList().length" translate>Add ons:</label></dt>
43
47
 
44
- <select multiple ng-multiple="true"
48
+ <dd><select multiple ng-multiple="true"
45
49
  ng-hide="!purposeAddonsList().length"
46
50
  ng-options="item for item in purposeAddonsList()"
47
51
  ng-model="selectedAddons">
48
- </select>
49
- <br /><br />
50
-
51
- </div>
52
-
53
- <div bst-alert="info" ng-show="showConfirm">
54
- <span translate>
55
- Set System Purpose values on {{ hostCount }} selected content hosts?
56
- </span>
57
- <div>
58
- <br />
59
- <button type="button" class="btn btn-primary" ng-click="showConfirm = false; performAction()" translate>Assign</button>
52
+ </select></dd>
53
+ <div class="help-block" style="text-align:center; margin-left: -180px;">
54
+ <p translate>ctrl-click or shift-click to select multiple Add ons</p>
60
55
  </div>
56
+ <br /><br />
57
+ </dl></b>
61
58
  </div>
62
-
63
- <button class="btn btn-primary"
64
- type="button"
65
- ng-hide="showConfirm"
66
- ng-click="showConfirm = true;">
67
- <span translate>Assign</span>
68
- </button>
69
-
70
59
  </form>
71
60
  </div>
72
61
 
73
62
  <div data-block="modal-footer">
63
+ <button class="btn btn-primary"
64
+ type="button"
65
+ ng-click="performAction()">
66
+ <span translate>Assign</span>
67
+ </button>
68
+
74
69
  <button type="button" class="btn btn-default" ng-click="cancel()" translate>
75
70
  Cancel
76
71
  </button>