katello 3.7.0.rc1 → 3.7.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +5 -2
- data/app/controllers/katello/api/v2/environments_controller.rb +8 -3
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +4 -4
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +5 -22
- data/app/lib/actions/katello/host/update_content_overrides.rb +1 -0
- data/app/lib/actions/katello/product/content_create.rb +1 -0
- data/app/lib/actions/katello/product/repositories_certs_reset.rb +25 -0
- data/app/lib/actions/katello/product/update.rb +6 -0
- data/app/lib/katello/resources/candlepin/activation_key.rb +8 -4
- data/app/lib/katello/resources/candlepin/product.rb +2 -1
- data/app/lib/katello/util/cdn_var_substitutor.rb +5 -3
- data/app/lib/katello/util/package.rb +21 -13
- data/app/lib/katello/util/package_filter.rb +33 -31
- data/app/lib/katello/validators/prior_validator.rb +6 -10
- data/app/models/katello/concerns/host_managed_extensions.rb +2 -0
- data/app/models/katello/concerns/organization_extensions.rb +1 -0
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +10 -6
- data/app/models/katello/content.rb +23 -2
- data/app/models/katello/content_view_docker_filter.rb +1 -1
- data/app/models/katello/content_view_puppet_module.rb +3 -3
- data/app/models/katello/content_view_version.rb +4 -0
- data/app/models/katello/environment_prior.rb +7 -0
- data/app/models/katello/glue/candlepin/candlepin_object.rb +2 -2
- data/app/models/katello/glue/candlepin/pool.rb +10 -13
- data/app/models/katello/glue/candlepin/product.rb +19 -9
- data/app/models/katello/glue/candlepin/repository.rb +16 -0
- data/app/models/katello/glue/candlepin/subscription.rb +1 -1
- data/app/models/katello/glue/provider.rb +15 -81
- data/app/models/katello/host/subscription_facet.rb +1 -1
- data/app/models/katello/kt_environment.rb +39 -8
- data/app/models/katello/pool.rb +2 -1
- data/app/models/katello/rpm.rb +144 -2
- data/app/models/katello/upstream_pool.rb +7 -10
- data/app/services/katello/candlepin/pool_service.rb +18 -3
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +13 -16
- data/app/views/dashboard/_content_views_widget.html.erb +3 -3
- data/app/views/dashboard/_errata_widget.html.erb +2 -2
- data/app/views/dashboard/_host_collection_widget.html.erb +3 -3
- data/app/views/dashboard/_subscription_status_widget.html.erb +2 -2
- data/app/views/dashboard/_subscription_widget.html.erb +1 -1
- data/app/views/dashboard/_sync_widget.html.erb +3 -3
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +1 -1
- data/app/views/katello/api/v2/upstream_subscriptions/base.json.rabl +2 -6
- data/app/views/katello/layouts/react.html.erb +3 -3
- data/config/katello.yaml +89 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160302091113_change_environment_prior.rb +9 -0
- data/db/migrate/20180410140909_add_organization_id_to_pool.rb +2 -1
- data/db/migrate/20180612163403_add_foreign_key_to_hypervisor_id.rb +10 -0
- data/db/migrate/20180612164926_add_content_org_id.rb +39 -0
- data/db/migrate/20180612165011_remove_content_fields_from_host.rb +7 -0
- data/db/migrate/20180626160422_add_upstream_pool_id_to_katello_pool.rb +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment.html +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js +19 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/new-environment.controller.js +18 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/paths.service.js +51 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/new-environment.html +16 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks.module.js +1 -6
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +4 -0
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -1
- data/lib/katello/plugin.rb +2 -11
- data/lib/katello/scheduled_jobs.rb +2 -14
- data/lib/katello/tasks/clean_backend_objects.rake +2 -0
- data/lib/katello/tasks/repository.rake +11 -2
- data/lib/katello/tasks/upgrades/3.7/import_pools.rake +12 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +4 -3
- data/webpack/components/PaginationRow/index.js +6 -2
- data/webpack/containers/Application/config.js +7 -2
- data/webpack/index.js +3 -5
- data/webpack/move_to_foreman/common/helpers.js +5 -24
- data/webpack/move_to_foreman/components/common/emptyState/index.js +12 -7
- data/webpack/move_to_foreman/components/common/table/components/CollapseSubscriptionGroupButton.js +31 -0
- data/webpack/move_to_foreman/components/common/table/components/CollapseSubscriptionGroupButton.test.js +16 -0
- data/webpack/move_to_foreman/components/common/table/components/Table.js +76 -0
- data/webpack/move_to_foreman/components/common/table/components/Table.test.js +31 -0
- data/webpack/move_to_foreman/components/common/table/components/TableBody.js +27 -0
- data/webpack/move_to_foreman/components/common/table/components/TableBody.test.js +18 -0
- data/webpack/move_to_foreman/components/common/table/components/TableBodyMessage.js +18 -0
- data/webpack/move_to_foreman/components/common/table/components/TableBodyMessage.test.js +12 -0
- data/webpack/move_to_foreman/components/common/table/components/TableFixtures.js +14 -0
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js +39 -0
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionCell.test.js +16 -0
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionHeaderCell.js +34 -0
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionHeaderCell.test.js +14 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +19 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/Table.test.js.snap +167 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableBody.test.js.snap +28 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableBodyMessage.test.js.snap +13 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionCell.test.js.snap +16 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +15 -0
- data/webpack/move_to_foreman/components/common/table/components/index.js +6 -0
- data/webpack/move_to_foreman/components/common/table/formatters/cellFormatter.js +4 -0
- data/webpack/move_to_foreman/components/common/table/formatters/collapseableAndSelectionCellFormatter.js +18 -0
- data/webpack/move_to_foreman/components/common/table/formatters/ellipsisCellFormatter.js +5 -0
- data/webpack/move_to_foreman/components/common/table/formatters/headerFormatter.js +4 -0
- data/webpack/move_to_foreman/components/common/table/formatters/index.js +6 -0
- data/webpack/move_to_foreman/components/common/table/formatters/selectionCellFormatter.js +17 -0
- data/webpack/move_to_foreman/components/common/table/formatters/selectionHeaderCellFormatter.js +10 -0
- data/webpack/move_to_foreman/components/common/table/index.js +2 -88
- data/webpack/move_to_pf/LoadingState/LoadingState.js +35 -0
- data/webpack/move_to_pf/LoadingState/LoadingState.scss +12 -0
- data/webpack/move_to_pf/LoadingState/LoadingState.test.js +28 -0
- data/webpack/move_to_pf/LoadingState/__snapshots__/LoadingState.test.js.snap +20 -0
- data/webpack/move_to_pf/LoadingState/index.js +3 -0
- data/webpack/move_to_pf/test-utils/testHelpers.js +71 -0
- data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +34 -9
- data/webpack/redux/actions/RedHatRepositories/sets.js +28 -6
- data/webpack/redux/consts.js +1 -0
- data/webpack/redux/reducers/RedHatRepositories/sets.fixtures.js +12 -2
- data/webpack/redux/reducers/RedHatRepositories/sets.js +34 -27
- data/webpack/redux/reducers/RedHatRepositories/sets.test.js +10 -2
- data/webpack/redux/reducers/index.js +2 -0
- data/webpack/scenes/Organizations/OrganizationActions.js +3 -3
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.js +44 -0
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.scss +16 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +8 -2
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +5 -3
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +4 -2
- data/webpack/scenes/RedHatRepositories/components/Search.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/__tests__/RecommendedRepositorySetsToggler.test.js +17 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +37 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +1 -1
- data/webpack/scenes/RedHatRepositories/index.js +17 -7
- data/webpack/scenes/RedHatRepositories/index.scss +16 -4
- data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +17 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +28 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +47 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailConstants.js +3 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +65 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +20 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +37 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +58 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailActions.test.js +47 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailAssociations.test.js +16 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailInfo.test.js +15 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailProducts.test.js +16 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js +39 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +28 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailAssociations.test.js.snap +53 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +185 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProducts.test.js.snap +77 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +432 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +167 -0
- data/webpack/scenes/Subscriptions/Details/index.js +19 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +58 -12
- data/webpack/scenes/Subscriptions/Manifest/Manifest.scss +6 -1
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +7 -7
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +6 -9
- data/webpack/scenes/Subscriptions/Manifest/index.js +2 -2
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +5 -6
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +2 -3
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +46 -30
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +38 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +3 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +7 -6
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +17 -14
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +12 -15
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +4 -4
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionValidations.test.js +5 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +2 -2
- data/webpack/scenes/Subscriptions/{EntitlementsInlineEditFormatter.js → components/SubscriptionsTable/EntitlementsInlineEditFormatter.js} +7 -7
- data/webpack/scenes/Subscriptions/{SubscriptionsTable.js → components/SubscriptionsTable/SubscriptionsTable.js} +75 -47
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +60 -0
- data/webpack/scenes/Subscriptions/{SubscriptionsTableSchema.js → components/SubscriptionsTable/SubscriptionsTableSchema.js} +37 -26
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +56 -0
- data/webpack/scenes/Subscriptions/{__tests__ → components/SubscriptionsTable/__tests__}/__snapshots__/SubscriptionsTable.test.js.snap +16 -5
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/index.js +2 -0
- data/webpack/scenes/Subscriptions/index.js +2 -2
- data/webpack/scenes/Tasks/TaskActions.js +18 -11
- data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +92 -9
- data/webpack/scenes/Tasks/__tests__/task.fixtures.js +19 -9
- data/webpack/services/api/index.js +2 -2
- data/webpack/test_setup.js +1 -0
- metadata +79 -10
- data/webpack/scenes/Subscriptions/Subscriptions.scss +0 -14
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsTable.test.js +0 -47
@@ -18,11 +18,14 @@
|
|
18
18
|
<h1 translate>New Environment</h1>
|
19
19
|
</header>
|
20
20
|
|
21
|
-
<div
|
22
|
-
|
21
|
+
<div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
|
22
|
+
|
23
|
+
<div ng-show="loading" class="loading-mask">
|
24
|
+
<i class="fa fa-spinner fa-spin"></i>
|
25
|
+
{{ "Loading..." | translate }}
|
23
26
|
</div>
|
24
27
|
|
25
|
-
<div ng-show="!
|
28
|
+
<div ng-show="!loading" class="row">
|
26
29
|
|
27
30
|
<p class="col-sm-12" translate>Adding Lifecycle Environment to the end of "{{ priorEnvironment.name }}"</p>
|
28
31
|
|
@@ -54,6 +57,16 @@
|
|
54
57
|
</textarea>
|
55
58
|
</div>
|
56
59
|
|
60
|
+
<div bst-form-group label="{{ 'Prior Environment' | translate }}"
|
61
|
+
ng-show="currentPath != null">
|
62
|
+
<select id="prior_id"
|
63
|
+
name="prior_id"
|
64
|
+
ng-model="environment.prior_id"
|
65
|
+
ng-options="env.id as env.name for env in currentPath"
|
66
|
+
tabindex="4">
|
67
|
+
</select>
|
68
|
+
</div>
|
69
|
+
|
57
70
|
<div bst-form-buttons
|
58
71
|
on-cancel="transitionTo('environments')"
|
59
72
|
on-save="save(environment)"
|
@@ -27,7 +27,7 @@ angular.module('Bastion.products').controller('ProductsBulkAdvancedSyncModalCont
|
|
27
27
|
message = translate("Product syncs has been initiated in the background. " +
|
28
28
|
"Click %s to monitor the progress.");
|
29
29
|
|
30
|
-
Notification.
|
30
|
+
Notification.setSuccessMessage(message.replace('%s', taskLink));
|
31
31
|
};
|
32
32
|
|
33
33
|
error = function (response) {
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js
CHANGED
@@ -64,7 +64,7 @@ angular.module('Bastion.products').controller('ProductsController',
|
|
64
64
|
taskUrl = $scope.taskUrl(taskId);
|
65
65
|
taskLink = $sce.trustAsHtml("<a href=" + taskUrl + ">here</a>");
|
66
66
|
message = translate("Product delete operation has been initiated in the background. Click %s to monitor the progress.");
|
67
|
-
Notification.
|
67
|
+
Notification.setSuccessMessage(message.replace("%", taskLink));
|
68
68
|
});
|
69
69
|
|
70
70
|
$scope.unsetProductDeletionTaskId = function () {
|
@@ -95,7 +95,7 @@ angular.module('Bastion.products').controller('ProductsController',
|
|
95
95
|
message = translate("Product sync has been initiated in the background. " +
|
96
96
|
"Click %s to monitor the progress.");
|
97
97
|
|
98
|
-
Notification.
|
98
|
+
Notification.setSuccessMessage(message.replace('%s', taskLink));
|
99
99
|
};
|
100
100
|
|
101
101
|
ProductBulkAction.syncProducts(getBulkParams(), success, bulkError);
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*/
|
10
10
|
angular.module('Bastion.subscriptions').config(['$stateProvider', function ($stateProvider) {
|
11
11
|
$stateProvider.state('subscriptions', {
|
12
|
-
url: '/
|
12
|
+
url: '/legacy_subscriptions',
|
13
13
|
permission: 'view_subscriptions',
|
14
14
|
template: '<div ui-view></div>',
|
15
15
|
views: {
|
@@ -25,7 +25,7 @@ angular.module('Bastion.subscriptions').config(['$stateProvider', function ($sta
|
|
25
25
|
|
26
26
|
$stateProvider.state('subscription', {
|
27
27
|
abstract: true,
|
28
|
-
url: '/
|
28
|
+
url: '/legacy_subscriptions/:subscriptionId',
|
29
29
|
permission: 'view_subscriptions',
|
30
30
|
controller: 'SubscriptionDetailsController',
|
31
31
|
templateUrl: 'subscriptions/details/views/subscription-details.html'
|
@@ -72,7 +72,7 @@ angular.module('Bastion.subscriptions').config(['$stateProvider', function ($sta
|
|
72
72
|
|
73
73
|
$stateProvider.state('subscriptions-manifest', {
|
74
74
|
abstract: true,
|
75
|
-
url: '/
|
75
|
+
url: '/legacy_subscriptions/manifest',
|
76
76
|
permission: 'import_manifest',
|
77
77
|
controller: 'ManifestController',
|
78
78
|
templateUrl: 'subscriptions/manifest/views/manifest.html'
|
@@ -27,11 +27,6 @@ angular.module('Bastion.tasks').config(['$stateProvider', function ($stateProvid
|
|
27
27
|
abstract: true,
|
28
28
|
templateUrl: 'tasks/views/tasks.html'
|
29
29
|
})
|
30
|
-
.state('tasks.index', {
|
31
|
-
url: 'katello_tasks',
|
32
|
-
permission: 'view_tasks',
|
33
|
-
templateUrl: 'tasks/views/tasks-index.html'
|
34
|
-
})
|
35
30
|
.state('tasks.details', {
|
36
31
|
url: 'katello_tasks/:taskId',
|
37
32
|
permission: 'view_tasks',
|
@@ -40,7 +35,7 @@ angular.module('Bastion.tasks').config(['$stateProvider', function ($stateProvid
|
|
40
35
|
templateUrl: 'tasks/views/task-details-standalone.html'
|
41
36
|
})
|
42
37
|
.state('task', {
|
43
|
-
url: '
|
38
|
+
url: 'foreman_tasks/tasks/:taskId',
|
44
39
|
controller: 'TaskDetailsController',
|
45
40
|
permission: 'view_tasks',
|
46
41
|
templateUrl: 'tasks/views/task-details-standalone.html'
|
data/lib/katello/plugin.rb
CHANGED
@@ -3,7 +3,7 @@ require 'katello/repository_types.rb'
|
|
3
3
|
|
4
4
|
# rubocop:disable Metrics/BlockLength
|
5
5
|
Foreman::Plugin.register :katello do
|
6
|
-
requires_foreman '>= 1.
|
6
|
+
requires_foreman '>= 1.18'
|
7
7
|
|
8
8
|
sub_menu :top_menu, :content_menu, :caption => N_('Content'),
|
9
9
|
:icon => 'fa fa-book', :after => :monitor_menu do
|
@@ -11,7 +11,7 @@ Foreman::Plugin.register :katello do
|
|
11
11
|
:red_hat_subscriptions,
|
12
12
|
:caption => N_('Subscriptions'),
|
13
13
|
:url => '/subscriptions',
|
14
|
-
:url_hash => {:controller => 'katello/
|
14
|
+
:url_hash => {:controller => 'katello/react',
|
15
15
|
:action => 'index'},
|
16
16
|
:engine => Katello::Engine,
|
17
17
|
:turbolinks => false
|
@@ -191,15 +191,6 @@ Foreman::Plugin.register :katello do
|
|
191
191
|
:after => :content_hosts,
|
192
192
|
:turbolinks => false
|
193
193
|
|
194
|
-
menu :labs_menu,
|
195
|
-
:experimental_ui,
|
196
|
-
:url => '/xui/subscriptions',
|
197
|
-
:url_hash => {:controller => 'katello/react',
|
198
|
-
:action => 'index'},
|
199
|
-
:caption => N_('Red Hat Subscriptions'),
|
200
|
-
:parent => :lab_features_menu,
|
201
|
-
:turbolinks => false
|
202
|
-
|
203
194
|
allowed_template_helpers :subscription_manager_configuration_url, :repository_url
|
204
195
|
search_path_override("Katello") do |resource|
|
205
196
|
"/#{Katello::Util::Model.model_to_controller_path(resource)}/auto_complete_search"
|
@@ -1,18 +1,6 @@
|
|
1
1
|
# First, we check if there's a job already enqueued for any notifications
|
2
2
|
::Foreman::Application.dynflow.config.on_init do |world|
|
3
|
-
|
4
|
-
|
5
|
-
delayed_plan = world.persistence.load_delayed_plan job.id
|
6
|
-
next if delayed_plan.blank?
|
7
|
-
delayed_plan.to_hash[:serialized_args].first.try(:[], 'job_class') == 'CreatePulpDiskSpaceNotifications'
|
3
|
+
[CreatePulpDiskSpaceNotifications, SendExpireSoonNotifications].each do |job_class|
|
4
|
+
job_class.spawn_if_missing(world)
|
8
5
|
end
|
9
|
-
scheduled_subs_expiration_job = pending_jobs.select do |job|
|
10
|
-
delayed_plan = world.persistence.load_delayed_plan job.id
|
11
|
-
next if delayed_plan.blank?
|
12
|
-
delayed_plan.to_hash[:serialized_args].first.try(:[], 'job_class') == 'SendExpireSoonNotifications'
|
13
|
-
end
|
14
|
-
|
15
|
-
# Only create notifications if there isn't a scheduled job
|
16
|
-
CreatePulpDiskSpaceNotifications.perform_later if scheduled_pulp_job.blank?
|
17
|
-
SendExpireSoonNotifications.perform_later if scheduled_subs_expiration_job.blank?
|
18
6
|
end
|
@@ -59,12 +59,14 @@ namespace :katello do
|
|
59
59
|
def clean_backend_orphans(cleaner)
|
60
60
|
cp_uuids = cleaner.cp_orphaned_host_uuids
|
61
61
|
print "#{cp_uuids.count} orphaned consumer id(s) found in candlepin.\n"
|
62
|
+
print "Candlepin orphaned consumers: #{cp_uuids}\n"
|
62
63
|
cp_uuids.each do |consumer_id|
|
63
64
|
execute("exception when destroying candlepin consumer #{consumer_id}") { Katello::Resources::Candlepin::Consumer.destroy(consumer_id) }
|
64
65
|
end
|
65
66
|
|
66
67
|
pulp_uuids = cleaner.pulp_orphaned_host_uuids
|
67
68
|
print "#{pulp_uuids.count} orphaned consumer id(s) found in pulp.\n"
|
69
|
+
print "Pulp orphaned consumers: #{pulp_uuids}\n"
|
68
70
|
pulp_uuids.each do |consumer_id|
|
69
71
|
execute("exception when destroying pulp consumer #{consumer_id}") { Katello.pulp_server.extensions.consumer.delete(consumer_id) }
|
70
72
|
end
|
@@ -29,7 +29,7 @@ namespace :katello do
|
|
29
29
|
repos = lookup_repositories
|
30
30
|
|
31
31
|
if repos.any?
|
32
|
-
task = ForemanTasks.async_task(Actions::Katello::Repository::BulkMetadataGenerate, repos.all.
|
32
|
+
task = ForemanTasks.async_task(Actions::Katello::Repository::BulkMetadataGenerate, repos.all.order(:name))
|
33
33
|
puts "Regenerating #{repos.count} repositories. You can monitor these on task id #{task.id}\n"
|
34
34
|
else
|
35
35
|
puts "No repositories found for regeneration."
|
@@ -42,7 +42,7 @@ namespace :katello do
|
|
42
42
|
repos = lookup_repositories
|
43
43
|
|
44
44
|
if repos.any?
|
45
|
-
task = ForemanTasks.async_task(::Actions::BulkAction, Actions::Katello::Repository::RefreshRepository, repos.all.
|
45
|
+
task = ForemanTasks.async_task(::Actions::BulkAction, Actions::Katello::Repository::RefreshRepository, repos.all.order(:name))
|
46
46
|
puts "Refreshing #{repos.count} repositories. You can monitor these on task id #{task.id}\n"
|
47
47
|
else
|
48
48
|
puts "No repositories found for regeneration."
|
@@ -102,6 +102,15 @@ namespace :katello do
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
105
|
+
desc "Refresh pulp sync schedules"
|
106
|
+
task :refresh_sync_schedule => ["environment", "check_ping"] do
|
107
|
+
User.current = User.anonymous_api_admin
|
108
|
+
Katello::Product.all.each do |product|
|
109
|
+
puts "Updating #{product}"
|
110
|
+
ForemanTasks.sync_task(::Actions::Pulp::Repos::Update, product)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
105
114
|
def lookup_repositories
|
106
115
|
lifecycle_envs = Katello::KTEnvironment.where(:name => ENV['LIFECYCLE_ENVIRONMENT']) if ENV['LIFECYCLE_ENVIRONMENT']
|
107
116
|
content_views = Katello::ContentView.where(:name => ENV['CONTENT_VIEW']) if ENV['CONTENT_VIEW']
|
data/lib/katello/version.rb
CHANGED
data/package.json
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
27
27
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
28
28
|
"babel-preset-env": "^1.6.0",
|
29
|
+
"babel-polyfill": "^6.26.0",
|
29
30
|
"babel-preset-react": "^6.24.1",
|
30
31
|
"enzyme": "^3.2.0",
|
31
32
|
"enzyme-adapter-react-16": "^1.1.0",
|
@@ -52,12 +53,12 @@
|
|
52
53
|
"jed": "^1.1.1",
|
53
54
|
"lodash": "^4.17.5",
|
54
55
|
"patternfly": "^3.41.1",
|
55
|
-
"patternfly-react": "
|
56
|
+
"patternfly-react": "2.5.1",
|
56
57
|
"prop-types": "^15.6.0",
|
57
|
-
"react": "^16.
|
58
|
+
"react": "^16.3.1",
|
58
59
|
"react-bootstrap": "^0.31.5",
|
59
60
|
"react-bootstrap-tooltip-button": "^1.0.6",
|
60
|
-
"react-dom": "^16.
|
61
|
+
"react-dom": "^16.3.1",
|
61
62
|
"react-ellipsis-with-tooltip": "^1.0.7",
|
62
63
|
"react-redux": "^5.0.6",
|
63
64
|
"react-router": "^4.2.0",
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React, { Component } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { Paginator } from 'patternfly-react';
|
4
|
+
import { isEqual } from 'lodash';
|
4
5
|
|
5
6
|
const defaultPerPageOptions = [5, 10, 15, 25, 50];
|
6
7
|
|
@@ -26,8 +27,11 @@ class PaginationRow extends Component {
|
|
26
27
|
this.onPerPageSelect = this.onPerPageSelect.bind(this);
|
27
28
|
}
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
static getDerivedStateFromProps(newProps, prevState) {
|
31
|
+
if (!isEqual(newProps.pagination, prevState.pagination)) {
|
32
|
+
return { ...newProps.pagination };
|
33
|
+
}
|
34
|
+
return null;
|
31
35
|
}
|
32
36
|
|
33
37
|
onPageSet(page) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Repos from '../../scenes/RedHatRepositories';
|
2
2
|
import Subscriptions from '../../scenes/Subscriptions';
|
3
3
|
import UpstreamSubscriptions from '../../scenes/Subscriptions/UpstreamSubscriptions/index';
|
4
|
+
import SubscriptionDetails from '../../scenes/Subscriptions/Details';
|
4
5
|
|
5
6
|
// eslint-disable-next-line import/prefer-default-export
|
6
7
|
export const links = [
|
@@ -11,11 +12,15 @@ export const links = [
|
|
11
12
|
},
|
12
13
|
{
|
13
14
|
text: 'RH Subscriptions',
|
14
|
-
path: '
|
15
|
+
path: 'subscriptions',
|
15
16
|
component: Subscriptions,
|
16
17
|
},
|
17
18
|
{
|
18
|
-
path: '
|
19
|
+
path: 'subscriptions/add',
|
19
20
|
component: UpstreamSubscriptions,
|
20
21
|
},
|
22
|
+
{
|
23
|
+
path: 'subscriptions/:id(\[0-9]*$\)',
|
24
|
+
component: SubscriptionDetails,
|
25
|
+
},
|
21
26
|
];
|
data/webpack/index.js
CHANGED
@@ -4,15 +4,13 @@
|
|
4
4
|
/* eslint-disable import/no-unresolved */
|
5
5
|
|
6
6
|
import componentRegistry from 'foremanReact/components/componentRegistry';
|
7
|
-
import
|
8
|
-
import ExperimentalUi from './containers/Application/index';
|
7
|
+
import Application from './containers/Application/index';
|
9
8
|
import './redux';
|
10
9
|
// Not currently mocking anything
|
11
10
|
// import './services/api/setupMocks';
|
12
11
|
|
13
12
|
componentRegistry.register({
|
14
|
-
name: '
|
15
|
-
type:
|
13
|
+
name: 'katello',
|
14
|
+
type: Application,
|
16
15
|
});
|
17
16
|
|
18
|
-
mount('xui_katello', '#reactRoot');
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Table } from 'patternfly-react';
|
3
|
-
|
4
1
|
export default {
|
5
2
|
urlBuilder(controller, action, id = undefined) {
|
6
3
|
return `/${controller}/${id ? `${id}/` : ''}${action}`;
|
7
4
|
},
|
5
|
+
|
6
|
+
urlWithSearch(base, searchQuery) {
|
7
|
+
return `/${base}?search=${searchQuery}`;
|
8
|
+
},
|
8
9
|
};
|
9
10
|
|
10
11
|
export const KEY_CODES = {
|
@@ -13,24 +14,4 @@ export const KEY_CODES = {
|
|
13
14
|
ESCAPE_KEY: 27,
|
14
15
|
};
|
15
16
|
|
16
|
-
export const
|
17
|
-
<Table.SelectionHeading aria-label={label}>
|
18
|
-
<Table.Checkbox
|
19
|
-
id="selectAll"
|
20
|
-
label={label}
|
21
|
-
checked={selectionController.allRowsSelected()}
|
22
|
-
onChange={() => selectionController.selectAllRows()}
|
23
|
-
/>
|
24
|
-
</Table.SelectionHeading>
|
25
|
-
);
|
26
|
-
|
27
|
-
export const selectionCellFormatter = (selectionController, value, additionalData) => (
|
28
|
-
<Table.SelectionCell>
|
29
|
-
<Table.Checkbox
|
30
|
-
id={`select${additionalData.rowIndex}`}
|
31
|
-
label={__('Select row')}
|
32
|
-
checked={selectionController.isSelected(additionalData)}
|
33
|
-
onChange={() => selectionController.selectRow(additionalData)}
|
34
|
-
/>
|
35
|
-
</Table.SelectionCell>
|
36
|
-
);
|
17
|
+
export const getResponseError = ({ data }) => data && (data.displayMessage || data.error);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/* eslint-disable */
|
2
2
|
import React from 'react';
|
3
3
|
import { EmptyState as PfEmptyState, Button } from 'patternfly-react';
|
4
|
+
import { LinkContainer } from 'react-router-bootstrap';
|
4
5
|
|
5
6
|
const EmptyState = (props) => {
|
6
7
|
const {
|
@@ -29,18 +30,22 @@ const EmptyState = (props) => {
|
|
29
30
|
)}
|
30
31
|
{action && (
|
31
32
|
<PfEmptyState.Action>
|
32
|
-
<
|
33
|
-
{action.
|
34
|
-
|
33
|
+
<LinkContainer to={action.url}>
|
34
|
+
<Button href={action.url} bsStyle="primary" bsSize="large">
|
35
|
+
{action.title}
|
36
|
+
</Button>
|
37
|
+
</LinkContainer>
|
35
38
|
</PfEmptyState.Action>
|
36
39
|
)}
|
37
40
|
{secondayActions && (
|
38
41
|
<PfEmptyState.Action secondary>
|
39
42
|
{secondayActions.map(item => (
|
40
|
-
<
|
41
|
-
{item.title}
|
42
|
-
|
43
|
-
|
43
|
+
<LinkContainer to={item.url}>
|
44
|
+
<Button href={item.url} title={item.title}>
|
45
|
+
{item.title}
|
46
|
+
</Button>
|
47
|
+
</LinkContainer>
|
48
|
+
))}
|
44
49
|
</PfEmptyState.Action>
|
45
50
|
)}
|
46
51
|
</PfEmptyState>
|
data/webpack/move_to_foreman/components/common/table/components/CollapseSubscriptionGroupButton.js
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { noop } from 'foremanReact/common/helpers';
|
4
|
+
import { Icon } from 'patternfly-react';
|
5
|
+
|
6
|
+
const CollapseSubscriptionGroupButton = ({
|
7
|
+
collapsed, onClick, ...props
|
8
|
+
}) => {
|
9
|
+
const iconName = collapsed ? 'angle-right' : 'angle-down';
|
10
|
+
|
11
|
+
return (
|
12
|
+
<Icon
|
13
|
+
className="collapse-subscription-group-button"
|
14
|
+
name={iconName}
|
15
|
+
onClick={onClick}
|
16
|
+
{...props}
|
17
|
+
/>
|
18
|
+
);
|
19
|
+
};
|
20
|
+
|
21
|
+
CollapseSubscriptionGroupButton.propTypes = {
|
22
|
+
collapsed: PropTypes.bool,
|
23
|
+
onClick: PropTypes.func,
|
24
|
+
};
|
25
|
+
|
26
|
+
CollapseSubscriptionGroupButton.defaultProps = {
|
27
|
+
collapsed: false,
|
28
|
+
onClick: noop,
|
29
|
+
};
|
30
|
+
|
31
|
+
export default CollapseSubscriptionGroupButton;
|