foreman-tasks 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/js_tests.yml +5 -1
  3. data/app/controllers/foreman_tasks/api/tasks_controller.rb +1 -2
  4. data/app/models/setting/foreman_tasks.rb +8 -8
  5. data/app/services/foreman_tasks/dashboard_table_filter.rb +5 -1
  6. data/lib/foreman_tasks/version.rb +1 -1
  7. data/test/controllers/api/tasks_controller_test.rb +10 -0
  8. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/ScheduledTasksCard/ScheduledTasksCard.scss +4 -0
  9. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.js +53 -0
  10. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.test.js +14 -0
  11. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.js +27 -19
  12. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.scss +14 -0
  13. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.test.js +1 -34
  14. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/{StoppedTasksCardHelper.js → StoppedTasksCardTable.js} +28 -1
  15. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js +54 -0
  16. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/OtherInfo.test.js.snap +48 -0
  17. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCard.test.js.snap +60 -1367
  18. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/StoppedTasksCardTable.test.js.snap +960 -0
  19. data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/__snapshots__/TasksCardsGrid.test.js.snap +14 -11
  20. data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardConstants.js +2 -0
  21. data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardSelectors.js +17 -11
  22. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardSelectors.test.js +26 -14
  23. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboard.test.js.snap +14 -11
  24. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardSelectors.test.js.snap +38 -22
  25. metadata +8 -3
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`OtherInfo render 1`] = `
4
+ <span
5
+ className=""
6
+ >
7
+ <OverlayTrigger
8
+ defaultOverlayShown={false}
9
+ overlay={
10
+ <Tooltip
11
+ bsClass="tooltip"
12
+ id="stopped-tooltip"
13
+ placement="right"
14
+ >
15
+ Other includes all stopped tasks that are cancelled or pending
16
+ </Tooltip>
17
+ }
18
+ placement="bottom"
19
+ trigger={
20
+ Array [
21
+ "hover",
22
+ "focus",
23
+ ]
24
+ }
25
+ >
26
+ <span>
27
+ <Icon
28
+ name="info"
29
+ type="pf"
30
+ />
31
+ <span>
32
+ Other:
33
+
34
+ </span>
35
+ </span>
36
+ </OverlayTrigger>
37
+ <Button
38
+ active={false}
39
+ block={false}
40
+ bsClass="btn"
41
+ bsStyle="link"
42
+ disabled={false}
43
+ onClick={[Function]}
44
+ >
45
+ 7
46
+ </Button>
47
+ </span>
48
+ `;
@@ -1,319 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`StoppedTasksCard render error-last selected 1`] = `
4
- <Card
5
- accented={false}
6
- aggregated={false}
7
- aggregatedMini={false}
8
- cardRef={null}
9
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
10
- id="stopped-tasks-card"
11
- matchHeight={false}
12
- >
13
- <CardTitle
14
- className=""
15
- onClick={[Function]}
16
- >
17
- Stopped
18
- </CardTitle>
19
- <CardBody
20
- className=""
21
- >
22
- <table
23
- className="table table-bordered table-striped stopped-table"
24
- >
25
- <thead>
26
- <tr>
27
- <th />
28
- <th>
29
- Total
30
- </th>
31
- <th>
32
- week
33
- </th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- <tr
38
- key="error"
39
- >
40
- <td>
41
- <Icon
42
- name="error-circle-o"
43
- type="pf"
44
- />
45
- Error
46
- </td>
47
- <td
48
- className="data-col not-focused"
49
- onClick={[Function]}
50
- >
51
- <Button
52
- active={false}
53
- block={false}
54
- bsClass="btn"
55
- bsStyle="link"
56
- disabled={false}
57
- >
58
- 0
59
- </Button>
60
- </td>
61
- <td
62
- className="data-col active"
63
- onClick={[Function]}
64
- >
65
- <Button
66
- active={false}
67
- block={false}
68
- bsClass="btn"
69
- bsStyle="link"
70
- disabled={false}
71
- >
72
- 0
73
- </Button>
74
- </td>
75
- </tr>
76
- <tr
77
- key="warning"
78
- >
79
- <td>
80
- <Icon
81
- name="warning-triangle-o"
82
- type="pf"
83
- />
84
- Warning
85
- </td>
86
- <td
87
- className="data-col not-focused"
88
- onClick={[Function]}
89
- >
90
- <Button
91
- active={false}
92
- block={false}
93
- bsClass="btn"
94
- bsStyle="link"
95
- disabled={false}
96
- >
97
- 0
98
- </Button>
99
- </td>
100
- <td
101
- className="data-col not-focused"
102
- onClick={[Function]}
103
- >
104
- <Button
105
- active={false}
106
- block={false}
107
- bsClass="btn"
108
- bsStyle="link"
109
- disabled={false}
110
- >
111
- 0
112
- </Button>
113
- </td>
114
- </tr>
115
- <tr
116
- key="success"
117
- >
118
- <td>
119
- <Icon
120
- name="ok"
121
- type="pf"
122
- />
123
- Success
124
- </td>
125
- <td
126
- className="data-col not-focused"
127
- onClick={[Function]}
128
- >
129
- <Button
130
- active={false}
131
- block={false}
132
- bsClass="btn"
133
- bsStyle="link"
134
- disabled={false}
135
- >
136
- 0
137
- </Button>
138
- </td>
139
- <td
140
- className="data-col not-focused"
141
- onClick={[Function]}
142
- >
143
- <Button
144
- active={false}
145
- block={false}
146
- bsClass="btn"
147
- bsStyle="link"
148
- disabled={false}
149
- >
150
- 0
151
- </Button>
152
- </td>
153
- </tr>
154
- </tbody>
155
- </table>
156
- </CardBody>
157
- </Card>
158
- `;
159
-
160
- exports[`StoppedTasksCard render error-total selected 1`] = `
161
- <Card
162
- accented={false}
163
- aggregated={false}
164
- aggregatedMini={false}
165
- cardRef={null}
166
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
167
- id="stopped-tasks-card"
168
- matchHeight={false}
169
- >
170
- <CardTitle
171
- className=""
172
- onClick={[Function]}
173
- >
174
- Stopped
175
- </CardTitle>
176
- <CardBody
177
- className=""
178
- >
179
- <table
180
- className="table table-bordered table-striped stopped-table"
181
- >
182
- <thead>
183
- <tr>
184
- <th />
185
- <th>
186
- Total
187
- </th>
188
- <th>
189
- 24h
190
- </th>
191
- </tr>
192
- </thead>
193
- <tbody>
194
- <tr
195
- key="error"
196
- >
197
- <td>
198
- <Icon
199
- name="error-circle-o"
200
- type="pf"
201
- />
202
- Error
203
- </td>
204
- <td
205
- className="data-col active"
206
- onClick={[Function]}
207
- >
208
- <Button
209
- active={false}
210
- block={false}
211
- bsClass="btn"
212
- bsStyle="link"
213
- disabled={false}
214
- >
215
- 0
216
- </Button>
217
- </td>
218
- <td
219
- className="data-col not-focused"
220
- onClick={[Function]}
221
- >
222
- <Button
223
- active={false}
224
- block={false}
225
- bsClass="btn"
226
- bsStyle="link"
227
- disabled={false}
228
- >
229
- 0
230
- </Button>
231
- </td>
232
- </tr>
233
- <tr
234
- key="warning"
235
- >
236
- <td>
237
- <Icon
238
- name="warning-triangle-o"
239
- type="pf"
240
- />
241
- Warning
242
- </td>
243
- <td
244
- className="data-col not-focused"
245
- onClick={[Function]}
246
- >
247
- <Button
248
- active={false}
249
- block={false}
250
- bsClass="btn"
251
- bsStyle="link"
252
- disabled={false}
253
- >
254
- 0
255
- </Button>
256
- </td>
257
- <td
258
- className="data-col not-focused"
259
- onClick={[Function]}
260
- >
261
- <Button
262
- active={false}
263
- block={false}
264
- bsClass="btn"
265
- bsStyle="link"
266
- disabled={false}
267
- >
268
- 0
269
- </Button>
270
- </td>
271
- </tr>
272
- <tr
273
- key="success"
274
- >
275
- <td>
276
- <Icon
277
- name="ok"
278
- type="pf"
279
- />
280
- Success
281
- </td>
282
- <td
283
- className="data-col not-focused"
284
- onClick={[Function]}
285
- >
286
- <Button
287
- active={false}
288
- block={false}
289
- bsClass="btn"
290
- bsStyle="link"
291
- disabled={false}
292
- >
293
- 0
294
- </Button>
295
- </td>
296
- <td
297
- className="data-col not-focused"
298
- onClick={[Function]}
299
- >
300
- <Button
301
- active={false}
302
- block={false}
303
- bsClass="btn"
304
- bsStyle="link"
305
- disabled={false}
306
- >
307
- 0
308
- </Button>
309
- </td>
310
- </tr>
311
- </tbody>
312
- </table>
313
- </CardBody>
314
- </Card>
315
- `;
316
-
317
3
  exports[`StoppedTasksCard render selected 1`] = `
318
4
  <Card
319
5
  accented={false}
@@ -333,768 +19,40 @@ exports[`StoppedTasksCard render selected 1`] = `
333
19
  <CardBody
