katello 3.7.0.rc2 → 3.7.0

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

Potentially problematic release.


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

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/v2/repository_sets_controller.rb +10 -1
  3. data/app/models/katello/glue/candlepin/owner.rb +0 -8
  4. data/app/models/katello/product_content.rb +4 -1
  5. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +3 -1
  6. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +1 -1
  7. data/lib/katello/version.rb +1 -1
  8. data/package.json +2 -1
  9. data/webpack/__mocks__/foremanReact/components/BreadcrumbBar.js +3 -0
  10. data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +6 -0
  11. data/webpack/mockRequest.js +3 -3
  12. data/webpack/move_to_foreman/common/helpers.js +45 -8
  13. data/webpack/redux/actions/RedHatRepositories/sets.js +1 -1
  14. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +2 -7
  15. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +1 -1
  16. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +44 -6
  17. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js +3 -1
  18. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +0 -1
  19. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +22 -14
  20. data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +3 -4
  21. data/webpack/scenes/Subscriptions/Details/index.js +2 -2
  22. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +5 -24
  23. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -1
  24. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +20 -8
  25. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +3 -1
  26. data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +9 -16
  27. data/webpack/scenes/Subscriptions/SubscriptionActions.js +5 -26
  28. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +6 -2
  29. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +13 -10
  30. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +3 -12
  31. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +55 -20
  32. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +2 -3
  33. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +10 -5
  34. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +10 -5
  35. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +50 -5
  36. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +8 -3
  37. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +18 -5
  38. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +5 -8
  39. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +9 -3
  40. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -0
  41. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +10 -14
  42. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +16 -39
  43. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +2 -2
  44. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -0
  45. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +349 -355
  46. data/webpack/scenes/Subscriptions/index.js +1 -2
  47. data/webpack/services/api/testHelpers.js +28 -0
  48. metadata +7 -5
  49. data/webpack/services/api/fixtures.js +0 -353
@@ -9,11 +9,10 @@ import reducer from './SubscriptionReducer';
9
9
 
10
10
  import SubscriptionsPage from './SubscriptionsPage';
11
11
 
12
- const EMPTY_ARRAY = [];
13
12
  // map state to props
14
13
  const mapStateToProps = state => ({
15
14
  subscriptions: state.katello.subscriptions,
16
- tasks: state.katello.subscriptions.tasks || EMPTY_ARRAY,
15
+ tasks: state.katello.subscriptions.tasks,
17
16
  });
18
17
 
19
18
  // map action dispatchers to props
@@ -0,0 +1,28 @@
1
+
2
+ export const failureAction = (type, message = 'Request failed with status code 422') => (
3
+ {
4
+ type,
5
+ payload: {
6
+ messages: [message],
7
+ result: new Error(message),
8
+ },
9
+ }
10
+ );
11
+
12
+ export const toastErrorAction = (message = 'Request failed with status code 422') => (
13
+ {
14
+ payload: {
15
+ message: {
16
+ message,
17
+ sticky: true,
18
+ type: 'error',
19
+ },
20
+ },
21
+ type: 'TOASTS_ADD',
22
+ }
23
+ );
24
+
25
+ export default {
26
+ failureAction,
27
+ toastErrorAction,
28
+ };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0.rc2
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -2256,7 +2256,9 @@ files:
2256
2256
  - vendor/assets/stylesheets/katello/jquery.treeTable.css.scss
2257
2257
  - vendor/assets/stylesheets/katello/ui.spinner.css.scss
2258
2258
  - webpack/__mocks__/foremanReact/common/helpers.js
2259
+ - webpack/__mocks__/foremanReact/components/BreadcrumbBar.js
2259
2260
  - webpack/__mocks__/foremanReact/components/common/table.js
2261
+ - webpack/__mocks__/foremanReact/redux/actions/toasts.js
2260
2262
  - webpack/__mocks__/react-bootstrap-tooltip-button.js
2261
2263
  - webpack/components/MultiSelect/index.js
2262
2264
  - webpack/components/PaginationRow/PaginationRow.test.js
@@ -2443,9 +2445,9 @@ files:
2443
2445
  - webpack/scenes/Tasks/TaskConstants.js
