katello 3.15.0.rc1.1 → 3.15.0.rc1.2
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/assets/javascripts/katello/hosts/activation_key_edit.js +32 -54
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +11 -4
- data/app/controllers/katello/api/v2/repositories_controller.rb +7 -3
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -3
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +6 -2
- data/app/lib/actions/pulp3/content_migration.rb +5 -5
- data/app/lib/actions/pulp3/import_migration.rb +3 -3
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/models/katello/authorization/pool.rb +5 -1
- data/app/models/katello/authorization/subscription.rb +3 -1
- data/app/models/katello/candlepin/repository_mapper.rb +5 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
- data/app/models/katello/concerns/pulp_database_unit.rb +1 -1
- data/app/models/katello/content_view.rb +4 -0
- data/app/models/katello/glue/candlepin/candlepin_object.rb +0 -6
- data/app/models/katello/glue/candlepin/owner.rb +1 -1
- data/app/models/katello/glue/candlepin/repository.rb +0 -8
- data/app/models/katello/glue/pulp/repos.rb +41 -1
- data/app/models/katello/installed_package.rb +5 -4
- data/app/models/katello/pool.rb +1 -1
- data/app/services/katello/pulp/repository/docker.rb +12 -2
- data/app/services/katello/pulp/simple_package.rb +6 -2
- data/app/services/katello/pulp3/erratum.rb +4 -0
- data/app/services/katello/pulp3/migration.rb +61 -8
- data/app/services/katello/pulp3/migration_plan.rb +79 -5
- data/app/views/dashboard/_subscription_widget.html.erb +1 -1
- data/app/views/katello/api/v2/organizations/show.json.rabl +3 -0
- data/app/views/katello/api/v2/packages/backend.json.rabl +4 -0
- data/app/views/katello/api/v2/products/show.json.rabl +2 -0
- data/app/views/overrides/activation_keys/_host_tab_pane.html.erb +10 -2
- data/app/views/smart_proxies/plugins/{_pulp3.html.erb → _pulpcore.html.erb} +0 -0
- data/config/katello.yaml.example +0 -6
- data/db/migrate/20200121213430_katello_repository_rpms_id_big_int.rb +5 -0
- data/db/migrate/20200129172534_add_epoch_version_release_arch_to_katello_installed_packages.rb +40 -0
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +15 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/lib/katello/tasks/pulp3_migration.rake +1 -1
- data/lib/katello/tasks/pulp3_post_migration_check.rake +32 -0
- data/lib/katello/tasks/repository.rake +10 -7
- data/lib/katello/version.rb +1 -1
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalSelectors.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +4 -0
- data/webpack/scenes/Organizations/OrganizationSelectors.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js +14 -9
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +183 -169
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +12 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +5 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +130 -181
- data/webpack/scenes/Subscriptions/Manifest/index.js +10 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +4 -9
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -3
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -11
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +33 -13
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +2 -5
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -7
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +5 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -12
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +0 -12
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +0 -73
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +0 -3
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +0 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +13 -22
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +10 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +2 -1
- data/webpack/scenes/Subscriptions/index.js +4 -3
- data/webpack/scenes/Tasks/TaskConstants.js +1 -0
- metadata +41 -18
- data/app/assets/javascripts/katello/widgets/auto_complete.js +0 -183
- data/db/seeds.d/115-http_proxy.rb +0 -25
- data/vendor/assets/stylesheets/katello/jquery.jnotify.css +0 -98
@@ -21,9 +21,6 @@ export const UPDATE_SUBSCRIPTION_COLUMNS = 'UPDATE_SUBSCRIPTION_COLUMNS';
|
|
21
21
|
|
22
22
|
export const SUBSCRIPTIONS_UPDATE_SEARCH_QUERY = 'SUBSCRIPTIONS_UPDATE_SEARCH_QUERY';
|
23
23
|
|
24
|
-
export const SUBSCRIPTIONS_OPEN_MANIFEST_MODAL = 'SUBSCRIPTIONS_OPEN_MANIFEST_MODAL';
|
25
|
-
export const SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL = 'SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL';
|
26
|
-
|
27
24
|
export const SUBSCRIPTIONS_OPEN_DELETE_MODAL = 'SUBSCRIPTIONS_OPEN_DELETE_MODAL';
|
28
25
|
export const SUBSCRIPTIONS_CLOSE_DELETE_MODAL = 'SUBSCRIPTIONS_CLOSE_DELETE_MODAL';
|
29
26
|
|
@@ -17,12 +17,9 @@ import {
|
|
17
17
|
UPDATE_QUANTITY_REQUEST,
|
18
18
|
UPDATE_QUANTITY_SUCCESS,
|
19
19
|
UPDATE_QUANTITY_FAILURE,
|
20
|
-
DELETE_SUBSCRIPTIONS_REQUEST,
|
21
20
|
DELETE_SUBSCRIPTIONS_SUCCESS,
|
22
21
|
DELETE_SUBSCRIPTIONS_FAILURE,
|
23
22
|
SUBSCRIPTIONS_UPDATE_SEARCH_QUERY,
|
24
|
-
SUBSCRIPTIONS_OPEN_MANIFEST_MODAL,
|
25
|
-
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
26
23
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
27
24
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
28
25
|
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
@@ -35,7 +32,6 @@ const initialState = Immutable({
|
|
35
32
|
...initialApiState,
|
36
33
|
disconnected: false,
|
37
34
|
searchQuery: '',
|
38
|
-
manifestModalOpened: false,
|
39
35
|
deleteModalOpened: false,
|
40
36
|
taskModalOpened: false,
|
41
37
|
deleteButtonDisabled: true,
|
@@ -50,7 +46,6 @@ export default (state = initialState, action) => {
|
|
50
46
|
switch (action.type) {
|
51
47
|
case SUBSCRIPTIONS_REQUEST:
|
52
48
|
case UPDATE_QUANTITY_REQUEST:
|
53
|
-
case DELETE_SUBSCRIPTIONS_REQUEST:
|
54
49
|
return state.set('loading', true);
|
55
50
|
case SUBSCRIPTIONS_COLUMNS_REQUEST:
|
56
51
|
return state
|
@@ -91,7 +86,9 @@ export default (state = initialState, action) => {
|
|
91
86
|
}
|
92
87
|
|
93
88
|
case DELETE_SUBSCRIPTIONS_SUCCESS:
|
94
|
-
return state
|
89
|
+
return state
|
90
|
+
.set('deleteButtonDisabled', true)
|
91
|
+
.set('loading', false);
|
95
92
|
|
96
93
|
case UPDATE_QUANTITY_SUCCESS:
|
97
94
|
return state.set('loading', false);
|
@@ -163,11 +160,6 @@ export default (state = initialState, action) => {
|
|
163
160
|
case SUBSCRIPTIONS_UPDATE_SEARCH_QUERY:
|
164
161
|
return state.set('searchQuery', action.payload);
|
165
162
|
|
166
|
-
case SUBSCRIPTIONS_OPEN_MANIFEST_MODAL:
|
167
|
-
return state.set('manifestModalOpened', true);
|
168
|
-
case SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL:
|
169
|
-
return state.set('manifestModalOpened', false);
|
170
|
-
|
171
163
|
case SUBSCRIPTIONS_OPEN_DELETE_MODAL:
|
172
164
|
return state.set('deleteModalOpened', true);
|
173
165
|
case SUBSCRIPTIONS_CLOSE_DELETE_MODAL:
|
@@ -4,11 +4,12 @@ import Immutable from 'seamless-immutable';
|
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import { propsToCamelCase } from 'foremanReact/common/helpers';
|
6
6
|
import { isEmpty, isEqual } from 'lodash';
|
7
|
-
import { Grid, Row, Col } from 'patternfly-react';
|
7
|
+
import { Grid, Row, Col, Alert } from 'patternfly-react';
|
8
8
|
import ModalProgressBar from 'foremanReact/components/common/ModalProgressBar';
|
9
9
|
import PermissionDenied from 'foremanReact/components/PermissionDenied';
|
10
10
|
import { renderTaskFinishedToast, renderTaskStartedToast } from '../Tasks/helpers';
|
11
11
|
import ManageManifestModal from './Manifest/';
|
12
|
+
import { MANAGE_MANIFEST_MODAL_ID } from './Manifest/ManifestConstants';
|
12
13
|
import { SubscriptionsTable } from './components/SubscriptionsTable';
|
13
14
|
import SubscriptionsToolbar from './components/SubscriptionsToolbar';
|
14
15
|
import { manifestExists } from './SubscriptionHelpers';
|
@@ -20,10 +21,17 @@ import {
|
|
20
21
|
BULK_TASK_SEARCH_INTERVAL,
|
21
22
|
SUBSCRIPTION_TABLE_NAME,
|
22
23
|
} from './SubscriptionConstants';
|
23
|
-
|
24
|
+
import { POLL_TASK_INTERVAL } from '../Tasks/TaskConstants';
|
24
25
|
import './SubscriptionsPage.scss';
|
25
26
|
|
26
27
|
class SubscriptionsPage extends Component {
|
28
|
+
constructor(props) {
|
29
|
+
super(props);
|
30
|
+
this.state = {
|
31
|
+
selectedRows: [],
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
27
35
|
componentDidMount() {
|
28
36
|
this.props.resetTasks();
|
29
37
|
this.props.loadSetting('content_disconnected');
|
@@ -41,14 +49,14 @@ class SubscriptionsPage extends Component {
|
|
41
49
|
const [task] = tasks;
|
42
50
|
|
43
51
|
if (numberOfTasks > 0) {
|
44
|
-
if (currentOrg === task.input.
|
52
|
+
if (currentOrg === task.input.current_organization_id) {
|
45
53
|
if (!taskModalOpened) {
|
46
54
|
openTaskModal();
|
47
55
|
}
|
48
56
|
}
|
49
57
|
|
50
58
|
if (numberOfPrevTasks === 0 || prevTasks[0].id !== task.id) {
|
51
|
-
if (currentOrg === task.input.
|
59
|
+
if (currentOrg === task.input.current_organization_id) {
|
52
60
|
this.handleDoneTask(task);
|
53
61
|
} else if (taskModalOpened) {
|
54
62
|
closeTaskModal();
|
@@ -94,6 +102,10 @@ class SubscriptionsPage extends Component {
|
|
94
102
|
return disabledReason;
|
95
103
|
}
|
96
104
|
|
105
|
+
handleSelectedRowsChange = (selectedRows) => {
|
106
|
+
this.setState({ selectedRows });
|
107
|
+
};
|
108
|
+
|
97
109
|
async pollTasks() {
|
98
110
|
const { pollBulkSearch, organization } = this.props;
|
99
111
|
|
@@ -113,7 +125,6 @@ class SubscriptionsPage extends Component {
|
|
113
125
|
}
|
114
126
|
|
115
127
|
async handleDoneTask(taskToPoll) {
|
116
|
-
const POLL_TASK_INTERVAL = 5000;
|
117
128
|
const { pollTaskUntilDone, loadSubscriptions, organization } = this.props;
|
118
129
|
|
119
130
|
const task = await pollTaskUntilDone(taskToPoll.id, {}, POLL_TASK_INTERVAL, organization.id);
|
@@ -159,11 +170,10 @@ class SubscriptionsPage extends Component {
|
|
159
170
|
render() {
|
160
171
|
const currentOrg = orgId();
|
161
172
|
const {
|
162
|
-
manifestModalOpened, openManageManifestModal, closeManageManifestModal,
|
163
173
|
deleteModalOpened, openDeleteModal, closeDeleteModal,
|
164
174
|
deleteButtonDisabled, disableDeleteButton, enableDeleteButton,
|
165
175
|
searchQuery, updateSearchQuery,
|
166
|
-
taskModalOpened,
|
176
|
+
taskModalOpened, simpleContentAccess,
|
167
177
|
tasks = [], activePermissions, subscriptions, organization, subscriptionTableSettings,
|
168
178
|
} = this.props;
|
169
179
|
// Basic permissions - should we even show this page?
|
@@ -183,6 +193,8 @@ class SubscriptionsPage extends Component {
|
|
183
193
|
const disableManifestActions = taskInProgress || disconnected;
|
184
194
|
let task = null;
|
185
195
|
|
196
|
+
const openManageManifestModal = () => this.props.setModalOpen({ id: MANAGE_MANIFEST_MODAL_ID });
|
197
|
+
|
186
198
|
if (taskInProgress) {
|
187
199
|
[task] = tasks;
|
188
200
|
}
|
@@ -200,7 +212,9 @@ class SubscriptionsPage extends Component {
|
|
200
212
|
});
|
201
213
|
|
202
214
|
const onDeleteSubscriptions = (selectedRows) => {
|
215
|
+
this.startManifestTask();
|
203
216
|
this.props.deleteSubscriptions(selectedRows);
|
217
|
+
this.handleSelectedRowsChange([]);
|
204
218
|
closeDeleteModal();
|
205
219
|
};
|
206
220
|
|
@@ -275,17 +289,22 @@ class SubscriptionsPage extends Component {
|
|
275
289
|
canImportManifest={canImportManifest}
|
276
290
|
canDeleteManifest={canDeleteManifest}
|
277
291
|
canEditOrganizations={canEditOrganizations}
|
278
|
-
showModal={manifestModalOpened}
|
279
292
|
taskInProgress={taskInProgress}
|
280
293
|
disableManifestActions={disableManifestActions}
|
281
294
|
disabledReason={this.getDisabledReason()}
|
282
|
-
onClose={closeManageManifestModal}
|
283
295
|
upload={this.uploadManifest}
|
284
296
|
delete={this.deleteManifest}
|
285
297
|
refresh={this.refreshManifest}
|
286
298
|
/>
|
287
299
|
|
288
300
|
<div id="subscriptions-table" className="modal-container">
|
301
|
+
{simpleContentAccess && (
|
302
|
+
<Alert type="info">
|
303
|
+
This organization has Simple Content Access enabled. <br />
|
304
|
+
Hosts can consume from all repositories in their Content View regardless of
|
305
|
+
subscription status.
|
306
|
+
</Alert>
|
307
|
+
)}
|
289
308
|
<SubscriptionsTable
|
290
309
|
canManageSubscriptionAllocations={canManageSubscriptionAllocations}
|
291
310
|
loadSubscriptions={this.props.loadSubscriptions}
|
@@ -299,6 +318,8 @@ class SubscriptionsPage extends Component {
|
|
299
318
|
toggleDeleteButton={toggleDeleteButton}
|
300
319
|
task={task}
|
301
320
|
bulkSearch={this.props.bulkSearch}
|
321
|
+
selectedRows={this.state.selectedRows}
|
322
|
+
onSelectedRowsChange={this.handleSelectedRowsChange}
|
302
323
|
/>
|
303
324
|
<ModalProgressBar
|
304
325
|
show={taskModalOpened}
|
@@ -322,6 +343,7 @@ SubscriptionsPage.propTypes = {
|
|
322
343
|
updateQuantity: PropTypes.func.isRequired,
|
323
344
|
loadTableColumns: PropTypes.func.isRequired,
|
324
345
|
taskDetails: PropTypes.shape({}),
|
346
|
+
simpleContentAccess: PropTypes.bool,
|
325
347
|
subscriptions: PropTypes.shape({
|
326
348
|
disconnected: PropTypes.bool,
|
327
349
|
tableColumns: PropTypes.array,
|
@@ -351,9 +373,7 @@ SubscriptionsPage.propTypes = {
|
|
351
373
|
refreshManifest: PropTypes.func.isRequired,
|
352
374
|
searchQuery: PropTypes.string,
|
353
375
|
updateSearchQuery: PropTypes.func.isRequired,
|
354
|
-
|
355
|
-
closeManageManifestModal: PropTypes.func.isRequired,
|
356
|
-
manifestModalOpened: PropTypes.bool,
|
376
|
+
setModalOpen: PropTypes.func.isRequired,
|
357
377
|
deleteModalOpened: PropTypes.bool,
|
358
378
|
openDeleteModal: PropTypes.func.isRequired,
|
359
379
|
closeDeleteModal: PropTypes.func.isRequired,
|
@@ -371,11 +391,11 @@ SubscriptionsPage.defaultProps = {
|
|
371
391
|
taskDetails: {},
|
372
392
|
organization: undefined,
|
373
393
|
searchQuery: '',
|
374
|
-
manifestModalOpened: false,
|
375
394
|
deleteModalOpened: false,
|
376
395
|
taskModalOpened: false,
|
377
396
|
deleteButtonDisabled: true,
|
378
397
|
subscriptionTableSettings: {},
|
398
|
+
simpleContentAccess: false,
|
379
399
|
activePermissions: {
|
380
400
|
can_import_manifest: false,
|
381
401
|
can_manage_subscription_allocations: false,
|
@@ -1,15 +1,12 @@
|
|
1
1
|
export const selectSubscriptionsState = state =>
|
2
2
|
state.katello.subscriptions;
|
3
3
|
|
4
|
-
export const
|
5
|
-
selectSubscriptionsState(state).
|
4
|
+
export const selectSearchQuery = state =>
|
5
|
+
selectSubscriptionsState(state).searchQuery;
|
6
6
|
|
7
7
|
export const selectDeleteModalOpened = state =>
|
8
8
|
selectSubscriptionsState(state).deleteModalOpened;
|
9
9
|
|
10
|
-
export const selectSearchQuery = state =>
|
11
|
-
selectSubscriptionsState(state).searchQuery;
|
12
|
-
|
13
10
|
export const selectTaskModalOpened = state =>
|
14
11
|
selectSubscriptionsState(state).taskModalOpened;
|
15
12
|
|
@@ -23,8 +23,6 @@ import {
|
|
23
23
|
loadAvailableQuantities,
|
24
24
|
loadTableColumns,
|
25
25
|
updateSearchQuery,
|
26
|
-
openManageManifestModal,
|
27
|
-
closeManageManifestModal,
|
28
26
|
openDeleteModal,
|
29
27
|
closeDeleteModal,
|
30
28
|
openTaskModal,
|
@@ -147,11 +145,6 @@ describe('subscription actions', () => {
|
|
147
145
|
);
|
148
146
|
});
|
149
147
|
|
150
|
-
describe('manageManifestModal', () => testActionSnapshotWithFixtures({
|
151
|
-
'it should open manage-manifest modal': () => openManageManifestModal(),
|
152
|
-
'it should close manage-manifest modal': () => closeManageManifestModal(),
|
153
|
-
}));
|
154
|
-
|
155
148
|
describe('deleteModal', () => testActionSnapshotWithFixtures({
|
156
149
|
'it should open delete modal': () => openDeleteModal(),
|
157
150
|
'it should close delete modal': () => closeDeleteModal(),
|
@@ -9,6 +9,7 @@ import { createColumns, updateColumns } from '../../../scenes/Settings/Tables/Ta
|
|
9
9
|
|
10
10
|
jest.mock('foremanReact/components/PermissionDenied');
|
11
11
|
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
12
|
+
jest.mock('foremanReact/components/ForemanModal', () => (<div>ForemanModal Mock</div>));
|
12
13
|
|
13
14
|
const loadTables = () => new Promise((resolve) => {
|
14
15
|
resolve();
|
@@ -18,6 +19,8 @@ describe('subscriptions page', () => {
|
|
18
19
|
const noop = () => {};
|
19
20
|
const organization = { owner_details: { upstreamConsumer: 'blah' } };
|
20
21
|
const page = shallow(<SubscriptionsPage
|
22
|
+
setModalOpen={noop}
|
23
|
+
setModalClosed={noop}
|
21
24
|
organization={organization}
|
22
25
|
subscriptions={successState}
|
23
26
|
subscriptionTableSettings={settingsSuccessState}
|
@@ -47,6 +50,8 @@ describe('subscriptions page', () => {
|
|
47
50
|
/>);
|
48
51
|
|
49
52
|
const permissionDeniedPage = shallow(<SubscriptionsPage
|
53
|
+
setModalOpen={noop}
|
54
|
+
setModalClosed={noop}
|
50
55
|
organization={organization}
|
51
56
|
subscriptions={permissionDeniedState}
|
52
57
|
subscriptionTableSettings={settingsSuccessState}
|
@@ -17,8 +17,6 @@ import {
|
|
17
17
|
DELETE_SUBSCRIPTIONS_SUCCESS,
|
18
18
|
DELETE_SUBSCRIPTIONS_FAILURE,
|
19
19
|
SUBSCRIPTIONS_UPDATE_SEARCH_QUERY,
|
20
|
-
SUBSCRIPTIONS_OPEN_MANIFEST_MODAL,
|
21
|
-
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
22
20
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
23
21
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
24
22
|
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
@@ -124,16 +122,6 @@ const fixtures = {
|
|
124
122
|
payload: 'some-query',
|
125
123
|
},
|
126
124
|
},
|
127
|
-
'should handle SUBSCRIPTIONS_OPEN_MANIFEST_MODAL': {
|
128
|
-
action: {
|
129
|
-
type: SUBSCRIPTIONS_OPEN_MANIFEST_MODAL,
|
130
|
-
},
|
131
|
-
},
|
132
|
-
'should handle SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL': {
|
133
|
-
action: {
|
134
|
-
type: SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
135
|
-
},
|
136
|
-
},
|
137
125
|
'should handle SUBSCRIPTIONS_OPEN_DELETE_MODAL': {
|
138
126
|
action: {
|
139
127
|
type: SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
@@ -2,7 +2,6 @@ import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
|
|
2
2
|
import {
|
3
3
|
selectSubscriptionsState,
|
4
4
|
selectSearchQuery,
|
5
|
-
selectManifestModalOpened,
|
6
5
|
selectDeleteModalOpened,
|
7
6
|
selectDeleteButtonDisabled,
|
8
7
|
selectSubscriptionsTasks,
|
@@ -13,7 +12,6 @@ const state = {
|
|
13
12
|
katello: {
|
14
13
|
subscriptions: {
|
15
14
|
searchQuery: 'some-query',
|
16
|
-
manifestModalOpened: false,
|
17
15
|
deleteModalOpened: false,
|
18
16
|
taskModalOpened: false,
|
19
17
|
deleteButtonDisabled: true,
|
@@ -25,7 +23,6 @@ const state = {
|
|
25
23
|
const fixtures = {
|
26
24
|
'should select the subscriptions state': () => selectSubscriptionsState(state),
|
27
25
|
'should select search-query': () => selectSearchQuery(state),
|
28
|
-
'should select manifest-modal-opened': () => selectManifestModalOpened(state),
|
29
26
|
'should select delete-modal-opened': () => selectDeleteModalOpened(state),
|
30
27
|
'should select task-modal-opened': () => selectTaskModalOpened(state),
|
31
28
|
'should select delete-button-disabled': () => selectDeleteButtonDisabled(state),
|
@@ -24,18 +24,6 @@ Object {
|
|
24
24
|
}
|
25
25
|
`;
|
26
26
|
|
27
|
-
exports[`subscription actions manageManifestModal it should close manage-manifest modal 1`] = `
|
28
|
-
Object {
|
29
|
-
"type": "SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL",
|
30
|
-
}
|
31
|
-
`;
|
32
|
-
|
33
|
-
exports[`subscription actions manageManifestModal it should open manage-manifest modal 1`] = `
|
34
|
-
Object {
|
35
|
-
"type": "SUBSCRIPTIONS_OPEN_MANIFEST_MODAL",
|
36
|
-
}
|
37
|
-
`;
|
38
|
-
|
39
27
|
exports[`subscription actions searchQuery it should update the search-query 1`] = `
|
40
28
|
Object {
|
41
29
|
"payload": "some-query",
|
@@ -50,9 +50,7 @@ exports[`subscriptions page should render 1`] = `
|
|
50
50
|
canImportManifest={false}
|
51
51
|
delete={[Function]}
|
52
52
|
disabledReason={null}
|
53
|
-
onClose={[Function]}
|
54
53
|
refresh={[Function]}
|
55
|
-
showModal={false}
|
56
54
|
taskInProgress={false}
|
57
55
|
upload={[Function]}
|
58
56
|
/>
|
@@ -74,14 +72,15 @@ exports[`subscriptions page should render 1`] = `
|
|
74
72
|
}
|
75
73
|
loadSubscriptions={[Function]}
|
76
74
|
onDeleteSubscriptions={[Function]}
|
75
|
+
onSelectedRowsChange={[Function]}
|
77
76
|
onSubscriptionDeleteModalClose={[Function]}
|
77
|
+
selectedRows={Array []}
|
78
78
|
subscriptionDeleteModalOpen={false}
|
79
79
|
subscriptions={
|
80
80
|
Object {
|
81
81
|
"availableQuantities": null,
|
82
82
|
"itemCount": 81,
|
83
83
|
"loading": false,
|
84
|
-
"manifestModalOpened": false,
|
85
84
|
"pagination": Object {
|
86
85
|
"page": 1,
|
87
86
|
"perPage": 2,
|
@@ -8,7 +8,6 @@ Object {
|
|
8
8
|
"disconnected": false,
|
9
9
|
"itemCount": 0,
|
10
10
|
"loading": false,
|
11
|
-
"manifestModalOpened": false,
|
12
11
|
"pagination": Object {
|
13
12
|
"page": 0,
|
14
13
|
"perPage": 20,
|
@@ -31,7 +30,6 @@ Object {
|
|
31
30
|
"disconnected": false,
|
32
31
|
"itemCount": 0,
|
33
32
|
"loading": true,
|
34
|
-
"manifestModalOpened": false,
|
35
33
|
"pagination": Object {
|
36
34
|
"page": 0,
|
37
35
|
"perPage": 20,
|
@@ -54,7 +52,6 @@ Object {
|
|
54
52
|
"disconnected": false,
|
55
53
|
"itemCount": 0,
|
56
54
|
"loading": false,
|
57
|
-
"manifestModalOpened": false,
|
58
55
|
"pagination": Object {
|
59
56
|
"page": 0,
|
60
57
|
"perPage": 20,
|
@@ -77,7 +74,6 @@ Object {
|
|
77
74
|
"disconnected": "some-value",
|
78
75
|
"itemCount": 0,
|
79
76
|
"loading": true,
|
80
|
-
"manifestModalOpened": false,
|
81
77
|
"pagination": Object {
|
82
78
|
"page": 0,
|
83
79
|
"perPage": 20,
|
@@ -100,7 +96,6 @@ Object {
|
|
100
96
|
"disconnected": false,
|
101
97
|
"itemCount": 0,
|
102
98
|
"loading": true,
|
103
|
-
"manifestModalOpened": false,
|
104
99
|
"pagination": Object {
|
105
100
|
"page": 0,
|
106
101
|
"perPage": 20,
|
@@ -123,7 +118,6 @@ Object {
|
|
123
118
|
"disconnected": false,
|
124
119
|
"itemCount": 0,
|
125
120
|
"loading": true,
|
126
|
-
"manifestModalOpened": false,
|
127
121
|
"pagination": Object {
|
128
122
|
"page": 0,
|
129
123
|
"perPage": 20,
|
@@ -146,7 +140,6 @@ Object {
|
|
146
140
|
"disconnected": false,
|
147
141
|
"itemCount": 0,
|
148
142
|
"loading": true,
|
149
|
-
"manifestModalOpened": false,
|
150
143
|
"pagination": Object {
|
151
144
|
"page": 0,
|
152
145
|
"perPage": 20,
|
@@ -169,30 +162,6 @@ Object {
|
|
169
162
|
"disconnected": false,
|
170
163
|
"itemCount": 0,
|
171
164
|
"loading": true,
|
172
|
-
"manifestModalOpened": false,
|
173
|
-
"pagination": Object {
|
174
|
-
"page": 0,
|
175
|
-
"perPage": 20,
|
176
|
-
},
|
177
|
-
"quantitiesLoading": false,
|
178
|
-
"results": Array [],
|
179
|
-
"searchQuery": "",
|
180
|
-
"selectedTableColumns": Array [],
|
181
|
-
"tableColumns": Array [],
|
182
|
-
"taskModalOpened": false,
|
183
|
-
"tasks": Array [],
|
184
|
-
}
|
185
|
-
`;
|
186
|
-
|
187
|
-
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL 1`] = `
|
188
|
-
Object {
|
189
|
-
"availableQuantities": null,
|
190
|
-
"deleteButtonDisabled": true,
|
191
|
-
"deleteModalOpened": false,
|
192
|
-
"disconnected": false,
|
193
|
-
"itemCount": 0,
|
194
|
-
"loading": true,
|
195
|
-
"manifestModalOpened": false,
|
196
165
|
"pagination": Object {
|
197
166
|
"page": 0,
|
198
167
|
"perPage": 20,
|
@@ -215,7 +184,6 @@ Object {
|
|
215
184
|
"disconnected": false,
|
216
185
|
"itemCount": 0,
|
217
186
|
"loading": true,
|
218
|
-
"manifestModalOpened": false,
|
219
187
|
"pagination": Object {
|
220
188
|
"page": 0,
|
221
189
|
"perPage": 20,
|
@@ -238,7 +206,6 @@ Object {
|
|
238
206
|
"disconnected": false,
|
239
207
|
"itemCount": 0,
|
240
208
|
"loading": true,
|
241
|
-
"manifestModalOpened": false,
|
242
209
|
"pagination": Object {
|
243
210
|
"page": 0,
|
244
211
|
"perPage": 20,
|
@@ -265,7 +232,6 @@ Object {
|
|
265
232
|
"disconnected": false,
|
266
233
|
"itemCount": 0,
|
267
234
|
"loading": true,
|
268
|
-
"manifestModalOpened": false,
|
269
235
|
"pagination": Object {
|
270
236
|
"page": 0,
|
271
237
|
"perPage": 20,
|
@@ -288,7 +254,6 @@ Object {
|
|
288
254
|
"disconnected": false,
|
289
255
|
"itemCount": 0,
|
290
256
|
"loading": true,
|
291
|
-
"manifestModalOpened": false,
|
292
257
|
"pagination": Object {
|
293
258
|
"page": 0,
|
294
259
|
"perPage": 20,
|
@@ -311,7 +276,6 @@ Object {
|
|
311
276
|
"disconnected": false,
|
312
277
|
"itemCount": 0,
|
313
278
|
"loading": false,
|
314
|
-
"manifestModalOpened": false,
|
315
279
|
"missingPermissions": undefined,
|
316
280
|
"pagination": Object {
|
317
281
|
"page": 0,
|
@@ -335,30 +299,6 @@ Object {
|
|
335
299
|
"disconnected": false,
|
336
300
|
"itemCount": 0,
|
337
301
|
"loading": true,
|
338
|
-
"manifestModalOpened": false,
|
339
|
-
"pagination": Object {
|
340
|
-
"page": 0,
|
341
|
-
"perPage": 20,
|
342
|
-
},
|
343
|
-
"quantitiesLoading": false,
|
344
|
-
"results": Array [],
|
345
|
-
"searchQuery": "",
|
346
|
-
"selectedTableColumns": Array [],
|
347
|
-
"tableColumns": Array [],
|
348
|
-
"taskModalOpened": false,
|
349
|
-
"tasks": Array [],
|
350
|
-
}
|
351
|
-
`;
|
352
|
-
|
353
|
-
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_MANIFEST_MODAL 1`] = `
|
354
|
-
Object {
|
355
|
-
"availableQuantities": null,
|
356
|
-
"deleteButtonDisabled": true,
|
357
|
-
"deleteModalOpened": false,
|
358
|
-
"disconnected": false,
|
359
|
-
"itemCount": 0,
|
360
|
-
"loading": true,
|
361
|
-
"manifestModalOpened": true,
|
362
302
|
"pagination": Object {
|
363
303
|
"page": 0,
|
364
304
|
"perPage": 20,
|
@@ -381,7 +321,6 @@ Object {
|
|
381
321
|
"disconnected": false,
|
382
322
|
"itemCount": 0,
|
383
323
|
"loading": true,
|
384
|
-
"manifestModalOpened": false,
|
385
324
|
"pagination": Object {
|
386
325
|
"page": 0,
|
387
326
|
"perPage": 20,
|
@@ -404,7 +343,6 @@ Object {
|
|
404
343
|
"disconnected": false,
|
405
344
|
"itemCount": 0,
|
406
345
|
"loading": true,
|
407
|
-
"manifestModalOpened": false,
|
408
346
|
"pagination": Object {
|
409
347
|
"page": 0,
|
410
348
|
"perPage": 20,
|
@@ -427,7 +365,6 @@ Object {
|
|
427
365
|
"disconnected": false,
|
428
366
|
"itemCount": 0,
|
429
367
|
"loading": true,
|
430
|
-
"manifestModalOpened": false,
|
431
368
|
"pagination": Object {
|
432
369
|
"page": 0,
|
433
370
|
"perPage": 20,
|
@@ -450,7 +387,6 @@ Object {
|
|
450
387
|
"disconnected": false,
|
451
388
|
"itemCount": 0,
|
452
389
|
"loading": true,
|
453
|
-
"manifestModalOpened": false,
|
454
390
|
"pagination": Object {
|
455
391
|
"page": 0,
|
456
392
|
"perPage": 20,
|
@@ -473,7 +409,6 @@ Object {
|
|
473
409
|
"disconnected": false,
|
474
410
|
"itemCount": 0,
|
475
411
|
"loading": true,
|
476
|
-
"manifestModalOpened": false,
|
477
412
|
"pagination": Object {
|
478
413
|
"page": 0,
|
479
414
|
"perPage": 20,
|
@@ -502,7 +437,6 @@ Object {
|
|
502
437
|
"disconnected": false,
|
503
438
|
"itemCount": 20,
|
504
439
|
"loading": false,
|
505
|
-
"manifestModalOpened": false,
|
506
440
|
"pagination": Object {
|
507
441
|
"page": 1,
|
508
442
|
"perPage": 10,
|
@@ -527,7 +461,6 @@ Object {
|
|
527
461
|
"disconnected": false,
|
528
462
|
"itemCount": 0,
|
529
463
|
"loading": true,
|
530
|
-
"manifestModalOpened": false,
|
531
464
|
"pagination": Object {
|
532
465
|
"page": 0,
|
533
466
|
"perPage": 20,
|
@@ -550,7 +483,6 @@ Object {
|
|
550
483
|
"disconnected": false,
|
551
484
|
"itemCount": 0,
|
552
485
|
"loading": true,
|
553
|
-
"manifestModalOpened": false,
|
554
486
|
"pagination": Object {
|
555
487
|
"page": 0,
|
556
488
|
"perPage": 20,
|
@@ -573,7 +505,6 @@ Object {
|
|
573
505
|
"disconnected": false,
|
574
506
|
"itemCount": 0,
|
575
507
|
"loading": false,
|
576
|
-
"manifestModalOpened": false,
|
577
508
|
"pagination": Object {
|
578
509
|
"page": 0,
|
579
510
|
"perPage": 20,
|
@@ -596,7 +527,6 @@ Object {
|
|
596
527
|
"disconnected": false,
|
597
528
|
"itemCount": 0,
|
598
529
|
"loading": true,
|
599
|
-
"manifestModalOpened": false,
|
600
530
|
"pagination": Object {
|
601
531
|
"page": 0,
|
602
532
|
"perPage": 20,
|
@@ -619,7 +549,6 @@ Object {
|
|
619
549
|
"disconnected": false,
|
620
550
|
"itemCount": 0,
|
621
551
|
"loading": false,
|
622
|
-
"manifestModalOpened": false,
|
623
552
|
"pagination": Object {
|
624
553
|
"page": 0,
|
625
554
|
"perPage": 20,
|
@@ -642,7 +571,6 @@ Object {
|
|
642
571
|
"disconnected": false,
|
643
572
|
"itemCount": 0,
|
644
573
|
"loading": true,
|
645
|
-
"manifestModalOpened": false,
|
646
574
|
"pagination": Object {
|
647
575
|
"page": 0,
|
648
576
|
"perPage": 20,
|
@@ -668,7 +596,6 @@ Object {
|
|
668
596
|
"disconnected": false,
|
669
597
|
"itemCount": 0,
|
670
598
|
"loading": true,
|
671
|
-
"manifestModalOpened": false,
|
672
599
|
"pagination": Object {
|
673
600
|
"page": 0,
|
674
601
|
"perPage": 20,
|