334
20
  className=""
335
21
  >
336
- <table
337
- className="table table-bordered table-striped stopped-table"
338
- >
339
- <thead>
340
- <tr>
341
- <th />
342
- <th>
343
- Total
344
- </th>
345
- <th>
346
- 24h
347
- </th>
348
- </tr>
349
- </thead>
350
- <tbody>
351
- <tr
352
- key="error"
353
- >
354
- <td>
355
- <Icon
356
- name="error-circle-o"
357
- type="pf"
358
- />
359
- Error
360
- </td>
361
- <td
362
- className="data-col"
363
- onClick={[Function]}
364
- >
365
- <Button
366
- active={false}
367
- block={false}
368
- bsClass="btn"
369
- bsStyle="link"
370
- disabled={false}
371
- >
372
- 0
373
- </Button>
374
- </td>
375
- <td
376
- className="data-col"
377
- onClick={[Function]}
378
- >
379
- <Button
380
- active={false}
381
- block={false}
382
- bsClass="btn"
383
- bsStyle="link"
384
- disabled={false}
385
- >
386
- 0
387
- </Button>
388
- </td>
389
- </tr>
390
- <tr
391
- key="warning"
392
- >
393
- <td>
394
- <Icon
395
- name="warning-triangle-o"
396
- type="pf"
397
- />
398
- Warning
399
- </td>
400
- <td
401
- className="data-col"
402
- onClick={[Function]}
403
- >
404
- <Button
405
- active={false}
406
- block={false}
407
- bsClass="btn"
408
- bsStyle="link"
409
- disabled={false}
410
- >
411
- 0
412
- </Button>
413
- </td>
414
- <td
415
- className="data-col"
416
- onClick={[Function]}
417
- >
418
- <Button
419
- active={false}
420
- block={false}
421
- bsClass="btn"
422
- bsStyle="link"
423
- disabled={false}
424
- >
425
- 0
426
- </Button>
427
- </td>
428
- </tr>
429
- <tr
430
- key="success"
431
- >
432
- <td>
433
- <Icon
434
- name="ok"
435
- type="pf"
436
- />
437
- Success
438
- </td>
439
- <td
440
- className="data-col"
441
- onClick={[Function]}
442
- >
443
- <Button
444
- active={false}
445
- block={false}
446
- bsClass="btn"
447
- bsStyle="link"
448
- disabled={false}
449
- >
450
- 0
451
- </Button>
452
- </td>
453
- <td
454
- className="data-col"
455
- onClick={[Function]}
456
- >
457
- <Button
458
- active={false}
459
- block={false}
460
- bsClass="btn"
461
- bsStyle="link"
462
- disabled={false}
463
- >
464
- 0
465
- </Button>
466
- </td>
467
- </tr>
468
- </tbody>
469
- </table>
470
- </CardBody>
471
- </Card>
472
- `;
473
-
474
- exports[`StoppedTasksCard render success-last selected 1`] = `
475
- <Card
476
- accented={false}
477
- aggregated={false}
478
- aggregatedMini={false}
479
- cardRef={null}
480
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
481
- id="stopped-tasks-card"
482
- matchHeight={false}
483
- >
484
- <CardTitle
485
- className=""
486
- onClick={[Function]}
487
- >
488
- Stopped
489
- </CardTitle>
490
- <CardBody
491
- className=""
492
- >
493
- <table
494
- className="table table-bordered table-striped stopped-table"
495
- >
496
- <thead>
497
- <tr>
498
- <th />
499
- <th>
500
- Total
501
- </th>
502
- <th>
503
- week
504
- </th>
505
- </tr>
506
- </thead>
507
- <tbody>
508
- <tr
509
- key="error"
510
- >
511
- <td>
512
- <Icon
513
- name="error-circle-o"
514
- type="pf"
515
- />
516
- Error
517
- </td>
518
- <td
519
- className="data-col not-focused"
520
- onClick={[Function]}
521
- >
522
- <Button
523
- active={false}
524
- block={false}
525
- bsClass="btn"
526
- bsStyle="link"
527
- disabled={false}
528
- >
529
- 0
530
- </Button>
531
- </td>
532
- <td
533
- className="data-col not-focused"
534
- onClick={[Function]}
535
- >
536
- <Button
537
- active={false}
538
- block={false}
539
- bsClass="btn"
540
- bsStyle="link"
541
- disabled={false}
542
- >
543
- 0
544
- </Button>
545
- </td>
546
- </tr>
547
- <tr
548
- key="warning"
549
- >
550
- <td>
551
- <Icon
552
- name="warning-triangle-o"
553
- type="pf"
554
- />
555
- Warning
556
- </td>
557
- <td
558
- className="data-col not-focused"
559
- onClick={[Function]}
560
- >
561
- <Button
562
- active={false}
563
- block={false}
564
- bsClass="btn"
565
- bsStyle="link"
566
- disabled={false}
567
- >
568
- 0
569
- </Button>
570
- </td>
571
- <td
572
- className="data-col not-focused"
573
- onClick={[Function]}
574
- >
575
- <Button
576
- active={false}
577
- block={false}
578
- bsClass="btn"
579
- bsStyle="link"
580
- disabled={false}
581
- >
582
- 0
583
- </Button>
584
- </td>
585
- </tr>
586
- <tr
587
- key="success"
588
- >
589
- <td>
590
- <Icon
591
- name="ok"
592
- type="pf"
593
- />
594
- Success
595
- </td>
596
- <td
597
- className="data-col not-focused"
598
- onClick={[Function]}
599
- >
600
- <Button
601
- active={false}
602
- block={false}
603
- bsClass="btn"
604
- bsStyle="link"
605
- disabled={false}
606
- >
607
- 0
608
- </Button>
609
- </td>
610
- <td
611
- className="data-col active"
612
- onClick={[Function]}
613
- >
614
- <Button
615
- active={false}
616
- block={false}
617
- bsClass="btn"
618
- bsStyle="link"
619
- disabled={false}
620
- >
621
- 0
622
- </Button>
623
- </td>
624
- </tr>
625
- </tbody>
626
- </table>
627
- </CardBody>
628
- </Card>
629
- `;
630
-
631
- exports[`StoppedTasksCard render success-total selected 1`] = `
632
- <Card
633
- accented={false}
634
- aggregated={false}
635
- aggregatedMini={false}
636
- cardRef={null}
637
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
638
- id="stopped-tasks-card"
639
- matchHeight={false}
640
- >
641
- <CardTitle
642
- className=""
643
- onClick={[Function]}
644
- >
645
- Stopped
646
- </CardTitle>
647
- <CardBody
648
- className=""
649
- >
650
- <table
651
- className="table table-bordered table-striped stopped-table"
652
- >
653
- <thead>
654
- <tr>
655
- <th />
656
- <th>
657
- Total
658
- </th>
659
- <th>
660
- 24h
661
- </th>
662
- </tr>
663
- </thead>
664
- <tbody>
665
- <tr
666
- key="error"
667
- >
668
- <td>
669
- <Icon
670
- name="error-circle-o"
671
- type="pf"
672
- />
673
- Error
674
- </td>
675
- <td
676
- className="data-col not-focused"
677
- onClick={[Function]}
678
- >
679
- <Button
680
- active={false}
681
- block={false}
682
- bsClass="btn"
683
- bsStyle="link"
684
- disabled={false}
685
- >
686
- 0
687
- </Button>
688
- </td>
689
- <td
690
- className="data-col not-focused"
691
- onClick={[Function]}
692
- >
693
- <Button
694
- active={false}
695
- block={false}
696
- bsClass="btn"
697
- bsStyle="link"
698
- disabled={false}
699
- >
700
- 0
701
- </Button>
702
- </td>
703
- </tr>
704
- <tr
705
- key="warning"
706
- >
707
- <td>
708
- <Icon
709
- name="warning-triangle-o"
710
- type="pf"
711
- />
712
- Warning
713
- </td>
714
- <td
715
- className="data-col not-focused"
716
- onClick={[Function]}
717
- >
718
- <Button
719
- active={false}
720
- block={false}
721
- bsClass="btn"
722
- bsStyle="link"
723
- disabled={false}
724
- >
725
- 0
726
- </Button>
727
- </td>
728
- <td
729
- className="data-col not-focused"
730
- onClick={[Function]}
731
- >
732
- <Button
733
- active={false}
734
- block={false}
735
- bsClass="btn"
736
- bsStyle="link"
737
- disabled={false}
738
- >
739
- 0
740
- </Button>
741
- </td>
742
- </tr>
743
- <tr
744
- key="success"
745
- >
746
- <td>
747
- <Icon
748
- name="ok"
749
- type="pf"
750
- />
751
- Success
752
- </td>
753
- <td
754
- className="data-col active"
755
- onClick={[Function]}
756
- >
757
- <Button
758
- active={false}
759
- block={false}
760
- bsClass="btn"
761
- bsStyle="link"
762
- disabled={false}
763
- >
764
- 0
765
- </Button>
766
- </td>
767
- <td
768
- className="data-col not-focused"
769
- onClick={[Function]}
770
- >
771
- <Button
772
- active={false}
773
- block={false}
774
- bsClass="btn"
775
- bsStyle="link"
776
- disabled={false}
777
- >
778
- 0
779
- </Button>
780
- </td>
781
- </tr>
782
- </tbody>
783
- </table>
784
- </CardBody>
785
- </Card>
786
- `;
787
-
788
- exports[`StoppedTasksCard render warning-last selected 1`] = `
789
- <Card
790
- accented={false}
791
- aggregated={false}
792
- aggregatedMini={false}
793
- cardRef={null}
794
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
795
- id="stopped-tasks-card"
796
- matchHeight={false}
797
- >
798
- <CardTitle
799
- className=""
800
- onClick={[Function]}
801
- >
802
- Stopped
803
- </CardTitle>
804
- <CardBody
805
- className=""
806
- >
807
- <table
808
- className="table table-bordered table-striped stopped-table"
809
- >
810
- <thead>
811
- <tr>
812
- <th />
813
- <th>
814
- Total
815
- </th>
816
- <th>
817
- week
818
- </th>
819
- </tr>
820
- </thead>
821
- <tbody>
822
- <tr
823
- key="error"
824
- >
825
- <td>
826
- <Icon
827
- name="error-circle-o"
828
- type="pf"
829
- />
830
- Error
831
- </td>
832
- <td
833
- className="data-col not-focused"
834
- onClick={[Function]}
835
- >
836
- <Button
837
- active={false}
838
- block={false}
839
- bsClass="btn"
840
- bsStyle="link"
841
- disabled={false}
842
- >
843
- 0
844
- </Button>
845
- </td>
846
- <td
847
- className="data-col not-focused"
848
- onClick={[Function]}
849
- >
850
- <Button
851
- active={false}
852
- block={false}
853
- bsClass="btn"
854
- bsStyle="link"
855
- disabled={false}
856
- >
857
- 0
858
- </Button>
859
- </td>
860
- </tr>
861
- <tr
862
- key="warning"
863
- >
864
- <td>
865
- <Icon
866
- name="warning-triangle-o"
867
- type="pf"
868
- />
869
- Warning
870
- </td>
871
- <td
872
- className="data-col not-focused"
873
- onClick={[Function]}
874
- >
875
- <Button
876
- active={false}
877
- block={false}
878
- bsClass="btn"
879
- bsStyle="link"
880
- disabled={false}
881
- >
882
- 0
883
- </Button>
884
- </td>
885
- <td
886
- className="data-col active"
887
- onClick={[Function]}
888
- >
889
- <Button
890
- active={false}
891
- block={false}
892
- bsClass="btn"
893
- bsStyle="link"
894
- disabled={false}
895
- >
896
- 0
897
- </Button>
898
- </td>
899
- </tr>
900
- <tr
901
- key="success"
902
- >
903
- <td>
904
- <Icon
905
- name="ok"
906
- type="pf"
907
- />
908
- Success
909
- </td>
910
- <td
911
- className="data-col not-focused"
912
- onClick={[Function]}
913
- >
914
- <Button
915
- active={false}
916
- block={false}
917
- bsClass="btn"
918
- bsStyle="link"
919
- disabled={false}
920
- >
921
- 0
922
- </Button>
923
- </td>
924
- <td
925
- className="data-col not-focused"
926
- onClick={[Function]}
927
- >
928
- <Button
929
- active={false}
930
- block={false}
931
- bsClass="btn"
932
- bsStyle="link"
933
- disabled={false}
934
- >
935
- 0
936
- </Button>
937
- </td>
938
- </tr>
939
- </tbody>
940
- </table>
941
- </CardBody>
942
- </Card>
943
- `;
944
-
945
- exports[`StoppedTasksCard render warning-total selected 1`] = `
946
- <Card
947
- accented={false}
948
- aggregated={false}
949
- aggregatedMini={false}
950
- cardRef={null}
951
- className="tasks-donut-card stopped-tasks-card selected-tasks-card"
952
- id="stopped-tasks-card"
953
- matchHeight={false}
954
- >
955
- <CardTitle
956
- className=""
957
- onClick={[Function]}
958
- >
959
- Stopped
960
- </CardTitle>
961
- <CardBody
962
- className=""
963
- >
964
- <table
965
- className="table table-bordered table-striped stopped-table"
966
- >
967
- <thead>
968
- <tr>
969
- <th />
970
- <th>
971
- Total
972
- </th>
973
- <th>
974
- 24h
975
- </th>
976
- </tr>
977
- </thead>
978
- <tbody>
979
- <tr
980
- key="error"
981
- >
982
- <td>
983
- <Icon
984
- name="error-circle-o"
985
- type="pf"
986
- />
987
- Error
988
- </td>
989
- <td
990
- className="data-col not-focused"
991
- onClick={[Function]}
992
- >
993
- <Button
994
- active={false}
995
- block={false}
996
- bsClass="btn"
997
- bsStyle="link"
998
- disabled={false}
999
- >
1000
- 0
1001
- </Button>
1002
- </td>
1003
- <td
1004
- className="data-col not-focused"
1005
- onClick={[Function]}
1006
- >
1007
- <Button
1008
- active={false}
1009
- block={false}
1010
- bsClass="btn"
1011
- bsStyle="link"
1012
- disabled={false}
1013
- >
1014
- 0
1015
- </Button>
1016
- </td>
1017
- </tr>
1018
- <tr
1019
- key="warning"
1020
- >
1021
- <td>
1022
- <Icon
1023
- name="warning-triangle-o"
1024
- type="pf"
1025
- />
1026
- Warning
1027
- </td>
1028
- <td
1029
- className="data-col active"
1030
- onClick={[Function]}
1031
- >
1032
- <Button
1033
- active={false}
1034
- block={false}
1035
- bsClass="btn"
1036
- bsStyle="link"
1037
- disabled={false}
1038
- >
1039
- 0
1040
- </Button>
1041
- </td>
1042
- <td
1043
- className="data-col not-focused"
1044
- onClick={[Function]}
1045
- >
1046
- <Button
1047
- active={false}
1048
- block={false}
1049
- bsClass="btn"
1050
- bsStyle="link"
1051
- disabled={false}
1052
- >
1053
- 0
1054
- </Button>
1055
- </td>
1056
- </tr>
1057
- <tr
1058
- key="success"
1059
- >
1060
- <td>
1061
- <Icon
1062
- name="ok"
1063
- type="pf"
1064
- />
1065
- Success
1066
- </td>
1067
- <td
1068
- className="data-col not-focused"
1069
- onClick={[Function]}
1070
- >
1071
- <Button
1072
- active={false}
1073
- block={false}
1074
- bsClass="btn"
1075
- bsStyle="link"
1076
- disabled={false}
1077
- >
1078
- 0
1079
- </Button>
1080
- </td>
1081
- <td
1082
- className="data-col not-focused"
1083
- onClick={[Function]}
1084
- >
1085
- <Button
1086
- active={false}
1087
- block={false}
1088
- bsClass="btn"
1089
- bsStyle="link"
1090
- disabled={false}
1091
- >
1092
- 0
1093
- </Button>
1094
- </td>
1095
- </tr>
1096
- </tbody>
1097
- </table>
22
+ <StoppedTable
23
+ data={
24
+ Object {
25
+ "error": Object {
26
+ "last": 0,
27
+ "total": 0,
28
+ },
29
+ "success": Object {
30
+ "last": 0,
31
+ "total": 0,
32
+ },
33
+ "warning": Object {
34
+ "last": 0,
35
+ "total": 0,
36
+ },
37
+ }
38
+ }
39
+ query={
40
+ Object {
41
+ "state": "stopped",
42
+ }
43
+ }
44
+ time="H24"
45
+ updateQuery={[Function]}
46
+ />
47
+ <OtherInfo
48
+ otherCount={0}
49
+ query={
50
+ Object {
51
+ "state": "stopped",
52
+ }
53
+ }
54
+ updateQuery={[Function]}
55
+ />
1098
56
  </CardBody>
