katello 3.17.3 → 3.18.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +38 -21
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -1
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -15
  5. data/app/controllers/katello/api/v2/api_controller.rb +2 -1
  6. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -8
  7. data/app/controllers/katello/api/v2/content_view_components_controller.rb +31 -14
  8. data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +1 -0
  9. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +65 -36
  10. data/app/controllers/katello/api/v2/content_views_controller.rb +27 -25
  11. data/app/controllers/katello/api/v2/environments_controller.rb +8 -8
  12. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +5 -5
  13. data/app/controllers/katello/api/v2/host_collections_controller.rb +19 -16
  14. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +17 -0
  15. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
  16. data/app/controllers/katello/api/v2/repositories_controller.rb +8 -5
  17. data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
  18. data/app/controllers/katello/api/v2/sync_plans_controller.rb +8 -9
  19. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +9 -2
  20. data/app/controllers/katello/concerns/api/v2/authorization.rb +9 -5
  21. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +21 -0
  22. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
  23. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +2 -1
  24. data/app/helpers/katello/katello_urls_helper.rb +5 -2
  25. data/app/lib/actions/candlepin/product/content_create.rb +2 -0
  26. data/app/lib/actions/candlepin/product/content_update.rb +2 -0
  27. data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -6
  28. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +2 -6
  29. data/app/lib/actions/katello/content_view/publish.rb +3 -4
  30. data/app/lib/actions/katello/content_view_version/import.rb +4 -3
  31. data/app/lib/actions/katello/content_view_version/incremental_update.rb +18 -3
  32. data/app/lib/actions/katello/host/update_system_purpose.rb +31 -0
  33. data/app/lib/actions/katello/organization/manifest_delete.rb +0 -1
  34. data/app/lib/actions/katello/organization/manifest_import.rb +0 -1
  35. data/app/lib/actions/katello/organization/manifest_refresh.rb +0 -1
  36. data/app/lib/actions/katello/product/content_create.rb +7 -6
  37. data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -1
  38. data/app/lib/actions/katello/repository/import_upload.rb +2 -1
  39. data/app/lib/actions/katello/repository/update.rb +4 -1
  40. data/app/lib/actions/pulp3/abstract_async_task.rb +0 -1
  41. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
  42. data/app/lib/actions/pulp3/content_view_version/create_importer.rb +7 -3
  43. data/app/lib/actions/pulp3/content_view_version/export.rb +2 -1
  44. data/app/lib/actions/pulp3/content_view_version/import.rb +7 -3
  45. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +15 -10
  46. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +16 -10
  47. data/app/lib/actions/pulp3/repository/commit_upload.rb +2 -1
  48. data/app/lib/actions/pulp3/repository/delete.rb +1 -1
  49. data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
  50. data/app/lib/katello/resources/candlepin/consumer.rb +2 -2
  51. data/app/lib/katello/resources/candlepin/owner.rb +5 -0
  52. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
  53. data/app/lib/katello/resources/registry.rb +3 -3
  54. data/app/models/katello/authorization/activation_key.rb +4 -0
  55. data/app/models/katello/authorization/content_view.rb +13 -0
  56. data/app/models/katello/authorization/content_view_component.rb +15 -0
  57. data/app/models/katello/authorization/gpg_key.rb +12 -4
  58. data/app/models/katello/authorization/lifecycle_environment.rb +8 -0
  59. data/app/models/katello/authorization/sync_plan.rb +16 -0
  60. data/app/models/katello/concerns/organization_extensions.rb +4 -5
  61. data/app/models/katello/concerns/redhat_extensions.rb +2 -2
  62. data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -3
  63. data/app/models/katello/content_view_component.rb +2 -0
  64. data/app/models/katello/content_view_version_export_history.rb +2 -0
  65. data/app/models/katello/glue/candlepin/pool.rb +9 -14
  66. data/app/models/katello/glue/pulp/repo.rb +8 -0
  67. data/app/models/katello/gpg_key.rb +1 -1
  68. data/app/models/katello/root_repository.rb +26 -1
  69. data/app/services/katello/applicability/applicable_content_helper.rb +1 -12
  70. data/app/services/katello/candlepin/event_handler.rb +2 -0
  71. data/app/services/katello/candlepin/message_handler.rb +34 -0
  72. data/app/services/katello/candlepin/upstream_consumer.rb +28 -0
  73. data/app/services/katello/host_status_manager.rb +9 -0
  74. data/app/services/katello/pulp3/api/apt.rb +57 -0
  75. data/app/services/katello/pulp3/api/core.rb +8 -0
  76. data/app/services/katello/pulp3/content_view_version/export.rb +4 -3
  77. data/app/services/katello/pulp3/content_view_version/import.rb +5 -15
  78. data/app/services/katello/pulp3/deb.rb +38 -0
  79. data/app/services/katello/pulp3/erratum.rb +1 -2
  80. data/app/services/katello/pulp3/pulp_content_unit.rb +5 -0
  81. data/app/services/katello/pulp3/repository/ansible_collection.rb +9 -0
  82. data/app/services/katello/pulp3/repository/apt.rb +63 -0
  83. data/app/services/katello/pulp3/repository/docker.rb +4 -0
  84. data/app/services/katello/pulp3/repository/yum.rb +2 -1
  85. data/app/services/katello/pulp3/repository.rb +11 -9
  86. data/app/services/katello/pulp3/repository_mirror.rb +9 -4
  87. data/app/services/katello/pulp3/task.rb +3 -3
  88. data/app/services/katello/pulp3/task_group.rb +0 -6
  89. data/app/views/dashboard/_subscription_widget.html.erb +0 -5
  90. data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +1 -1
  91. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
  92. data/app/views/overrides/organizations/_index_row_override.html.erb +1 -1
  93. data/config/routes/api/v2.rb +2 -0
  94. data/config/routes/overrides.rb +1 -0
  95. data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
  96. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +2 -5
  97. data/db/migrate/20201008204114_add_os_versions_to_katello_root_repositories.rb +5 -0
  98. data/db/migrate/20201012172713_remove_gpg_key_perms.rb +23 -0
  99. data/db/migrate/20201012192035_add_metadata_to_katello_content_view_version_export_history.rb +5 -0
  100. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  101. data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
  102. data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +8 -13
  103. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
  104. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +112 -0
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +78 -0
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +2 -42
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +1 -1
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +16 -14
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +6 -7
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +168 -155
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +17 -2
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +125 -113
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +15 -3
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +46 -0
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
  123. data/lib/katello/engine.rb +1 -0
  124. data/lib/katello/permission_creator.rb +68 -59
  125. data/lib/katello/permissions/host_permissions.rb +1 -0
  126. data/lib/katello/plugin.rb +4 -1
  127. data/lib/katello/repository_types/deb.rb +9 -1
  128. data/lib/katello/tasks/pulp3_content_switchover.rake +1 -3
  129. data/lib/katello/tasks/pulp3_migration_stats.rake +21 -0
  130. data/lib/katello/tasks/reports.rake +1 -4
  131. data/lib/katello/tasks/reset.rake +2 -1
  132. data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +18 -0
  133. data/lib/katello/version.rb +1 -1
  134. data/locale/action_names.rb +54 -47
  135. data/locale/bn/katello.po +165 -26
  136. data/locale/cs/katello.po +164 -24
  137. data/locale/de/katello.po +165 -26
  138. data/locale/en/katello.po +164 -23
  139. data/locale/es/katello.po +165 -25
  140. data/locale/fr/katello.po +165 -25
  141. data/locale/gu/katello.po +165 -26
  142. data/locale/hi/katello.po +165 -26
  143. data/locale/it/katello.po +165 -25
  144. data/locale/ja/katello.po +165 -26
  145. data/locale/katello.pot +1036 -802
  146. data/locale/kn/katello.po +165 -26
  147. data/locale/ko/katello.po +165 -25
  148. data/locale/mr/katello.po +165 -26
  149. data/locale/or/katello.po +165 -26
  150. data/locale/pa/katello.po +165 -26
  151. data/locale/pt/katello.po +164 -23
  152. data/locale/pt_BR/katello.po +165 -25
  153. data/locale/ru/katello.po +165 -25
  154. data/locale/ta/katello.po +165 -26
  155. data/locale/te/katello.po +165 -26
  156. data/locale/zh_CN/katello.po +165 -25
  157. data/locale/zh_TW/katello.po +165 -26
  158. data/webpack/components/ActionableDetail.js +2 -1
  159. data/webpack/components/Search/Search.js +1 -1
  160. data/webpack/components/Table/MainTable.js +6 -2
  161. data/webpack/components/Table/TableWrapper.js +46 -9
  162. data/webpack/scenes/ContentViews/ContentViewSelectors.js +7 -3
  163. data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -0
  164. data/webpack/scenes/ContentViews/ContentViewsPage.js +2 -9
  165. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +25 -3
  166. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +14 -4
  167. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
  168. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +56 -0
  169. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +169 -0
  170. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +47 -0
  171. data/webpack/scenes/ContentViews/Details/Repositories/RepoAddedStatus.js +17 -0
  172. data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +23 -0
  173. data/webpack/scenes/ContentViews/Details/Repositories/SelectableDropdown.js +49 -0
  174. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +154 -0
  175. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +131 -0
  176. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
  177. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -1
  178. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +2 -2
  179. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +16 -8
  180. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +17 -0
  181. data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
  182. data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +19 -2
  183. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +9 -1
  184. data/webpack/scenes/Subscriptions/Manifest/index.js +2 -1
  185. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +1 -1
  186. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -0
  187. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +8 -2
  188. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
  189. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +3 -0
  190. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
  191. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
  192. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -13
  193. metadata +69 -26
