foreman_snapshot_management 2.0.2 → 2.0.3
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.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/snapshots_controller.rb +4 -1
- data/app/controllers/concerns/foreman/controller/parameters/snapshot.rb +1 -1
- data/app/controllers/foreman_snapshot_management/snapshots_controller.rb +16 -2
- data/app/models/foreman_snapshot_management/proxmox_extensions.rb +3 -3
- data/app/models/foreman_snapshot_management/snapshot.rb +4 -4
- data/app/models/foreman_snapshot_management/vmware_extensions.rb +13 -3
- data/app/views/foreman_snapshot_management/snapshots/_index.html.erb +2 -1
- data/app/views/foreman_snapshot_management/snapshots/select_multiple_host.html.erb +5 -3
- data/lib/foreman_snapshot_management/version.rb +1 -1
- data/locale/Makefile +7 -3
- data/locale/cs_CZ/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/cs_CZ/foreman_snapshot_management.po +195 -0
- data/locale/de/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/de/foreman_snapshot_management.po +10 -10
- data/locale/el/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/el/foreman_snapshot_management.po +190 -0
- data/locale/en/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/en/foreman_snapshot_management.po +22 -13
- data/locale/foreman_snapshot_management.pot +56 -35
- data/locale/fr/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/fr/foreman_snapshot_management.po +196 -0
- data/locale/ja/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/ja/foreman_snapshot_management.po +189 -0
- data/locale/ka/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/ka/foreman_snapshot_management.po +190 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_snapshot_management.mo +0 -0
- data/locale/zh_CN/foreman_snapshot_management.po +191 -0
- data/package.json +3 -2
- data/test/controllers/foreman_snapshot_management/snapshots_controller_test.rb +17 -2
- data/webpack/components/SnapshotManagement/SnapshotManagement.js +2 -0
- data/webpack/components/SnapshotManagement/components/SnapshotForm/SnapshotForm.js +53 -11
- data/webpack/components/SnapshotManagement/components/SnapshotForm/__tests__/__snapshots__/SnapshotForm.test.js.snap +262 -24
- data/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js +61 -0
- data/webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js +53 -0
- data/webpack/components/SnapshotManagementCard/__tests__/__snapshots__/SnapshotManagementCard.test.js.snap +132 -0
- data/webpack/components/SnapshotManagementCard/index.js +1 -0
- data/webpack/global_index.js +13 -0
- metadata +21 -6
@@ -8,6 +8,8 @@ exports[`SnapshotForm rendering render 1`] = `
|
|
8
8
|
"description": "",
|
9
9
|
"includeRam": false,
|
10
10
|
"name": "",
|
11
|
+
"snapshotMode": "",
|
12
|
+
"useQuiesce": false,
|
11
13
|
}
|
12
14
|
}
|
13
15
|
onCancel={[Function]}
|
@@ -25,6 +27,8 @@ exports[`SnapshotForm rendering render 1`] = `
|
|
25
27
|
"_exclusive": Object {},
|
26
28
|
"_mutate": undefined,
|
27
29
|
"_nodes": Array [
|
30
|
+
"snapshotMode",
|
31
|
+
"useQuiesce",
|
28
32
|
"includeRam",
|
29
33
|
"description",
|
30
34
|
"name",
|
@@ -121,6 +125,56 @@ exports[`SnapshotForm rendering render 1`] = `
|
|
121
125
|
],
|
122
126
|
"type": "string",
|
123
127
|
},
|
128
|
+
"snapshotMode": StringSchema {
|
129
|
+
"_blacklist": RefSet {
|
130
|
+
"list": Array [],
|
131
|
+
"refs": Array [],
|
132
|
+
},
|
133
|
+
"_conditions": Array [],
|
134
|
+
"_deps": Array [],
|
135
|
+
"_exclusive": Object {},
|
136
|
+
"_mutate": undefined,
|
137
|
+
"_options": Object {
|
138
|
+
"abortEarly": true,
|
139
|
+
"recursive": true,
|
140
|
+
},
|
141
|
+
"_type": "string",
|
142
|
+
"_typeError": [Function],
|
143
|
+
"_whitelist": RefSet {
|
144
|
+
"list": Array [],
|
145
|
+
"refs": Array [],
|
146
|
+
},
|
147
|
+
"tests": Array [],
|
148
|
+
"transforms": Array [
|
149
|
+
[Function],
|
150
|
+
],
|
151
|
+
"type": "string",
|
152
|
+
},
|
153
|
+
"useQuiesce": BooleanSchema {
|
154
|
+
"_blacklist": RefSet {
|
155
|
+
"list": Array [],
|
156
|
+
"refs": Array [],
|
157
|
+
},
|
158
|
+
"_conditions": Array [],
|
159
|
+
"_deps": Array [],
|
160
|
+
"_exclusive": Object {},
|
161
|
+
"_mutate": undefined,
|
162
|
+
"_options": Object {
|
163
|
+
"abortEarly": true,
|
164
|
+
"recursive": true,
|
165
|
+
},
|
166
|
+
"_type": "boolean",
|
167
|
+
"_typeError": [Function],
|
168
|
+
"_whitelist": RefSet {
|
169
|
+
"list": Array [],
|
170
|
+
"refs": Array [],
|
171
|
+
},
|
172
|
+
"tests": Array [],
|
173
|
+
"transforms": Array [
|
174
|
+
[Function],
|
175
|
+
],
|
176
|
+
"type": "boolean",
|
177
|
+
},
|
124
178
|
},
|
125
179
|
"tests": Array [],
|
126
180
|
"transforms": Array [
|
@@ -146,14 +200,40 @@ exports[`SnapshotForm rendering render 1`] = `
|
|
146
200
|
required={false}
|
147
201
|
type="textarea"
|
148
202
|
/>
|
149
|
-
<
|
150
|
-
className=""
|
151
|
-
|
152
|
-
label
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
203
|
+
<div
|
204
|
+
className="form-group"
|
205
|
+
>
|
206
|
+
<label
|
207
|
+
className="col-md-2 control-label"
|
208
|
+
>
|
209
|
+
Snapshot Mode
|
210
|
+
<FieldLevelHelp
|
211
|
+
buttonClass="field-help"
|
212
|
+
content="Select Snapshot Mode between mutually exclusive options, 'Memory' (includes RAM) and 'Quiesce'."
|
213
|
+
placement="top"
|
214
|
+
rootClose={true}
|
215
|
+
/>
|
216
|
+
</label>
|
217
|
+
<div
|
218
|
+
className="col-md-8"
|
219
|
+
>
|
220
|
+
<select
|
221
|
+
className="common-select form-control"
|
222
|
+
onChange={[Function]}
|
223
|
+
>
|
224
|
+
<option
|
225
|
+
key=""
|
226
|
+
value=""
|
227
|
+
/>
|
228
|
+
<option
|
229
|
+
key="Memory"
|
230
|
+
value="Memory"
|
231
|
+
>
|
232
|
+
Memory
|
233
|
+
</option>
|
234
|
+
</select>
|
235
|
+
</div>
|
236
|
+
</div>
|
157
237
|
</ForemanForm>
|
158
238
|
`;
|
159
239
|
|
@@ -165,6 +245,8 @@ exports[`SnapshotForm rendering render with limitSnapshotNameFormat capability 1
|
|
165
245
|
"description": "",
|
166
246
|
"includeRam": false,
|
167
247
|
"name": "",
|
248
|
+
"snapshotMode": "",
|
249
|
+
"useQuiesce": false,
|
168
250
|
}
|
169
251
|
}
|
170
252
|
onCancel={[Function]}
|
@@ -182,6 +264,8 @@ exports[`SnapshotForm rendering render with limitSnapshotNameFormat capability 1
|
|
182
264
|
"_exclusive": Object {},
|
183
265
|
"_mutate": undefined,
|
184
266
|
"_nodes": Array [
|
267
|
+
"snapshotMode",
|
268
|
+
"useQuiesce",
|
185
269
|
"includeRam",
|
186
270
|
"description",
|
187
271
|
"name",
|
@@ -282,6 +366,56 @@ exports[`SnapshotForm rendering render with limitSnapshotNameFormat capability 1
|
|
282
366
|
],
|
283
367
|
"type": "string",
|
284
368
|
},
|
369
|
+
"snapshotMode": StringSchema {
|
370
|
+
"_blacklist": RefSet {
|
371
|
+
"list": Array [],
|
372
|
+
"refs": Array [],
|
373
|
+
},
|
374
|
+
"_conditions": Array [],
|
375
|
+
"_deps": Array [],
|
376
|
+
"_exclusive": Object {},
|
377
|
+
"_mutate": undefined,
|
378
|
+
"_options": Object {
|
379
|
+
"abortEarly": true,
|
380
|
+
"recursive": true,
|
381
|
+
},
|
382
|
+
"_type": "string",
|
383
|
+
"_typeError": [Function],
|
384
|
+
"_whitelist": RefSet {
|
385
|
+
"list": Array [],
|
386
|
+
"refs": Array [],
|
387
|
+
},
|
388
|
+
"tests": Array [],
|
389
|
+
"transforms": Array [
|
390
|
+
[Function],
|
391
|
+
],
|
392
|
+
"type": "string",
|
393
|
+
},
|
394
|
+
"useQuiesce": BooleanSchema {
|
395
|
+
"_blacklist": RefSet {
|
396
|
+
"list": Array [],
|
397
|
+
"refs": Array [],
|
398
|
+
},
|
399
|
+
"_conditions": Array [],
|
400
|
+
"_deps": Array [],
|
401
|
+
"_exclusive": Object {},
|
402
|
+
"_mutate": undefined,
|
403
|
+
"_options": Object {
|
404
|
+
"abortEarly": true,
|
405
|
+
"recursive": true,
|
406
|
+
},
|
407
|
+
"_type": "boolean",
|
408
|
+
"_typeError": [Function],
|
409
|
+
"_whitelist": RefSet {
|
410
|
+
"list": Array [],
|
411
|
+
"refs": Array [],
|
412
|
+
},
|
413
|
+
"tests": Array [],
|
414
|
+
"transforms": Array [
|
415
|
+
[Function],
|
416
|
+
],
|
417
|
+
"type": "boolean",
|
418
|
+
},
|
285
419
|
},
|
286
420
|
"tests": Array [],
|
287
421
|
"transforms": Array [
|
@@ -307,14 +441,40 @@ exports[`SnapshotForm rendering render with limitSnapshotNameFormat capability 1
|
|
307
441
|
required={false}
|
308
442
|
type="textarea"
|
309
443
|
/>
|
310
|
-
<
|
311
|
-
className=""
|
312
|
-
|
313
|
-
label
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
444
|
+
<div
|
445
|
+
className="form-group"
|
446
|
+
>
|
447
|
+
<label
|
448
|
+
className="col-md-2 control-label"
|
449
|
+
>
|
450
|
+
Snapshot Mode
|
451
|
+
<FieldLevelHelp
|
452
|
+
buttonClass="field-help"
|
453
|
+
content="Select Snapshot Mode between mutually exclusive options, 'Memory' (includes RAM) and 'Quiesce'."
|
454
|
+
placement="top"
|
455
|
+
rootClose={true}
|
456
|
+
/>
|
457
|
+
</label>
|
458
|
+
<div
|
459
|
+
className="col-md-8"
|
460
|
+
>
|
461
|
+
<select
|
462
|
+
className="common-select form-control"
|
463
|
+
onChange={[Function]}
|
464
|
+
>
|
465
|
+
<option
|
466
|
+
key=""
|
467
|
+
value=""
|
468
|
+
/>
|
469
|
+
<option
|
470
|
+
key="Memory"
|
471
|
+
value="Memory"
|
472
|
+
>
|
473
|
+
Memory
|
474
|
+
</option>
|
475
|
+
</select>
|
476
|
+
</div>
|
477
|
+
</div>
|
318
478
|
</ForemanForm>
|
319
479
|
`;
|
320
480
|
|
@@ -343,6 +503,8 @@ exports[`SnapshotForm rendering render with optional Props 1`] = `
|
|
343
503
|
"_exclusive": Object {},
|
344
504
|
"_mutate": undefined,
|
345
505
|
"_nodes": Array [
|
506
|
+
"snapshotMode",
|
507
|
+
"useQuiesce",
|
346
508
|
"includeRam",
|
347
509
|
"description",
|
348
510
|
"name",
|
@@ -439,6 +601,56 @@ exports[`SnapshotForm rendering render with optional Props 1`] = `
|
|
439
601
|
],
|
440
602
|
"type": "string",
|
441
603
|
},
|
604
|
+
"snapshotMode": StringSchema {
|
605
|
+
"_blacklist": RefSet {
|
606
|
+
"list": Array [],
|
607
|
+
"refs": Array [],
|
608
|
+
},
|
609
|
+
"_conditions": Array [],
|
610
|
+
"_deps": Array [],
|
611
|
+
"_exclusive": Object {},
|
612
|
+
"_mutate": undefined,
|
613
|
+
"_options": Object {
|
614
|
+
"abortEarly": true,
|
615
|
+
"recursive": true,
|
616
|
+
},
|
617
|
+
"_type": "string",
|
618
|
+
"_typeError": [Function],
|
619
|
+
"_whitelist": RefSet {
|
620
|
+
"list": Array [],
|
621
|
+
"refs": Array [],
|
622
|
+
},
|
623
|
+
"tests": Array [],
|
624
|
+
"transforms": Array [
|
625
|
+
[Function],
|
626
|
+
],
|
627
|
+
"type": "string",
|
628
|
+
},
|
629
|
+
"useQuiesce": BooleanSchema {
|
630
|
+
"_blacklist": RefSet {
|
631
|
+
"list": Array [],
|
632
|
+
"refs": Array [],
|
633
|
+
},
|
634
|
+
"_conditions": Array [],
|
635
|
+
"_deps": Array [],
|
636
|
+
"_exclusive": Object {},
|
637
|
+
"_mutate": undefined,
|
638
|
+
"_options": Object {
|
639
|
+
"abortEarly": true,
|
640
|
+
"recursive": true,
|
641
|
+
},
|
642
|
+
"_type": "boolean",
|
643
|
+
"_typeError": [Function],
|
644
|
+
"_whitelist": RefSet {
|
645
|
+
"list": Array [],
|
646
|
+
"refs": Array [],
|
647
|
+
},
|
648
|
+
"tests": Array [],
|
649
|
+
"transforms": Array [
|
650
|
+
[Function],
|
651
|
+
],
|
652
|
+
"type": "boolean",
|
653
|
+
},
|
442
654
|
},
|
443
655
|
"tests": Array [],
|
444
656
|
"transforms": Array [
|
@@ -464,13 +676,39 @@ exports[`SnapshotForm rendering render with optional Props 1`] = `
|
|
464
676
|
required={false}
|
465
677
|
type="textarea"
|
466
678
|
/>
|
467
|
-
<
|
468
|
-
className=""
|
469
|
-
|
470
|
-
label
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
679
|
+
<div
|
680
|
+
className="form-group"
|
681
|
+
>
|
682
|
+
<label
|
683
|
+
className="col-md-2 control-label"
|
684
|
+
>
|
685
|
+
Snapshot Mode
|
686
|
+
<FieldLevelHelp
|
687
|
+
buttonClass="field-help"
|
688
|
+
content="Select Snapshot Mode between mutually exclusive options, 'Memory' (includes RAM) and 'Quiesce'."
|
689
|
+
placement="top"
|
690
|
+
rootClose={true}
|
691
|
+
/>
|
692
|
+
</label>
|
693
|
+
<div
|
694
|
+
className="col-md-8"
|
695
|
+
>
|
696
|
+
<select
|
697
|
+
className="common-select form-control"
|
698
|
+
onChange={[Function]}
|
699
|
+
>
|
700
|
+
<option
|
701
|
+
key=""
|
702
|
+
value=""
|
703
|
+
/>
|
704
|
+
<option
|
705
|
+
key="Memory"
|
706
|
+
value="Memory"
|
707
|
+
>
|
708
|
+
Memory
|
709
|
+
</option>
|
710
|
+
</select>
|
711
|
+
</div>
|
712
|
+
</div>
|
475
713
|
</ForemanForm>
|
476
714
|
`;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import PropTypes from 'prop-types';
|
2
|
+
import React from 'react';
|
3
|
+
|
4
|
+
import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
|
5
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
6
|
+
|
7
|
+
import SnapshotManagement from '../SnapshotManagement';
|
8
|
+
|
9
|
+
const SnapshotManagementCard = ({ hostDetails, ...props }) => {
|
10
|
+
const children = [];
|
11
|
+
const capabilities = {
|
12
|
+
editableSnapshotName:
|
13
|
+
hostDetails?.capabilities?.includes('editable_snapshot_name') || false,
|
14
|
+
limitSnapshotNameFormat:
|
15
|
+
hostDetails?.capabilities?.includes('limit_snapshot_name_format') ||
|
16
|
+
false,
|
17
|
+
quiesceOption:
|
18
|
+
hostDetails?.capabilities?.includes('snapshot_include_quiesce') || false,
|
19
|
+
};
|
20
|
+
|
21
|
+
if (hostDetails?.id && hostDetails?.permissions)
|
22
|
+
children.push(
|
23
|
+
<SnapshotManagement
|
24
|
+
key="SnapshotManagement"
|
25
|
+
host={{ id: hostDetails.id, name: hostDetails.name }}
|
26
|
+
canCreate={hostDetails.permissions.create_snapshots}
|
27
|
+
canUpdate={hostDetails.permissions.edit_snapshots}
|
28
|
+
canRevert={hostDetails.permissions.revert_snapshots}
|
29
|
+
canDelete={hostDetails.permissions.destroy_snapshots}
|
30
|
+
capabilities={capabilities}
|
31
|
+
/>
|
32
|
+
);
|
33
|
+
return (
|
34
|
+
<CardTemplate
|
35
|
+
overrideGridProps={{ xl2: 6, xl: 8, lg: 8, md: 12 }}
|
36
|
+
header={__('Snapshots')}
|
37
|
+
>
|
38
|
+
{children}
|
39
|
+
</CardTemplate>
|
40
|
+
);
|
41
|
+
};
|
42
|
+
|
43
|
+
export default SnapshotManagementCard;
|
44
|
+
|
45
|
+
SnapshotManagementCard.propTypes = {
|
46
|
+
hostDetails: PropTypes.shape({
|
47
|
+
name: PropTypes.string,
|
48
|
+
id: PropTypes.number,
|
49
|
+
capabilities: PropTypes.array,
|
50
|
+
permissions: PropTypes.shape({
|
51
|
+
create_snapshots: PropTypes.bool,
|
52
|
+
edit_snapshots: PropTypes.bool,
|
53
|
+
revert_snapshots: PropTypes.bool,
|
54
|
+
destroy_snapshots: PropTypes.bool,
|
55
|
+
}),
|
56
|
+
}),
|
57
|
+
};
|
58
|
+
|
59
|
+
SnapshotManagementCard.defaultProps = {
|
60
|
+
hostDetails: {},
|
61
|
+
};
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
|
2
|
+
|
3
|
+
import SnapshotManagementCard from '../SnapshotManagementCard';
|
4
|
+
|
5
|
+
const hostDetails = {
|
6
|
+
id: 42,
|
7
|
+
name: 'deep.thought',
|
8
|
+
permissions: {
|
9
|
+
create_snapshots: true,
|
10
|
+
edit_snapshots: false,
|
11
|
+
revert_snapshots: true,
|
12
|
+
destroy_snapshots: false,
|
13
|
+
},
|
14
|
+
};
|
15
|
+
|
16
|
+
const hostDetailsVmware = {
|
17
|
+
...hostDetails,
|
18
|
+
capabilities: [
|
19
|
+
'build',
|
20
|
+
'image',
|
21
|
+
'snapshots',
|
22
|
+
'snapshot_include_quiesce',
|
23
|
+
'snapshot_include_ram',
|
24
|
+
'editable_snapshot_name',
|
25
|
+
],
|
26
|
+
};
|
27
|
+
const hostDetailsProxmox = {
|
28
|
+
...hostDetails,
|
29
|
+
capabilities: [
|
30
|
+
'build',
|
31
|
+
'new_volume',
|
32
|
+
'new_interface',
|
33
|
+
'image',
|
34
|
+
'snapshots',
|
35
|
+
'limit_snapshot_name_format',
|
36
|
+
],
|
37
|
+
};
|
38
|
+
|
39
|
+
const fixtures = {
|
40
|
+
'without optional Props': {},
|
41
|
+
'with Props': { hostDetails },
|
42
|
+
'with VMWare capabilities': {
|
43
|
+
hostDetails: hostDetailsVmware,
|
44
|
+
},
|
45
|
+
'with Proxmox capabilities': {
|
46
|
+
hostDetails: hostDetailsProxmox,
|
47
|
+
},
|
48
|
+
};
|
49
|
+
|
50
|
+
describe('SnapshotManagementCard', () => {
|
51
|
+
describe('renders', () =>
|
52
|
+
testComponentSnapshotsWithFixtures(SnapshotManagementCard, fixtures));
|
53
|
+
});
|
@@ -0,0 +1,132 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`SnapshotManagementCard renders with Props 1`] = `
|
4
|
+
<CardTemplate
|
5
|
+
expandable={false}
|
6
|
+
header="Snapshots"
|
7
|
+
masonryLayout={false}
|
8
|
+
overrideDropdownProps={Object {}}
|
9
|
+
overrideGridProps={
|
10
|
+
Object {
|
11
|
+
"lg": 8,
|
12
|
+
"md": 12,
|
13
|
+
"xl": 8,
|
14
|
+
"xl2": 6,
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<Connect(SnapshotManagement)
|
19
|
+
canCreate={true}
|
20
|
+
canDelete={false}
|
21
|
+
canRevert={true}
|
22
|
+
canUpdate={false}
|
23
|
+
capabilities={
|
24
|
+
Object {
|
25
|
+
"editableSnapshotName": false,
|
26
|
+
"limitSnapshotNameFormat": false,
|
27
|
+
"quiesceOption": false,
|
28
|
+
}
|
29
|
+
}
|
30
|
+
host={
|
31
|
+
Object {
|
32
|
+
"id": 42,
|
33
|
+
"name": "deep.thought",
|
34
|
+
}
|
35
|
+
}
|
36
|
+
key="SnapshotManagement"
|
37
|
+
/>
|
38
|
+
</CardTemplate>
|
39
|
+
`;
|
40
|
+
|
41
|
+
exports[`SnapshotManagementCard renders with Proxmox capabilities 1`] = `
|
42
|
+
<CardTemplate
|
43
|
+
expandable={false}
|
44
|
+
header="Snapshots"
|
45
|
+
masonryLayout={false}
|
46
|
+
overrideDropdownProps={Object {}}
|
47
|
+
overrideGridProps={
|
48
|
+
Object {
|
49
|
+
"lg": 8,
|
50
|
+
"md": 12,
|
51
|
+
"xl": 8,
|
52
|
+
"xl2": 6,
|
53
|
+
}
|
54
|
+
}
|
55
|
+
>
|
56
|
+
<Connect(SnapshotManagement)
|
57
|
+
canCreate={true}
|
58
|
+
canDelete={false}
|
59
|
+
canRevert={true}
|
60
|
+
canUpdate={false}
|
61
|
+
capabilities={
|
62
|
+
Object {
|
63
|
+
"editableSnapshotName": false,
|
64
|
+
"limitSnapshotNameFormat": true,
|
65
|
+
"quiesceOption": false,
|
66
|
+
}
|
67
|
+
}
|
68
|
+
host={
|
69
|
+
Object {
|
70
|
+
"id": 42,
|
71
|
+
"name": "deep.thought",
|
72
|
+
}
|
73
|
+
}
|
74
|
+
key="SnapshotManagement"
|
75
|
+
/>
|
76
|
+
</CardTemplate>
|
77
|
+
`;
|
78
|
+
|
79
|
+
exports[`SnapshotManagementCard renders with VMWare capabilities 1`] = `
|
80
|
+
<CardTemplate
|
81
|
+
expandable={false}
|
82
|
+
header="Snapshots"
|
83
|
+
masonryLayout={false}
|
84
|
+
overrideDropdownProps={Object {}}
|
85
|
+
overrideGridProps={
|
86
|
+
Object {
|
87
|
+
"lg": 8,
|
88
|
+
"md": 12,
|
89
|
+
"xl": 8,
|
90
|
+
"xl2": 6,
|
91
|
+
}
|
92
|
+
}
|
93
|
+
>
|
94
|
+
<Connect(SnapshotManagement)
|
95
|
+
canCreate={true}
|
96
|
+
canDelete={false}
|
97
|
+
canRevert={true}
|
98
|
+
canUpdate={false}
|
99
|
+
capabilities={
|
100
|
+
Object {
|
101
|
+
"editableSnapshotName": true,
|
102
|
+
"limitSnapshotNameFormat": false,
|
103
|
+
"quiesceOption": true,
|
104
|
+
}
|
105
|
+
}
|
106
|
+
host={
|
107
|
+
Object {
|
108
|
+
"id": 42,
|
109
|
+
"name": "deep.thought",
|
110
|
+
}
|
111
|
+
}
|
112
|
+
key="SnapshotManagement"
|
113
|
+
/>
|
114
|
+
</CardTemplate>
|
115
|
+
`;
|
116
|
+
|
117
|
+
exports[`SnapshotManagementCard renders without optional Props 1`] = `
|
118
|
+
<CardTemplate
|
119
|
+
expandable={false}
|
120
|
+
header="Snapshots"
|
121
|
+
masonryLayout={false}
|
122
|
+
overrideDropdownProps={Object {}}
|
123
|
+
overrideGridProps={
|
124
|
+
Object {
|
125
|
+
"lg": 8,
|
126
|
+
"md": 12,
|
127
|
+
"xl": 8,
|
128
|
+
"xl2": 6,
|
129
|
+
}
|
130
|
+
}
|
131
|
+
/>
|
132
|
+
`;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './SnapshotManagementCard';
|
data/webpack/global_index.js
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
1
3
|
import { registerReducer } from 'foremanReact/common/MountingService';
|
4
|
+
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
5
|
+
|
2
6
|
import reducers from './reducers';
|
7
|
+
import SnapshotManagementCard from './components/SnapshotManagementCard';
|
3
8
|
|
4
9
|
// register reducers
|
5
10
|
Object.entries(reducers).forEach(([key, reducer]) =>
|
6
11
|
registerReducer(key, reducer)
|
7
12
|
);
|
13
|
+
|
14
|
+
// register HostDetails-Fill
|
15
|
+
addGlobalFill(
|
16
|
+
'host-overview-cards',
|
17
|
+
'foreman_snapshot_management-card',
|
18
|
+
<SnapshotManagementCard key="foreman_snapshot_management-card" />,
|
19
|
+
1000
|
20
|
+
);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_snapshot_management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Foreman-plugin to manage snapshots in a virtual-hardware environments.
|
14
14
|
email:
|
@@ -48,12 +48,24 @@ files:
|
|
48
48
|
- lib/foreman_snapshot_management/version.rb
|
49
49
|
- lib/tasks/foreman_snapshot_management_tasks.rake
|
50
50
|
- locale/Makefile
|
51
|
+
- locale/cs_CZ/LC_MESSAGES/foreman_snapshot_management.mo
|
52
|
+
- locale/cs_CZ/foreman_snapshot_management.po
|
51
53
|
- locale/de/LC_MESSAGES/foreman_snapshot_management.mo
|
52
54
|
- locale/de/foreman_snapshot_management.po
|
55
|
+
- locale/el/LC_MESSAGES/foreman_snapshot_management.mo
|
56
|
+
- locale/el/foreman_snapshot_management.po
|
53
57
|
- locale/en/LC_MESSAGES/foreman_snapshot_management.mo
|
54
58
|
- locale/en/foreman_snapshot_management.po
|
55
59
|
- locale/foreman_snapshot_management.pot
|
60
|
+
- locale/fr/LC_MESSAGES/foreman_snapshot_management.mo
|
61
|
+
- locale/fr/foreman_snapshot_management.po
|
56
62
|
- locale/gemspec.rb
|
63
|
+
- locale/ja/LC_MESSAGES/foreman_snapshot_management.mo
|
64
|
+
- locale/ja/foreman_snapshot_management.po
|
65
|
+
- locale/ka/LC_MESSAGES/foreman_snapshot_management.mo
|
66
|
+
- locale/ka/foreman_snapshot_management.po
|
67
|
+
- locale/zh_CN/LC_MESSAGES/foreman_snapshot_management.mo
|
68
|
+
- locale/zh_CN/foreman_snapshot_management.po
|
57
69
|
- package.json
|
58
70
|
- test/controllers/api/v2/snapshots_test.rb
|
59
71
|
- test/controllers/foreman_snapshot_management/snapshots_controller_test.rb
|
@@ -87,6 +99,10 @@ files:
|
|
87
99
|
- webpack/components/SnapshotManagement/components/SnapshotList/snapshotList.scss
|
88
100
|
- webpack/components/SnapshotManagement/index.js
|
89
101
|
- webpack/components/SnapshotManagement/snapshotManagement.scss
|
102
|
+
- webpack/components/SnapshotManagementCard/SnapshotManagementCard.js
|
103
|
+
- webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js
|
104
|
+
- webpack/components/SnapshotManagementCard/__tests__/__snapshots__/SnapshotManagementCard.test.js.snap
|
105
|
+
- webpack/components/SnapshotManagementCard/index.js
|
90
106
|
- webpack/global_index.js
|
91
107
|
- webpack/global_test_setup.js
|
92
108
|
- webpack/index.js
|
@@ -111,13 +127,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
127
|
- !ruby/object:Gem::Version
|
112
128
|
version: '0'
|
113
129
|
requirements: []
|
114
|
-
|
115
|
-
rubygems_version: 2.7.6
|
130
|
+
rubygems_version: 3.2.5
|
116
131
|
signing_key:
|
117
132
|
specification_version: 4
|
118
133
|
summary: Snapshot Management for machines on virtualization-platforms
|
119
134
|
test_files:
|
120
|
-
- test/factories/proxmox_factory.rb
|
121
|
-
- test/test_plugin_helper.rb
|
122
135
|
- test/controllers/foreman_snapshot_management/snapshots_controller_test.rb
|
123
136
|
- test/controllers/api/v2/snapshots_test.rb
|
137
|
+
- test/factories/proxmox_factory.rb
|
138
|
+
- test/test_plugin_helper.rb
|