1099
57
  </Card>
1100
58
  `;
@@ -1118,297 +76,32 @@ exports[`StoppedTasksCard render with minimal props 1`] = `
1118
76
  <CardBody
1119
77
  className=""
1120
78
  >
1121
- <table
1122
- className="table table-bordered table-striped stopped-table"
1123
- >
1124
- <thead>
1125
- <tr>
1126
- <th />
1127
- <th>
1128
- Total
1129
- </th>
1130
- <th>
1131
- 24h
1132
- </th>
1133
- </tr>
1134
- </thead>
1135
- <tbody>
1136
- <tr
1137
- key="error"
1138
- >
1139
- <td>
1140
- <Icon
1141
- name="error-circle-o"
1142
- type="pf"
1143
- />
1144
- Error
1145
- </td>
1146
- <td
1147
- className="data-col"
1148
- onClick={[Function]}
1149
- >
1150
- <Button
1151
- active={false}
1152
- block={false}
1153
- bsClass="btn"
1154
- bsStyle="link"
1155
- disabled={false}
1156
- >
1157
- 0
1158
- </Button>
1159
- </td>
1160
- <td
1161
- className="data-col"
1162
- onClick={[Function]}
1163
- >
1164
- <Button
1165
- active={false}
1166
- block={false}
1167
- bsClass="btn"
1168
- bsStyle="link"
1169
- disabled={false}
1170
- >
1171
- 0
1172
- </Button>
1173
- </td>
1174
- </tr>
1175
- <tr
1176
- key="warning"
1177
- >
1178
- <td>
1179
- <Icon
1180
- name="warning-triangle-o"
1181
- type="pf"
1182
- />
1183
- Warning
1184
- </td>
1185
- <td
1186
- className="data-col"
1187
- onClick={[Function]}
1188
- >
1189
- <Button
1190
- active={false}
1191
- block={false}
1192
- bsClass="btn"
1193
- bsStyle="link"
1194
- disabled={false}
1195
- >
1196
- 0
1197
- </Button>
1198
- </td>
1199
- <td
1200
- className="data-col"
1201
- onClick={[Function]}
1202
- >
1203
- <Button
1204
- active={false}
1205
- block={false}
1206
- bsClass="btn"
1207
- bsStyle="link"
1208
- disabled={false}
1209
- >
1210
- 0
1211
- </Button>
1212
- </td>
1213
- </tr>
1214
- <tr
1215
- key="success"
1216
- >
1217
- <td>
1218
- <Icon
1219
- name="ok"
1220
- type="pf"
1221
- />
1222
- Success
1223
- </td>
1224
- <td
1225
- className="data-col"
1226
- onClick={[Function]}
1227
- >
1228
- <Button
1229
- active={false}
1230
- block={false}
1231
- bsClass="btn"
1232
- bsStyle="link"
1233
- disabled={false}
1234
- >
1235
- 0
1236
- </Button>
1237
- </td>
1238
- <td
1239
- className="data-col"
1240
- onClick={[Function]}
1241
- >
1242
- <Button
1243
- active={false}
1244
- block={false}
1245
- bsClass="btn"
1246
- bsStyle="link"
1247
- disabled={false}
1248
- >
1249
- 0
1250
- </Button>
1251
- </td>
1252
- </tr>
1253
- </tbody>
1254
- </table>
1255
- </CardBody>
1256
- </Card>
1257
- `;
1258
-
1259
- exports[`StoppedTasksCard render with props 1`] = `
1260
- <Card
1261
- accented={false}
1262
- aggregated={false}
1263
- aggregatedMini={false}
1264
- cardRef={null}
1265
- className="tasks-donut-card stopped-tasks-card"
1266
- id="stopped-tasks-card"
1267
- matchHeight={false}
1268
- >
1269
- <CardTitle
1270
- className=""
1271
- onClick={[Function]}
1272
- >
1273
- Stopped
1274
- </CardTitle>
1275
- <CardBody
1276
- className=""
1277
- >
1278
- <table
1279
- className="table table-bordered table-striped stopped-table"
1280
- >
1281
- <thead>
1282
- <tr>
1283
- <th />
1284
- <th>
1285
- Total
1286
- </th>
1287
- <th>
1288
- week
1289
- </th>
1290
- </tr>
1291
- </thead>
1292
- <tbody>
1293
- <tr
1294
- key="error"
1295
- >
1296
- <td>
1297
- <Icon
1298
- name="error-circle-o"
1299
- type="pf"
1300
- />
1301
- Error
1302
- </td>
1303
- <td
1304
- className="data-col"
1305
- onClick={[Function]}
1306
- >
1307
- <Button
1308
- active={false}
1309
- block={false}
1310
- bsClass="btn"
1311
- bsStyle="link"
1312
- disabled={false}
1313
- >
1314
- 9
1315
- </Button>
1316
- </td>
1317
- <td
1318
- className="data-col"
1319
- onClick={[Function]}
1320
- >
1321
- <Button
1322
- active={false}
1323
- block={false}
1324
- bsClass="btn"
1325
- bsStyle="link"
1326
- disabled={false}
1327
- >
1328
- 1
1329
- </Button>
1330
- </td>
1331
- </tr>
1332
- <tr
1333
- key="warning"
1334
- >
1335
- <td>
1336
- <Icon
1337
- name="warning-triangle-o"
1338
- type="pf"
1339
- />
1340
- Warning
1341
- </td>
1342
- <td
1343
- className="data-col"
1344
- onClick={[Function]}
1345
- >
1346
- <Button
1347
- active={false}
1348
- block={false}
1349
- bsClass="btn"
1350
- bsStyle="link"
1351
- disabled={false}
1352
- >
1353
- 8
1354
- </Button>
1355
- </td>
1356
- <td
1357
- className="data-col"
1358
- onClick={[Function]}
1359
- >
1360
- <Button
1361
- active={false}
1362
- block={false}
1363
- bsClass="btn"
1364
- bsStyle="link"
1365
- disabled={false}
1366
- >
1367
- 2
1368
- </Button>
1369
- </td>
1370
- </tr>
1371
- <tr
1372
- key="success"
1373
- >
1374
- <td>
1375
- <Icon
1376
- name="ok"
1377
- type="pf"
1378
- />
1379
- Success
1380
- </td>
1381
- <td
1382
- className="data-col"
1383
- onClick={[Function]}
1384
- >
1385
- <Button
1386
- active={false}
1387
- block={false}
1388
- bsClass="btn"
1389
- bsStyle="link"
1390
- disabled={false}
1391
- >
1392
- 7
1393
- </Button>
1394
- </td>
1395
- <td
1396
- className="data-col"
1397
- onClick={[Function]}
1398
- >
1399
- <Button
1400
- active={false}
1401
- block={false}
1402
- bsClass="btn"
1403
- bsStyle="link"
1404
- disabled={false}
1405
- >
1406
- 3
1407
- </Button>
1408
- </td>
1409
- </tr>
1410
- </tbody>
1411
- </table>
79
+ <StoppedTable
80
+ data={
81
+ Object {
82
+ "error": Object {
83
+ "last": 0,
84
+ "total": 0,
85
+ },
86
+ "success": Object {
87
+ "last": 0,
88
+ "total": 0,
89
+ },
90
+ "warning": Object {
91
+ "last": 0,
92
+ "total": 0,
93
+ },
94
+ }
95
+ }
96
+ query={Object {}}
97
+ time="H24"
98
+ updateQuery={[Function]}
99
+ />
100
+ <OtherInfo
101
+ otherCount={0}
102
+ query={Object {}}
103
+ updateQuery={[Function]}
104
+ />
1412
105
  </CardBody>
1413
106
  </Card>
1414
107
  `;