@@ -0,0 +1,5 @@
1
+ class AddOsVersionsToKatelloRootRepositories < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_root_repositories, :os_versions, :text
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ class RemoveGpgKeyPerms < ActiveRecord::Migration[6.0]
2
+ def permission_map
3
+ {
4
+ Permission.find_by(name: :view_gpg_keys) => Permission.find_by(name: :view_content_credentials),
5
+ Permission.find_by(name: :edit_gpg_keys) => Permission.find_by(name: :edit_content_credentials),
6
+ Permission.find_by(name: :destroy_gpg_keys) => Permission.find_by(name: :destroy_content_credentials),
7
+ Permission.find_by(name: :create_gpg_keys) => Permission.find_by(name: :create_content_credentials)
8
+ }
9
+ end
10
+
11
+ def up
12
+ perms = permission_map
13
+ perms.each do |old_perm, new_perm|
14
+ Filtering.where(permission_id: old_perm.id).update_all(:permission_id => new_perm.id) if old_perm
15
+ end
16
+ names = perms.keys.compact.map(&:name)
17
+ Permission.where(:name => names).destroy_all if names.any?
18
+ end
19
+
20
+ def down
21
+ fail ActiveRecord::IrreversibleMigration
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ class AddMetadataToKatelloContentViewVersionExportHistory < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_content_view_version_export_histories, :metadata, :text
4
+ end
5
+ end
@@ -13,6 +13,7 @@ UpgradeTask.define_tasks(:katello) do
13
13
  {:name => 'katello:upgrades:3.13:republish_deb_metadata'},