2444
2446
  - webpack/scenes/Tasks/__tests__/TaskActions.test.js
2445
2447
  - webpack/scenes/Tasks/__tests__/task.fixtures.js
2446
- - webpack/services/api/fixtures.js
2447
2448
  - webpack/services/api/index.js
2448
2449
  - webpack/services/api/setupMocks.js
2450
+ - webpack/services/api/testHelpers.js
2449
2451
  - webpack/services/index.js
2450
2452
  - webpack/stories/index.js
2451
2453
  - webpack/test_setup.js
@@ -2463,9 +2465,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2463
2465
  version: '0'
2464
2466
  required_rubygems_version: !ruby/object:Gem::Requirement
2465
2467
  requirements:
2466
- - - ">"
2468
+ - - ">="
2467
2469
  - !ruby/object:Gem::Version
2468
- version: 1.3.1
2470
+ version: '0'
2469
2471
  requirements: []
2470
2472
  rubyforge_project:
2471
2473
  rubygems_version: 2.6.14.1
@@ -1,353 +0,0 @@
1
- export default [
2
- {
3
- path: '/katello/api/v2/products/:id/repository_sets/:repo_set_id/enable',
4
- searchRegex: /\/katello\/api\/v2\/products\/\d+\/repository_sets\/\d+\/enable/,
5
- type: 'PUT',
6
- response: () => {
7
- const types = ['yum', 'source_rpm', 'debug', 'iso', 'beta', 'kickstart'];
8
-
9
- const output = {
10
- id: Math.round(Math.random() * 500),
11
- name: 'Red Hat Enterprise Linux 6.2 Server for RHS 2 VSA Beta RPMs from RHUI x86_64',
12
- content_type: types[Math.floor(Math.random() * types.length)],
13
- };
14
-
15
- return [
16
- 200,
17
- {
18
- id: 'd4a4432e-4987-4206-aa99-615b5b15fbf8',
19
- label: 'Actions::Katello::RepositorySet::EnableRepository',
20
- pending: false,
21
- username: 'admin',
22
- started_at: '2017-12-19 14:33:41 UTC',
23
- ended_at: '2017-12-19 14:33:44 UTC',
24
- state: 'stopped',
25
- result: 'success',
26
- progress: 1.0,
27
- input: {
28
- services_checked: ['pulp', 'pulp_auth', 'candlepin', 'candlepin_auth'],
29
- repository: {
30
- id: 7,
31
- name: 'Red Hat Enterprise Linux 6.2 Server for RHS 2 VSA Beta RPMs from RHUI x86_64',
32
- label: 'Red_Hat_Enterprise_Linux_6_2_Server_for_RHS_2_VSA_Beta_RPMs_from_RHUI_x86_64',
33
- },
34
- product: {
35
- id: 155,
36
- name: 'Red Hat Storage',
37
- label: 'Red_Hat_Storage',
38
- cp_id: '171',
39
- },
40
- provider: {
41
- id: 2,
42
- name: 'Red Hat',
43
- },
44
- organization: {
45
- id: 1,
46
- name: 'Default Organization',
47
- label: 'Default_Organization',
48
- },
49
- },
50
- output,
51
- humanized: {
52
- action: 'Enable',
53
- input: [],
54
- output: '',
55
- errors: [],
56
- },
57
- cli_example: null,
58
- },
59
- ];
60
- },
61
- },
62
- {
63
- path: '/katello/api/v2/products/:id/repository_sets/:repo_set_id/disable',
64
- searchRegex: /\/katello\/api\/v2\/products\/\d+\/repository_sets\/\d+\/disable/,
65
- type: 'PUT',
66
- response: () => [
67
- 200,
68
- {
69
- id: 'd4a4432e-4987-4206-aa99-615b5b15fbf8',
70
- label: 'Actions::Katello::RepositorySet::DisableRepository',
71
- pending: false,
72
- username: 'admin',
73
- started_at: '2017-12-19 14:33:41 UTC',
74
- ended_at: '2017-12-19 14:33:44 UTC',
75
- state: 'stopped',
76
- result: 'success',
77
- progress: 1.0,
78
- input: {
79
- services_checked: ['pulp', 'pulp_auth', 'candlepin', 'candlepin_auth'],
80
- repository: {
81
- id: 7,
82
- name: 'Red Hat Enterprise Linux 6.2 Server for RHS 2 VSA Beta RPMs from RHUI x86_64',
83
- label: 'Red_Hat_Enterprise_Linux_6_2_Server_for_RHS_2_VSA_Beta_RPMs_from_RHUI_x86_64',
84
- },
85
- product: {
86
- id: 155,
87
- name: 'Red Hat Storage',
88
- label: 'Red_Hat_Storage',
89
- cp_id: '171',
90
- },
91
- provider: {
92
- id: 2,
93
- name: 'Red Hat',
94
- },
95
- organization: {
96
- id: 1,
97
- name: 'Default Organization',
98
- label: 'Default_Organization',
99
- },
100
- },
101
- output: {},
102
- humanized: {
103
- action: 'Disable',
104
- input: [],
105
- output: '',
106
- errors: [],
107
- },
108
- cli_example: null,
109
- },
110
- ],
111
- },
112
- {
113
- path: '/organizations/:id/repository_sets',
114
- searchRegex: /\/organizations\/\d+\/repository_sets$/,
115
- response: () => [
116
- 200,
117
- {
118
- total: 5,
119
- subtotal: 5,
120
- page: null,
121
- per_page: null,
122
- error: null,
123
- search: null,
124
- sort: {
125
- by: null,
126
- order: null,
127
- },
128
- results: [
129
- {
130
- repositories: [],
131
- product: {
132
- name: 'Red hat Enterprise Linux Server 7',
133
- id: 5,
134
- },
135
- type: 'file',
136
- vendor: 'Red Hat',
137
- gpgUrl: 'http://',
138
- contentUrl: '/content/dist/rhel/server/7///source/iso',
139
- id: '2457',
140
- name: 'Red Hat Enterprise Linux 7 Server (Source ISOs)',
141
- label: 'rhel-7-server-source-isos',
142
- },
143
- {
144
- repositories: [],
145
- type: 'yum',
146
- product: {
147
- name: 'Red hat Enterprise Linux Server 7',
148
- id: 5,
149
- },
150
- vendor: 'Red Hat',
151
- gpgUrl: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release',
152
- contentUrl: '/content/dist/rhel/server/6/6Server//sat-tools/6.1/source/SRPMS',
153
- id: '4187',
154
- name: 'Red Hat Satellite Tools 6.1 (for RHEL 6 Server) (Source RPMs)',
155
- label: 'rhel-6-server-satellite-tools-6.1-source-rpms',
156
- },
157
- {
158
- repositories: [],
159
- type: 'yum',
160
- product: {
161
- name: 'Red hat Enterprise Linux Server 7',
162
- id: 5,
163
- },
164
- vendor: 'Red Hat',
165
- gpgUrl:
166
- 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release',
167
- contentUrl: '/content/beta/rhel/server/6/6Server//rh-common/os',
168
- id: '3076',
169
- name: 'Red Hat Enterprise Linux 6 Server - RH Common Beta (RPMs)',
170
- label: 'rhel-6-server-rh-common-beta-rpms',
171
- },
172
- {
173
- repositories: [],
174
- type: 'yum',
175
- product: {
176
- name: 'Red hat Enterprise Linux Server 7',
177
- id: 5,
178
- },
179
- vendor: 'Red Hat',
180
- gpgUrl: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release',
181
- contentUrl: '/content/dist/rhel/server/6///rhev-agent/3/os',
182
- id: '1699',
183
- name: 'Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)',
184
- label: 'rhel-6-server-rhev-agent-rpms',
185
- },
186
- {
187
- repositories: [
188
- {
189
- id: 631,
190
- name: 'Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.8',
191
- releasever: '6.8',
192
- arch: 'x86_64',
193
- },
194
- ],
195
- product: {
196
- name: 'Red hat Enterprise Linux Server 7',
197
- id: 5,
198
- },
199
- type: 'kickstart',
200
- vendor: 'Red Hat',
201
- gpgUrl: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release',
202
- contentUrl: '/content/dist/rhel/server/6///kickstart',
203
- id: '1952',
204
- name: 'Red Hat Enterprise Linux 6 Server (Kickstart)',
205
- label: 'rhel-6-server-kickstart',
206
- },
207
- ],
208
- },
209
- ],
210
- },
211
- {
212
- // Returns the currently enabled repositories
213
- path: '/repository_sets?organization_id=:id',
214
- searchRegex: /\/organizations\/\d+\/repository_sets/,
215
- response: () => [
216
- 200,
217
- {
218
- total: 5,
219
- subtotal: 5,
220
- page: null,
221
- per_page: null,
222
- error: null,
223
- search: null,
224
- sort: {
225
- by: null,
226
- order: null,
227
- },
228
- results: [
229
- {
230
- repositories: [
231
- {
232
- id: 631,
233
- name: 'Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.8',
234
- releasever: '6.8',
235
- arch: 'x86_64',
236
- },
237
- ],
238
- product: {
239
- name: 'Red hat Enterprise Linux Server 7',
240
- id: 5,
241
- },
242
- type: 'kickstart',
243
- vendor: 'Red Hat',
244
- gpgUrl: 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release',
245
- contentUrl: '/content/dist/rhel/server/6///kickstart',
246
- id: '1952',
247
- name: 'Red Hat Enterprise Linux 6 Server (Kickstart)',
248
- label: 'rhel-6-server-kickstart',
249
- },
250
- ],
251
- },
252
- ],
253
- },
254
- {
255
- path: '/products/:product_id/repository_sets/:content_id/available_repositories',
256
- searchRegex: /\/products\/\d+\/repository_sets\/\d+\/available_repositories/,
257
- response: () => [
258
- 200,
259
- {
260
- total: 6,
261
- subtotal: 6,
262
- page: null,
263
- per_page: null,
264
- error: null,
265
- search: null,
266
- sort: {
267
- by: null,
268
- order: null,
269
- },
270
- results: [
271
- {
272
- substitutions: {
273
- releasever: '7.0',
274
- basearch: 'x86_64',
275
- },
276
- path: '/content/dist/rhel/server/7/7.0/x86_64/supplementary/os',
277
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.0',
278
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
279
- pulp_id:
280
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_0',
281
- enabled: false,
282
- promoted: false,
283
- },
284
- {
285
- substitutions: {
286
- releasever: '7.1',
287
- basearch: 'x86_64',
288
- },
289
- path: '/content/dist/rhel/server/7/7.1/x86_64/supplementary/os',
290
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.1',
291
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
292
- pulp_id:
293
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_1',
294
- enabled: false,
295
- promoted: false,
296
- },
297
- {
298
- substitutions: {
299
- releasever: '7.2',
300
- basearch: 'x86_64',
301
- },
302
- path: '/content/dist/rhel/server/7/7.2/x86_64/supplementary/os',
303
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.2',
304
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
305
- pulp_id:
306
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_2',
307
- enabled: false,
308
- promoted: false,
309
- },
310
- {
311
- substitutions: {
312
- releasever: '7.3',
313
- basearch: 'x86_64',
314
- },
315
- path: '/content/dist/rhel/server/7/7.3/x86_64/supplementary/os',
316
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.3',
317
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
318
- pulp_id:
319
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_3',
320
- enabled: false,
321
- promoted: false,
322
- },
323
- {
324
- substitutions: {
325
- releasever: '7.4',
326
- basearch: 'x86_64',
327
- },
328
- path: '/content/dist/rhel/server/7/7.4/x86_64/supplementary/os',
329
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.4',
330
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
331
- pulp_id:
332
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_4',
333
- enabled: false,
334
- promoted: false,
335
- },
336
- {
337
- substitutions: {
338
- releasever: '7Server',
339
- basearch: 'x86_64',
340
- },
341
- path: '/content/dist/rhel/server/7/7Server/x86_64/supplementary/os',
342
- repo_name: 'Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7Server',
343
- name: 'Red Hat Enterprise Linux 7 Server - Supplementary (RPMs)',
344
- pulp_id:
345
- 'Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7Server',
346
- enabled: false,
347
- promoted: false,
348
- },
349
- ],
350
- },
351
- ],
352
- },
353
- ];