katello 3.16.0.rc3.1 → 3.16.0

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

Potentially problematic release.


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

Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +39 -23
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
  4. data/app/controllers/katello/api/v2/api_controller.rb +9 -4
  5. data/app/controllers/katello/api/v2/content_view_filters_controller.rb +5 -1
  6. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +3 -0
  7. data/app/controllers/katello/api/v2/content_views_controller.rb +7 -0
  8. data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +13 -1
  10. data/app/controllers/katello/concerns/api/v2/associations_permission_check.rb +67 -0
  11. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -0
  12. data/app/helpers/katello/content_view_helper.rb +15 -0
  13. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +4 -0
  14. data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
  15. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +16 -16
  16. data/app/lib/actions/katello/content_view/incremental_updates.rb +8 -1
  17. data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -1
  18. data/app/lib/actions/katello/content_view/publish.rb +55 -16
  19. data/app/lib/actions/katello/content_view_version/incremental_update.rb +120 -26
  20. data/app/lib/actions/katello/host/attach_subscriptions.rb +5 -1
  21. data/app/lib/actions/katello/repository/multi_clone_contents.rb +66 -0
  22. data/app/lib/actions/katello/repository/multi_clone_to_version.rb +30 -0
  23. data/app/lib/actions/katello/sync_plan/run.rb +1 -1
  24. data/app/lib/actions/pulp/abstract_async_task.rb +1 -0
  25. data/app/lib/actions/pulp/consumer/sync_capsule.rb +8 -0
  26. data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +2 -2
  27. data/app/lib/actions/pulp3/abstract_async_task.rb +62 -58
  28. data/app/lib/actions/pulp3/content_migration.rb +4 -0
  29. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +1 -2
  30. data/app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb +36 -0
  31. data/app/lib/actions/pulp3/repository/multi_copy_content.rb +28 -0
  32. data/app/lib/actions/pulp3/repository/multi_copy_units.rb +55 -0
  33. data/app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb +1 -1
  34. data/app/lib/actions/pulp3/repository/save_version.rb +11 -3
  35. data/app/lib/actions/pulp3/repository/save_versions.rb +73 -0
  36. data/app/lib/katello/concerns/base_template_scope_extensions.rb +0 -14
  37. data/app/lib/katello/errors.rb +26 -15
  38. data/app/lib/katello/resources/candlepin.rb +1 -1
  39. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
  40. data/app/models/katello/concerns/host_managed_extensions.rb +7 -0
  41. data/app/models/katello/concerns/organization_extensions.rb +14 -0
  42. data/app/models/katello/content_view.rb +18 -6
  43. data/app/models/katello/content_view_erratum_filter.rb +13 -0
  44. data/app/models/katello/content_view_filter.rb +4 -0
  45. data/app/models/katello/content_view_module_stream_filter.rb +30 -3
  46. data/app/models/katello/glue/pulp/repo.rb +1 -0
  47. data/app/models/katello/host/content_facet.rb +10 -5
  48. data/app/models/katello/module_stream.rb +1 -1
  49. data/app/models/katello/pulp3/content_guard.rb +1 -1
  50. data/app/models/katello/repository.rb +11 -0
  51. data/app/models/setting/content.rb +3 -1
  52. data/app/presenters/katello/sync_status_presenter.rb +4 -2
  53. data/app/services/katello/candlepin/message_handler.rb +2 -3
  54. data/app/services/katello/pulp/repository/yum.rb +2 -1
  55. data/app/services/katello/pulp3/api/core.rb +4 -0
  56. data/app/services/katello/pulp3/erratum.rb +3 -1
  57. data/app/services/katello/pulp3/migration.rb +9 -4
  58. data/app/services/katello/pulp3/migration_plan.rb +6 -6
  59. data/app/services/katello/pulp3/repository.rb +17 -1
  60. data/app/services/katello/pulp3/repository/yum.rb +187 -25
  61. data/app/services/katello/pulp3/task.rb +100 -0
  62. data/app/services/katello/pulp3/task_group.rb +79 -0
  63. data/app/services/katello/ui_notifications/subscriptions/manifest_expired_warning.rb +20 -8
  64. data/app/services/katello/upstream_connection_checker.rb +48 -0
  65. data/app/views/katello/api/v2/content_view_filters/base.json.rabl +4 -0
  66. data/app/views/katello/api/v2/srpms/backend.json.rabl +11 -0
  67. data/app/views/katello/api/v2/srpms/base.json.rabl +5 -0
  68. data/app/views/katello/api/v2/srpms/compare.json.rabl +10 -0
  69. data/app/views/katello/api/v2/srpms/index.json.rabl +1 -1
  70. data/app/views/katello/api/v2/srpms/show.json.rabl +3 -3
  71. data/config/routes/api/v2.rb +2 -0
  72. data/db/migrate/20200709021250_add_original_modules_to_content_view_module_stream_filter.rb +5 -0
  73. data/db/migrate/20200721142707_remove_duplicate_katello_pools_index.rb +5 -0
  74. data/db/seeds.d/109-katello-notification-blueprints.rb +1 -1
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +1 -13
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-details.controller.js +17 -4
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter-details.html +17 -0
  78. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.routes.js +1 -1
  79. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +4 -0
  80. data/lib/katello/engine.rb +0 -1
  81. data/lib/katello/permission_creator.rb +1 -1
  82. data/lib/katello/plugin.rb +2 -0
  83. data/lib/katello/tasks/reports.rake +16 -0
  84. data/lib/katello/version.rb +1 -1
  85. data/package.json +3 -3
  86. data/webpack/components/Content/ContentTable.js +2 -0
  87. data/webpack/components/Content/Details/ContentDetails.js +3 -0
  88. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
  89. data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetails.js +3 -0
  90. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +3 -0
  91. data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +2 -0
  92. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +2 -0
  93. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +2 -0
  94. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +2 -0
  95. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProductContent.js +2 -0
  96. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +2 -0
  97. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -0
  98. data/webpack/scenes/Subscriptions/SubscriptionActions.js +8 -8
  99. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +3 -1
  100. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +15 -1
  101. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +54 -7
  102. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
  103. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +15 -1
  104. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/{UpstreamSubscriptionsContstants.js → UpstreamSubscriptionsConstants.js} +3 -0
  105. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +2 -0
  106. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +1 -1
  107. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +1 -1
  108. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -13
  109. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +6 -1
  110. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +6 -4
  111. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +26 -25
  112. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +0 -58
  113. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +10 -4
  114. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -0
  115. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +1 -68
  116. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UpdateDialog.js +1 -1
  117. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/index.js +4 -4
  118. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +12 -10
  119. data/webpack/scenes/Subscriptions/index.js +6 -3
  120. metadata +44 -27
