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
@@ -27,10 +27,10 @@ const buildTableRowsFromGroup = (subscriptionGroup, availableQuantities, updated
27
27
  return [buildTableRow(firstSubscription, availableQuantities, updatedQuantity)];
28
28
  };
29
29
 
30
- export const buildTableRows = (groupdSubscriptions, availableQuantities, updatedQuantity) => {
30
+ export const buildTableRows = (groupedSubscriptions, availableQuantities, updatedQuantity) => {
31
31
  const rows = [];
32
32
 
33
- Object.values(groupdSubscriptions).forEach(subscriptionGroup =>
33
+ Object.values(groupedSubscriptions).forEach(subscriptionGroup =>
34
34
  rows.push(...buildTableRowsFromGroup(subscriptionGroup, availableQuantities, updatedQuantity)));
35
35
 
36
36
  return rows;
@@ -27,6 +27,7 @@ describe('subscriptions table', () => {
27
27
  /* eslint-enable react/jsx-indent */
28
28
 
29
29
  it('should render an empty state', async () => {
30
+ /* eslint-disable react/jsx-indent */
30
31
  const page = render(<MemoryRouter>
31
32
  <SubscriptionsTable
32
33
  subscriptions={emptyState}
@@ -14,417 +14,411 @@ exports[`subscriptions table should render a loading state 1`] = `
14
14
  `;
15
15
 
16
16
  exports[`subscriptions table should render a table 1`] = `
17
- Array [
18
- <div />,
19
- <div>
20
- <table
21
- class="table table-striped table-bordered table-hover pf-table-inline-edit table-fixed"
22
- >
23
- <thead>
24
- <tr
25
- class=""
17
+ <div>
18
+ <table
19
+ class="table table-striped table-bordered table-hover pf-table-inline-edit table-fixed"
20
+ >
21
+ <thead>
22
+ <tr
23
+ class=""
24
+ >
25
+ <th
26
+ aria-label="Select all rows"
27
+ class="table-view-pf-select"
26
28
  >
27
- <th
28
- aria-label="Select all rows"
29
- class="table-view-pf-select"
30
- >
31
- <label
32
- class="control-label sr-only"
33
- for="selectAll"
34
- >
35
- Select all rows
36
- </label>
37
- <input
38
- id="selectAll"
39
- type="checkbox"
40
- />
41
- </th>
42
- <th
43
- class=""
44
- >
45
- Name
46
- </th>
47
- <th
48
- class=""
49
- >
50
- SKU
51
- </th>
52
- <th
53
- class=""
29
+ <label
30
+ class="control-label sr-only"
31
+ for="selectAll"
54
32
  >
55
- Contract
56
- </th>
57
- <th
58
- class=""
59
- >
60
- Start Date
61
- </th>
62
- <th
63
- class=""
64
- >
65
- End Date
66
- </th>
67
- <th
68
- class=""
69
- >
70
- Requires Virt-Who
71
- </th>
72
- <th
73
- class=""
74
- >
75
- Consumed
76
- </th>
77
- <th
78
- class=""
79
- >
80
- Entitlements
81
- </th>
82
- </tr>
83
- </thead>
84
- <tbody>
85
- <tr
33
+ Select all rows
34
+ </label>
35
+ <input
36
+ id="selectAll"
37
+ type="checkbox"
38
+ />
39
+ </th>
40
+ <th
86
41
  class=""
87
42
  >
88
- <td
89
- class="table-view-pf-select"
90
- >
91
- <label
92
- class="control-label sr-only"
93
- for="select0"
94
- >
95
- Select row
96
- </label>
97
- <input
98
- id="select0"
99
- type="checkbox"
100
- />
101
- </td>
102
- <td>
103
- <a
104
- href="/subscriptions/3/"
105
- >
106
- zoo
107
- </a>
108
- </td>
109
- <td
110
- class=""
43
+ Name
44
+ </th>
45
+ <th
46
+ class=""
47
+ >
48
+ SKU
49
+ </th>
50
+ <th
51
+ class=""
52
+ >
53
+ Contract
54
+ </th>
55
+ <th
56
+ class=""
57
+ >
58
+ Start Date
59
+ </th>
60
+ <th
61
+ class=""
62
+ >
63
+ End Date
64
+ </th>
65
+ <th
66
+ class=""
67
+ >
68
+ Requires Virt-Who
69
+ </th>
70
+ <th
71
+ class=""
72
+ >
73
+ Consumed
74
+ </th>
75
+ <th
76
+ class=""
77
+ >
78
+ Entitlements
79
+ </th>
80
+ </tr>
81
+ </thead>
82
+ <tbody>
83
+ <tr
84
+ class=""
85
+ >
86
+ <td
87
+ class="table-view-pf-select"
88
+ >
89
+ <label
90
+ class="control-label sr-only"
91
+ for="select0"
111
92
  >
112
- 853987721546
113
- </td>
114
- <td
115
- class=""
93
+ Select row
94
+ </label>
95
+ <input
96
+ id="select0"
97
+ type="checkbox"
116
98
  />
117
- <td
118
- class=""
119
- >
120
- 2017-09-21 16:18:44 -0400
121
- </td>
122
- <td
123
- class=""
124
- >
125
- 2047-09-14 15:18:44 -0500
126
- </td>
127
- <td>
128
- <span
129
- aria-hidden="true"
130
- class="fa fa-minus"
131
- />
132
- </td>
133
- <td
134
- class=""
99
+ </td>
100
+ <td>
101
+ <a
102
+ href="/subscriptions/3/"
135
103
  >
136
- 1
137
- </td>
138
- <td>
139
- Unlimited
140
- </td>
141
- </tr>
142
- <tr
104
+ zoo
105
+ </a>
106
+ </td>
107
+ <td
143
108
  class=""
144
109
  >
145
- <td
146
- class="table-view-pf-select"
147
- >
148
- <label
149
- class="control-label sr-only"
150
- for="select1"
151
- >
152
- Select row
153
- </label>
154
- <input
155
- id="select1"
156
- type="checkbox"
157
- />
158
- </td>
159
- <td>
160
- <a
161
- href="/subscriptions/4/"
162
- >
163
- hsdfhsdh
164
- </a>
165
- </td>
166
- <td
167
- class=""
168
- >
169
- 947637693017
170
- </td>
171
- <td
172
- class=""
110
+ 853987721546
111
+ </td>
112
+ <td
113
+ class=""
114
+ />
115
+ <td
116
+ class=""
117
+ >
118
+ 2017-09-21 16:18:44 -0400
119
+ </td>
120
+ <td
121
+ class=""
122
+ >
123
+ 2047-09-14 15:18:44 -0500
124
+ </td>
125
+ <td>
126
+ <span
127
+ aria-hidden="true"
128
+ class="fa fa-minus"
173
129
  />
174
- <td
175
- class=""
176
- >
177
- 2017-09-25 17:54:36 -0400
178
- </td>
179
- <td
180
- class=""
181
- >
182
- 2047-09-18 16:54:36 -0500
183
- </td>
184
- <td>
185
- <span
186
- aria-hidden="true"
187
- class="fa fa-minus"
188
- />
189
- </td>
190
- <td
191
- class=""
192
- >
193
- 0
194
- </td>
195
- <td>
196
- Unlimited
197
- </td>
198
- </tr>
199
- </tbody>
200
- </table>
201
- <form
202
- class="content-view-pf-pagination table-view-pf-pagination clearfix"
203
- >
204
- <div
205
- class="form-group"
130
+ </td>
131
+ <td
132
+ class=""
133
+ >
134
+ 1
135
+ </td>
136
+ <td>
137
+ Unlimited
138
+ </td>
139
+ </tr>
140
+ <tr
141
+ class=""
206
142
  >
207
- <div
208
- class="dropup pagination-pf-pagesize btn-group"
143
+ <td
144
+ class="table-view-pf-select"
209
145
  >
210
- <button
211
- aria-expanded="false"
212
- aria-haspopup="true"
213
- class="dropdown-toggle btn btn-default"
214
- id="pagination-row-dropdown"
215
- role="button"
216
- type="button"
146
+ <label
147
+ class="control-label sr-only"
148
+ for="select1"
217
149
  >
218
- 2
219
- <span
220
- class="caret"
221
- />
222
- </button>
223
- <ul
224
- aria-labelledby="pagination-row-dropdown"
225
- class="dropdown-menu"
226
- role="menu"
150
+ Select row
151
+ </label>
152
+ <input
153
+ id="select1"
154
+ type="checkbox"
155
+ />
156
+ </td>
157
+ <td>
158
+ <a
159
+ href="/subscriptions/4/"
227
160
  >
228
- <li
229
- class=""
230
- role="presentation"
231
- >
232
- <a
233
- href="#"
234
- role="menuitem"
235
- tabindex="-1"
236
- >
237
- 5
238
- </a>
239
- </li>
240
- <li
241
- class=""
242
- role="presentation"
243
- >
244
- <a
245
- href="#"
246
- role="menuitem"
247
- tabindex="-1"
248
- >
249
- 10
250
- </a>
251
- </li>
252
- <li
253
- class=""
254
- role="presentation"
255
- >
256
- <a
257
- href="#"
258
- role="menuitem"
259
- tabindex="-1"
260
- >
261
- 15
262
- </a>
263
- </li>
264
- <li
265
- class=""
266
- role="presentation"
267
- >
268
- <a
269
- href="#"
270
- role="menuitem"
271
- tabindex="-1"
272
- >
273
- 25
274
- </a>
275
- </li>
276
- <li
277
- class=""
278
- role="presentation"
279
- >
280
- <a
281
- href="#"
282
- role="menuitem"
283
- tabindex="-1"
284
- >
285
- 50
286
- </a>
287
- </li>
288
- </ul>
289
- </div>
290
- <span>
291
- per page
292
- </span>
293
- </div>
161
+ hsdfhsdh
162
+ </a>
163
+ </td>
164
+ <td
165
+ class=""
166
+ >
167
+ 947637693017
168
+ </td>
169
+ <td
170
+ class=""
171
+ />
172
+ <td
173
+ class=""
174
+ >
175
+ 2017-09-25 17:54:36 -0400
176
+ </td>
177
+ <td
178
+ class=""
179
+ >
180
+ 2047-09-18 16:54:36 -0500
181
+ </td>
182
+ <td>
183
+ <span
184
+ aria-hidden="true"
185
+ class="fa fa-minus"
186
+ />
187
+ </td>
188
+ <td
189
+ class=""
190
+ >
191
+ 0
192
+ </td>
193
+ <td>
194
+ Unlimited
195
+ </td>
196
+ </tr>
197
+ </tbody>
198
+ </table>
199
+ <form
200
+ class="content-view-pf-pagination table-view-pf-pagination clearfix"
201
+ >
202
+ <div
203
+ class="form-group"
204
+ >
294
205
  <div
295
- class="form-group"
206
+ class="dropup pagination-pf-pagesize btn-group"
296
207
  >
297
- <span>
298
- <span
299
- class="pagination-pf-items-current"
300
- >
301
- 1-2
302
- </span>
303
-  of 
208
+ <button
209
+ aria-expanded="false"
210
+ aria-haspopup="true"
211
+ class="dropdown-toggle btn btn-default"
212
+ id="pagination-row-dropdown"
213
+ role="button"
214
+ type="button"
215
+ >
216
+ 2
304
217
  <span
305
- class="pagination-pf-items-total"
306
- >
307
- 81
308
- </span>
309
- </span>
218
+ class="caret"
219
+ />
220
+ </button>
310
221
  <ul
311
- class="pagination pagination-pf-back"
222
+ aria-labelledby="pagination-row-dropdown"
223
+ class="dropdown-menu"
224
+ role="menu"
312
225
  >
313
226
  <li
314
- class="disabled"
227
+ class=""
228
+ role="presentation"
315
229
  >
316
230
  <a
317
231
  href="#"
318
- title="First Page"
232
+ role="menuitem"
233
+ tabindex="-1"
319
234
  >
320
- <span
321
- aria-hidden="true"
322
- class="fa fa-angle-double-left i"
323
- />
235
+ 5
324
236
  </a>
325
237
  </li>
326
238
  <li
327
- class="disabled"
239
+ class=""
240
+ role="presentation"
328
241
  >
329
242
  <a
330
243
  href="#"
331
- title="Previous Page"
244
+ role="menuitem"
245
+ tabindex="-1"
332
246
  >
333
- <span
334
- aria-hidden="true"
335
- class="fa fa-angle-left i"
336
- />
247
+ 10
337
248
  </a>
338
249
  </li>
339
- </ul>
340
- <label
341
- class="sr-only control-label"
342
- >
343
- Current Page
344
- </label>
345
- <input
346
- class="pagination-pf-page form-control"
347
- type="text"
348
- value="1"
349
- />
350
- <span>
351
-  of 
352
- <span
353
- class="pagination-pf-pages"
250
+ <li
251
+ class=""
252
+ role="presentation"
354
253
  >
355
- 41
356
- </span>
357
- </span>
358
- <ul
359
- class="pagination pagination-pf-forward"
360
- >
254
+ <a
255
+ href="#"
256
+ role="menuitem"
257
+ tabindex="-1"
258
+ >
259
+ 15
260
+ </a>
261
+ </li>
361
262
  <li
362
263
  class=""
264
+ role="presentation"
363
265
  >
364
266
  <a
365
267
  href="#"
366
- title="Next Page"
268
+ role="menuitem"
269
+ tabindex="-1"
367
270
  >
368
- <span
369
- aria-hidden="true"
370
- class="fa fa-angle-right i"
371
- />
271
+ 25
372
272
  </a>
373
273
  </li>
374
274
  <li
375
275
  class=""
276
+ role="presentation"
376
277
  >
377
278
  <a
378
279
  href="#"
379
- title="Last Page"
280
+ role="menuitem"
281
+ tabindex="-1"
380
282
  >
381
- <span
382
- aria-hidden="true"
383
- class="fa fa-angle-double-right i"
384
- />
283
+ 50
385
284
  </a>
386
285
  </li>
387
286
  </ul>
388
287
  </div>
389
- </form>
390
- </div>,
391
- ]
288
+ <span>
289
+ per page
290
+ </span>
291
+ </div>
292
+ <div
293
+ class="form-group"
294
+ >
295
+ <span>
296
+ <span
297
+ class="pagination-pf-items-current"
298
+ >
299
+ 1-2
300
+ </span>
301
+  of 
302
+ <span
303
+ class="pagination-pf-items-total"
304
+ >
305
+ 81
306
+ </span>
307
+ </span>
308
+ <ul
309
+ class="pagination pagination-pf-back"
310
+ >
311
+ <li
312
+ class="disabled"
313
+ >
314
+ <a
315
+ href="#"
316
+ title="First Page"
317
+ >
318
+ <span
319
+ aria-hidden="true"
320
+ class="fa fa-angle-double-left i"
321
+ />
322
+ </a>
323
+ </li>
324
+ <li
325
+ class="disabled"
326
+ >
327
+ <a
328
+ href="#"
329
+ title="Previous Page"
330
+ >
331
+ <span
332
+ aria-hidden="true"
333
+ class="fa fa-angle-left i"
334
+ />
335
+ </a>
336
+ </li>
337
+ </ul>
338
+ <label
339
+ class="sr-only control-label"
340
+ >
341
+ Current Page
342
+ </label>
343
+ <input
344
+ class="pagination-pf-page form-control"
345
+ type="text"
346
+ value="1"
347
+ />
348
+ <span>
349
+  of 
350
+ <span
351
+ class="pagination-pf-pages"
352
+ >
353
+ 41
354
+ </span>
355
+ </span>
356
+ <ul
357
+ class="pagination pagination-pf-forward"
358
+ >
359
+ <li
360
+ class=""
361
+ >
362
+ <a
363
+ href="#"
364
+ title="Next Page"
365
+ >
366
+ <span
367
+ aria-hidden="true"
368
+ class="fa fa-angle-right i"
369
+ />
370
+ </a>
371
+ </li>
372
+ <li
373
+ class=""
374
+ >
375
+ <a
376
+ href="#"
377
+ title="Last Page"
378
+ >
379
+ <span
380
+ aria-hidden="true"
381
+ class="fa fa-angle-double-right i"
382
+ />
383
+ </a>
384
+ </li>
385
+ </ul>
386
+ </div>
387
+ </form>
388
+ </div>
392
389
  `;
393
390
 
394
391
  exports[`subscriptions table should render an empty state 1`] = `
395
- Array [
396
- <div />,
392
+ <div
393
+ class="blank-slate-pf"
394
+ >
397
395
  <div
398
- class="blank-slate-pf"
396
+ class="blank-slate-pf-icon"
399
397
  >
400
- <div
401
- class="blank-slate-pf-icon"
402
- >
403
- <span
404
- aria-hidden="true"
405
- class="pficon pficon-add-circle-o"
406
- />
407
- </div>
408
- <h4
409
- class="h1 blank-slate-pf-title"
410
- >
411
- There are no Subscriptions to display
412
- </h4>
413
- <p
414
- class="blank-slate-pf-info"
415
- >
416
- Add Subscriptions to this Allocation to manage your Entitlements.
417
- </p>
418
- <div
419
- class="blank-slate-pf-main-action"
398
+ <span
399
+ aria-hidden="true"
400
+ class="pficon pficon-add-circle-o"
401
+ />
402
+ </div>
403
+ <h4
404
+ class="h1 blank-slate-pf-title"
405
+ >
406
+ There are no Subscriptions to display
407
+ </h4>
408
+ <p
409
+ class="blank-slate-pf-info"
410
+ >
411
+ Add Subscriptions to this Allocation to manage your Entitlements.
412
+ </p>
413
+ <div
414
+ class="blank-slate-pf-main-action"
415
+ >
416
+ <a
417
+ class="btn btn-lg btn-primary"
418
+ href="subscriptions/add"
420
419
  >
421
- <a
422
- class="btn btn-lg btn-primary"
423
- href="subscriptions/add"
424
- >
425
- Add Subscriptions
426
- </a>
427
- </div>
428
- </div>,
429
- ]
420
+ Add Subscriptions
421
+ </a>
422
+ </div>
423
+ </div>
430
424
  `;