foreman_acd 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +619 -0
  3. data/README.md +87 -0
  4. data/Rakefile +49 -0
  5. data/app/assets/javascripts/foreman_acd/acd_dummy.js +3 -0
  6. data/app/controllers/foreman_acd/api/v2/app_definitions_controller.rb +55 -0
  7. data/app/controllers/foreman_acd/api/v2/base_controller.rb +16 -0
  8. data/app/controllers/foreman_acd/app_definitions_controller.rb +53 -0
  9. data/app/controllers/foreman_acd/app_instances_controller.rb +158 -0
  10. data/app/controllers/foreman_acd/application_controller.rb +10 -0
  11. data/app/controllers/foreman_acd/concerns/app_definition_parameters.rb +23 -0
  12. data/app/controllers/foreman_acd/concerns/app_instance_parameters.rb +23 -0
  13. data/app/controllers/ui_acd_controller.rb +30 -0
  14. data/app/models/foreman_acd/app_definition.rb +23 -0
  15. data/app/models/foreman_acd/app_instance.rb +21 -0
  16. data/app/views/foreman_acd/app_definitions/_form.html.erb +40 -0
  17. data/app/views/foreman_acd/app_definitions/edit.html.erb +11 -0
  18. data/app/views/foreman_acd/app_definitions/index.html.erb +27 -0
  19. data/app/views/foreman_acd/app_definitions/new.html.erb +10 -0
  20. data/app/views/foreman_acd/app_instances/_form.html.erb +46 -0
  21. data/app/views/foreman_acd/app_instances/edit.html.erb +11 -0
  22. data/app/views/foreman_acd/app_instances/index.html.erb +30 -0
  23. data/app/views/foreman_acd/app_instances/new.html.erb +11 -0
  24. data/app/views/ui_acd/app.json.rabl +9 -0
  25. data/app/views/ui_acd/app_definition.json.rabl +5 -0
  26. data/app/views/ui_acd/computeprofile.json.rabl +4 -0
  27. data/app/views/ui_acd/domain.json.rabl +4 -0
  28. data/app/views/ui_acd/environment.json.rabl +4 -0
  29. data/app/views/ui_acd/fdata.json.rabl +24 -0
  30. data/app/views/ui_acd/lifecycle_environment.json.rabl +4 -0
  31. data/app/views/ui_acd/ptable.json.rabl +4 -0
  32. data/config/routes.rb +24 -0
  33. data/db/migrate/20190610202252_create_app_definitions.rb +19 -0
  34. data/db/migrate/20190625140305_create_app_instances.rb +19 -0
  35. data/lib/foreman_acd/engine.rb +43 -0
  36. data/lib/foreman_acd/plugin.rb +80 -0
  37. data/lib/foreman_acd/version.rb +5 -0
  38. data/lib/foreman_acd.rb +7 -0
  39. data/lib/tasks/foreman_acd_tasks.rake +47 -0
  40. data/locale/Makefile +60 -0
  41. data/locale/en/foreman_acd.po +19 -0
  42. data/locale/foreman_acd.pot +19 -0
  43. data/locale/gemspec.rb +2 -0
  44. data/package.json +121 -0
  45. data/test/controllers/app_definitions_controller_test.rb +24 -0
  46. data/test/controllers/app_instances_controller_test.rb +24 -0
  47. data/test/controllers/ui_acd_controller_test.rb +26 -0
  48. data/test/factories/foreman_acd_factories.rb +17 -0
  49. data/test/models/app_definition_test.rb +11 -0
  50. data/test/models/app_instance_test.rb +8 -0
  51. data/test/test_plugin_helper.rb +8 -0
  52. data/webpack/__mocks__/foremanReact/components/common/forms/Select.js +2 -0
  53. data/webpack/components/ParameterSelection/ParameterSelection.js +468 -0
  54. data/webpack/components/ParameterSelection/ParameterSelection.scss +3 -0
  55. data/webpack/components/ParameterSelection/ParameterSelectionActions.js +294 -0
  56. data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +31 -0
  57. data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +52 -0
  58. data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +175 -0
  59. data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +15 -0
  60. data/webpack/components/ParameterSelection/__fixtures__/parameterSelection.fixtures.js +162 -0
  61. data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +194 -0
  62. data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +127 -0
  63. data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +48 -0
  64. data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +150 -0
  65. data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +47 -0
  66. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +454 -0
  67. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +2265 -0
  68. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +209 -0
  69. data/webpack/components/ParameterSelection/index.js +39 -0
  70. data/webpack/index.js +8 -0
  71. data/webpack/reducer.js +7 -0
  72. data/webpack/test_setup.js +11 -0
  73. metadata +206 -0
