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.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +39 -23
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
- data/app/controllers/katello/api/v2/api_controller.rb +9 -4
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +5 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +3 -0
- data/app/controllers/katello/api/v2/content_views_controller.rb +7 -0
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +13 -1
- data/app/controllers/katello/concerns/api/v2/associations_permission_check.rb +67 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -0
- data/app/helpers/katello/content_view_helper.rb +15 -0
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +4 -0
- data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +16 -16
- data/app/lib/actions/katello/content_view/incremental_updates.rb +8 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -1
- data/app/lib/actions/katello/content_view/publish.rb +55 -16
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +120 -26
- data/app/lib/actions/katello/host/attach_subscriptions.rb +5 -1
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +66 -0
- data/app/lib/actions/katello/repository/multi_clone_to_version.rb +30 -0
- data/app/lib/actions/katello/sync_plan/run.rb +1 -1
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -0
- data/app/lib/actions/pulp/consumer/sync_capsule.rb +8 -0
- data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +2 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +62 -58
- data/app/lib/actions/pulp3/content_migration.rb +4 -0
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb +36 -0
- data/app/lib/actions/pulp3/repository/multi_copy_content.rb +28 -0
- data/app/lib/actions/pulp3/repository/multi_copy_units.rb +55 -0
- data/app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +11 -3
- data/app/lib/actions/pulp3/repository/save_versions.rb +73 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +0 -14
- data/app/lib/katello/errors.rb +26 -15
- data/app/lib/katello/resources/candlepin.rb +1 -1
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +7 -0
- data/app/models/katello/concerns/organization_extensions.rb +14 -0
- data/app/models/katello/content_view.rb +18 -6
- data/app/models/katello/content_view_erratum_filter.rb +13 -0
- data/app/models/katello/content_view_filter.rb +4 -0
- data/app/models/katello/content_view_module_stream_filter.rb +30 -3
- data/app/models/katello/glue/pulp/repo.rb +1 -0
- data/app/models/katello/host/content_facet.rb +10 -5
- data/app/models/katello/module_stream.rb +1 -1
- data/app/models/katello/pulp3/content_guard.rb +1 -1
- data/app/models/katello/repository.rb +11 -0
- data/app/models/setting/content.rb +3 -1
- data/app/presenters/katello/sync_status_presenter.rb +4 -2
- data/app/services/katello/candlepin/message_handler.rb +2 -3
- data/app/services/katello/pulp/repository/yum.rb +2 -1
- data/app/services/katello/pulp3/api/core.rb +4 -0
- data/app/services/katello/pulp3/erratum.rb +3 -1
- data/app/services/katello/pulp3/migration.rb +9 -4
- data/app/services/katello/pulp3/migration_plan.rb +6 -6
- data/app/services/katello/pulp3/repository.rb +17 -1
- data/app/services/katello/pulp3/repository/yum.rb +187 -25
- data/app/services/katello/pulp3/task.rb +100 -0
- data/app/services/katello/pulp3/task_group.rb +79 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_expired_warning.rb +20 -8
- data/app/services/katello/upstream_connection_checker.rb +48 -0
- data/app/views/katello/api/v2/content_view_filters/base.json.rabl +4 -0
- data/app/views/katello/api/v2/srpms/backend.json.rabl +11 -0
- data/app/views/katello/api/v2/srpms/base.json.rabl +5 -0
- data/app/views/katello/api/v2/srpms/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/srpms/index.json.rabl +1 -1
- data/app/views/katello/api/v2/srpms/show.json.rabl +3 -3
- data/config/routes/api/v2.rb +2 -0
- data/db/migrate/20200709021250_add_original_modules_to_content_view_module_stream_filter.rb +5 -0
- data/db/migrate/20200721142707_remove_duplicate_katello_pools_index.rb +5 -0
- data/db/seeds.d/109-katello-notification-blueprints.rb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +1 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-details.controller.js +17 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/module-stream-filter-details.html +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.routes.js +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +4 -0
- data/lib/katello/engine.rb +0 -1
- data/lib/katello/permission_creator.rb +1 -1
- data/lib/katello/plugin.rb +2 -0
- data/lib/katello/tasks/reports.rake +16 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +3 -3
- data/webpack/components/Content/ContentTable.js +2 -0
- data/webpack/components/Content/Details/ContentDetails.js +3 -0
- data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetails.js +3 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +3 -0
- data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +2 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +2 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProductContent.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +2 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -0
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +8 -8
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +3 -1
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +15 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +54 -7
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +15 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/{UpstreamSubscriptionsContstants.js → UpstreamSubscriptionsConstants.js} +3 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +2 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +1 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -13
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +6 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +6 -4
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +26 -25
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +0 -58
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +10 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +1 -68
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UpdateDialog.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/index.js +4 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +12 -10
- data/webpack/scenes/Subscriptions/index.js +6 -3
- metadata +44 -27
@@ -262,6 +262,8 @@ UpstreamSubscriptionsPage.propTypes = {
|
|
262
262
|
upstreamSubscriptions: PropTypes.shape({
|
263
263
|
loading: PropTypes.bool,
|
264
264
|
itemCount: PropTypes.number,
|
265
|
+
// Disabling rule as existing code failed due to an eslint-plugin-react update
|
266
|
+
// eslint-disable-next-line react/forbid-prop-types
|
265
267
|
results: PropTypes.array,
|
266
268
|
pagination: PropTypes.shape({}),
|
267
269
|
task: PropTypes.shape({
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
SAVE_UPSTREAM_SUBSCRIPTIONS_REQUEST,
|
8
8
|
SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS,
|
9
9
|
SAVE_UPSTREAM_SUBSCRIPTIONS_FAILURE,
|
10
|
-
} from './
|
10
|
+
} from './UpstreamSubscriptionsConstants';
|
11
11
|
|
12
12
|
const initialState = initialApiState;
|
13
13
|
|
@@ -5,9 +5,7 @@ import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
|
|
5
5
|
import { mockRequest, mockErrorRequest, mockReset } from '../../../mockRequest';
|
6
6
|
import {
|
7
7
|
requestSuccessResponse,
|
8
|
-
requestSuccessResponseWithRHSubscriptions,
|
9
8
|
successActions,
|
10
|
-
successActionsWithQuantityLoad,
|
11
9
|
failureActions,
|
12
10
|
updateQuantitySuccessActions,
|
13
11
|
updateQuantityFailureActions,
|
@@ -78,17 +76,6 @@ describe('subscription actions', () => {
|
|
78
76
|
expect(store.getActions()).toEqual(successActions);
|
79
77
|
},
|
80
78
|
);
|
81
|
-
it(
|
82
|
-
'creates SUBSCRIPTIONS_REQUEST and triggers loadAvailableQuantities when there is some RH subscription',
|
83
|
-
async () => {
|
84
|
-
mockRequest({
|
85
|
-
url: '/katello/api/v2/subscriptions',
|
86
|
-
response: requestSuccessResponseWithRHSubscriptions,
|
87
|
-
});
|
88
|
-
await store.dispatch(loadSubscriptions());
|
89
|
-
expect(store.getActions()).toEqual(successActionsWithQuantityLoad);
|
90
|
-
},
|
91
|
-
);
|
92
79
|
});
|
93
80
|
|
94
81
|
describe('updateQuantity', () => {
|
@@ -4,7 +4,8 @@ import toJson from 'enzyme-to-json';
|
|
4
4
|
import { loadSetting } from 'foremanReact/components/Settings/SettingsActions';
|
5
5
|
import SubscriptionsPage from '../SubscriptionsPage';
|
6
6
|
import { successState, settingsSuccessState, permissionDeniedState } from './subscriptions.fixtures';
|
7
|
-
import { loadSubscriptions, updateQuantity, loadTableColumns } from '../SubscriptionActions';
|
7
|
+
import { loadAvailableQuantities, loadSubscriptions, updateQuantity, loadTableColumns } from '../SubscriptionActions';
|
8
|
+
import { pingUpstreamSubscriptions } from '../UpstreamSubscriptions/UpstreamSubscriptionsActions';
|
8
9
|
import { createColumns, updateColumns } from '../../../scenes/Settings/Tables/TableActions';
|
9
10
|
|
10
11
|
jest.mock('foremanReact/components/PermissionDenied');
|
@@ -40,6 +41,8 @@ describe('subscriptions page', () => {
|
|
40
41
|
createColumns={createColumns}
|
41
42
|
updateColumns={updateColumns}
|
42
43
|
loadSubscriptions={loadSubscriptions}
|
44
|
+
loadAvailableQuantities={loadAvailableQuantities}
|
45
|
+
pingUpstreamSubscriptions={pingUpstreamSubscriptions}
|
43
46
|
updateQuantity={updateQuantity}
|
44
47
|
handleStartTask={handleStartTask}
|
45
48
|
handleFinishedTask={handleFinishedTask}
|
@@ -73,6 +76,8 @@ describe('subscriptions page', () => {
|
|
73
76
|
createColumns={createColumns}
|
74
77
|
updateColumns={updateColumns}
|
75
78
|
loadSubscriptions={loadSubscriptions}
|
79
|
+
loadAvailableQuantities={loadAvailableQuantities}
|
80
|
+
pingUpstreamSubscriptions={pingUpstreamSubscriptions}
|
76
81
|
updateQuantity={updateQuantity}
|
77
82
|
handleStartTask={handleStartTask}
|
78
83
|
handleFinishedTask={handleFinishedTask}
|
@@ -38,11 +38,11 @@ exports[`subscriptions page should render 1`] = `
|
|
38
38
|
</h1>
|
39
39
|
<SubscriptionsToolbar
|
40
40
|
canManageSubscriptionAllocations={false}
|
41
|
-
disableAddButton={
|
41
|
+
disableAddButton={true}
|
42
42
|
disableDeleteButton={true}
|
43
43
|
disableDeleteReason="This is disabled because no subscriptions are selected."
|
44
|
-
disableManifestActions={
|
45
|
-
disableManifestReason=
|
44
|
+
disableManifestActions={true}
|
45
|
+
disableManifestReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
|
46
46
|
getAutoCompleteParams={[Function]}
|
47
47
|
initialInputValue=""
|
48
48
|
onDeleteButtonClick={[Function]}
|
@@ -57,7 +57,8 @@ exports[`subscriptions page should render 1`] = `
|
|
57
57
|
<Connect(ManageManifestModal)
|
58
58
|
canImportManifest={false}
|
59
59
|
delete={[Function]}
|
60
|
-
|
60
|
+
disableManifestActions={true}
|
61
|
+
disabledReason="This is disabled because no connection could be made to the upstream Subscription Allocation."
|
61
62
|
refresh={[Function]}
|
62
63
|
taskInProgress={false}
|
63
64
|
upload={[Function]}
|
@@ -83,6 +84,7 @@ exports[`subscriptions page should render 1`] = `
|
|
83
84
|
onSelectedRowsChange={[Function]}
|
84
85
|
onSubscriptionDeleteModalClose={[Function]}
|
85
86
|
selectedRows={Array []}
|
87
|
+
selectionEnabled={false}
|
86
88
|
subscriptionDeleteModalOpen={false}
|
87
89
|
subscriptions={
|
88
90
|
Object {
|
@@ -5,7 +5,7 @@ Object {
|
|
5
5
|
"availableQuantities": null,
|
6
6
|
"deleteButtonDisabled": true,
|
7
7
|
"deleteModalOpened": false,
|
8
|
-
"
|
8
|
+
"hasUpstreamConnection": false,
|
9
9
|
"itemCount": 0,
|
10
10
|
"loading": true,
|
11
11
|
"pagination": Object {
|
@@ -31,7 +31,7 @@ Object {
|
|
31
31
|
"availableQuantities": null,
|
32
32
|
"deleteButtonDisabled": true,
|
33
33
|
"deleteModalOpened": false,
|
34
|
-
"
|
34
|
+
"hasUpstreamConnection": false,
|
35
35
|
"itemCount": 0,
|
36
36
|
"loading": true,
|
37
37
|
"pagination": Object {
|
@@ -58,6 +58,7 @@ Object {
|
|
58
58
|
"deleteButtonDisabled": true,
|
59
59
|
"deleteModalOpened": false,
|
60
60
|
"disconnected": "some-value",
|
61
|
+
"hasUpstreamConnection": false,
|
61
62
|
"itemCount": 0,
|
62
63
|
"loading": true,
|
63
64
|
"pagination": Object {
|
@@ -78,7 +79,7 @@ Object {
|
|
78
79
|
"availableQuantities": null,
|
79
80
|
"deleteButtonDisabled": true,
|
80
81
|
"deleteModalOpened": false,
|
81
|
-
"
|
82
|
+
"hasUpstreamConnection": false,
|
82
83
|
"itemCount": 0,
|
83
84
|
"loading": true,
|
84
85
|
"pagination": Object {
|
@@ -99,7 +100,7 @@ Object {
|
|
99
100
|
"availableQuantities": null,
|
100
101
|
"deleteButtonDisabled": true,
|
101
102
|
"deleteModalOpened": false,
|
102
|
-
"
|
103
|
+
"hasUpstreamConnection": false,
|
103
104
|
"itemCount": 0,
|
104
105
|
"loading": true,
|
105
106
|
"pagination": Object {
|
@@ -125,7 +126,7 @@ Object {
|
|
125
126
|
"availableQuantities": null,
|
126
127
|
"deleteButtonDisabled": true,
|
127
128
|
"deleteModalOpened": false,
|
128
|
-
"
|
129
|
+
"hasUpstreamConnection": false,
|
129
130
|
"itemCount": 0,
|
130
131
|
"loading": true,
|
131
132
|
"pagination": Object {
|
@@ -146,7 +147,7 @@ Object {
|
|
146
147
|
"availableQuantities": null,
|
147
148
|
"deleteButtonDisabled": true,
|
148
149
|
"deleteModalOpened": false,
|
149
|
-
"
|
150
|
+
"hasUpstreamConnection": false,
|
150
151
|
"itemCount": 0,
|
151
152
|
"loading": true,
|
152
153
|
"pagination": Object {
|
@@ -171,7 +172,7 @@ Object {
|
|
171
172
|
"availableQuantities": null,
|
172
173
|
"deleteButtonDisabled": true,
|
173
174
|
"deleteModalOpened": false,
|
174
|
-
"
|
175
|
+
"hasUpstreamConnection": false,
|
175
176
|
"itemCount": 0,
|
176
177
|
"loading": true,
|
177
178
|
"pagination": Object {
|
@@ -192,7 +193,7 @@ Object {
|
|
192
193
|
"availableQuantities": null,
|
193
194
|
"deleteButtonDisabled": false,
|
194
195
|
"deleteModalOpened": false,
|
195
|
-
"
|
196
|
+
"hasUpstreamConnection": false,
|
196
197
|
"itemCount": 0,
|
197
198
|
"loading": true,
|
198
199
|
"pagination": Object {
|
@@ -213,7 +214,7 @@ Object {
|
|
213
214
|
"availableQuantities": null,
|
214
215
|
"deleteButtonDisabled": true,
|
215
216
|
"deleteModalOpened": false,
|
216
|
-
"
|
217
|
+
"hasUpstreamConnection": false,
|
217
218
|
"itemCount": 0,
|
218
219
|
"loading": false,
|
219
220
|
"missingPermissions": undefined,
|
@@ -235,7 +236,7 @@ Object {
|
|
235
236
|
"availableQuantities": null,
|
236
237
|
"deleteButtonDisabled": true,
|
237
238
|
"deleteModalOpened": true,
|
238
|
-
"
|
239
|
+
"hasUpstreamConnection": false,
|
239
240
|
"itemCount": 0,
|
240
241
|
"loading": true,
|
241
242
|
"pagination": Object {
|
@@ -256,7 +257,7 @@ Object {
|
|
256
257
|
"availableQuantities": null,
|
257
258
|
"deleteButtonDisabled": true,
|
258
259
|
"deleteModalOpened": false,
|
259
|
-
"
|
260
|
+
"hasUpstreamConnection": false,
|
260
261
|
"itemCount": 0,
|
261
262
|
"loading": true,
|
262
263
|
"pagination": Object {
|
@@ -277,7 +278,7 @@ Object {
|
|
277
278
|
"availableQuantities": null,
|
278
279
|
"deleteButtonDisabled": true,
|
279
280
|
"deleteModalOpened": false,
|
280
|
-
"
|
281
|
+
"hasUpstreamConnection": false,
|
281
282
|
"itemCount": 0,
|
282
283
|
"loading": true,
|
283
284
|
"pagination": Object {
|
@@ -303,7 +304,7 @@ Object {
|
|
303
304
|
"availableQuantities": Object {},
|
304
305
|
"deleteButtonDisabled": true,
|
305
306
|
"deleteModalOpened": false,
|
306
|
-
"
|
307
|
+
"hasUpstreamConnection": false,
|
307
308
|
"itemCount": 0,
|
308
309
|
"loading": true,
|
309
310
|
"pagination": Object {
|
@@ -324,7 +325,7 @@ Object {
|
|
324
325
|
"availableQuantities": null,
|
325
326
|
"deleteButtonDisabled": true,
|
326
327
|
"deleteModalOpened": false,
|
327
|
-
"
|
328
|
+
"hasUpstreamConnection": false,
|
328
329
|
"itemCount": 0,
|
329
330
|
"loading": true,
|
330
331
|
"pagination": Object {
|
@@ -345,7 +346,7 @@ Object {
|
|
345
346
|
"availableQuantities": "some-quantities-data",
|
346
347
|
"deleteButtonDisabled": true,
|
347
348
|
"deleteModalOpened": false,
|
348
|
-
"
|
349
|
+
"hasUpstreamConnection": false,
|
349
350
|
"itemCount": 0,
|
350
351
|
"loading": true,
|
351
352
|
"pagination": Object {
|
@@ -366,7 +367,7 @@ Object {
|
|
366
367
|
"availableQuantities": null,
|
367
368
|
"deleteButtonDisabled": true,
|
368
369
|
"deleteModalOpened": false,
|
369
|
-
"
|
370
|
+
"hasUpstreamConnection": false,
|
370
371
|
"itemCount": 0,
|
371
372
|
"loading": true,
|
372
373
|
"pagination": Object {
|
@@ -387,7 +388,7 @@ Object {
|
|
387
388
|
"availableQuantities": null,
|
388
389
|
"deleteButtonDisabled": true,
|
389
390
|
"deleteModalOpened": false,
|
390
|
-
"
|
391
|
+
"hasUpstreamConnection": false,
|
391
392
|
"itemCount": 0,
|
392
393
|
"loading": true,
|
393
394
|
"pagination": Object {
|
@@ -414,7 +415,7 @@ Object {
|
|
414
415
|
"availableQuantities": null,
|
415
416
|
"deleteButtonDisabled": true,
|
416
417
|
"deleteModalOpened": false,
|
417
|
-
"
|
418
|
+
"hasUpstreamConnection": false,
|
418
419
|
"itemCount": 20,
|
419
420
|
"loading": false,
|
420
421
|
"pagination": Object {
|
@@ -437,7 +438,7 @@ Object {
|
|
437
438
|
"availableQuantities": null,
|
438
439
|
"deleteButtonDisabled": true,
|
439
440
|
"deleteModalOpened": false,
|
440
|
-
"
|
441
|
+
"hasUpstreamConnection": false,
|
441
442
|
"itemCount": 0,
|
442
443
|
"loading": true,
|
443
444
|
"pagination": Object {
|
@@ -458,7 +459,7 @@ Object {
|
|
458
459
|
"availableQuantities": null,
|
459
460
|
"deleteButtonDisabled": true,
|
460
461
|
"deleteModalOpened": false,
|
461
|
-
"
|
462
|
+
"hasUpstreamConnection": false,
|
462
463
|
"itemCount": 0,
|
463
464
|
"loading": true,
|
464
465
|
"pagination": Object {
|
@@ -484,7 +485,7 @@ Object {
|
|
484
485
|
"availableQuantities": null,
|
485
486
|
"deleteButtonDisabled": true,
|
486
487
|
"deleteModalOpened": false,
|
487
|
-
"
|
488
|
+
"hasUpstreamConnection": false,
|
488
489
|
"itemCount": 0,
|
489
490
|
"loading": true,
|
490
491
|
"pagination": Object {
|
@@ -505,7 +506,7 @@ Object {
|
|
505
506
|
"availableQuantities": null,
|
506
507
|
"deleteButtonDisabled": true,
|
507
508
|
"deleteModalOpened": false,
|
508
|
-
"
|
509
|
+
"hasUpstreamConnection": false,
|
509
510
|
"itemCount": 0,
|
510
511
|
"loading": true,
|
511
512
|
"pagination": Object {
|
@@ -531,7 +532,7 @@ Object {
|
|
531
532
|
"availableQuantities": null,
|
532
533
|
"deleteButtonDisabled": true,
|
533
534
|
"deleteModalOpened": false,
|
534
|
-
"
|
535
|
+
"hasUpstreamConnection": false,
|
535
536
|
"itemCount": 0,
|
536
537
|
"loading": true,
|
537
538
|
"pagination": Object {
|
@@ -555,7 +556,7 @@ Object {
|
|
555
556
|
"availableQuantities": null,
|
556
557
|
"deleteButtonDisabled": true,
|
557
558
|
"deleteModalOpened": false,
|
558
|
-
"
|
559
|
+
"hasUpstreamConnection": false,
|
559
560
|
"itemCount": 0,
|
560
561
|
"loading": true,
|
561
562
|
"pagination": Object {
|
@@ -581,7 +582,7 @@ Object {
|
|
581
582
|
"availableQuantities": null,
|
582
583
|
"deleteButtonDisabled": true,
|
583
584
|
"deleteModalOpened": false,
|
584
|
-
"
|
585
|
+
"hasUpstreamConnection": false,
|
585
586
|
"itemCount": 0,
|
586
587
|
"loading": true,
|
587
588
|
"pagination": Object {
|
@@ -93,50 +93,6 @@ export const requestSuccessResponse = Immutable({
|
|
93
93
|
],
|
94
94
|
});
|
95
95
|
|
96
|
-
export const requestSuccessResponseWithRHSubscriptions = Immutable({
|
97
|
-
organization: {},
|
98
|
-
total: 81,
|
99
|
-
subtotal: 1,
|
100
|
-
page: 1,
|
101
|
-
per_page: 2,
|
102
|
-
error: null,
|
103
|
-
search: null,
|
104
|
-
sort: {
|
105
|
-
by: 'cp_id',
|
106
|
-
order: 'asc',
|
107
|
-
},
|
108
|
-
results: [
|
109
|
-
{
|
110
|
-
id: 4,
|
111
|
-
cp_id: '4028f95a62ce96190162cf435202005b',
|
112
|
-
subscription_id: 5,
|
113
|
-
name: 'Some RH Product',
|
114
|
-
start_date: '2013-02-28 18:00:00 -1100',
|
115
|
-
end_date: '2021-12-31 17:59:59 -1100',
|
116
|
-
available: 12,
|
117
|
-
quantity: 12,
|
118
|
-
consumed: 0,
|
119
|
-
account_number: 1000000,
|
120
|
-
contract_number: 20000000,
|
121
|
-
support_level: 'Self-Support',
|
122
|
-
product_id: 'Z3BRU11',
|
123
|
-
sockets: null,
|
124
|
-
cores: null,
|
125
|
-
ram: null,
|
126
|
-
instance_multiplier: 1,
|
127
|
-
stacking_id: null,
|
128
|
-
multi_entitlement: null,
|
129
|
-
type: 'NORMAL',
|
130
|
-
product_name: 'Some RH Product',
|
131
|
-
unmapped_guest: false,
|
132
|
-
virt_only: false,
|
133
|
-
virt_who: false,
|
134
|
-
upstream: true,
|
135
|
-
upstream_pool_id: '8a85f98160f068060160f06e922a0201',
|
136
|
-
},
|
137
|
-
],
|
138
|
-
});
|
139
|
-
|
140
96
|
export const quantitiesRequestSuccessResponse = Immutable({
|
141
97
|
results: [
|
142
98
|
{
|
@@ -399,20 +355,6 @@ export const successActions = [
|
|
399
355
|
},
|
400
356
|
];
|
401
357
|
|
402
|
-
export const successActionsWithQuantityLoad = [
|
403
|
-
{
|
404
|
-
type: 'SUBSCRIPTIONS_REQUEST',
|
405
|
-
},
|
406
|
-
{
|
407
|
-
type: 'SUBSCRIPTIONS_SUCCESS',
|
408
|
-
response: requestSuccessResponseWithRHSubscriptions,
|
409
|
-
search: undefined,
|
410
|
-
},
|
411
|
-
{
|
412
|
-
type: 'SUBSCRIPTIONS_QUANTITIES_REQUEST',
|
413
|
-
},
|
414
|
-
];
|
415
|
-
|
416
358
|
export const failureActions = [
|
417
359
|
{
|
418
360
|
type: 'SUBSCRIPTIONS_REQUEST',
|
@@ -106,7 +106,11 @@ class SubscriptionsTable extends Component {
|
|
106
106
|
|
107
107
|
getTableProps = () => {
|
108
108
|
const {
|
109
|
-
subscriptions,
|
109
|
+
subscriptions,
|
110
|
+
emptyState,
|
111
|
+
tableColumns,
|
112
|
+
loadSubscriptions,
|
113
|
+
selectionEnabled,
|
110
114
|
} = this.props;
|
111
115
|
const { groupedSubscriptions, rows, editing } = this.state;
|
112
116
|
|
@@ -117,8 +121,8 @@ class SubscriptionsTable extends Component {
|
|
117
121
|
loadSubscriptions,
|
118
122
|
rows,
|
119
123
|
subscriptions,
|
124
|
+
selectionEnabled,
|
120
125
|
tableColumns,
|
121
|
-
canManageSubscriptionAllocations,
|
122
126
|
toggleSubscriptionGroup: this.toggleSubscriptionGroup,
|
123
127
|
inlineEditController: this.getInlineEditController(),
|
124
128
|
selectionController: this.getSelectionController(),
|
@@ -272,10 +276,11 @@ SubscriptionsTable.propTypes = {
|
|
272
276
|
loadSubscriptions: PropTypes.func.isRequired,
|
273
277
|
updateQuantity: PropTypes.func.isRequired,
|
274
278
|
emptyState: PropTypes.shape({}).isRequired,
|
275
|
-
canManageSubscriptionAllocations: PropTypes.bool,
|
276
279
|
subscriptions: PropTypes.shape({
|
277
280
|
loading: PropTypes.bool,
|
278
281
|
availableQuantities: PropTypes.shape({}),
|
282
|
+
// Disabling rule as existing code failed due to an eslint-plugin-react update
|
283
|
+
// eslint-disable-next-line react/forbid-prop-types
|
279
284
|
results: PropTypes.array,
|
280
285
|
}).isRequired,
|
281
286
|
subscriptionDeleteModalOpen: PropTypes.bool.isRequired,
|
@@ -284,10 +289,11 @@ SubscriptionsTable.propTypes = {
|
|
284
289
|
toggleDeleteButton: PropTypes.func.isRequired,
|
285
290
|
selectedRows: PropTypes.instanceOf(Array).isRequired,
|
286
291
|
onSelectedRowsChange: PropTypes.func.isRequired,
|
292
|
+
selectionEnabled: PropTypes.bool,
|
287
293
|
};
|
288
294
|
|
289
295
|
SubscriptionsTable.defaultProps = {
|
290
|
-
|
296
|
+
selectionEnabled: false,
|
291
297
|
};
|
292
298
|
|
293
299
|
export default SubscriptionsTable;
|