katello 3.4.5 → 3.5.0.rc1

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

Potentially problematic release.


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

Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/app/assets/stylesheets/katello/katello.scss +7 -5
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -3
  5. data/app/controllers/katello/api/v2/api_controller.rb +8 -0
  6. data/app/controllers/katello/api/v2/capsule_content_controller.rb +6 -1
  7. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -1
  8. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -2
  12. data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
  13. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +6 -6
  14. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -7
  15. data/app/controllers/katello/api/v2/repository_sets_controller.rb +25 -4
  16. data/app/controllers/katello/concerns/api/v2/content_overrides_controller.rb +2 -4
  17. data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +10 -27
  18. data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +10 -14
  19. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +33 -0
  20. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -1
  21. data/app/helpers/katello/organizations_helper.rb +1 -1
  22. data/app/helpers/katello/providers_helper.rb +1 -1
  23. data/app/lib/actions/candlepin/abstract_async_task.rb +1 -1
  24. data/app/lib/actions/candlepin/candlepin_listening_service.rb +17 -6
  25. data/app/lib/actions/candlepin/import_pool_handler.rb +21 -56
  26. data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +1 -0
  27. data/app/lib/actions/candlepin/owner/import_products.rb +1 -3
  28. data/app/lib/actions/candlepin/product/content_create.rb +2 -0
  29. data/app/lib/actions/candlepin/product/content_update.rb +2 -0
  30. data/app/lib/actions/candlepin/product/create.rb +2 -10
  31. data/app/lib/actions/candlepin/product/create_unlimited_subscription.rb +8 -1
  32. data/app/lib/actions/katello/capsule_content/sync.rb +12 -3
  33. data/app/lib/actions/katello/host/attach_subscriptions.rb +1 -1
  34. data/app/lib/actions/katello/host/hypervisors_update.rb +2 -4
  35. data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
  36. data/app/lib/actions/katello/organization/create.rb +2 -2
  37. data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -2
  38. data/app/lib/actions/katello/product/content_create.rb +4 -4
  39. data/app/lib/actions/katello/product/create.rb +13 -11
  40. data/app/lib/actions/katello/repository/sync.rb +0 -1
  41. data/app/lib/actions/katello/repository/update.rb +2 -1
  42. data/app/lib/actions/pulp/consumer/generate_applicability.rb +5 -1
  43. data/app/lib/actions/pulp/repository/create.rb +1 -0
  44. data/app/lib/actions/pulp/repository/create_in_plan.rb +4 -4
  45. data/app/lib/actions/pulp/repository/sync.rb +1 -1
  46. data/app/lib/katello/http_resource.rb +1 -1
  47. data/app/lib/katello/lazy_accessor.rb +1 -1
  48. data/app/lib/katello/resources/candlepin.rb +2 -2
  49. data/app/lib/katello/util/data.rb +6 -0
  50. data/app/lib/katello/util/support.rb +1 -1
  51. data/app/models/katello/activation_key.rb +25 -7
  52. data/app/models/katello/concerns/host_managed_extensions.rb +60 -17
  53. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +31 -10
  54. data/app/models/katello/content_facet_applicable_rpm.rb +0 -2
  55. data/app/models/katello/content_facet_erratum.rb +0 -2
  56. data/app/models/katello/content_facet_repository.rb +0 -2
  57. data/app/models/katello/content_view.rb +3 -4
  58. data/app/models/katello/content_view_component.rb +1 -3
  59. data/app/models/katello/content_view_docker_filter_rule.rb +0 -2
  60. data/app/models/katello/content_view_environment.rb +2 -4
  61. data/app/models/katello/content_view_erratum_filter_rule.rb +0 -2
  62. data/app/models/katello/content_view_filter.rb +0 -2
  63. data/app/models/katello/content_view_package_filter_rule.rb +0 -2
  64. data/app/models/katello/content_view_package_group_filter_rule.rb +0 -2
  65. data/app/models/katello/content_view_puppet_environment.rb +0 -2
  66. data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -2
  67. data/app/models/katello/content_view_puppet_module.rb +0 -2
  68. data/app/models/katello/content_view_repository.rb +0 -2
  69. data/app/models/katello/content_view_version.rb +0 -2
  70. data/app/models/katello/erratum_bugzilla.rb +0 -2
  71. data/app/models/katello/erratum_cve.rb +0 -2
  72. data/app/models/katello/erratum_package.rb +0 -2
  73. data/app/models/katello/ext/label_from_name.rb +1 -1
  74. data/app/models/katello/glue/candlepin/pool.rb +18 -11
  75. data/app/models/katello/glue/candlepin/product.rb +1 -2
  76. data/app/models/katello/glue/pulp/repo.rb +13 -6
  77. data/app/models/katello/glue/pulp/repos.rb +16 -16
  78. data/app/models/katello/gpg_key.rb +0 -2
  79. data/app/models/katello/host/content_facet.rb +21 -0
  80. data/app/models/katello/host/info_provider.rb +56 -0
  81. data/app/models/katello/host/subscription_facet.rb +5 -3
  82. data/app/models/katello/host_collection.rb +0 -2
  83. data/app/models/katello/host_collection_hosts.rb +0 -2
  84. data/app/models/katello/host_installed_package.rb +0 -2
  85. data/app/models/katello/host_tracer.rb +0 -2
  86. data/app/models/katello/key_host_collection.rb +0 -2
  87. data/app/models/katello/kt_environment.rb +0 -2
  88. data/app/models/katello/model.rb +1 -1
  89. data/app/models/katello/pool.rb +3 -3
  90. data/app/models/katello/product.rb +10 -3
  91. data/app/models/katello/provider.rb +0 -2
  92. data/app/models/katello/repository.rb +0 -2
  93. data/app/models/katello/repository_docker_manifest.rb +0 -2
  94. data/app/models/katello/repository_erratum.rb +0 -2
  95. data/app/models/katello/repository_file.rb +0 -2
  96. data/app/models/katello/repository_ostree_branch.rb +0 -2
  97. data/app/models/katello/repository_package_group.rb +0 -1
  98. data/app/models/katello/repository_puppet_module.rb +0 -2
  99. data/app/models/katello/repository_rpm.rb +0 -2
  100. data/app/models/katello/rpm.rb +2 -2
  101. data/app/models/katello/subscription_facet_activation_key.rb +0 -2
  102. data/app/models/katello/subscription_facet_pool.rb +6 -0
  103. data/app/models/katello/subscription_product.rb +0 -1
  104. data/app/models/katello/sync_plan.rb +0 -2
  105. data/app/models/katello/task_status.rb +2 -4
  106. data/app/models/setting/content.rb +2 -0
  107. data/app/services/katello/candlepin/consumer.rb +1 -2
  108. data/app/services/katello/candlepin/message_handler.rb +88 -0
  109. data/app/services/katello/repository_type_manager.rb +1 -1
  110. data/app/views/dashboard/_content_views_widget.html.erb +2 -2
  111. data/app/views/dashboard/_errata_widget.html.erb +3 -3
  112. data/app/views/foreman/smart_proxies/_content_sync.html.erb +25 -8
  113. data/app/views/foreman/unattended/kickstart-katello-atomic.erb +1 -1
  114. data/app/views/foreman/unattended/kickstart-katello.erb +1 -1
  115. data/app/views/katello/api/v2/common/_org_reference.json.rabl +1 -0
  116. data/app/views/katello/api/v2/content_facet/base.json.rabl +3 -14
  117. data/app/views/katello/api/v2/products/base.json.rabl +1 -1
  118. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
  119. data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -1
  120. data/app/views/katello/api/v2/subscriptions/base.json.rabl +0 -7
  121. data/app/views/katello/api/v2/subscriptions/show.json.rabl +4 -37
  122. data/config/routes/overrides.rb +1 -0
  123. data/db/migrate/20140422000001_update_products_add_organization.rb +1 -1
  124. data/db/migrate/20140610154745_content_view_puppet_environment_id.rb +1 -1
  125. data/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb +1 -1
  126. data/db/migrate/20140626204902_add_unlimited_to_host_collection.rb +1 -1
  127. data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
  128. data/db/migrate/20150901213759_remove_distributors.rb +1 -1
  129. data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
  130. data/db/migrate/20150930183738_migrate_content_hosts.rb +20 -20
  131. data/db/migrate/20151014144004_host_collection_to_hosts.rb +5 -5
  132. data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -1
  133. data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -1
  134. data/db/migrate/20160222143432_move_system_description_to_host.rb +2 -2
  135. data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +1 -1
  136. data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +1 -1
  137. data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +4 -4
  138. data/db/migrate/20160619223332_fix_viewer_role.rb +4 -4
  139. data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +1 -1
  140. data/db/migrate/20160924213020_change_katello_widget_names.rb +1 -1
  141. data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -2
  142. data/db/migrate/20161026191118_fix_invalid_interfaces.rb +1 -1
  143. data/db/migrate/20170321012632_fill_in_content_view_components.rb +3 -3
  144. data/db/migrate/20170718142148_create_katello_subscription_facet_pools.rb +15 -0
  145. data/db/migrate/20170821170915_add_index_to_installed_packages.rb +5 -0
  146. data/db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb +5 -0
  147. data/db/migrate/20170913183848_add_errata_counts.rb +23 -0
  148. data/db/seeds.d/101-locations.rb +2 -2
  149. data/db/seeds.d/102-organizations.rb +3 -3
  150. data/db/seeds.d/103-provisioning_templates.rb +29 -31
  151. data/db/seeds.d/104-proxy.rb +10 -12
  152. data/db/seeds.d/106-mail_notifications.rb +30 -32
  153. data/db/seeds.d/107-enable_dynflow.rb +3 -4
  154. data/db/seeds.d/108-subcription-bookmarks.rb +12 -10
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.routes.js +1 -1
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architecture.factory.js +15 -0
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architectures.module.js +14 -0
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +2 -2
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +107 -0
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +113 -0
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +13 -0
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +25 -4
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -4
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +15 -12
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +11 -5
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +15 -12
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +16 -12
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -6
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-counts.html +6 -12
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +4 -1
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -0
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -2
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +20 -2
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +22 -3
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +17 -1
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +1 -1
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +16 -0
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +4 -0
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -19
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +31 -0
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +1 -1
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +6 -3
  189. data/lib/katello/permissions/host_permissions.rb +1 -0
  190. data/lib/katello/plugin.rb +7 -5
  191. data/lib/katello/tasks/clean_installed_packages.rake +54 -0
  192. data/lib/katello/tasks/import_subscriptions.rake +8 -0
  193. data/lib/katello/tasks/{setup.rake → reset.rake} +10 -0
  194. data/lib/katello/tasks/test.rake +18 -0
  195. data/lib/katello/version.rb +1 -1
  196. data/vendor/assets/stylesheets/katello/{jquery-ui-1.8.11.custom.css → jquery-ui-1.8.11.custom.css.scss} +0 -0
  197. data/vendor/assets/stylesheets/katello/{jquery.loadmask.css → jquery.loadmask.css.scss} +0 -0
  198. data/vendor/assets/stylesheets/katello/{jquery.treeTable.scss → jquery.treeTable.css.scss} +0 -0
  199. data/vendor/assets/stylesheets/katello/{ui.spinner.css → ui.spinner.css.scss} +0 -0
  200. metadata +43 -21
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-activation-keys.controller.js +0 -30
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-content-hosts.controller.js +0 -45
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-activation-keys.html +0 -48
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-content-hosts.html +0 -62
  205. data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +0 -12
  206. data/lib/katello/tasks/upgrades/3.3/import_subscriptions.rake +0 -12
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @ngdoc module
3
+ * @name Bastion.architectures
4
+ *
5
+ * @description
6
+ * Module for architectures
7
+ */
8
+ angular.module('Bastion.architectures', [
9
+ 'ngResource',
10
+ 'ui.router',
11
+ 'Bastion',
12
+ 'Bastion.i18n',
13
+ 'Bastion.common'
14
+ ]);
@@ -1,6 +1,7 @@
1
1
  BASTION_MODULES.push(
2
2
  'Bastion.capsule-content',
3
3
  'Bastion.activation-keys',
4
+ 'Bastion.architectures' ,
4
5
  'Bastion.common',
5
6
  'Bastion.content-views',
6
7
  'Bastion.content-views.versions',
@@ -82,6 +82,9 @@
82
82
  //= require "bastion_katello/settings/settings.module.js"
83
83
  //= require_tree "./settings"
84
84
 
85
+ //= require "bastion_katello/architectures/architectures.module.js"
86
+ //= require_tree "./architectures"
87
+
85
88
  //= require "bastion_katello/i18n/translations.js"
86
89
 
87
90
  //= require "bastion_katello/bastion-katello-bootstrap.js"
@@ -122,13 +122,13 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
122
122
 
123
123
  $scope.isTaskInProgress = isTaskInProgress;
124
124
 
125
- $scope.syncCapsule = function () {
125
+ $scope.syncCapsule = function (skipMetadataCheck) {
126
126
  if (!$scope.syncState.is(syncState.SYNCING)) {
127
127
 
128
128
  $scope.syncErrorMessages = [];
129
129
  $scope.syncState.set(syncState.SYNC_TRIGGERED);
130
130
 
131
- CapsuleContent.sync({id: capsuleId}).$promise.then(function (task) {
131
+ CapsuleContent.sync({id: capsuleId, 'skip_metadata_check': skipMetadataCheck}).$promise.then(function (task) {
132
132
  $scope.syncStatus['active_sync_tasks'].push(task);
133
133
  $scope.syncTask = aggregateTasks($scope.syncStatus['active_sync_tasks']);
134
134
  $scope.syncState.set(syncState.SYNCING);
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @ngdoc object
3
+ * @name Bastion.content-hosts.controller:ContentHostsBulkRepositorySetsModalController
4
+ *
5
+ * @requires $scope
6
+ * @requires $location
7
+ * @requires $uibModalInstance
8
+ * @requires translate
9
+ * @requires Nutupane
10
+ * @requires HostBulkAction
11
+ * @requires RepositorySet
12
+ * @requires CurrentOrganization
13
+ * @requires GlobalNotification
14
+ * @requires hostIds
15
+ *
16
+ * @description
17
+ * A controller for providing bulk action functionality to the content hosts page.
18
+ */
19
+ angular.module('Bastion.content-hosts').controller('ContentHostsBulkRepositorySetsModalController',
20
+ ['$scope', '$location', '$uibModalInstance', 'translate', 'Nutupane', 'HostBulkAction', 'RepositorySet', 'CurrentOrganization', 'GlobalNotification', 'hostIds',
21
+ function ($scope, $location, $uibModalInstance, translate, Nutupane, HostBulkAction, RepositorySet, CurrentOrganization, GlobalNotification, hostIds) {
22
+ var nutupane, nutupaneParams;
23
+
24
+ $scope.repositorySets = {
25
+ action: null
26
+ };
27
+
28
+ nutupaneParams = {
29
+ 'organization_id': CurrentOrganization,
30
+ 'offset': 0,
31
+ 'sort_by': 'name',
32
+ 'sort_order': 'ASC',
33
+ 'paged': true
34
+ };
35
+
36
+ nutupane = new Nutupane(RepositorySet, nutupaneParams, 'queryPaged');
37
+ $scope.controllerName = 'katello_repository_sets';
38
+ nutupane.masterOnly = true;
39
+
40
+ $scope.table = nutupane.table;
41
+
42
+ $scope.confirmRepositorySetAction = function (action) {
43
+ $scope.repositorySets.confirm = true;
44
+ $scope.repositorySets.action = action;
45
+ };
46
+
47
+ $scope.performRepositorySetAction = function () {
48
+ var params, action, success, error, contentOverrides;
49
+
50
+ action = $scope.repositorySets.action;
51
+ params = hostIds;
52
+ params['organization_id'] = CurrentOrganization;
53
+ contentOverrides = [];
54
+ angular.forEach(nutupane.getAllSelectedResults('id').included.resources, function (repositorySet) {
55
+ var value, remove;
56
+
57
+ if (action === 'enable') {
58
+ value = true;
59
+ remove = false;
60
+ } else if (action === 'disable') {
61
+ value = false;
62
+ remove = false;
63
+ } else if (action === 'reset') {
64
+ value = true;
65
+ remove = true;
66
+ }
67
+ contentOverrides.push({
68
+ 'content_label': repositorySet.label,
69
+ name: 'enabled',
70
+ value: value,
71
+ remove: remove
72
+ });
73
+ });
74
+ params['content_overrides'] = contentOverrides;
75
+
76
+ $scope.repositorySets.action = null;
77
+
78
+ success = function (response) {
79
+ nutupane.invalidate();
80
+ $scope.ok();
81
+ $scope.transitionTo('content-hosts.bulk-task', {taskId: response.id});
82
+ };
83
+
84
+ error = function (response) {
85
+ angular.forEach(response.data.errors, function (responseError) {
86
+ GlobalNotification.setErrorMessage(responseError);
87
+ });
88
+ $scope.editMode = true;
89
+ };
90
+
91
+ HostBulkAction.updateRepositorySets(params, success, error);
92
+ };
93
+
94
+ $scope.ok = function () {
95
+ $uibModalInstance.close();
96
+ };
97
+
98
+ $scope.cancel = function () {
99
+ $uibModalInstance.dismiss('cancel');
100
+ };
101
+
102
+ $scope.repositorySetsAction = function (action) {
103
+ $scope.repositorySets.action = action;
104
+ $scope.repositorySets.working = true;
105
+ };
106
+ }]
107
+ );
@@ -0,0 +1,113 @@
1
+ <div data-extend-template="components/views/bst-modal.html">
2
+ <h4 data-block="modal-header">Repository Sets Management</h4>
3
+
4
+ <div data-block="modal-body">
5
+ <div class="row">
6
+ <div class="col-sm-12">
7
+ <div bst-global-notification></div>
8
+ </div>
9
+ </div>
10
+
11
+ <div bst-alert="info" ng-show="repositorySets.action == 'enable'">
12
+ <span translate>
13
+ Are you sure you want to enable the {{ table.numSelected }} repository set(s) chosen?
14
+ </span>
15
+ <div>
16
+ <button type="button" class="btn btn-default" ng-click="performRepositorySetAction()" translate>Yes</button>
17
+ <button type="button" class="btn btn-default" ng-click="repositorySets.action = null; repositorySets.working = false" translate>No</button>
18
+ </div>
19
+ </div>
20
+
21
+ <div bst-alert="info" ng-show="repositorySets.action == 'disable'">
22
+ <span translate>
23
+ Are you sure you want to disable the {{ table.numSelected }} repository set(s) chosen?
24
+ </span>
25
+ <div>
26
+ <button type="button" class="btn btn-default" ng-click="performRepositorySetAction()" translate>Yes</button>
27
+ <button type="button" class="btn btn-default" ng-click="repositorySets.action = null; repositorySets.working = false" translate>No</button>
28
+ </div>
29
+ </div>
30
+
31
+ <div bst-alert="info" ng-show="repositorySets.action == 'reset'">
32
+ <span translate>
33
+ Are you sure you want to reset to default the {{ table.numSelected }} repository set(s) chosen?
34
+ </span>
35
+ <div>
36
+ <button type="button" class="btn btn-default" ng-click="performRepositorySetAction()" translate>Yes</button>
37
+ <button type="button" class="btn btn-default" ng-click="repositorySets.action = null; repositorySets.working = false" translate>No</button>
38
+ </div>
39
+ </div>
40
+
41
+ <div data-extend-template="layouts/partials/table.html">
42
+ <div data-block="search">
43
+ <input type="text" class="form-control" stop-event="click"
44
+ placeholder="{{ 'Filter...' | translate }}"
45
+ ng-model="repositorySetFilter"/>
46
+ </div>
47
+
48
+ <div data-block="list-actions">
49
+ <div class="btn-group" select-action-dropdown>
50
+ <ul class="dropdown-menu-right" uib-dropdown-menu role="menu" aria-labelledby="split-button">
51
+ <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
52
+ <a ng-click="repositorySetsAction('enable')" disable-link="table.numSelected === 0" translate>
53
+ Override to Enabled
54
+ </a>
55
+ </li>
56
+
57
+ <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
58
+ <a ng-click="repositorySetsAction('disable')" disable-link="table.numSelected === 0" translate>
59
+ Override to Disabled
60
+ </a>
61
+ </li>
62
+
63
+ <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
64
+ <a ng-click="repositorySetsAction('reset')" disable-link="table.numSelected === 0" translate>
65
+ Reset to Default
66
+ </a>
67
+ </li>
68
+ </ul>
69
+ </div>
70
+ </div>
71
+
72
+ <span data-block="no-rows-message" translate>
73
+ No Repository Sets provided through subscriptions.
74
+ </span>
75
+
76
+ <span data-block="no-search-results-message" translate>
77
+ Your search returned zero Repository Sets.
78
+ </span>
79
+
80
+ <div data-block="table">
81
+ <table class="table table-striped table-bordered" ng-class="{'table-mask': state.working}">
82
+ <thead>
83
+ <tr bst-table-head row-select>
84
+ <th bst-table-column="repository_name" translate>Repository Name</th>
85
+ <th bst-table-column="product_name" translate>Product Name</th>
86
+ <th bst-table-column="repository_path" translate>Repository Path</th>
87
+ <th bst-table-column="enabled" translate>Status</th>
88
+ </tr>
89
+ </thead>
90
+
91
+ <tbody>
92
+ <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="repositorySet in table.rows | filter:repositorySetFilter" row-select="repositorySet">
93
+ <td bst-table-cell>{{ repositorySet.name }}</td>
94
+ <td bst-table-cell>
95
+ <a ui-sref="product.info({productId: repositorySet.product.id})">
96
+ {{ repositorySet.product.name }}
97
+ </a>
98
+ </td>
99
+ <td bst-table-cell>{{ repositorySet.contentUrl }}</td>
100
+ <td bst-table-cell>{{ repositorySet | repositorySetsEnabled }}</td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <div data-block="modal-footer">
109
+ <button type="button" class="btn btn-primary" ng-click="ok()" translate>
110
+ Done
111
+ </button>
112
+ </div>
113
+ </div>
@@ -7,6 +7,19 @@
7
7
  */
8
8
  angular.module('Bastion.content-hosts').service('ContentHostsHelper',
9
9
  function () {
10
+ this.convertMemToGB = function (memoryValue) {
11
+ if (angular.isString(memoryValue)) {
12
+ memoryValue = memoryValue.toLowerCase();
13
+ if (_.includes(memoryValue, "gb")) {
14
+ memoryValue = memoryValue.replace("gb", "").trim();
15
+ return memoryValue;
16
+ }
17
+ memoryValue = parseInt(memoryValue);
18
+ }
19
+ memoryValue = (memoryValue / 1048576).toFixed(2);
20
+ return memoryValue;
21
+ };
22
+
10
23
  this.getHostStatusIcon = function (globalStatus) {
11
24
  var icons;
12
25
  var colors = {
@@ -21,20 +21,27 @@
21
21
  * within the table.
22
22
  */
23
23
  angular.module('Bastion.content-hosts').controller('ContentHostsController',
24
- ['$scope', '$q', '$state', '$location', '$window', '$uibModal', 'translate', 'Nutupane', 'Host', 'HostBulkAction', 'GlobalNotification', 'CurrentOrganization', 'ContentHostsHelper', 'ContentHostsModalHelper',
25
- function ($scope, $q, $state, $location, $window, $uibModal, translate, Nutupane, Host, HostBulkAction, GlobalNotification, CurrentOrganization, ContentHostsHelper, ContentHostsModalHelper) {
26
- var nutupane, params;
24
+ ['$scope', '$q', '$state', '$location', '$window', '$uibModal', 'translate', 'Nutupane', 'Host', 'HostBulkAction', 'GlobalNotification', 'CurrentOrganization', 'ContentHostsHelper', 'ContentHostsModalHelper', '$httpParamSerializer',
25
+ function ($scope, $q, $state, $location, $window, $uibModal, translate, Nutupane, Host, HostBulkAction, GlobalNotification, CurrentOrganization, ContentHostsHelper, ContentHostsModalHelper, $httpParamSerializer) {
26
+ var nutupane, params, query;
27
27
 
28
28
  $scope.successMessages = [];
29
29
  $scope.errorMessages = [];
30
30
 
31
+ if ($location.search().search) {
32
+ query = '"' + $location.search().search + '"';
33
+ } else {
34
+ query = "";
35
+ }
36
+
31
37
  params = {
32
38
  'organization_id': CurrentOrganization,
33
- 'search': $location.search().search || "",
39
+ 'search': query,
34
40
  'sort_by': 'name',
35
41
  'sort_order': 'ASC'
36
42
  };
37
43
 
44
+ $scope.csvQuery = $httpParamSerializer(params);
38
45
  nutupane = new Nutupane(Host, params);
39
46
  $scope.controllerName = 'hosts';
40
47
  nutupane.masterOnly = true;
@@ -108,6 +115,20 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
108
115
  ContentHostsModalHelper.openHostCollectionsModal();
109
116
  };
110
117
 
118
+ $scope.openRepositorySetsModal = function () {
119
+ nutupane.invalidate();
120
+ $uibModal.open({
121
+ templateUrl: 'content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html',
122
+ controller: 'ContentHostsBulkRepositorySetsModalController',
123
+ size: 'lg',
124
+ resolve: {
125
+ hostIds: function () {
126
+ return $scope.nutupane.getAllSelectedResults('id');
127
+ }
128
+ }
129
+ });
130
+ };
131
+
111
132
  $scope.openPackagesModal = function () {
112
133
  nutupane.invalidate();
113
134
  ContentHostsModalHelper.openPackagesModal();
@@ -119,8 +119,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
119
119
  return '/activation_keys!=&panel=activation_key_%s&panelpage=edit'.replace('%s', activationKey.id);
120
120
  };
121
121
 
122
- $scope.memory = ContentHostsHelper.memory;
123
-
124
122
  $scope.virtualGuestIds = function (host) {
125
123
  var ids = [];
126
124
  if (host && host.subscription_facet_attributes) {
@@ -132,8 +130,10 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsInfoContro
132
130
  return ids.join(" or ");
133
131
  };
134
132
 
135
- $scope.convertMemToGB = function (memoryValue) {
136
- return (memoryValue / 1048576).toFixed(2);
133
+ $scope.convertMemToGB = ContentHostsHelper.convertMemToGB;
134
+
135
+ $scope.virtual = function (virt) {
136
+ return (virt === true || virt === 'true');
137
137
  };
138
138
  }]
139
139
  );
@@ -111,8 +111,17 @@
111
111
  <dt translate>Number of CPUs</dt>
112
112
  <dd>{{ host.facts["cpu::cpu(s)"] }}</dd>
113
113
 
114
+ <dt translate>Sockets</dt>
115
+ <dd>{{ host.facts['cpu::cpu_socket(s)'] }}</dd>
116
+
117
+ <dt translate>Cores per Socket</dt>
118
+ <dd>{{ host.facts['cpu::core(s)_per_socket'] }}</dd>
119
+
114
120
  <dt translate>RAM (GB)</dt>
115
121
  <dd>{{ convertMemToGB(host.facts["memory::memtotal"]) }}</dd>
122
+
123
+ <dt translate>Virtual Guest</dt>
124
+ <dd>{{ virtual(host.facts['virt::is_guest']) | booleanToYesNo }}</dd>
116
125
  </dl>
117
126
 
118
127
  <div class="divider"></div>
@@ -137,30 +146,24 @@
137
146
  <dl class="dl-horizontal dl-horizontal-left">
138
147
  <dt translate>Security</dt>
139
148
  <dd>
140
- <a ui-sref="content-host.errata.index({getSearch: 'type=security'})">
141
- <i class="fa fa-warning inline-icon"
142
- ng-class="{black: host.content_facet_attributes.errata_counts.security === 0, red: host.content_facet_attributes.errata_counts.security > 0}"
143
- title="{{ 'Security' | translate }}"></i>
149
+ <a ui-sref="content-host.errata.index({getSearch: 'type=security'})" ng-class="{black: !host.content_facet_attributes.errata_counts.security, red: host.content_facet_attributes.errata_counts.security > 0}">
150
+ <i class="fa fa-warning inline-icon" title="{{ 'Security' | translate }}"></i>
144
151
  {{ host.content_facet_attributes.errata_counts.security || 0 }}
145
152
  </a>
146
153
  </dd>
147
154
 
148
155
  <dt translate>Bug Fix</dt>
149
156
  <dd>
150
- <a ui-sref="content-host.errata.index({getSearch: 'type=bugfix'})">
151
- <i class="fa fa-bug inline-icon"
152
- ng-class="{black: host.content_facet_attributes.errata_counts.bugfix === 0, yellow: host.content_facet_attributes.errata_counts.bugfix > 0}"
153
- title="{{ 'Bug Fix' | translate }}"></i>
157
+ <a ui-sref="content-host.errata.index({getSearch: 'type=bugfix'})" ng-class="{black: !host.content_facet_attributes.errata_counts.bugfix, yellow: host.content_facet_attributes.errata_counts.bugfix > 0}">
158
+ <i class="fa fa-bug inline-icon" title="{{ 'Bug Fix' | translate }}"></i>
154
159
  {{ host.content_facet_attributes.errata_counts.bugfix || 0 }}
155
160
  </a>
156
161
  </dd>
157
162
 
158
163
  <dt translate>Enhancement</dt>
159
164
  <dd>
160
- <a ui-sref="content-host.errata.index({getSearch: 'type=enhancement'})">
161
- <i class="fa fa-plus-square inline-icon"
162
- ng-class="{black: host.content_facet_attributes.errata_counts.enhancement === 0, yellow: host.content_facet_attributes.errata_counts.enhancement > 0}"
163
- title="{{ 'Enhancement' | translate }}"></i>
165
+ <a ui-sref="content-host.errata.index({getSearch: 'type=enhancement'})" ng-class="{black: !host.content_facet_attributes.errata_counts.enhancement, yellow: host.content_facet_attributes.errata_counts.enhancement > 0}">
166
+ <i class="fa fa-plus-square inline-icon" title="{{ 'Enhancement' | translate }}"></i>
164
167
  {{ host.content_facet_attributes.errata_counts.enhancement || 0 }}
165
168
  </a>
166
169
  </dd>
@@ -81,7 +81,7 @@
81
81
  <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="productRepoSet in table.rows | filter:repositorySetFilter" row-select="productRepoSet">
82
82
  <td bst-table-cell>{{ productRepoSet.content.name }}</td>
83
83
  <td bst-table-cell>
84
- <a ui-sref="product.info({productId: id})">
84
+ <a ui-sref="product.info({productId: productRepoSet.product.id})">
85
85
  {{ productRepoSet.product.name }}
86
86
  </a>
87
87
  </td>
@@ -5,6 +5,9 @@
5
5
  </div>
6
6
 
7
7
  <div data-block="list-actions">
8
+ <a href="/hosts/content_hosts.csv?{{csvQuery}}" class="btn btn-default" target="_self">
9
+ <span translate>Export</span>
10
+ </a>
8
11
  <button class="btn btn-default"
9
12
  type="button"
10
13
  ng-show="permitted('create_hosts')"
@@ -34,6 +37,10 @@
34
37
  <a ng-click="openSubscriptionsModal()" disable-link="table.numSelected === 0" translate>Manage Subscriptions</a>
35
38
  </li>
36
39
 
40
+ <li role="menuitem" ng-show="permitted('edit_hosts')" ng-class="{disabled: table.numSelected === 0}">
41
+ <a ng-click="openRepositorySetsModal()" disable-link="table.numSelected === 0" translate>Manage Repository Sets</a>
42
+ </li>
43
+
37
44
  <li class="divider"></li>
38
45
 
39
46
  <li role="menuitem" ng-show="permitted('destroy_hosts')" ng-class="{disabled: table.numSelected === 0}">
@@ -92,14 +99,13 @@
92
99
 
93
100
  <a ui-sref="content-host.packages.applicable({hostId: host.id})">
94
101
  <span class="aligned-errata-count">
95
- <span class="errata-count">
102
+ <span class="errata-count"
103
+ ng-class="{black: !host.content_facet_attributes.upgradable_package_count,
104
+ green: host.content_facet_attributes.upgradable_package_count > 0}">
96
105
  <span>
97
106
  {{ host.content_facet_attributes.upgradable_package_count || 0 }}
98
107
  </span>
99
- <i class="fa fa-cube inline-icon"
100
- ng-class="{black: host.content_facet_attributes.upgradable_package_count === 0,
101
- green: host.content_facet_attributes.upgradable_package_count > 0}"
102
- title="{{ 'Package Updates' | translate }}"></i>
108
+ <i class="fa fa-cube inline-icon" title="{{ 'Package Updates' | translate }}"></i>
103
109
  </span>
104
110
  </span>
105
111
  </a>