@@ -0,0 +1,2265 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ParameterSelectionReducer should activate edit parameter 1`] = `
4
+ Object {
5
+ "appDefinition": Object {
6
+ "hostgroup_id": 1,
7
+ "id": 1,
8
+ "name": "Test123",
9
+ },
10
+ "columns": Array [
11
+ Object {
12
+ "header": Object {
13
+ "label": "Name",
14
+ "props": Object {
15
+ "index": 0,
16
+ "sort": true,
17
+ "style": Object {
18
+ "width": "20%",
19
+ },
20
+ },
21
+ },
22
+ "property": "name",
23
+ },
24
+ Object {
25
+ "cell": Object {
26
+ "props": Object {
27
+ "index": 1,
28
+ },
29
+ },
30
+ "header": Object {
31
+ "label": "Description",
32
+ "props": Object {
33
+ "index": 1,
34
+ "sort": true,
35
+ "style": Object {
36
+ "width": "25%",
37
+ },
38
+ },
39
+ },
40
+ "property": "description",
41
+ },
42
+ Object {
43
+ "cell": Object {
44
+ "props": Object {
45
+ "index": 2,
46
+ },
47
+ },
48
+ "header": Object {
49
+ "label": "Type",
50
+ "props": Object {
51
+ "index": 2,
52
+ "sort": true,
53
+ "style": Object {
54
+ "width": "20%",
55
+ },
56
+ },
57
+ },
58
+ "property": "type",
59
+ },
60
+ Object {
61
+ "cell": Object {
62
+ "props": Object {
63
+ "index": 3,
64
+ },
65
+ },
66
+ "header": Object {
67
+ "label": "Default value",
68
+ "props": Object {
69
+ "index": 3,
70
+ "sort": true,
71
+ "style": Object {
72
+ "width": "25%",
73
+ },
74
+ },
75
+ },
76
+ "property": "value",
77
+ },
78
+ Object {
79
+ "cell": Object {
80
+ "props": Object {
81
+ "index": 4,
82
+ },
83
+ },
84
+ "header": Object {
85
+ "label": "Actions",
86
+ "props": Object {
87
+ "index": 4,
88
+ },
89
+ },
90
+ "property": "actions",
91
+ },
92
+ ],
93
+ "editMode": true,
94
+ "error": Object {
95
+ "errorMsg": "",
96
+ "status": "",
97
+ "statusText": "",
98
+ },
99
+ "foremanData": Object {
100
+ "computeprofiles": Array [],
101
+ "domains": Array [],
102
+ "environments": Array [
103
+ Object {
104
+ "id": 1,
105
+ "name": "production",
106
+ },
107
+ Object {
108
+ "id": 2,
109
+ "name": "test",
110
+ },
111
+ ],
112
+ "hostgroup_id": 1,
113
+ "lifecycle_environments": Array [],
114
+ "ptables": Array [
115
+ Object {
116
+ "id": 105,
117
+ "name": "Kickstart default",
118
+ },
119
+ Object {
120
+ "id": 104,
121
+ "name": "Kickstart default thin",
122
+ },
123
+ ],
124
+ },
125
+ "hostgroupId": 1,
126
+ "loading": false,
127
+ "parameterTypes": Object {
128
+ "computeprofile": "Compute profile",
129
+ "domain": "Domain",
130
+ "hostparam": "Host parameter",
131
+ "lifecycleenv": "Lifecycle environment",
132
+ },
133
+ "rows": Array [
134
+ Object {
135
+ "description": "",
136
+ "id": 1,
137
+ "name": "PuppetEnv",
138
+ "type": "puppetenv",
139
+ "value": "2",
140
+ },
141
+ Object {
142
+ "description": "",
143
+ "id": 2,
144
+ "name": "PW",
145
+ "type": "password",
146
+ "value": "rooot",
147
+ },
148
+ Object {
149
+ "description": "",
150
+ "id": 3,
151
+ "name": "Blub",
152
+ "type": "hostparam",
153
+ "value": "awesome",
154
+ },
155
+ Object {
156
+ "description": "",
157
+ "id": 4,
158
+ "name": "111allo",
159
+ "type": "ip",
160
+ "value": "1.1.1.1",
161
+ },
162
+ Object {
163
+ "backup": Object {
164
+ "description": "",
165
+ "id": 5,
166
+ "name": "1111aasdfasf",
167
+ "type": "hostname",
168
+ "value": "dername",
169
+ },
170
+ "description": "",
171
+ "id": 5,
172
+ "name": "1111aasdfasf",
173
+ "type": "hostname",
174
+ "value": "dername",
175
+ },
176
+ Object {
177
+ "description": "",
178
+ "id": 6,
179
+ "name": "222nocheiner",
180
+ "type": "hostparam",
181
+ "value": "",
182
+ },
183
+ Object {
184
+ "description": "aa",
185
+ "id": 7,
186
+ "name": "aaaaa",
187
+ "type": "ptable",
188
+ "value": "",
189
+ },
190
+ Object {
191
+ "description": "",
192
+ "id": 8,
193
+ "name": "aaa",
194
+ "type": "hostparam",
195
+ "value": "2134234",
196
+ },
197
+ ],
198
+ "sortingColumns": Object {
199
+ "name": Object {
200
+ "direction": "asc",
201
+ "position": 0,
202
+ },
203
+ },
204
+ }
205
+ `;
206
+
207
+ exports[`ParameterSelectionReducer should add a parameter 1`] = `
208
+ Object {
209
+ "appDefinition": Object {
210
+ "hostgroup_id": 1,
211
+ "id": 1,
212
+ "name": "Test123",
213
+ },
214
+ "columns": Array [
215
+ Object {
216
+ "header": Object {
217
+ "label": "Name",
218
+ "props": Object {
219
+ "index": 0,
220
+ "sort": true,
221
+ "style": Object {
222
+ "width": "20%",
223
+ },
224
+ },
225
+ },
226
+ "property": "name",
227
+ },
228
+ Object {
229
+ "cell": Object {
230
+ "props": Object {
231
+ "index": 1,
232
+ },
233
+ },
234
+ "header": Object {
235
+ "label": "Description",
236
+ "props": Object {
237
+ "index": 1,
238
+ "sort": true,
239
+ "style": Object {
240
+ "width": "25%",
241
+ },
242
+ },
243
+ },
244
+ "property": "description",
245
+ },
246
+ Object {
247
+ "cell": Object {
248
+ "props": Object {
249
+ "index": 2,
250
+ },
251
+ },
252
+ "header": Object {
253
+ "label": "Type",
254
+ "props": Object {
255
+ "index": 2,
256
+ "sort": true,
257
+ "style": Object {
258
+ "width": "20%",
259
+ },
260
+ },
261
+ },
262
+ "property": "type",
263
+ },
264
+ Object {
265
+ "cell": Object {
266
+ "props": Object {
267
+ "index": 3,
268
+ },
269
+ },
270
+ "header": Object {
271
+ "label": "Default value",
272
+ "props": Object {
273
+ "index": 3,
274
+ "sort": true,
275
+ "style": Object {
276
+ "width": "25%",
277
+ },
278
+ },
279
+ },
280
+ "property": "value",
281
+ },
282
+ Object {
283
+ "cell": Object {
284
+ "props": Object {
285
+ "index": 4,
286
+ },
287
+ },
288
+ "header": Object {
289
+ "label": "Actions",
290
+ "props": Object {
291
+ "index": 4,
292
+ },
293
+ },
294
+ "property": "actions",
295
+ },
296
+ ],
297
+ "editMode": true,
298
+ "error": Object {
299
+ "errorMsg": "",
300
+ "status": "",
301
+ "statusText": "",
302
+ },
303
+ "foremanData": Object {
304
+ "computeprofiles": Array [],
305
+ "domains": Array [],
306
+ "environments": Array [
307
+ Object {
308
+ "id": 1,
309
+ "name": "production",
310
+ },
311
+ Object {
312
+ "id": 2,
313
+ "name": "test",
314
+ },
315
+ ],
316
+ "hostgroup_id": 1,
317
+ "lifecycle_environments": Array [],
318
+ "ptables": Array [
319
+ Object {
320
+ "id": 105,
321
+ "name": "Kickstart default",
322
+ },
323
+ Object {
324
+ "id": 104,
325
+ "name": "Kickstart default thin",
326
+ },
327
+ ],
328
+ },
329
+ "hostgroupId": 1,
330
+ "loading": false,
331
+ "parameterTypes": Object {
332
+ "computeprofile": "Compute profile",
333
+ "domain": "Domain",
334
+ "hostparam": "Host parameter",
335
+ "lifecycleenv": "Lifecycle environment",
336
+ },
337
+ "rows": Array [
338
+ Object {
339
+ "description": "",
340
+ "id": 1,
341
+ "name": "PuppetEnv",
342
+ "type": "puppetenv",
343
+ "value": "2",
344
+ },
345
+ Object {
346
+ "description": "",
347
+ "id": 2,
348
+ "name": "PW",
349
+ "type": "password",
350
+ "value": "rooot",
351
+ },
352
+ Object {
353
+ "description": "",
354
+ "id": 3,
355
+ "name": "Blub",
356
+ "type": "hostparam",
357
+ "value": "awesome",
358
+ },
359
+ Object {
360
+ "description": "",
361
+ "id": 4,
362
+ "name": "111allo",
363
+ "type": "ip",
364
+ "value": "1.1.1.1",
365
+ },
366
+ Object {
367
+ "description": "",
368
+ "id": 5,
369
+ "name": "1111aasdfasf",
370
+ "type": "hostname",
371
+ "value": "dername",
372
+ },
373
+ Object {
374
+ "description": "",
375
+ "id": 6,
376
+ "name": "222nocheiner",
377
+ "type": "hostparam",
378
+ "value": "",
379
+ },
380
+ Object {
381
+ "description": "aa",
382
+ "id": 7,
383
+ "name": "aaaaa",
384
+ "type": "ptable",
385
+ "value": "",
386
+ },
387
+ Object {
388
+ "description": "",
389
+ "id": 8,
390
+ "name": "aaa",
391
+ "type": "hostparam",
392
+ "value": "2134234",
393
+ },
394
+ Object {
395
+ "backup": Object {
396
+ "description": "",
397
+ "id": 9,
398
+ "name": "",
399
+ "newEntry": true,
400
+ "type": "",
401
+ "value": "",
402
+ },
403
+ "description": "",
404
+ "id": 9,
405
+ "name": "",
406
+ "newEntry": true,
407
+ "type": "",
408
+ "value": "",
409
+ },
410
+ ],
411
+ "sortingColumns": Object {
412
+ "name": Object {
413
+ "direction": "asc",
414
+ "position": 0,
415
+ },
416
+ },
417
+ }
418
+ `;
419
+
420
+ exports[`ParameterSelectionReducer should cancel edit parameter 1`] = `
421
+ Object {
422
+ "appDefinition": Object {
423
+ "hostgroup_id": 1,
424
+ "id": 1,
425
+ "name": "Test123",
426
+ },
427
+ "columns": Array [
428
+ Object {
429
+ "header": Object {
430
+ "label": "Name",
431
+ "props": Object {
432
+ "index": 0,
433
+ "sort": true,
434
+ "style": Object {
435
+ "width": "20%",
436
+ },
437
+ },
438
+ },
439
+ "property": "name",
440
+ },
441
+ Object {
442
+ "cell": Object {
443
+ "props": Object {
444
+ "index": 1,
445
+ },
446
+ },
447
+ "header": Object {
448
+ "label": "Description",
449
+ "props": Object {
450
+ "index": 1,
451
+ "sort": true,
452
+ "style": Object {
453
+ "width": "25%",
454
+ },
455
+ },
456
+ },
457
+ "property": "description",
458
+ },
459
+ Object {
460
+ "cell": Object {
461
+ "props": Object {
462
+ "index": 2,
463
+ },
464
+ },
465
+ "header": Object {
466
+ "label": "Type",
467
+ "props": Object {
468
+ "index": 2,
469
+ "sort": true,
470
+ "style": Object {
471
+ "width": "20%",
472
+ },
473
+ },
474
+ },
475
+ "property": "type",
476
+ },
477
+ Object {
478
+ "cell": Object {
479
+ "props": Object {
480
+ "index": 3,
481
+ },
482
+ },
483
+ "header": Object {
484
+ "label": "Default value",
485
+ "props": Object {
486
+ "index": 3,
487
+ "sort": true,
488
+ "style": Object {
489
+ "width": "25%",
490
+ },
491
+ },
492
+ },
493
+ "property": "value",
494
+ },
495
+ Object {
496
+ "cell": Object {
497
+ "props": Object {
498
+ "index": 4,
499
+ },
500
+ },
501
+ "header": Object {
502
+ "label": "Actions",
503
+ "props": Object {
504
+ "index": 4,
505
+ },
506
+ },
507
+ "property": "actions",
508
+ },
509
+ ],
510
+ "editMode": false,
511
+ "error": Object {
512
+ "errorMsg": "",
513
+ "status": "",
514
+ "statusText": "",
515
+ },
516
+ "foremanData": Object {
517
+ "computeprofiles": Array [],
518
+ "domains": Array [],
519
+ "environments": Array [
520
+ Object {
521
+ "id": 1,
522
+ "name": "production",
523
+ },
524
+ Object {
525
+ "id": 2,
526
+ "name": "test",
527
+ },
528
+ ],
529
+ "hostgroup_id": 1,
530
+ "lifecycle_environments": Array [],
531
+ "ptables": Array [
532
+ Object {
533
+ "id": 105,
534
+ "name": "Kickstart default",
535
+ },
536
+ Object {
537
+ "id": 104,
538
+ "name": "Kickstart default thin",
539
+ },
540
+ ],
541
+ },
542
+ "hostgroupId": 1,
543
+ "loading": false,
544
+ "parameterTypes": Object {
545
+ "computeprofile": "Compute profile",
546
+ "domain": "Domain",
547
+ "hostparam": "Host parameter",
548
+ "lifecycleenv": "Lifecycle environment",
549
+ },
550
+ "rows": Array [
551
+ Object {
552
+ "description": "",
553
+ "id": 1,
554
+ "name": "PuppetEnv",
555
+ "type": "puppetenv",
556
+ "value": "2",
557
+ },
558
+ Object {
559
+ "description": "",
560
+ "id": 2,
561
+ "name": "PW",
562
+ "type": "password",
563
+ "value": "rooot",
564
+ },
565
+ Object {
566
+ "description": "",
567
+ "id": 3,
568
+ "name": "Blub",
569
+ "type": "hostparam",
570
+ "value": "awesome",
571
+ },
572
+ Object {
573
+ "description": "",
574
+ "id": 4,
575
+ "name": "111allo",
576
+ "type": "ip",
577
+ "value": "1.1.1.1",
578
+ },
579
+ Object {
580
+ "description": "",
581
+ "id": 5,
582
+ "name": "1111aasdfasf",
583
+ "type": "hostname",
584
+ "value": "dername",
585
+ },
586
+ Object {
587
+ "description": "",
588
+ "id": 6,
589
+ "name": "222nocheiner",
590
+ "type": "hostparam",
591
+ "value": "",
592
+ },
593
+ Object {
594
+ "description": "aa",
595
+ "id": 7,
596
+ "name": "aaaaa",
597
+ "type": "ptable",
598
+ "value": "",
599
+ },
600
+ Object {
601
+ "description": "",
602
+ "id": 8,
603
+ "name": "aaa",
604
+ "type": "hostparam",
605
+ "value": "2134234",
606
+ },
607
+ ],
608
+ "sortingColumns": Object {
609
+ "name": Object {
610
+ "direction": "asc",
611
+ "position": 0,
612
+ },
613
+ },
614
+ }
615
+ `;
616
+
617
+ exports[`ParameterSelectionReducer should change edit parameter 1`] = `
618
+ Object {
619
+ "appDefinition": Object {
620
+ "hostgroup_id": 1,
621
+ "id": 1,
622
+ "name": "Test123",
623
+ },
624
+ "columns": Array [
625
+ Object {
626
+ "header": Object {
627
+ "label": "Name",
628
+ "props": Object {
629
+ "index": 0,
630
+ "sort": true,
631
+ "style": Object {
632
+ "width": "20%",
633
+ },
634
+ },
635
+ },
636
+ "property": "name",
637
+ },
638
+ Object {
639
+ "cell": Object {
640
+ "props": Object {
641
+ "index": 1,
642
+ },
643
+ },
644
+ "header": Object {
645
+ "label": "Description",
646
+ "props": Object {
647
+ "index": 1,
648
+ "sort": true,
649
+ "style": Object {
650
+ "width": "25%",
651
+ },
652
+ },
653
+ },
654
+ "property": "description",
655
+ },
656
+ Object {
657
+ "cell": Object {
658
+ "props": Object {
659
+ "index": 2,
660
+ },
661
+ },
662
+ "header": Object {
663
+ "label": "Type",
664
+ "props": Object {
665
+ "index": 2,
666
+ "sort": true,
667
+ "style": Object {
668
+ "width": "20%",
669
+ },
670
+ },
671
+ },
672
+ "property": "type",
673
+ },
674
+ Object {
675
+ "cell": Object {
676
+ "props": Object {
677
+ "index": 3,
678
+ },
679
+ },
680
+ "header": Object {
681
+ "label": "Default value",
682
+ "props": Object {
683
+ "index": 3,
684
+ "sort": true,
685
+ "style": Object {
686
+ "width": "25%",
687
+ },
688
+ },
689
+ },
690
+ "property": "value",
691
+ },
692
+ Object {
693
+ "cell": Object {
694
+ "props": Object {
695
+ "index": 4,
696
+ },
697
+ },
698
+ "header": Object {
699
+ "label": "Actions",
700
+ "props": Object {
701
+ "index": 4,
702
+ },
703
+ },
704
+ "property": "actions",
705
+ },
706
+ ],
707
+ "editMode": false,
708
+ "error": Object {
709
+ "errorMsg": "",
710
+ "status": "",
711
+ "statusText": "",
712
+ },
713
+ "foremanData": Object {
714
+ "computeprofiles": Array [],
715
+ "domains": Array [],
716
+ "environments": Array [
717
+ Object {
718
+ "id": 1,
719
+ "name": "production",
720
+ },
721
+ Object {
722
+ "id": 2,
723
+ "name": "test",
724
+ },
725
+ ],
726
+ "hostgroup_id": 1,
727
+ "lifecycle_environments": Array [],
728
+ "ptables": Array [
729
+ Object {
730
+ "id": 105,
731
+ "name": "Kickstart default",
732
+ },
733
+ Object {
734
+ "id": 104,
735
+ "name": "Kickstart default thin",
736
+ },
737
+ ],
738
+ },
739
+ "hostgroupId": 1,
740
+ "loading": false,
741
+ "parameterTypes": Object {
742
+ "computeprofile": "Compute profile",
743
+ "domain": "Domain",
744
+ "hostparam": "Host parameter",
745
+ "lifecycleenv": "Lifecycle environment",
746
+ },
747
+ "rows": Array [
748
+ Object {
749
+ "description": "",
750
+ "id": 1,
751
+ "name": "PuppetEnv",
752
+ "type": "puppetenv",
753
+ "value": "2",
754
+ },
755
+ Object {
756
+ "description": "",
757
+ "id": 2,
758
+ "name": "PW",
759
+ "type": "password",
760
+ "value": "rooot",
761
+ },
762
+ Object {
763
+ "description": "",
764
+ "id": 3,
765
+ "name": "Blub",
766
+ "type": "hostparam",
767
+ "value": "awesome",
768
+ },
769
+ Object {
770
+ "description": "",
771
+ "id": 4,
772
+ "name": "111allo",
773
+ "type": "ip",
774
+ "value": "1.1.1.1",
775
+ },
776
+ Object {
777
+ "backup": Object {
778
+ "description": "",
779
+ "id": 5,
780
+ "name": "1111aasdfasf",
781
+ "type": "hostname",
782
+ "value": "dername",
783
+ },
784
+ "description": "",
785
+ "id": 5,
786
+ "name": "1111aasdfasf",
787
+ "type": "hostname",
788
+ "value": "helloworld",
789
+ },
790
+ Object {
791
+ "description": "",
792
+ "id": 6,
793
+ "name": "222nocheiner",
794
+ "type": "hostparam",
795
+ "value": "",
796
+ },
797
+ Object {
798
+ "description": "aa",
799
+ "id": 7,
800
+ "name": "aaaaa",
801
+ "type": "ptable",
802
+ "value": "",
803
+ },
804
+ Object {
805
+ "description": "",
806
+ "id": 8,
807
+ "name": "aaa",
808
+ "type": "hostparam",
809
+ "value": "2134234",
810
+ },
811
+ ],
812
+ "sortingColumns": Object {
813
+ "name": Object {
814
+ "direction": "asc",
815
+ "position": 0,
816
+ },
817
+ },
818
+ }
819
+ `;
820
+
821
+ exports[`ParameterSelectionReducer should confirm edit parameter 1`] = `
822
+ Object {
823
+ "appDefinition": Object {
824
+ "hostgroup_id": 1,
825
+ "id": 1,
826
+ "name": "Test123",
827
+ },
828
+ "columns": Array [
829
+ Object {
830
+ "header": Object {
831
+ "label": "Name",
832
+ "props": Object {
833
+ "index": 0,
834
+ "sort": true,
835
+ "style": Object {
836
+ "width": "20%",
837
+ },
838
+ },
839
+ },
840
+ "property": "name",
841
+ },
842
+ Object {
843
+ "cell": Object {
844
+ "props": Object {
845
+ "index": 1,
846
+ },
847
+ },
848
+ "header": Object {
849
+ "label": "Description",
850
+ "props": Object {
851
+ "index": 1,
852
+ "sort": true,
853
+ "style": Object {
854
+ "width": "25%",
855
+ },
856
+ },
857
+ },
858
+ "property": "description",
859
+ },
860
+ Object {
861
+ "cell": Object {
862
+ "props": Object {
863
+ "index": 2,
864
+ },
865
+ },
866
+ "header": Object {
867
+ "label": "Type",
868
+ "props": Object {
869
+ "index": 2,
870
+ "sort": true,
871
+ "style": Object {
872
+ "width": "20%",
873
+ },
874
+ },
875
+ },
876
+ "property": "type",
877
+ },
878
+ Object {
879
+ "cell": Object {
880
+ "props": Object {
881
+ "index": 3,
882
+ },
883
+ },
884
+ "header": Object {
885
+ "label": "Default value",
886
+ "props": Object {
887
+ "index": 3,
888
+ "sort": true,
889
+ "style": Object {
890
+ "width": "25%",
891
+ },
892
+ },
893
+ },
894
+ "property": "value",
895
+ },
896
+ Object {
897
+ "cell": Object {
898
+ "props": Object {
899
+ "index": 4,
900
+ },
901
+ },
902
+ "header": Object {
903
+ "label": "Actions",
904
+ "props": Object {
905
+ "index": 4,
906
+ },
907
+ },
908
+ "property": "actions",
909
+ },
910
+ ],
911
+ "editMode": false,
912
+ "error": Object {
913
+ "errorMsg": "",
914
+ "status": "",
915
+ "statusText": "",
916
+ },
917
+ "foremanData": Object {
918
+ "computeprofiles": Array [],
919
+ "domains": Array [],
920
+ "environments": Array [
921
+ Object {
922
+ "id": 1,
923
+ "name": "production",
924
+ },
925
+ Object {
926
+ "id": 2,
927
+ "name": "test",
928
+ },
929
+ ],
930
+ "hostgroup_id": 1,
931
+ "lifecycle_environments": Array [],
932
+ "ptables": Array [
933
+ Object {
934
+ "id": 105,
935
+ "name": "Kickstart default",
936
+ },
937
+ Object {
938
+ "id": 104,
939
+ "name": "Kickstart default thin",
940
+ },
941
+ ],
942
+ },
943
+ "hostgroupId": 1,
944
+ "loading": false,
945
+ "parameterTypes": Object {
946
+ "computeprofile": "Compute profile",
947
+ "domain": "Domain",
948
+ "hostparam": "Host parameter",
949
+ "lifecycleenv": "Lifecycle environment",
950
+ },
951
+ "rows": Array [
952
+ Object {
953
+ "description": "",
954
+ "id": 1,
955
+ "name": "PuppetEnv",
956
+ "type": "puppetenv",
957
+ "value": "2",
958
+ },
959
+ Object {
960
+ "description": "",
961
+ "id": 2,
962
+ "name": "PW",
963
+ "type": "password",
964
+ "value": "rooot",
965
+ },
966
+ Object {
967
+ "description": "",
968
+ "id": 3,
969
+ "name": "Blub",
970
+ "type": "hostparam",
971
+ "value": "awesome",
972
+ },
973
+ Object {
974
+ "description": "",
975
+ "id": 4,
976
+ "name": "111allo",
977
+ "type": "ip",
978
+ "value": "1.1.1.1",
979
+ },
980
+ Object {
981
+ "description": "",
982
+ "id": 5,
983
+ "name": "1111aasdfasf",
984
+ "type": "hostname",
985
+ "value": "dername",
986
+ },
987
+ Object {
988
+ "description": "",
989
+ "id": 6,
990
+ "name": "222nocheiner",
991
+ "type": "hostparam",
992
+ "value": "",
993
+ },
994
+ Object {
995
+ "description": "aa",
996
+ "id": 7,
997
+ "name": "aaaaa",
998
+ "type": "ptable",
999
+ "value": "",
1000
+ },
1001
+ Object {
1002
+ "description": "",
1003
+ "id": 8,
1004
+ "name": "aaa",
1005
+ "type": "hostparam",
1006
+ "value": "2134234",
1007
+ },
1008
+ ],
1009
+ "sortingColumns": Object {
1010
+ "name": Object {
1011
+ "direction": "asc",
1012
+ "position": 0,
1013
+ },
1014
+ },
1015
+ }
1016
+ `;
1017
+
1018
+ exports[`ParameterSelectionReducer should delete a parameter 1`] = `
1019
+ Object {
1020
+ "appDefinition": Object {
1021
+ "hostgroup_id": 1,
1022
+ "id": 1,
1023
+ "name": "Test123",
1024
+ },
1025
+ "columns": Array [
1026
+ Object {
1027
+ "header": Object {
1028
+ "label": "Name",
1029
+ "props": Object {
1030
+ "index": 0,
1031
+ "sort": true,
1032
+ "style": Object {
1033
+ "width": "20%",
1034
+ },
1035
+ },
1036
+ },
1037
+ "property": "name",
1038
+ },
1039
+ Object {
1040
+ "cell": Object {
1041
+ "props": Object {
1042
+ "index": 1,
1043
+ },
1044
+ },
1045
+ "header": Object {
1046
+ "label": "Description",
1047
+ "props": Object {
1048
+ "index": 1,
1049
+ "sort": true,
1050
+ "style": Object {
1051
+ "width": "25%",
1052
+ },
1053
+ },
1054
+ },
1055
+ "property": "description",
1056
+ },
1057
+ Object {
1058
+ "cell": Object {
1059
+ "props": Object {
1060
+ "index": 2,
1061
+ },
1062
+ },
1063
+ "header": Object {
1064
+ "label": "Type",
1065
+ "props": Object {
1066
+ "index": 2,
1067
+ "sort": true,
1068
+ "style": Object {
1069
+ "width": "20%",
1070
+ },
1071
+ },
1072
+ },
1073
+ "property": "type",
1074
+ },
1075
+ Object {
1076
+ "cell": Object {
1077
+ "props": Object {
1078
+ "index": 3,
1079
+ },
1080
+ },
1081
+ "header": Object {
1082
+ "label": "Default value",
1083
+ "props": Object {
1084
+ "index": 3,
1085
+ "sort": true,
1086
+ "style": Object {
1087
+ "width": "25%",
1088
+ },
1089
+ },
1090
+ },
1091
+ "property": "value",
1092
+ },
1093
+ Object {
1094
+ "cell": Object {
1095
+ "props": Object {
1096
+ "index": 4,
1097
+ },
1098
+ },
1099
+ "header": Object {
1100
+ "label": "Actions",
1101
+ "props": Object {
1102
+ "index": 4,
1103
+ },
1104
+ },
1105
+ "property": "actions",
1106
+ },
1107
+ ],
1108
+ "editMode": false,
1109
+ "error": Object {
1110
+ "errorMsg": "",
1111
+ "status": "",
1112
+ "statusText": "",
1113
+ },
1114
+ "foremanData": Object {
1115
+ "computeprofiles": Array [],
1116
+ "domains": Array [],
1117
+ "environments": Array [
1118
+ Object {
1119
+ "id": 1,
1120
+ "name": "production",
1121
+ },
1122
+ Object {
1123
+ "id": 2,
1124
+ "name": "test",
1125
+ },
1126
+ ],
1127
+ "hostgroup_id": 1,
1128
+ "lifecycle_environments": Array [],
1129
+ "ptables": Array [
1130
+ Object {
1131
+ "id": 105,
1132
+ "name": "Kickstart default",
1133
+ },
1134
+ Object {
1135
+ "id": 104,
1136
+ "name": "Kickstart default thin",
1137
+ },
1138
+ ],
1139
+ },
1140
+ "hostgroupId": 1,
1141
+ "loading": false,
1142
+ "parameterTypes": Object {
1143
+ "computeprofile": "Compute profile",
1144
+ "domain": "Domain",
1145
+ "hostname": "Hostname",
1146
+ "hostparam": "Host parameter",
1147
+ "lifecycleenv": "Lifecycle environment",
1148
+ },
1149
+ "rows": Array [
1150
+ Object {
1151
+ "description": "",
1152
+ "id": 1,
1153
+ "name": "PuppetEnv",
1154
+ "type": "puppetenv",
1155
+ "value": "2",
1156
+ },
1157
+ Object {
1158
+ "description": "",
1159
+ "id": 2,
1160
+ "name": "PW",
1161
+ "type": "password",
1162
+ "value": "rooot",
1163
+ },
1164
+ Object {
1165
+ "description": "",
1166
+ "id": 3,
1167
+ "name": "Blub",
1168
+ "type": "hostparam",
1169
+ "value": "awesome",
1170
+ },
1171
+ Object {
1172
+ "description": "",
1173
+ "id": 4,
1174
+ "name": "111allo",
1175
+ "type": "ip",
1176
+ "value": "1.1.1.1",
1177
+ },
1178
+ Object {
1179
+ "description": "",
1180
+ "id": 6,
1181
+ "name": "222nocheiner",
1182
+ "type": "hostparam",
1183
+ "value": "",
1184
+ },
1185
+ Object {
1186
+ "description": "aa",
1187
+ "id": 7,
1188
+ "name": "aaaaa",
1189
+ "type": "ptable",
1190
+ "value": "",
1191
+ },
1192
+ Object {
1193
+ "description": "",
1194
+ "id": 8,
1195
+ "name": "aaa",
1196
+ "type": "hostparam",
1197
+ "value": "2134234",
1198
+ },
1199
+ ],
1200
+ "sortingColumns": Object {
1201
+ "name": Object {
1202
+ "direction": "asc",
1203
+ "position": 0,
1204
+ },
1205
+ },
1206
+ }
1207
+ `;
1208
+
1209
+ exports[`ParameterSelectionReducer should initialize component 1`] = `
1210
+ Object {
1211
+ "appDefinition": Object {
1212
+ "hostgroup_id": 1,
1213
+ "id": 1,
1214
+ "name": "Test123",
1215
+ },
1216
+ "columns": Array [
1217
+ Object {
1218
+ "header": Object {
1219
+ "label": "Name",
1220
+ "props": Object {
1221
+ "index": 0,
1222
+ "sort": true,
1223
+ "style": Object {
1224
+ "width": "20%",
1225
+ },
1226
+ },
1227
+ },
1228
+ "property": "name",
1229
+ },
1230
+ Object {
1231
+ "cell": Object {
1232
+ "props": Object {
1233
+ "index": 1,
1234
+ },
1235
+ },
1236
+ "header": Object {
1237
+ "label": "Description",
1238
+ "props": Object {
1239
+ "index": 1,
1240
+ "sort": true,
1241
+ "style": Object {
1242
+ "width": "25%",
1243
+ },
1244
+ },
1245
+ },
1246
+ "property": "description",
1247
+ },
1248
+ Object {
1249
+ "cell": Object {
1250
+ "props": Object {
1251
+ "index": 2,
1252
+ },
1253
+ },
1254
+ "header": Object {
1255
+ "label": "Type",
1256
+ "props": Object {
1257
+ "index": 2,
1258
+ "sort": true,
1259
+ "style": Object {
1260
+ "width": "20%",
1261
+ },
1262
+ },
1263
+ },
1264
+ "property": "type",
1265
+ },
1266
+ Object {
1267
+ "cell": Object {
1268
+ "props": Object {
1269
+ "index": 3,
1270
+ },
1271
+ },
1272
+ "header": Object {
1273
+ "label": "Default value",
1274
+ "props": Object {
1275
+ "index": 3,
1276
+ "sort": true,
1277
+ "style": Object {
1278
+ "width": "25%",
1279
+ },
1280
+ },
1281
+ },
1282
+ "property": "value",
1283
+ },
1284
+ Object {
1285
+ "cell": Object {
1286
+ "props": Object {
1287
+ "index": 4,
1288
+ },
1289
+ },
1290
+ "header": Object {
1291
+ "label": "Actions",
1292
+ "props": Object {
1293
+ "index": 4,
1294
+ },
1295
+ },
1296
+ "property": "actions",
1297
+ },
1298
+ ],
1299
+ "editMode": false,
1300
+ "error": Object {
1301
+ "errorMsg": "",
1302
+ "status": "",
1303
+ "statusText": "",
1304
+ },
1305
+ "foremanData": Object {
1306
+ "computeprofiles": Array [],
1307
+ "domains": Array [],
1308
+ "environments": Array [
1309
+ Object {
1310
+ "id": 1,
1311
+ "name": "production",
1312
+ },
1313
+ Object {
1314
+ "id": 2,
1315
+ "name": "test",
1316
+ },
1317
+ ],
1318
+ "hostgroup_id": 1,
1319
+ "lifecycle_environments": Array [],
1320
+ "ptables": Array [
1321
+ Object {
1322
+ "id": 105,
1323
+ "name": "Kickstart default",
1324
+ },
1325
+ Object {
1326
+ "id": 104,
1327
+ "name": "Kickstart default thin",
1328
+ },
1329
+ ],
1330
+ },
1331
+ "hostgroupId": 1,
1332
+ "loading": false,
1333
+ "parameterTypes": Object {
1334
+ "computeprofile": "Compute profile",
1335
+ "domain": "Domain",
1336
+ "hostparam": "Host parameter",
1337
+ "lifecycleenv": "Lifecycle environment",
1338
+ },
1339
+ "rows": Array [
1340
+ Object {
1341
+ "description": "",
1342
+ "id": 1,
1343
+ "name": "PuppetEnv",
1344
+ "type": "puppetenv",
1345
+ "value": "2",
1346
+ },
1347
+ Object {
1348
+ "description": "",
1349
+ "id": 2,
1350
+ "name": "PW",
1351
+ "type": "password",
1352
+ "value": "rooot",
1353
+ },
1354
+ Object {
1355
+ "description": "",
1356
+ "id": 3,
1357
+ "name": "Blub",
1358
+ "type": "hostparam",
1359
+ "value": "awesome",
1360
+ },
1361
+ Object {
1362
+ "description": "",
1363
+ "id": 4,
1364
+ "name": "111allo",
1365
+ "type": "ip",
1366
+ "value": "1.1.1.1",
1367
+ },
1368
+ Object {
1369
+ "backup": Object {
1370
+ "description": "",
1371
+ "id": 5,
1372
+ "name": "1111aasdfasf",
1373
+ "type": "hostname",
1374
+ "value": "dername",
1375
+ },
1376
+ "description": "",
1377
+ "id": 5,
1378
+ "name": "1111aasdfasf",
1379
+ "type": "hostname",
1380
+ "value": "dername",
1381
+ },
1382
+ Object {
1383
+ "description": "",
1384
+ "id": 6,
1385
+ "name": "222nocheiner",
1386
+ "type": "hostparam",
1387
+ "value": "",
1388
+ },
1389
+ Object {
1390
+ "description": "aa",
1391
+ "id": 7,
1392
+ "name": "aaaaa",
1393
+ "type": "ptable",
1394
+ "value": "",
1395
+ },
1396
+ Object {
1397
+ "description": "",
1398
+ "id": 8,
1399
+ "name": "aaa",
1400
+ "type": "hostparam",
1401
+ "value": "2134234",
1402
+ },
1403
+ ],
1404
+ "sortingColumns": Object {
1405
+ "name": Object {
1406
+ "direction": "asc",
1407
+ "position": 0,
1408
+ },
1409
+ },
1410
+ }
1411
+ `;
1412
+
1413
+ exports[`ParameterSelectionReducer should load foreman data be erroneous 1`] = `
1414
+ Object {
1415
+ "appDefinition": Object {
1416
+ "hostgroup_id": 1,
1417
+ "id": 1,
1418
+ "name": "Test123",
1419
+ },
1420
+ "columns": Array [
1421
+ Object {
1422
+ "header": Object {
1423
+ "label": "Name",
1424
+ "props": Object {
1425
+ "index": 0,
1426
+ "sort": true,
1427
+ "style": Object {
1428
+ "width": "20%",
1429
+ },
1430
+ },
1431
+ },
1432
+ "property": "name",
1433
+ },
1434
+ Object {
1435
+ "cell": Object {
1436
+ "props": Object {
1437
+ "index": 1,
1438
+ },
1439
+ },
1440
+ "header": Object {
1441
+ "label": "Description",
1442
+ "props": Object {
1443
+ "index": 1,
1444
+ "sort": true,
1445
+ "style": Object {
1446
+ "width": "25%",
1447
+ },
1448
+ },
1449
+ },
1450
+ "property": "description",
1451
+ },
1452
+ Object {
1453
+ "cell": Object {
1454
+ "props": Object {
1455
+ "index": 2,
1456
+ },
1457
+ },
1458
+ "header": Object {
1459
+ "label": "Type",
1460
+ "props": Object {
1461
+ "index": 2,
1462
+ "sort": true,
1463
+ "style": Object {
1464
+ "width": "20%",
1465
+ },
1466
+ },
1467
+ },
1468
+ "property": "type",
1469
+ },
1470
+ Object {
1471
+ "cell": Object {
1472
+ "props": Object {
1473
+ "index": 3,
1474
+ },
1475
+ },
1476
+ "header": Object {
1477
+ "label": "Default value",
1478
+ "props": Object {
1479
+ "index": 3,
1480
+ "sort": true,
1481
+ "style": Object {
1482
+ "width": "25%",
1483
+ },
1484
+ },
1485
+ },
1486
+ "property": "value",
1487
+ },
1488
+ Object {
1489
+ "cell": Object {
1490
+ "props": Object {
1491
+ "index": 4,
1492
+ },
1493
+ },
1494
+ "header": Object {
1495
+ "label": "Actions",
1496
+ "props": Object {
1497
+ "index": 4,
1498
+ },
1499
+ },
1500
+ "property": "actions",
1501
+ },
1502
+ ],
1503
+ "editMode": false,
1504
+ "error": "Something really bad happend",
1505
+ "foremanData": Object {
1506
+ "computeprofiles": Array [],
1507
+ "domains": Array [],
1508
+ "environments": Array [
1509
+ Object {
1510
+ "id": 1,
1511
+ "name": "production",
1512
+ },
1513
+ Object {
1514
+ "id": 2,
1515
+ "name": "test",
1516
+ },
1517
+ ],
1518
+ "hostgroup_id": 1,
1519
+ "lifecycle_environments": Array [],
1520
+ "ptables": Array [
1521
+ Object {
1522
+ "id": 105,
1523
+ "name": "Kickstart default",
1524
+ },
1525
+ Object {
1526
+ "id": 104,
1527
+ "name": "Kickstart default thin",
1528
+ },
1529
+ ],
1530
+ },
1531
+ "hostgroupId": 1,
1532
+ "loading": false,
1533
+ "parameterTypes": Object {
1534
+ "computeprofile": "Compute profile",
1535
+ "domain": "Domain",
1536
+ "hostparam": "Host parameter",
1537
+ "lifecycleenv": "Lifecycle environment",
1538
+ },
1539
+ "rows": Array [
1540
+ Object {
1541
+ "description": "",
1542
+ "id": 1,
1543
+ "name": "PuppetEnv",
1544
+ "type": "puppetenv",
1545
+ "value": "2",
1546
+ },
1547
+ Object {
1548
+ "description": "",
1549
+ "id": 2,
1550
+ "name": "PW",
1551
+ "type": "password",
1552
+ "value": "rooot",
1553
+ },
1554
+ Object {
1555
+ "description": "",
1556
+ "id": 3,
1557
+ "name": "Blub",
1558
+ "type": "hostparam",
1559
+ "value": "awesome",
1560
+ },
1561
+ Object {
1562
+ "description": "",
1563
+ "id": 4,
1564
+ "name": "111allo",
1565
+ "type": "ip",
1566
+ "value": "1.1.1.1",
1567
+ },
1568
+ Object {
1569
+ "description": "",
1570
+ "id": 5,
1571
+ "name": "1111aasdfasf",
1572
+ "type": "hostname",
1573
+ "value": "dername",
1574
+ },
1575
+ Object {
1576
+ "description": "",
1577
+ "id": 6,
1578
+ "name": "222nocheiner",
1579
+ "type": "hostparam",
1580
+ "value": "",
1581
+ },
1582
+ Object {
1583
+ "description": "aa",
1584
+ "id": 7,
1585
+ "name": "aaaaa",
1586
+ "type": "ptable",
1587
+ "value": "",
1588
+ },
1589
+ Object {
1590
+ "description": "",
1591
+ "id": 8,
1592
+ "name": "aaa",
1593
+ "type": "hostparam",
1594
+ "value": "2134234",
1595
+ },
1596
+ ],
1597
+ "sortingColumns": Object {
1598
+ "name": Object {
1599
+ "direction": "asc",
1600
+ "position": 0,
1601
+ },
1602
+ },
1603
+ }
1604
+ `;
1605
+
1606
+ exports[`ParameterSelectionReducer should load foreman data be successful 1`] = `
1607
+ Object {
1608
+ "appDefinition": Object {
1609
+ "hostgroup_id": 1,
1610
+ "id": 1,
1611
+ "name": "Test123",
1612
+ },
1613
+ "columns": Array [
1614
+ Object {
1615
+ "header": Object {
1616
+ "label": "Name",
1617
+ "props": Object {
1618
+ "index": 0,
1619
+ "sort": true,
1620
+ "style": Object {
1621
+ "width": "20%",
1622
+ },
1623
+ },
1624
+ },
1625
+ "property": "name",
1626
+ },
1627
+ Object {
1628
+ "cell": Object {
1629
+ "props": Object {
1630
+ "index": 1,
1631
+ },
1632
+ },
1633
+ "header": Object {
1634
+ "label": "Description",
1635
+ "props": Object {
1636
+ "index": 1,
1637
+ "sort": true,
1638
+ "style": Object {
1639
+ "width": "25%",
1640
+ },
1641
+ },
1642
+ },
1643
+ "property": "description",
1644
+ },
1645
+ Object {
1646
+ "cell": Object {
1647
+ "props": Object {
1648
+ "index": 2,
1649
+ },
1650
+ },
1651
+ "header": Object {
1652
+ "label": "Type",
1653
+ "props": Object {
1654
+ "index": 2,
1655
+ "sort": true,
1656
+ "style": Object {
1657
+ "width": "20%",
1658
+ },
1659
+ },
1660
+ },
1661
+ "property": "type",
1662
+ },
1663
+ Object {
1664
+ "cell": Object {
1665
+ "props": Object {
1666
+ "index": 3,
1667
+ },
1668
+ },
1669
+ "header": Object {
1670
+ "label": "Default value",
1671
+ "props": Object {
1672
+ "index": 3,
1673
+ "sort": true,
1674
+ "style": Object {
1675
+ "width": "25%",
1676
+ },
1677
+ },
1678
+ },
1679
+ "property": "value",
1680
+ },
1681
+ Object {
1682
+ "cell": Object {
1683
+ "props": Object {
1684
+ "index": 4,
1685
+ },
1686
+ },
1687
+ "header": Object {
1688
+ "label": "Actions",
1689
+ "props": Object {
1690
+ "index": 4,
1691
+ },
1692
+ },
1693
+ "property": "actions",
1694
+ },
1695
+ ],
1696
+ "editMode": false,
1697
+ "error": Object {
1698
+ "errorMsg": "",
1699
+ "status": "",
1700
+ "statusText": "",
1701
+ },
1702
+ "foremanData": Object {
1703
+ "computeprofiles": Array [],
1704
+ "domains": Array [],
1705
+ "environments": Array [
1706
+ Object {
1707
+ "id": 1,
1708
+ "name": "production",
1709
+ },
1710
+ Object {
1711
+ "id": 2,
1712
+ "name": "test",
1713
+ },
1714
+ ],
1715
+ "hostgroup_id": 1,
1716
+ "lifecycle_environments": Array [],
1717
+ "ptables": Array [
1718
+ Object {
1719
+ "id": 105,
1720
+ "name": "Kickstart default",
1721
+ },
1722
+ Object {
1723
+ "id": 104,
1724
+ "name": "Kickstart default thin",
1725
+ },
1726
+ ],
1727
+ },
1728
+ "hostgroupId": 1,
1729
+ "loading": false,
1730
+ "parameterTypes": Object {
1731
+ "computeprofile": "Compute profile",
1732
+ "domain": "Domain",
1733
+ "hostparam": "Host parameter",
1734
+ "lifecycleenv": "Lifecycle environment",
1735
+ },
1736
+ "rows": Array [
1737
+ Object {
1738
+ "description": "",
1739
+ "id": 1,
1740
+ "name": "PuppetEnv",
1741
+ "type": "puppetenv",
1742
+ "value": "2",
1743
+ },
1744
+ Object {
1745
+ "description": "",
1746
+ "id": 2,
1747
+ "name": "PW",
1748
+ "type": "password",
1749
+ "value": "rooot",
1750
+ },
1751
+ Object {
1752
+ "description": "",
1753
+ "id": 3,
1754
+ "name": "Blub",
1755
+ "type": "hostparam",
1756
+ "value": "awesome",
1757
+ },
1758
+ Object {
1759
+ "description": "",
1760
+ "id": 4,
1761
+ "name": "111allo",
1762
+ "type": "ip",
1763
+ "value": "1.1.1.1",
1764
+ },
1765
+ Object {
1766
+ "description": "",
1767
+ "id": 5,
1768
+ "name": "1111aasdfasf",
1769
+ "type": "hostname",
1770
+ "value": "dername",
1771
+ },
1772
+ Object {
1773
+ "description": "",
1774
+ "id": 6,
1775
+ "name": "222nocheiner",
1776
+ "type": "hostparam",
1777
+ "value": "",
1778
+ },
1779
+ Object {
1780
+ "description": "aa",
1781
+ "id": 7,
1782
+ "name": "aaaaa",
1783
+ "type": "ptable",
1784
+ "value": "",
1785
+ },
1786
+ Object {
1787
+ "description": "",
1788
+ "id": 8,
1789
+ "name": "aaa",
1790
+ "type": "hostparam",
1791
+ "value": "2134234",
1792
+ },
1793
+ ],
1794
+ "sortingColumns": Object {
1795
+ "name": Object {
1796
+ "direction": "asc",
1797
+ "position": 0,
1798
+ },
1799
+ },
1800
+ }
1801
+ `;
1802
+
1803
+ exports[`ParameterSelectionReducer should load parameter selection be erroneous 1`] = `
1804
+ Object {
1805
+ "editMode": false,
1806
+ "error": "Something really bad happend",
1807
+ "loading": false,
1808
+ }
1809
+ `;
1810
+
1811
+ exports[`ParameterSelectionReducer should load parameter selection be successful 1`] = `
1812
+ Object {
1813
+ "appDefinition": Object {
1814
+ "created_at": "2019-11-13 17:47:27 +0100",
1815
+ "description": "",
1816
+ "hostgroup_id": 1,
1817
+ "id": 2,
1818
+ "name": "sowasvonneu",
1819
+ "parameters": "[{\\"id\\":0,\\"name\\":\\"richtigneu\\",\\"description\\":\\"\\",\\"type\\":\\"puppetenv\\",\\"value\\":\\"1\\"},{\\"id\\":1,\\"name\\":\\"ganzgut\\",\\"description\\":\\"\\",\\"type\\":\\"ip\\",\\"value\\":\\"1.1.1.2\\"}]",
1820
+ "updated_at": "2019-11-13 17:47:27 +0100",
1821
+ },
1822
+ "editMode": false,
1823
+ "error": Object {
1824
+ "errorMsg": "",
1825
+ "status": "",
1826
+ "statusText": "",
1827
+ },
1828
+ "foremanData": Object {
1829
+ "computeprofiles": Array [],
1830
+ "domains": Array [],
1831
+ "environments": Array [
1832
+ Object {
1833
+ "id": 1,
1834
+ "name": "production",
1835
+ },
1836
+ Object {
1837
+ "id": 2,
1838
+ "name": "test",
1839
+ },
1840
+ ],
1841
+ "hostgroup_id": 1,
1842
+ "lifecycle_environments": Array [],
1843
+ "ptables": Array [
1844
+ Object {
1845
+ "id": 105,
1846
+ "name": "Kickstart default",
1847
+ },
1848
+ Object {
1849
+ "id": 104,
1850
+ "name": "Kickstart default thin",
1851
+ },
1852
+ ],
1853
+ },
1854
+ "hostgroupId": 1,
1855
+ "loading": false,
1856
+ "rows": Array [
1857
+ Object {
1858
+ "description": "",
1859
+ "id": 0,
1860
+ "name": "richtigneu",
1861
+ "type": "puppetenv",
1862
+ "value": "1",
1863
+ },
1864
+ Object {
1865
+ "description": "",
1866
+ "id": 1,
1867
+ "name": "ganzgut",
1868
+ "type": "ip",
1869
+ "value": "1.1.1.2",
1870
+ },
1871
+ ],
1872
+ }
1873
+ `;
1874
+
1875
+ exports[`ParameterSelectionReducer should request load foreman data 1`] = `
1876
+ Object {
1877
+ "appDefinition": Object {
1878
+ "hostgroup_id": 1,
1879
+ "id": 1,
1880
+ "name": "Test123",
1881
+ },
1882
+ "columns": Array [
1883
+ Object {
1884
+ "header": Object {
1885
+ "label": "Name",
1886
+ "props": Object {
1887
+ "index": 0,
1888
+ "sort": true,
1889
+ "style": Object {
1890
+ "width": "20%",
1891
+ },
1892
+ },
1893
+ },
1894
+ "property": "name",
1895
+ },
1896
+ Object {
1897
+ "cell": Object {
1898
+ "props": Object {
1899
+ "index": 1,
1900
+ },
1901
+ },
1902
+ "header": Object {
1903
+ "label": "Description",
1904
+ "props": Object {
1905
+ "index": 1,
1906
+ "sort": true,
1907
+ "style": Object {
1908
+ "width": "25%",
1909
+ },
1910
+ },
1911
+ },
1912
+ "property": "description",
1913
+ },
1914
+ Object {
1915
+ "cell": Object {
1916
+ "props": Object {
1917
+ "index": 2,
1918
+ },
1919
+ },
1920
+ "header": Object {
1921
+ "label": "Type",
1922
+ "props": Object {
1923
+ "index": 2,
1924
+ "sort": true,
1925
+ "style": Object {
1926
+ "width": "20%",
1927
+ },
1928
+ },
1929
+ },
1930
+ "property": "type",
1931
+ },
1932
+ Object {
1933
+ "cell": Object {
1934
+ "props": Object {
1935
+ "index": 3,
1936
+ },
1937
+ },
1938
+ "header": Object {
1939
+ "label": "Default value",
1940
+ "props": Object {
1941
+ "index": 3,
1942
+ "sort": true,
1943
+ "style": Object {
1944
+ "width": "25%",
1945
+ },
1946
+ },
1947
+ },
1948
+ "property": "value",
1949
+ },
1950
+ Object {
1951
+ "cell": Object {
1952
+ "props": Object {
1953
+ "index": 4,
1954
+ },
1955
+ },
1956
+ "header": Object {
1957
+ "label": "Actions",
1958
+ "props": Object {
1959
+ "index": 4,
1960
+ },
1961
+ },
1962
+ "property": "actions",
1963
+ },
1964
+ ],
1965
+ "editMode": false,
1966
+ "error": Object {
1967
+ "errorMsg": "",
1968
+ "status": "",
1969
+ "statusText": "",
1970
+ },
1971
+ "foremanData": Object {},
1972
+ "hostgroupId": -1,
1973
+ "loading": true,
1974
+ "parameterTypes": Object {
1975
+ "computeprofile": "Compute profile",
1976
+ "domain": "Domain",
1977
+ "hostparam": "Host parameter",
1978
+ "lifecycleenv": "Lifecycle environment",
1979
+ },
1980
+ "rows": Array [
1981
+ Object {
1982
+ "description": "",
1983
+ "id": 1,
1984
+ "name": "PuppetEnv",
1985
+ "type": "puppetenv",
1986
+ "value": "2",
1987
+ },
1988
+ Object {
1989
+ "description": "",
1990
+ "id": 2,
1991
+ "name": "PW",
1992
+ "type": "password",
1993
+ "value": "rooot",
1994
+ },
1995
+ Object {
1996
+ "description": "",
1997
+ "id": 3,
1998
+ "name": "Blub",
1999
+ "type": "hostparam",
2000
+ "value": "awesome",
2001
+ },
2002
+ Object {
2003
+ "description": "",
2004
+ "id": 4,
2005
+ "name": "111allo",
2006
+ "type": "ip",
2007
+ "value": "1.1.1.1",
2008
+ },
2009
+ Object {
2010
+ "description": "",
2011
+ "id": 5,
2012
+ "name": "1111aasdfasf",
2013
+ "type": "hostname",
2014
+ "value": "dername",
2015
+ },
2016
+ Object {
2017
+ "description": "",
2018
+ "id": 6,
2019
+ "name": "222nocheiner",
2020
+ "type": "hostparam",
2021
+ "value": "",
2022
+ },
2023
+ Object {
2024
+ "description": "aa",
2025
+ "id": 7,
2026
+ "name": "aaaaa",
2027
+ "type": "ptable",
2028
+ "value": "",
2029
+ },
2030
+ Object {
2031
+ "description": "",
2032
+ "id": 8,
2033
+ "name": "aaa",
2034
+ "type": "hostparam",
2035
+ "value": "2134234",
2036
+ },
2037
+ ],
2038
+ "sortingColumns": Object {
2039
+ "name": Object {
2040
+ "direction": "asc",
2041
+ "position": 0,
2042
+ },
2043
+ },
2044
+ }
2045
+ `;
2046
+
2047
+ exports[`ParameterSelectionReducer should request parameter selection 1`] = `
2048
+ Object {
2049
+ "editMode": false,
2050
+ "error": Object {
2051
+ "errorMsg": "",
2052
+ "status": "",
2053
+ "statusText": "",
2054
+ },
2055
+ "loading": true,
2056
+ }
2057
+ `;
2058
+
2059
+ exports[`ParameterSelectionReducer should return initial state 1`] = `
2060
+ Object {
2061
+ "editMode": false,
2062
+ "error": Object {
2063
+ "errorMsg": "",
2064
+ "status": "",
2065
+ "statusText": "",
2066
+ },
2067
+ }
2068
+ `;
2069
+
2070
+ exports[`ParameterSelectionReducer should sort parameter 1`] = `
2071
+ Object {
2072
+ "appDefinition": Object {
2073
+ "hostgroup_id": 1,
2074
+ "id": 1,
2075
+ "name": "Test123",
2076
+ },
2077
+ "columns": Array [
2078
+ Object {
2079
+ "header": Object {
2080
+ "label": "Name",
2081
+ "props": Object {
2082
+ "index": 0,
2083
+ "sort": true,
2084
+ "style": Object {
2085
+ "width": "20%",
2086
+ },
2087
+ },
2088
+ },
2089
+ "property": "name",
2090
+ },
2091
+ Object {
2092
+ "cell": Object {
2093
+ "props": Object {
2094
+ "index": 1,
2095
+ },
2096
+ },
2097
+ "header": Object {
2098
+ "label": "Description",
2099
+ "props": Object {
2100
+ "index": 1,
2101
+ "sort": true,
2102
+ "style": Object {
2103
+ "width": "25%",
2104
+ },
2105
+ },
2106
+ },
2107
+ "property": "description",
2108
+ },
2109
+ Object {
2110
+ "cell": Object {
2111
+ "props": Object {
2112
+ "index": 2,
2113
+ },
2114
+ },
2115
+ "header": Object {
2116
+ "label": "Type",
2117
+ "props": Object {
2118
+ "index": 2,
2119
+ "sort": true,
2120
+ "style": Object {
2121
+ "width": "20%",
2122
+ },
2123
+ },
2124
+ },
2125
+ "property": "type",
2126
+ },
2127
+ Object {
2128
+ "cell": Object {
2129
+ "props": Object {
2130
+ "index": 3,
2131
+ },
2132
+ },
2133
+ "header": Object {
2134
+ "label": "Default value",
2135
+ "props": Object {
2136
+ "index": 3,
2137
+ "sort": true,
2138
+ "style": Object {
2139
+ "width": "25%",
2140
+ },
2141
+ },
2142
+ },
2143
+ "property": "value",
2144
+ },
2145
+ Object {
2146
+ "cell": Object {
2147
+ "props": Object {
2148
+ "index": 4,
2149
+ },
2150
+ },
2151
+ "header": Object {
2152
+ "label": "Actions",
2153
+ "props": Object {
2154
+ "index": 4,
2155
+ },
2156
+ },
2157
+ "property": "actions",
2158
+ },
2159
+ ],
2160
+ "editMode": false,
2161
+ "error": Object {
2162
+ "errorMsg": "",
2163
+ "status": "",
2164
+ "statusText": "",
2165
+ },
2166
+ "foremanData": Object {
2167
+ "computeprofiles": Array [],
2168
+ "domains": Array [],
2169
+ "environments": Array [
2170
+ Object {
2171
+ "id": 1,
2172
+ "name": "production",
2173
+ },
2174
+ Object {
2175
+ "id": 2,
2176
+ "name": "test",
2177
+ },
2178
+ ],
2179
+ "hostgroup_id": 1,
2180
+ "lifecycle_environments": Array [],
2181
+ "ptables": Array [
2182
+ Object {
2183
+ "id": 105,
2184
+ "name": "Kickstart default",
2185
+ },
2186
+ Object {
2187
+ "id": 104,
2188
+ "name": "Kickstart default thin",
2189
+ },
2190
+ ],
2191
+ },
2192
+ "hostgroupId": 1,
2193
+ "loading": false,
2194
+ "parameterTypes": Object {
2195
+ "computeprofile": "Compute profile",
2196
+ "domain": "Domain",
2197
+ "hostparam": "Host parameter",
2198
+ "lifecycleenv": "Lifecycle environment",
2199
+ },
2200
+ "rows": Array [
2201
+ Object {
2202
+ "description": "",
2203
+ "id": 1,
2204
+ "name": "PuppetEnv",
2205
+ "type": "puppetenv",
2206
+ "value": "2",
2207
+ },
2208
+ Object {
2209
+ "description": "",
2210
+ "id": 2,
2211
+ "name": "PW",
2212
+ "type": "password",
2213
+ "value": "rooot",
2214
+ },
2215
+ Object {
2216
+ "description": "",
2217
+ "id": 3,
2218
+ "name": "Blub",
2219
+ "type": "hostparam",
2220
+ "value": "awesome",
2221
+ },
2222
+ Object {
2223
+ "description": "",
2224
+ "id": 4,
2225
+ "name": "111allo",
2226
+ "type": "ip",
2227
+ "value": "1.1.1.1",
2228
+ },
2229
+ Object {
2230
+ "description": "",
2231
+ "id": 5,
2232
+ "name": "1111aasdfasf",
2233
+ "type": "hostname",
2234
+ "value": "dername",
2235
+ },
2236
+ Object {
2237
+ "description": "",
2238
+ "id": 6,
2239
+ "name": "222nocheiner",
2240
+ "type": "hostparam",
2241
+ "value": "",
2242
+ },
2243
+ Object {
2244
+ "description": "aa",
2245
+ "id": 7,
2246
+ "name": "aaaaa",
2247
+ "type": "ptable",
2248
+ "value": "",
2249
+ },
2250
+ Object {
2251
+ "description": "",
2252
+ "id": 8,
2253
+ "name": "aaa",
2254
+ "type": "hostparam",
2255
+ "value": "2134234",
2256
+ },
2257
+ ],
2258
+ "sortingColumns": Object {
2259
+ "type": Object {
2260
+ "direction": "asc",
2261
+ "position": 0,
2262
+ },
2263
+ },
2264
+ }
2265
+ `;