@@ -0,0 +1,79 @@
1
+ module Katello
2
+ module Pulp3
3
+ class TaskGroup
4
+ WAITING = 'waiting'.freeze
5
+ SKIPPED = 'skipped'.freeze
6
+ RUNNING = 'running'.freeze
7
+ COMPLETED = 'completed'.freeze
8
+ CANCELLED = 'canceled'.freeze
9
+ FAILED = 'failed'.freeze
10
+
11
+ IN_PROGRESS_STATES = [WAITING, RUNNING].freeze
12
+
13
+ #needed for serialization in dynflow
14
+ delegate :to_hash, :to => :task_group_data
15
+ delegate :dig, :to => :task_group_data
16
+
17
+ attr_accessor :href
18
+
19
+ # A call report Looks like: {"task":"/pulp/api/v3/tasks/5/"}
20
+ #{
21
+ # "pulp_href":"/pulp/api/v3/task-groups/d9841aaa-8a47-4e31-9018-10e4430766bf/",
22
+ # "description":"Migration Sub-tasks",
23
+ # "waiting":0,
24
+ # "skipped":0,
25
+ # "running":0,
26
+ # "completed":0,
27
+ # "canceled":0,
28
+ # "failed":1
29
+ # }
30
+
31
+ def self.new_from_href(smart_proxy, href)
32
+ group = self.new(smart_proxy, {'pulp_href' => href})
33
+ group.clear_task_group_data
34
+ group
35
+ end
36
+
37
+ def initialize(smart_proxy, data)
38
+ @smart_proxy = smart_proxy
39
+ @pulp_data = data.with_indifferent_access
40
+ @href = @pulp_data['pulp_href']
41
+ Rails.logger.error("Got empty pulp_href on #{@pulp_data}") if @href.nil?
42
+ end
43
+
44
+ def task_group_data
45
+ @pulp_data ||= tasks_groups_api.read(@href).as_json.with_indifferent_access
46
+ end
47
+
48
+ def tasks_groups_api
49
+ ::Katello::Pulp3::Api::Core.new(@smart_proxy).task_groups_api
50
+ end
51
+
52
+ def done?
53
+ task_group_data['all_tasks_dispatched'] = true && IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
54
+ end
55
+
56
+ def poll
57
+ clear_task_group_data
58
+ task_group_data
59
+ end
60
+
61
+ def clear_task_group_data
62
+ @pulp_data = nil
63
+ end
64
+
65
+ def started?
66
+ [SKIPPED, RUNNING, COMPLETED, CANCELLED, FAILED].any? { |state| task_group_data[state] }
67
+ end
68
+
69
+ def error
70
+ if task_group_data[FAILED] > 0
71
+ "#{task_group_data[FAILED]} subtask(s) failed for task group #{@href}."
72
+ end
73
+ end
74
+
75
+ def cancel
76
+ end
77
+ end
78
+ end
79
+ end
@@ -7,14 +7,11 @@ module Katello
7
7
  CDN_PATH = '/content/dist/rhel/server/7/listing'.freeze
