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
@@ -13,3 +13,7 @@ export const DELETE_MANIFEST_FAILURE = 'DELETE_MANIFEST_FAILURE';
|
|
13
13
|
export const MANIFEST_HISTORY_REQUEST = 'MANIFEST_HISTORY_REQUEST';
|
14
14
|
export const MANIFEST_HISTORY_SUCCESS = 'MANIFEST_HISTORY_SUCCESS';
|
15
15
|
export const MANIFEST_HISTORY_FAILURE = 'MANIFEST_HISTORY_FAILURE';
|
16
|
+
|
17
|
+
// Modal IDs
|
18
|
+
export const MANAGE_MANIFEST_MODAL_ID = 'manageManifestModal';
|
19
|
+
export const DELETE_MANIFEST_MODAL_ID = 'deleteManifestModal';
|
@@ -5,13 +5,16 @@ import ManageManifestModal from '../ManageManifestModal';
|
|
5
5
|
import { manifestHistorySuccessState } from './manifest.fixtures';
|
6
6
|
|
7
7
|
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
8
|
+
jest.mock('foremanReact/components/ForemanModal');
|
8
9
|
|
9
10
|
describe('manage manifest modal', () => {
|
10
|
-
const noop = ()
|
11
|
+
const noop = jest.fn();
|
11
12
|
const organization = { id: 1, redhat_repository_url: 'https://redhat.com' };
|
12
13
|
|
13
|
-
it('should render',
|
14
|
+
it('should render', () => {
|
14
15
|
const page = shallow(<ManageManifestModal
|
16
|
+
setModalOpen={noop}
|
17
|
+
setModalClosed={noop}
|
15
18
|
upload={noop}
|
16
19
|
refresh={noop}
|
17
20
|
delete={noop}
|
@@ -22,7 +25,6 @@ describe('manage manifest modal', () => {
|
|
22
25
|
bulkSearch={noop}
|
23
26
|
manifestHistory={manifestHistorySuccessState}
|
24
27
|
taskInProgress={false}
|
25
|
-
showModal
|
26
28
|
/>);
|
27
29
|
expect(toJson(page)).toMatchSnapshot();
|
28
30
|
});
|
data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap
CHANGED
@@ -1,198 +1,147 @@
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
2
|
|
3
3
|
exports[`manage manifest modal should render 1`] = `
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
backdrop={true}
|
8
|
-
bsClass="modal"
|
9
|
-
dialogComponentClass={[Function]}
|
10
|
-
enforceFocus={true}
|
11
|
-
keyboard={true}
|
12
|
-
manager={
|
13
|
-
ModalManager {
|
14
|
-
"add": [Function],
|
15
|
-
"containers": Array [],
|
16
|
-
"data": Array [],
|
17
|
-
"handleContainerOverflow": true,
|
18
|
-
"hideSiblingNodes": true,
|
19
|
-
"isTopModal": [Function],
|
20
|
-
"modals": Array [],
|
21
|
-
"remove": [Function],
|
22
|
-
}
|
23
|
-
}
|
24
|
-
onHide={[Function]}
|
25
|
-
renderBackdrop={[Function]}
|
26
|
-
restoreFocus={true}
|
27
|
-
show={true}
|
4
|
+
<ForemanModal
|
5
|
+
id="manageManifestModal"
|
6
|
+
title="Manage Manifest"
|
28
7
|
>
|
29
|
-
<
|
30
|
-
|
31
|
-
closeButton={false}
|
32
|
-
closeLabel="Close"
|
8
|
+
<Uncontrolled(Tabs)
|
9
|
+
id="manifest-history-tabs"
|
33
10
|
>
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
onClick={[Function]}
|
38
|
-
>
|
39
|
-
<Icon
|
40
|
-
name="close"
|
41
|
-
type="pf"
|
42
|
-
/>
|
43
|
-
</button>
|
44
|
-
<ModalTitle
|
45
|
-
bsClass="modal-title"
|
46
|
-
componentClass="h4"
|
11
|
+
<Tab
|
12
|
+
eventKey={2}
|
13
|
+
title="Manifest History"
|
47
14
|
>
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
bsClass="modal-body"
|
53
|
-
componentClass="div"
|
54
|
-
>
|
55
|
-
<Uncontrolled(Tabs)
|
56
|
-
id="manifest-history-tabs"
|
57
|
-
>
|
58
|
-
<Tab
|
59
|
-
eventKey={2}
|
60
|
-
title="Manifest History"
|
15
|
+
<LoadingState
|
16
|
+
loading={false}
|
17
|
+
loadingText="Loading"
|
18
|
+
timeout={300}
|
61
19
|
>
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
Object {
|
71
|
-
"cell": Object {
|
72
|
-
"formatters": Array [
|
73
|
-
[Function],
|
74
|
-
],
|
75
|
-
},
|
76
|
-
"header": Object {
|
77
|
-
"formatters": Array [
|
78
|
-
[Function],
|
79
|
-
],
|
80
|
-
"label": "Status",
|
81
|
-
"props": Object {
|
82
|
-
"index": 0,
|
83
|
-
},
|
84
|
-
},
|
85
|
-
"property": "status",
|
86
|
-
},
|
87
|
-
Object {
|
88
|
-
"cell": Object {
|
89
|
-
"formatters": Array [
|
90
|
-
[Function],
|
91
|
-
],
|
92
|
-
},
|
93
|
-
"header": Object {
|
94
|
-
"formatters": Array [
|
95
|
-
[Function],
|
96
|
-
],
|
97
|
-
"label": "Message",
|
98
|
-
"props": Object {
|
99
|
-
"index": 1,
|
100
|
-
},
|
101
|
-
},
|
102
|
-
"property": "statusMessage",
|
20
|
+
<Table
|
21
|
+
columns={
|
22
|
+
Array [
|
23
|
+
Object {
|
24
|
+
"cell": Object {
|
25
|
+
"formatters": Array [
|
26
|
+
[Function],
|
27
|
+
],
|
103
28
|
},
|
104
|
-
Object {
|
105
|
-
"
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
"formatters": Array [
|
112
|
-
[Function],
|
113
|
-
],
|
114
|
-
"label": "Timestamp",
|
115
|
-
"props": Object {
|
116
|
-
"index": 2,
|
117
|
-
},
|
29
|
+
"header": Object {
|
30
|
+
"formatters": Array [
|
31
|
+
[Function],
|
32
|
+
],
|
33
|
+
"label": "Status",
|
34
|
+
"props": Object {
|
35
|
+
"index": 0,
|
118
36
|
},
|
119
|
-
"property": "created",
|
120
37
|
},
|
121
|
-
|
122
|
-
|
123
|
-
emptyState={
|
38
|
+
"property": "status",
|
39
|
+
},
|
124
40
|
Object {
|
125
|
-
"
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
},
|
130
|
-
"header": "There is no Manifest History to display.",
|
131
|
-
}
|
132
|
-
}
|
133
|
-
rows={
|
134
|
-
Array [
|
135
|
-
Object {
|
136
|
-
"created": "2018-04-12T18:58:45+0000",
|
137
|
-
"status": "SUCCESS",
|
138
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
139
|
-
},
|
140
|
-
Object {
|
141
|
-
"created": "2018-04-12T14:28:57+0000",
|
142
|
-
"status": "SUCCESS",
|
143
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
144
|
-
},
|
145
|
-
Object {
|
146
|
-
"created": "2018-04-11T14:36:43+0000",
|
147
|
-
"status": "SUCCESS",
|
148
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
149
|
-
},
|
150
|
-
Object {
|
151
|
-
"created": "2018-04-11T04:29:51+0000",
|
152
|
-
"status": "SUCCESS",
|
153
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
41
|
+
"cell": Object {
|
42
|
+
"formatters": Array [
|
43
|
+
[Function],
|
44
|
+
],
|
154
45
|
},
|
155
|
-
Object {
|
156
|
-
"
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
164
|
-
},
|
165
|
-
Object {
|
166
|
-
"created": "2018-04-11T04:05:07+0000",
|
167
|
-
"status": "SUCCESS",
|
168
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
169
|
-
},
|
170
|
-
Object {
|
171
|
-
"created": "2018-04-11T03:29:44+0000",
|
172
|
-
"status": "SUCCESS",
|
173
|
-
"statusMessage": "Default_Organization file imported successfully.",
|
46
|
+
"header": Object {
|
47
|
+
"formatters": Array [
|
48
|
+
[Function],
|
49
|
+
],
|
50
|
+
"label": "Message",
|
51
|
+
"props": Object {
|
52
|
+
"index": 1,
|
53
|
+
},
|
174
54
|
},
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
55
|
+
"property": "statusMessage",
|
56
|
+
},
|
57
|
+
Object {
|
58
|
+
"cell": Object {
|
59
|
+
"formatters": Array [
|
60
|
+
[Function],
|
61
|
+
],
|
179
62
|
},
|
180
|
-
Object {
|
181
|
-
"
|
182
|
-
|
183
|
-
|
63
|
+
"header": Object {
|
64
|
+
"formatters": Array [
|
65
|
+
[Function],
|
66
|
+
],
|
67
|
+
"label": "Timestamp",
|
68
|
+
"props": Object {
|
69
|
+
"index": 2,
|
70
|
+
},
|
184
71
|
},
|
185
|
-
|
72
|
+
"property": "created",
|
73
|
+
},
|
74
|
+
]
|
75
|
+
}
|
76
|
+
emptyState={
|
77
|
+
Object {
|
78
|
+
"description": "Import a Manifest using the manifest tab above.",
|
79
|
+
"documentation": Object {
|
80
|
+
"label": "Learn more about adding Subscription Manifests",
|
81
|
+
"url": "http://redhat.com",
|
82
|
+
},
|
83
|
+
"header": "There is no Manifest History to display.",
|
186
84
|
}
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
85
|
+
}
|
86
|
+
rows={
|
87
|
+
Array [
|
88
|
+
Object {
|
89
|
+
"created": "2018-04-12T18:58:45+0000",
|
90
|
+
"status": "SUCCESS",
|
91
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
92
|
+
},
|
93
|
+
Object {
|
94
|
+
"created": "2018-04-12T14:28:57+0000",
|
95
|
+
"status": "SUCCESS",
|
96
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
97
|
+
},
|
98
|
+
Object {
|
99
|
+
"created": "2018-04-11T14:36:43+0000",
|
100
|
+
"status": "SUCCESS",
|
101
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
102
|
+
},
|
103
|
+
Object {
|
104
|
+
"created": "2018-04-11T04:29:51+0000",
|
105
|
+
"status": "SUCCESS",
|
106
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
107
|
+
},
|
108
|
+
Object {
|
109
|
+
"created": "2018-04-11T04:26:38+0000",
|
110
|
+
"status": "SUCCESS",
|
111
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
112
|
+
},
|
113
|
+
Object {
|
114
|
+
"created": "2018-04-11T04:23:05+0000",
|
115
|
+
"status": "SUCCESS",
|
116
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
117
|
+
},
|
118
|
+
Object {
|
119
|
+
"created": "2018-04-11T04:05:07+0000",
|
120
|
+
"status": "SUCCESS",
|
121
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
122
|
+
},
|
123
|
+
Object {
|
124
|
+
"created": "2018-04-11T03:29:44+0000",
|
125
|
+
"status": "SUCCESS",
|
126
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
127
|
+
},
|
128
|
+
Object {
|
129
|
+
"created": "2018-04-10T18:44:38+0000",
|
130
|
+
"status": "SUCCESS",
|
131
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
132
|
+
},
|
133
|
+
Object {
|
134
|
+
"created": "2018-04-10T18:40:17+0000",
|
135
|
+
"status": "SUCCESS",
|
136
|
+
"statusMessage": "Default_Organization file imported successfully.",
|
137
|
+
},
|
138
|
+
]
|
139
|
+
}
|
140
|
+
/>
|
141
|
+
</LoadingState>
|
142
|
+
</Tab>
|
143
|
+
</Uncontrolled(Tabs)>
|
144
|
+
<Component>
|
196
145
|
<Button
|
197
146
|
active={false}
|
198
147
|
block={false}
|
@@ -203,6 +152,6 @@ exports[`manage manifest modal should render 1`] = `
|
|
203
152
|
>
|
204
153
|
Close
|
205
154
|
</Button>
|
206
|
-
</
|
207
|
-
</
|
155
|
+
</Component>
|
156
|
+
</ForemanModal>
|
208
157
|
`;
|
@@ -1,11 +1,15 @@
|
|
1
1
|
import { bindActionCreators } from 'redux';
|
2
2
|
|
3
3
|
import { connect } from 'react-redux';
|
4
|
+
import * as foremanModalActions from 'foremanReact/components/ForemanModal/ForemanModalActions';
|
5
|
+
import { selectIsModalOpen } from 'foremanReact/components/ForemanModal/ForemanModalSelectors';
|
6
|
+
import { DELETE_MANIFEST_MODAL_ID } from './ManifestConstants';
|
4
7
|
|
5
8
|
import * as manifestActions from './ManifestActions';
|
6
9
|
import * as organizationActions from '../../Organizations/OrganizationActions';
|
7
10
|
import * as tasksActions from '../../Tasks/TaskActions';
|
8
11
|
import history from './ManifestHistoryReducer';
|
12
|
+
import { selectSimpleContentAccessEnabled } from '../../Organizations/OrganizationSelectors';
|
9
13
|
|
10
14
|
import ManifestModal from './ManageManifestModal';
|
11
15
|
|
@@ -16,10 +20,15 @@ const mapStateToProps = state => ({
|
|
16
20
|
organization: state.katello.organization,
|
17
21
|
manifestHistory: state.katello.manifestHistory,
|
18
22
|
taskDetails: state.katello.manifestHistory.taskDetails,
|
23
|
+
simpleContentAccess: selectSimpleContentAccessEnabled(state),
|
24
|
+
modalOpenState: state.foremanModals.ManageManifestModal,
|
25
|
+
deleteManifestModalIsOpen: selectIsModalOpen(state, DELETE_MANIFEST_MODAL_ID),
|
19
26
|
});
|
20
27
|
|
21
28
|
// map action dispatchers to props
|
22
|
-
const actions = {
|
29
|
+
const actions = {
|
30
|
+
...manifestActions, ...organizationActions, ...tasksActions, ...foremanModalActions,
|
31
|
+
};
|
23
32
|
const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);
|
24
33
|
|
25
34
|
// export reducers
|
@@ -21,8 +21,6 @@ import {
|
|
21
21
|
SUBSCRIPTION_TABLE_DEFAULT_COLUMNS,
|
22
22
|
SUBSCRIPTIONS_COLUMNS_REQUEST,
|
23
23
|
SUBSCRIPTIONS_UPDATE_SEARCH_QUERY,
|
24
|
-
SUBSCRIPTIONS_OPEN_MANIFEST_MODAL,
|
25
|
-
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
26
24
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
27
25
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
28
26
|
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
@@ -32,6 +30,8 @@ import {
|
|
32
30
|
} from './SubscriptionConstants';
|
33
31
|
import { filterRHSubscriptions, selectSubscriptionsQuantitiesFromResponse } from './SubscriptionHelpers.js';
|
34
32
|
import { apiError } from '../../move_to_foreman/common/helpers.js';
|
33
|
+
import { pollTaskUntilDone } from '../Tasks/TaskActions';
|
34
|
+
import { POLL_TASK_INTERVAL } from '../Tasks/TaskConstants';
|
35
35
|
|
36
36
|
export const createSubscriptionParams = (extendedParams = {}) => ({
|
37
37
|
...{
|
@@ -127,10 +127,8 @@ export const deleteSubscriptions = poolIds => async (dispatch) => {
|
|
127
127
|
|
128
128
|
try {
|
129
129
|
const { data } = await api.delete(`/organizations/${(orgId())}/upstream_subscriptions`, {}, params);
|
130
|
-
|
131
|
-
|
132
|
-
response: data,
|
133
|
-
});
|
130
|
+
dispatch(pollTaskUntilDone(data.id, {}, POLL_TASK_INTERVAL, Number(orgId())));
|
131
|
+
return dispatch({ type: DELETE_SUBSCRIPTIONS_SUCCESS });
|
134
132
|
} catch (error) {
|
135
133
|
return dispatch(apiError(DELETE_SUBSCRIPTIONS_FAILURE, error));
|
136
134
|
}
|
@@ -141,9 +139,6 @@ export const updateSearchQuery = query => ({
|
|
141
139
|
payload: query,
|
142
140
|
});
|
143
141
|
|
144
|
-
export const openManageManifestModal = () => ({ type: SUBSCRIPTIONS_OPEN_MANIFEST_MODAL });
|
145
|
-
export const closeManageManifestModal = () => ({ type: SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL });
|
146
|
-
|
147
142
|
export const openDeleteModal = () => ({ type: SUBSCRIPTIONS_OPEN_DELETE_MODAL });
|
148
143
|
export const closeDeleteModal = () => ({ type: SUBSCRIPTIONS_CLOSE_DELETE_MODAL });
|
149
144
|
|