14
14
  {:name => 'katello:upgrades:3.15:set_sub_facet_dmi_uuid'},
15
15
  {:name => 'katello:upgrades:3.15:reindex_rpm_modular'},
16
- {:name => 'katello:upgrades:3.16:update_applicable_el8_hosts'}
16
+ {:name => 'katello:upgrades:3.16:update_applicable_el8_hosts'},
17
+ {:name => 'katello:upgrades:3.18:add_cvv_export_history_metadata'}
17
18
  ]
18
19
  end
@@ -32,6 +32,6 @@ angular.module('Bastion.components').service("Notification", ['$interpolate', 'f
32
32
  };
33
33
 
34
34
  this.setErrorMessage = function (message, context) {
35
- foreman.toastNotifications.notify({message: interpolateIfNeeded(message, context), type: 'danger'});
35
+ foreman.toastNotifications.notify({message: interpolateIfNeeded(message, context), type: 'error'});
36
36
  };
37
37
  }]);
@@ -97,7 +97,6 @@ angular.module('Bastion.components').factory('Nutupane',
97
97
  self.load = function () {
98
98
  var deferred = $q.defer(),
99
99
  responsePage,
100
- resourceCall,
101
100
  table = self.table,
102
101
  existingTable = TableCache.getTable(getTableName());
103
102
 
@@ -115,11 +114,7 @@ angular.module('Bastion.components').factory('Nutupane',
115
114
  params.search = table.searchTerm || "";
116
115
  params.search = self.searchTransform(params.search);
117
116
 
118
- resourceCall = resource[table.action](params, function (response) {
119
- if (response.error) {
120
- Notification.setErrorMessage(response.error);
121
- }
122
-
117
+ resource[table.action](params).$promise.then(function (response) {
123
118
  angular.forEach(response.results, function (row) {
124
119
  row.selected = table.allResultsSelected;
125
120
  });
@@ -155,14 +150,14 @@ angular.module('Bastion.components').factory('Nutupane',
155
150
  table.working = false;
156
151
  table.refreshing = false;
157
152
  table.initialLoad = false;
158
- });
153
+ }).catch(function(response) {
154
+ table.working = false;
155
+ table.refreshing = false;
159
156
 
160
- if (resourceCall && resourceCall.$promise && resourceCall.$promise.catch) {
161
- resourceCall.$promise.catch(function () {
162
- table.working = false;
163
- table.refreshing = false;
164
- });
165
- }
157
+ if (response && response.data && response.data.error && response.data.error.message) {
158
+ Notification.setErrorMessage(response.data.error.message);
159
+ }
160
+ });
166
161
 
167
162
  return deferred.promise;
168
163
  };
@@ -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 a future release.
4
+ Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.
5
5
  </span>
6
6
  </p>
7
7
  </section>
@@ -0,0 +1,112 @@
1
+ /**
2
+ * @ngdoc object
3
+ * @name Bastion.content-hosts.controller:ContentHostsBulkSystemPurposeModalController
4
+ *
5
+ * @requires $scope
6
+ * @requires $uibModalInstance
7
+ * @requires HostBulkAction
8
+ * @requires Organization
9
+ * @requires CurrentOrganization
10
+ * @requires Notification
11
+ * @requires hostIds
12
+ *
13
+ * @description
14
+ * A controller for providing bulk action functionality for setting system purpose values
15
+ */
16
+ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSystemPurposeModalController',
17
+ ['$scope', '$uibModalInstance', 'HostBulkAction', 'Organization', 'CurrentOrganization', 'Notification', 'hostIds',
18
+ function ($scope, $uibModalInstance, HostBulkAction, Organization, CurrentOrganization, Notification, hostIds) {
19
+
20
+ $scope.organization = Organization.get({id: CurrentOrganization});
21
+
22
+ $scope.purposeAddonsList = function () {
23
+ var defaultOptions = ['No Change', 'None (Clear)'];
24
+ if ($scope.organization.system_purposes && $scope.organization.system_purposes.addons) {
25
+ return defaultOptions.concat($scope.organization.system_purposes.addons);
26
+ }
27
+ return [];
28
+ };
29
+
30
+ $scope.defaultUsages = ['No change', 'None (Clear)', 'Production', 'Development/Test', 'Disaster Recovery'];
31
+ $scope.defaultRoles = ['No change', 'None (Clear)', 'Red Hat Enterprise Linux Server', 'Red Hat Enterprise Linux Workstation', 'Red Hat Enterprise Linux Compute Node'];
32
+ $scope.defaultServiceLevels = ['No change', 'None (Clear)', 'Self-Support', 'Standard', 'Premium'];
33
+
34
+ $scope.hostCount = hostIds.included.ids.length;
35
+
36
+ $scope.selectedUsages = $scope.defaultUsages[0];
37
+ $scope.selectedRoles = $scope.defaultRoles[0];
38
+ $scope.selectedServiceLevels = $scope.defaultServiceLevels[0];
39
+
40
+ $scope.selected = {
41
+ addons: undefined
42
+ };
43
+
44
+ $scope.selectedItemToParam = function (item) {
45
+ var mapping = {
46
+ "None (Clear)": "",
47
+ "No change": null,
48
+ "": []
49
+ };
50
+ if (Array.isArray(item)) {
51
+ return $scope.selectedAddonsToParam(item);
52
+ }
53
+ if (mapping.hasOwnProperty(item)) {
54
+ return mapping[item];
55
+ }
56
+ return item;
57
+ };
58
+
59
+ $scope.selectedAddonsToParam = function (addons) {
60
+ var intentOptions = ['No Change', 'None (Clear)'];
61
+
62
+ var userIntent = intentOptions.filter(function(val) {
63
+ return addons.indexOf(val) !== -1;
64
+ });
65
+
66
+ if (userIntent.length === 0) {
67
+ return addons;
68
+ }
69
+
70
+ if (userIntent.includes('No Change')) {
71
+ return null;
72
+ }
73
+
74
+ if (userIntent.includes('None (Clear)') && addons.length === 1) {
75
+ return [];
76
+ } if (userIntent.includes('None (Clear)') && addons.length > 1) {
77
+ addons.shift();
78
+ return addons;
79
+ }
80
+ };
81
+
82
+ function actionParams() {
83
+ var params = hostIds;
84
+
85
+ params['purpose_usage'] = $scope.selectedItemToParam($scope.selectedUsages);
86
+ params['purpose_role'] = $scope.selectedItemToParam($scope.selectedRoles);
87
+ params['purpose_addons'] = $scope.selectedItemToParam($scope.selectedAddons);
88
+ params['service_level'] = $scope.selectedItemToParam($scope.selectedServiceLevels);
89
+
90
+ return params;
91
+ }
92
+
93
+ $scope.performAction = function () {
94
+ HostBulkAction.systemPurpose(actionParams(), function (task) {
95
+ $scope.ok();
96
+ $scope.transitionTo('content-hosts.bulk-task', {taskId: task.id});
97
+ }, function (response) {
98
+ angular.forEach(response.data.errors, function (error) {
99
+ Notification.setErrorMessage(error);
100
+ });
101
+ });
102
+ };
103
+
104
+ $scope.ok = function () {
105
+ $uibModalInstance.close();
106
+ };
107
+
108
+ $scope.cancel = function () {
109
+ $uibModalInstance.dismiss('cancel');
110
+ };
111
+ }]
112
+ );
@@ -0,0 +1,78 @@
1
+ <div data-extend-template="components/views/bst-modal.html">
2
+ <h4 data-block="modal-header" translate>Content Host System Purpose</h4>
3
+
4
+ <div data-block="modal-body">
5
+ <h4 translate>Assign System Purpose:</h4>
6
+
7
+ <div class="row">
8
+ <div class="col-sm-12">
9
+ <div bst-global-notification></div>
10
+ </div>
11
+ </div>
12
+
13
+ <form name="contentHostContentForm" class="form" ng-hide="content.workingMode">
14
+ <div>
15
+ <label translate>Service Level:</label>
16
+
17
+ <select type="select"
18
+ ng-options="item for item in defaultServiceLevels"
19
+ ng-model="selectedServiceLevels">
20
+ </select>
21
+ <br /><br />
22
+
23
+ <label translate>Usage Type:</label>
24
+
25
+ <select type="select"
26
+ ng-options="item for item in defaultUsages"
27
+ ng-model="selectedRoles">
28
+ </select>
29
+ <br /><br />
30
+
31
+ <label translate>Role:</label>
32
+
33
+ <select type="select"
34
+ ng-options="item for item in defaultRoles"
35
+ ng-model="selectedUsages">
36
+ </select>
37
+ <br /><br />
38
+
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>
43
+
44
+ <select multiple ng-multiple="true"
45
+ ng-hide="!purposeAddonsList().length"
46
+ ng-options="item for item in purposeAddonsList()"
47
+ 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>
60
+ </div>
61
+ </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
+ </form>
71
+ </div>
72
+
73
+ <div data-block="modal-footer">
74
+ <button type="button" class="btn btn-default" ng-click="cancel()" translate>
75
+ Cancel
76
+ </button>
77
+ </div>
78
+ </div>
@@ -8,40 +8,15 @@
8
8
  * @requires HostDeb
9
9
  * @requires translate
10
10
  * @requires Nutupane
11
- * @requires Notification
12
11
  *
13
12
  * @description
14
13
  * Provides the functionality for the content host deb packages list and actions.
15
14
  */
16
15
  angular.module('Bastion.content-hosts').controller('ContentHostDebsInstalledController',
17
- ['$scope', '$timeout', '$window', 'HostDeb', 'translate', 'Nutupane', 'BastionConfig', 'Notification',
18
- function ($scope, $timeout, $window, HostDeb, translate, Nutupane, BastionConfig, Notification) {
16
+ ['$scope', '$timeout', '$window', 'HostDeb', 'translate', 'Nutupane',
17
+ function ($scope, $timeout, $window, HostDeb, translate, Nutupane) {
19
18
  var debsNutupane;
20
19
 
21
- $scope.openEventInfo = function (event) {
22
- // when the event has label defined, it means it comes
23
- // from foreman-tasks
24
- if (event.label) {
25
- $scope.transitionTo('content-host.tasks.details', {taskId: event.id});
26
- } else {
27
- $scope.transitionTo('content-host.events.details', {eventId: event.id});
28
- }
29
- $scope.working = false;
30
- };
31
-
32
- $scope.errorHandler = function (response) {
33
- angular.forEach(response.data.errors, function (responseError) {
34
- Notification.setErrorMessage(responseError);
35
- });
36
- $scope.working = false;
37
- };
38
-
39
- $scope.working = false;
40
- $scope.remoteExecutionPresent = BastionConfig.remoteExecutionPresent;
41
- $scope.packageActionFormValues = {
42
- authenticityToken: $window.AUTH_TOKEN.replace(/&quot;/g, '')
43
- };
44
-
45
20
  $scope.removeSelectedDebs = function () {
46
21
  var selected;
47
22
 
@@ -54,21 +29,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostDebsInstalledCont
54
29
  }
55
30
  };
56
31
 
57
- $scope.performPackageAction = function (actionType, term) {
58
- $scope.performViaRemoteExecution(actionType, term, false);
59
- };
60
-
61
- $scope.performViaRemoteExecution = function (actionType, term, customize) {
62
- $scope.packageActionFormValues.package = term;
63
- $scope.packageActionFormValues.remoteAction = actionType;
64
- $scope.packageActionFormValues.hostIds = $scope.host.id;
65
- $scope.packageActionFormValues.customize = customize;
66
-
67
- $timeout(function () {
68
- angular.element('#packageActionForm').submit();
69
- }, 0);
70
- };
71
-
72
32
  debsNutupane = new Nutupane(HostDeb, {id: $scope.$stateParams.hostId});
73
33
  debsNutupane.primaryOnly = true;
74
34
  $scope.table = debsNutupane.table;
@@ -91,6 +91,17 @@ angular.module('Bastion.content-hosts').service('ContentHostsModalHelper', ['$ui
91
91
  });
92
92
  };
93
93
 
94
+ this.openSystemPurposeModal = function() {
95
+ $uibModal.open({
96
+ templateUrl: 'content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html',
97
+ controller: 'ContentHostsBulkSystemPurposeModalController',
98
+ size: 'lg',
99
+ resolve: {
100
+ hostIds: this.resolveFunc()
101
+ }
102
+ });
103
+ };
104
+
94
105
  this.openModuleStreamsModal = function() {
95
106
  $uibModal.open({
96
107
  templateUrl: 'content-hosts/bulk/views/content-host-bulk-module-streams-modal.html',
@@ -160,6 +160,11 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
160
160
  ContentHostsModalHelper.openModuleStreamsModal();
161
161
  };
162
162
 
163
+ $scope.openSystemPurposeModal = function () {
164
+ nutupane.invalidate();
165
+ ContentHostsModalHelper.openSystemPurposeModal();
166
+ };
167
+
163
168
  $scope.openTracesModal = function () {
164
169
  nutupane.invalidate();
165
170
  ContentHostsModalHelper.openTracesModal();
@@ -51,6 +51,10 @@
51
51
  <a ng-click="openModuleStreamsModal()" disable-link="table.numSelected === 0" translate>Manage Module Streams</a>
52
52
  </li>
53
53
 
54
+ <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
55
+ <a ng-click="openSystemPurposeModal()" disable-link="table.numSelected === 0" translate>Manage System Purpose</a>
56
+ </li>
57
+
54
58
  <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
55
59
  <a ng-click="openTracesModal()" disable-link="table.numSelected === 0" translate>Manage Host Traces</a>
56
60
  </li>
@@ -12,7 +12,7 @@
12
12
  <section>
13
13
  <p bst-alert="warning" >
14
14
  <span translate>
15
- Katello-agent is deprecated and will be removed in a future release.
15
+ Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution.
16
16
  </span>
17
17
  </p>
18
18
  </section>
@@ -77,6 +77,10 @@ angular.module('Bastion.host-collections').controller('HostCollectionDetailsCont
77
77
  ContentHostsModalHelper.openSubscriptionsModal();
78
78
  };
79
79
 
80
+ $scope.openSystemPurposeModal = function () {
81
+ ContentHostsModalHelper.openSystemPurposeModal();
82
+ };
83
+
80
84
  $scope.openModuleStreamsModal = function () {
81
85
  ContentHostsModalHelper.openModuleStreamsModal();
82
86
  };
@@ -100,6 +100,12 @@
100
100
  </a>
101
101
  </li>
102
102
 
103
+ <li>
104
+ <a translate ng-click="openSystemPurposeModal()">
105
+ System Purpose Management
106
+ </a>
107
+ </li>
108
+
103
109
  <li bst-feature-flag="lifecycle_environments">
104
110
  <a translate ng-click="openEnvironmentModal()">
105
111
  Change assigned Lifecycle Environment or Content View
@@ -27,7 +27,8 @@ angular.module('Bastion.hosts').factory('HostBulkAction',
27
27
  availableIncrementalUpdates: {method: 'POST', isArray: true, params: {action: 'available_incremental_updates'}},
28
28
  moduleStreams: {method: 'POST', params: {action: 'module_streams'}},
29
29
  traces: {method: 'POST', params: {action: 'traces'}},
30
- resolveTraces: {method: 'PUT', isArray: true, params: {action: 'resolve_traces'}}
30
+ resolveTraces: {method: 'PUT', isArray: true, params: {action: 'resolve_traces'}},
31
+ systemPurpose: {method: 'PUT', params: {action: 'system_purpose'}}
31
32
  });
32
33
 
33
34
  }]
@@ -273,6 +273,7 @@ msgstr ""
273
273
  msgid "* These marked Content View Versions are from Composite Content Views. Their components needing updating are listed underneath."
274
274
  msgstr ""
275
275
 
276
+ #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js
276
277
  #: app/assets/javascripts/bastion_katello/products/products.controller.js
277
278
  msgid "/foreman_tasks/tasks/%taskId"
278
279
  msgstr ""
@@ -1311,6 +1312,7 @@ msgstr ""
1311
1312
  msgid "Click to monitor task progress."
1312
1313
  msgstr ""
1313
1314
 
1315
+ #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js
1314
1316
  #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-http-proxy-modal.controller.js
1315
1317
  #: app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js
1316
1318
  #: app/assets/javascripts/bastion_katello/products/products.controller.js
@@ -2083,11 +2085,6 @@ msgstr ""
2083
2085
  msgid "Enable"
2084
2086
  msgstr ""
2085
2087
 
2086
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
2087
- #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
2088
- msgid "Enable on Registration"
2089
- msgstr ""
2090
-
2091
2088
  #: app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-traces.html
2092
2089
  #: app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html
2093
2090
  msgid "Enable Traces"
@@ -2756,7 +2753,7 @@ msgstr ""
2756
2753
 
2757
2754
  #: app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html
2758
2755
  #: app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html
2759
- msgid "Katello-agent is deprecated and will be removed in a future release."
2756
+ msgid "Katello-agent is deprecated and will be removed in Katello 4.0. Consider migrating to Remote Execution."
2760
2757
  msgstr ""
2761
2758
 
2762
2759
  #: app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html
@@ -3238,7 +3235,7 @@ msgid "Name"
3238
3235
  msgstr ""
3239
3236
 
3240
3237
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
3241
- msgid "Name of the upstream repository you want to sync. Example: 'busybox' or 'fedora/ssh'."
3238
+ msgid "Name of the upstream repository you want to sync. Example: 'quay/busybox' or 'fedora/ssh'."
3242
3239
  msgstr ""
3243
3240
 
3244
3241
  #: app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html
@@ -3937,7 +3934,11 @@ msgid "Product sync has been initiated in the background."
3937
3934
  msgstr ""
3938
3935
 
3939
3936
  #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js
3940
- msgid "Product syncs has been initiated in the background. Click %s to monitor the progress."
3937
+ msgid "Product syncs has been initiated in the background."
3938
+ msgstr ""
3939
+
3940
+ #: app/assets/javascripts/bastion_katello/products/products.controller.js
3941
+ msgid "Product verify checksum has been initiated in the background."
3941
3942
  msgstr ""
3942
3943
 
3943
3944
  #: app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html
@@ -4771,10 +4772,6 @@ msgstr ""
4771
4772
  msgid "Selecting \"Complete Sync\" will cause only Yum repositories of the selected product to be synced. Selecting \"Validate Content\" will cause only Yum repositories using the \"Immediate\" or \"Background\" download policies will be synced."
4772
4773
  msgstr ""
4773
4774
 
4774
- #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
4775
- msgid "Selecting this option will automatically enable this Repository when a Host registers and consumes this subscription."
4776
- msgstr ""
4777
-
4778
4775
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
4779
4776
  msgid "Selecting this option will result in contents that are no longer part of the upstream repository being removed during synchronization."
4780
4777
  msgstr ""
@@ -5456,7 +5453,7 @@ msgid ""
5456
5453
  msgstr ""
5457
5454
 
5458
5455
  #: app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html
5459
- msgid "This organization has Simple Content Access enabled. Hosts can consume from all repositories in their Content View regardless of subscription status."
5456
+ msgid "This organization has Simple Content Access enabled. Hosts are not required to have subscriptions attached to access repositories."
5460
5457
  msgstr ""
5461
5458
 
5462
5459
  #: app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-environments.html
@@ -5737,7 +5734,7 @@ msgid "Url"
5737
5734
  msgstr ""
5738
5735
 
5739
5736
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
5740
- msgid "URL of the registry you want to sync. Example: https://registry-1.docker.io/"
5737
+ msgid "URL of the registry you want to sync. Example: https://registry-1.docker.io/ or https://quay.io/"
5741
5738
  msgstr ""
5742
5739
 
5743
5740
  #: app/assets/javascripts/bastion_katello/products/discovery/views/discovery.html
@@ -5798,6 +5795,11 @@ msgstr ""
5798
5795
  msgid "Variant"
5799
5796
  msgstr ""
5800
5797
 
5798
+ #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html
5799
+ #: app/assets/javascripts/bastion_katello/products/views/products.html
5800
+ msgid "Verify Content Checksum"
5801
+ msgstr ""
5802
+
5801
5803
  #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
5802
5804
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
5803
5805
  #: app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html
@@ -21,13 +21,12 @@ angular.module('Bastion.products').controller('ProductsBulkAdvancedSyncModalCont
21
21
  var success, error;
22
22
 
23
23
  success = function (task) {
24
- var url, message, taskLink;
25
- url = $state.href('task', {taskId: task.id});
26
- taskLink = $sce.trustAsHtml("<a href=" + url + ">here</a>");
27
- message = translate("Product syncs has been initiated in the background. " +
28
- "Click %s to monitor the progress.");
29
-
30
- Notification.setSuccessMessage(message.replace('%s', taskLink));
24
+ var message = translate("Product syncs has been initiated in the background.");
25
+ Notification.setSuccessMessage(message, {
26
+ link: {
27
+ children: translate("Click to view task"),
28
+ href: translate("/foreman_tasks/tasks/%taskId").replace('%taskId', task.id)
29
+ }});
31
30
  };
32
31
 
33
32
  error = function (response) {