8
8
 
9
9
  def self.deliver!(orgs = ::Organization.all)
10
+ return if Setting[:content_disconnected]
11
+
10
12
  orgs.each do |org|
11
- next unless redhat_connected?(org)
12
- content = org.contents.find_by(:label => CONTENT_LABEL)
13
- product = content&.products&.find { |p| p.key }
14
- if content && product && product.pools.any?
15
- if got_403? { product.cdn_resource.get(CDN_PATH) }
16
- new(org).deliver!
17
- end
13
+ if cdn_inaccessible?(org) || upstream_inaccessible?(org)
14
+ new(org).deliver!
18
15
  end
19
16
  end
20
17
  rescue StandardError => e
@@ -47,6 +44,14 @@ module Katello
47
44
  @blueprint ||= NotificationBlueprint.find_by(name: 'manifest_expired_warning')
48
45
  end
49
46
 
47
+ def self.cdn_inaccessible?(org)
48
+ content = org.contents.find_by(:label => CONTENT_LABEL)
49
+ product = content&.products&.find { |p| p.key }
50
+ if content && product && product.pools.any?
51
+ return got_403? { product.cdn_resource.get(CDN_PATH) }
52
+ end
53
+ end
54
+
50
55
  def self.got_403?
51
56
  yield
52
57
  false
@@ -54,8 +59,15 @@ module Katello
54
59
  true
55
60
  end
56
61
 
62
+ def self.upstream_inaccessible?(org)
63
+ return unless org.manifest_imported?
64
+
65
+ checker = Katello::UpstreamConnectionChecker.new(org)
66
+ !checker.can_connect?
67
+ end
68
+
57
69
  def self.redhat_connected?(org)
58
- org.redhat_provider.repository_url.include?(CDN_HOSTNAME) && !Setting[:content_disconnected]
70
+ org.redhat_provider.repository_url.include?(CDN_HOSTNAME)
59
71
  end
60
72
  end
61
73
  end
@@ -0,0 +1,48 @@
1
+ module Katello
2
+ class UpstreamConnectionChecker
3
+ POSSIBLE_EXCEPTIONS = [
4
+ Katello::Errors::DisconnectedMode,
5
+ Katello::Errors::ManifestExpired,
6
+ Katello::Errors::UpstreamConsumerGone,
7
+ Katello::Errors::NoManifestImported
8
+ ].freeze
9
+
10
+ def initialize(organization)
11
+ @organization = organization
12
+ end
13
+
14
+ def can_connect?
15
+ assert_connection
16
+ rescue StandardError => e
17
+ if POSSIBLE_EXCEPTIONS.include?(e.class)
18
+ false
19
+ else
20
+ raise e
21
+ end
22
+ end
23
+
24
+ def assert_connection
25
+ assert_connected
26
+ assert_unexpired_manifest
27
+ assert_can_upstream_ping
28
+
29
+ true
30
+ end
31
+
32
+ private
33
+
34
+ def assert_connected
35
+ fail Katello::Errors::DisconnectedMode if Setting[:content_disconnected]
36
+ end
37
+
38
+ def assert_can_upstream_ping
39
+ ::Organization.as_org(@organization) do
40
+ Katello::Resources::Candlepin::UpstreamConsumer.ping
41
+ end
42
+ end
43
+
44
+ def assert_unexpired_manifest
45
+ fail Katello::Errors::ManifestExpired if @organization.manifest_expired?
46
+ end
47
+ end
48
+ end
@@ -17,6 +17,10 @@ if @resource.respond_to?(:package_rules)
17
17
  attributes :original_packages
18
18
  end
19
19
 
20
+ if @resource.respond_to?(:module_stream_rules)
21
+ attributes :original_module_streams
22
+ end
23
+
20
24
  node :rules do |filter|
21
25
  if filter.respond_to?(:package_rules)
22
26
  filter.package_rules.map do |rule|
@@ -0,0 +1,11 @@
1
+ attributes :description
2
+ attributes :license, :buildhost, :vendor, :relativepath
3
+ attributes :children, :checksumtype, :size, :url, :build_time, :summary, :group, :requires, :provides, :files
4
+
5
+ node :human_readable_size do |package|
6
+ number_to_human_size(package.size) if package.size
7
+ end
8
+
9
+ node :build_time_utc do |package|
10
+ Time.at(package.build_time).to_datetime if package.build_time
11
+ end
@@ -0,0 +1,5 @@
1
+ object @resource
2
+
3
+ attributes :id, :pulp_id, :name, :filename
4
+ attributes :created_at, :updated, :version, :arch, :release
5
+ attributes :epoch, :checksum, :summary, :nvra
@@ -0,0 +1,10 @@
1
+ object false
2
+
3
+ extends "katello/api/v2/common/metadata"
4
+
5
+ child @collection[:results] => :results do
6
+ extends 'katello/api/v2/srpms/base'
7
+ node :comparison do |result|
8
+ result.comparison
9
+ end
10
+ end
@@ -3,5 +3,5 @@ object false
3
3
  extends "katello/api/v2/common/metadata"
4
4
 
5
5
  child @collection[:results] => :results do
6
- extends 'katello/api/v2/srpms/show'
6
+ extends 'katello/api/v2/srpms/base'
7
7
  end
@@ -1,5 +1,5 @@
1
1
  object @resource
2
2
 
3
- attributes :id, :pulp_id, :name, :filename
4
- attributes :created_at, :updated, :version, :arch, :release
5
- attributes :epoch, :checksum, :summary, :nvra
3
+ extends "katello/api/v2/srpms/base"
4
+ extends "katello/api/v2/srpms/backend",
5
+ :object => SmartProxy.pulp_master!.content_service("srpm").new(@resource.pulp_id)
@@ -349,10 +349,12 @@ Katello::Engine.routes.draw do
349
349
  put :refresh_manifest
350
350
  end
351
351
  end
352
+
352
353
  api_resources :upstream_subscriptions, only: [:index, :create] do
353
354
  collection do
354
355
  delete :destroy
355
356
  put :update
357
+ get :ping
356
358
  end
357
359
  end
358
360
  end
@@ -0,0 +1,5 @@
1
+ class AddOriginalModulesToContentViewModuleStreamFilter < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_content_view_filters, :original_module_streams, :boolean, :default => false, :null => false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveDuplicateKatelloPoolsIndex < ActiveRecord::Migration[6.0]
2
+ def change
3
+ remove_index :katello_pools, name: 'index_pools_on_cp_id'
4
+ end
5
+ end
@@ -22,7 +22,7 @@ blueprints = [
22
22
  {
23
23
  group: N_('Subscriptions'),
24
24
  name: 'manifest_expired_warning',
25
- message: N_('The manifest imported within Organization %{subject} is no longer valid. Attempted CDN access returned Forbidden. Refreshing the manifest may resolve this issue.'),
25
+ message: N_('The manifest imported within Organization %{subject} is no longer valid. Please import a new manifest.'),
26
26
  level: 'warning'
27
27
  },
28
28
  {
@@ -10,21 +10,9 @@
10
10
  */
11
11
  angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
12
12
  //Catch the url to prevent the router to perform redirect.
13
- $urlRouterProvider.when('/smart_proxies/:proxyId', ['$match', '$stateParams', function ($match, $stateParams) {
14
- $stateParams.pageName = 'smart_proxies/detail';
13
+ $urlRouterProvider.when('/smart_proxies/:proxyId', [function () {
15
14
  return true;
16
15
  }]);
17
-
18
- // Add rule to redirect links on the smart proxy detail page.
19
- // Changing state doesn't work there since there's no <ui-view> element there
20
- $urlRouterProvider.rule(function ($injector, $location) {
21
- var $stateParams = $injector.get('$stateParams'),
22
- $window = $injector.get('$window');
23
-
24
- if ($stateParams.pageName === 'smart_proxies/detail') {
25
- $window.location.href = $location.path();
26
- }
27
- });
28
16
  }]);
29
17
 
30
18
  /**
@@ -3,19 +3,32 @@
3
3
  * @name Bastion.content-views.controller:FilterDetailsController
4
4
  *
5
5
  * @requires $scope
6
+ * @requires $q
7
+ * @requires translate
8
+ * @requires Notification
6
9
  * @requires Filter
7
10
  *
8
11
  * @description
9
12
  * Handles fetching a filter.
10
13
  */
11
14
  angular.module('Bastion.content-views').controller('FilterDetailsController',
12
- ['$scope', 'Filter', function ($scope, Filter) {
13
-
15
+ ['$scope', '$q', 'translate', 'Notification', 'Filter', function ($scope, $q, translate, Notification, Filter) {
14
16
  $scope.filter = Filter.get({'content_view_id': $scope.$stateParams.contentViewId, filterId: $scope.$stateParams.filterId});
15
17
 
16
18
  $scope.updateFilter = function (filter) {
17
- filter.$update();
18
- };
19
+ var deferred = $q.defer();
19
20
 
21
+ filter.$update(function (response) {
22
+ deferred.resolve(response);
23
+ Notification.setSuccessMessage(translate('Filter Updated - ' + $scope.filter.name));
24
+ }, function (response) {
25
+ deferred.reject(response);
26
+ angular.forEach(response.data.errors, function (errorMessage) {
27
+ Notification.setErrorMessage(translate("An error occurred saving the Filter: ") + errorMessage);
28
+ });
29
+ });
30
+
31
+ return deferred.promise;
32
+ };
20
33
  }]
21
34
  );
@@ -1,4 +1,21 @@
1
1
  <div data-extend-template="layouts/partials/table.html">
2
+ <div data-block="filters">
3
+ <div class="checkbox">
4
+ <label>
5
+ <input type="checkbox"
6
+ ng-model="filter.original_module_streams"
7
+ ng-change="updateFilter(filter)"/>
8
+
9
+ <span ng-show="filter.inclusion" translate>
10
+ Include all Module Streams with no errata.
11
+ </span>
12
+
13
+ <span ng-show="!filter.inclusion" translate>
14
+ Exclude all Module Streams with no errata.
15
+ </span>
16
+ </label>
17
+ </div>
18
+ </div>
2
19
 
3
20
  <div data-block="list-actions">
4
21
  <button type="button" class="btn btn-primary"
@@ -9,7 +9,7 @@
9
9
  */
10
10
  angular.module('Bastion.errata').config(['$stateProvider', function ($stateProvider) {
11
11
  $stateProvider.state('errata', {
12
- url: '/errata',
12
+ url: '/errata?repositoryId',
13
13
  permission: ['view_products', 'view_content_views'],
14
14
  views: {
15
15
  '@': {
@@ -67,4 +67,8 @@
67
67
 
68
68
  .popover-large {
69
69
  max-width: 100%;
70
+ }
71
+
72
+ .uib-increment, .uib-decrement {
73
+ text-align: center;
70
74
  }
@@ -154,7 +154,6 @@ module Katello
154
154
 
155
155
  # Lib Extensions
156
156
  ::Foreman::Renderer::Scope::Variables::Base.include Katello::Concerns::RendererExtensions
157
- ::Foreman::Renderer::Scope::Base.include Katello::Concerns::BaseTemplateScopeExtensions
158
157
 
159
158
  # Model extensions
160
159
  ::Environment.include Katello::Concerns::EnvironmentExtensions
@@ -367,7 +367,7 @@ module Katello
367
367
  :resource_type => 'Katello::Subscription'
368
368
  @plugin.permission :manage_subscription_allocations,
369
369
  {
370
- 'katello/api/v2/upstream_subscriptions' => [:index, :create, :destroy, :update]
370
+ 'katello/api/v2/upstream_subscriptions' => [:index, :create, :destroy, :update, :ping]
371
371
  },
372
372
  :resource_type => 'Katello::Subscription'
373
373
  end
@@ -220,6 +220,8 @@ Foreman::Plugin.register :katello do
220
220
 
221
221
  allowed_template_helpers :subscription_manager_configuration_url, :repository_url
222
222
  extend_template_helpers Katello::KatelloUrlsHelper
223
+ extend_template_helpers Katello::Concerns::BaseTemplateScopeExtensions
224
+
223
225
  register_global_js_file 'fills'
224
226
 
225
227
  search_path_override("Katello") do |resource|
@@ -0,0 +1,16 @@
1
+ load "#{Rails.root}/lib/tasks/reports.rake"
2
+
3
+ #define this task since its not in foreman 2.1
4
+ namespace :dynflow do
5
+ desc <<~END_DESC
6
+ Sets up the environment to act as a Dynflow client. By acting as a client, it still send tasks to be processed, but it cannot execute tasks.
7
+ END_DESC
8
+ task :client do
9
+ dynflow = ::Rails.application.dynflow
10
+ dynflow.config.remote = true
11
+ dynflow.initialize!
12
+ end
13
+ end
14
+
15
+ #Katello reports can generate a foreman task, so mark the task as a dynflow client
16
+ ["reports:daily", "reports:weekly", "reports:monthly"].each { |task| Rake::Task[task].enhance ["dynflow:client"] }
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.16.0.rc3.1".freeze
2
+ VERSION = "3.16.0".freeze
3
3
  end
@@ -29,8 +29,8 @@
29
29
  "@storybook/storybook-deployer": "^2.0.0",
30
30
  "@testing-library/jest-dom": "^5.3.0",
31
31
  "@testing-library/react": "^10.0.2",
32
- "@theforeman/builder": "^4.2.0",
33
- "@theforeman/vendor-dev": "^4.2.0",
32
+ "@theforeman/builder": "4.3.0",
33
+ "@theforeman/vendor-dev": "4.3.0",
34
34
  "axios-mock-adapter": "^1.10.0",
35
35
  "babel-eslint": "^10.0.3",
36
36
  "babel-jest": "^24.9.0",
@@ -56,8 +56,8 @@
56
56
  "react-test-renderer": "^16.0.0",
57
57
  "redux-mock-store": "^1.3.0"
58
58
  },
59
- "_comment": "We don't include @theforeman/vendor because it's assumed to be present in Foreman",
60
59
  "dependencies": {
60
+ "@theforeman/vendor-core": "4.3.0",
61
61
  "@patternfly/react-icons": "^3.15.15",
62
62
  "@patternfly/react-tokens": "^2.8.13",
63
63
  "angular": "1.7.9",