foreman_openscap 9.0.3 → 9.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/foreman_openscap/version.rb +1 -1
  3. data/webpack/components/OpenscapRemediationWizard/Footer.js +54 -0
  4. data/webpack/components/OpenscapRemediationWizard/constants.js +9 -0
  5. data/webpack/components/OpenscapRemediationWizard/index.js +11 -5
  6. metadata +7 -38
  7. data/locale/cs_CZ/foreman_openscap.edit.po +0 -1455
  8. data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
  9. data/locale/de/foreman_openscap.edit.po +0 -1667
  10. data/locale/de/foreman_openscap.po.time_stamp +0 -0
  11. data/locale/en/foreman_openscap.edit.po +0 -1455
  12. data/locale/en/foreman_openscap.po.time_stamp +0 -0
  13. data/locale/en_GB/foreman_openscap.edit.po +0 -1467
  14. data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
  15. data/locale/es/foreman_openscap.edit.po +0 -1664
  16. data/locale/es/foreman_openscap.po.time_stamp +0 -0
  17. data/locale/fr/foreman_openscap.edit.po +0 -1676
  18. data/locale/fr/foreman_openscap.po.time_stamp +0 -0
  19. data/locale/gl/foreman_openscap.edit.po +0 -1455
  20. data/locale/gl/foreman_openscap.po.time_stamp +0 -0
  21. data/locale/it/foreman_openscap.edit.po +0 -1466
  22. data/locale/it/foreman_openscap.po.time_stamp +0 -0
  23. data/locale/ja/foreman_openscap.edit.po +0 -1659
  24. data/locale/ja/foreman_openscap.po.time_stamp +0 -0
  25. data/locale/ka/foreman_openscap.edit.po +0 -1654
  26. data/locale/ka/foreman_openscap.po.time_stamp +0 -0
  27. data/locale/ko/foreman_openscap.edit.po +0 -1470
  28. data/locale/ko/foreman_openscap.po.time_stamp +0 -0
  29. data/locale/pt_BR/foreman_openscap.edit.po +0 -1669
  30. data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
  31. data/locale/ru/foreman_openscap.edit.po +0 -1474
  32. data/locale/ru/foreman_openscap.po.time_stamp +0 -0
  33. data/locale/sv_SE/foreman_openscap.edit.po +0 -1455
  34. data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
  35. data/locale/zh_CN/foreman_openscap.edit.po +0 -1656
  36. data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
  37. data/locale/zh_TW/foreman_openscap.edit.po +0 -1471
  38. data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f47e20cecbc1294a564f405e94da207c92060f948a056aa0ef22d14b226eada
4
- data.tar.gz: cd21764970990472b08da16879541b9a049662ff91d4af42bb7c24f238c1e725
3
+ metadata.gz: db9d5beb1a4f3e676150bd6c7982feccee708f920dd68cb422b0736824a10cee
4
+ data.tar.gz: cb3c657f011aac5d73fc6595a5b9abed49033928223a53974c20f69cd8f97eed
5
5
  SHA512:
6
- metadata.gz: f300139aa92a12754ad23da61402e93fe5654cb831ecbbeef04f595c7654a38838d44c257066ae59a7e2c6e8aac44e1341ce7fb0ad9655102cb8bb1675fbbdf2
7
- data.tar.gz: 21fb172c6a58710a62da0fcca139d868001ab9eabcc7525557af8bbf930195cda66fd7362a6677155644b1b82b0318cb265efc3986f8ebf764f5e16da0432dad
6
+ metadata.gz: 4a7f09d5b4102cb8d1b95b2ed9e6b2005b84e5a28a9896411be2655bc073d5f4cb59b55096a42072e3450e685753534bdf0afcf7a91f4f567e412269092593a5
7
+ data.tar.gz: 9fddaa152d91a99f7efaa986ffdaf64926c56378f170ea2a82213648c10c163e97c081f122100f1cb823537f8ad540623dc1bfe54f355817f198948ba299dc17
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "9.0.3".freeze
2
+ VERSION = "9.0.4".freeze
3
3
  end
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import {
3
+ Button,
4
+ WizardFooter,
5
+ WizardContextConsumer,
6
+ } from '@patternfly/react-core';
7
+ import { translate as __ } from 'foremanReact/common/I18n';
8
+ import { WIZARD_TITLES } from './constants';
9
+
10
+ export const Footer = () => (
11
+ <WizardFooter>
12
+ <WizardContextConsumer>
13
+ {({ activeStep, onNext, onBack, onClose, goToStepByName }) => {
14
+ const isValid =
15
+ activeStep && activeStep.enableNext !== undefined
16
+ ? activeStep.enableNext
17
+ : true;
18
+
19
+ return (
20
+ <>
21
+ {!activeStep.isFinishedStep ? (
22
+ <Button
23
+ ouiaId="oscap-rem-wiz-next-button"
24
+ variant="primary"
25
+ type="submit"
26
+ onClick={onNext}
27
+ isDisabled={!isValid}
28
+ >
29
+ {activeStep.name === WIZARD_TITLES.reviewRemediation
30
+ ? __('Run')
31
+ : __('Next')}
32
+ </Button>
33
+ ) : null}
34
+ <Button
35
+ ouiaId="oscap-rem-wiz-back-button"
36
+ variant="secondary"
37
+ onClick={onBack}
38
+ isDisabled={activeStep.name === WIZARD_TITLES.snippetSelect}
39
+ >
40
+ {__('Back')}
41
+ </Button>
42
+ <Button
43
+ ouiaId="oscap-rem-wiz-cancel-button"
44
+ variant="link"
45
+ onClick={onClose}
46
+ >
47
+ {__('Cancel')}
48
+ </Button>
49
+ </>
50
+ );
51
+ }}
52
+ </WizardContextConsumer>
53
+ </WizardFooter>
54
+ );
@@ -1,3 +1,5 @@
1
+ import { translate as __ } from 'foremanReact/common/I18n';
2
+
1
3
  export const OPENSCAP_REMEDIATION_MODAL_ID = 'openscapRemediationModal';
2
4
  export const HOSTS_PATH = '/hosts';
3
5
  export const FAIL_RULE_SEARCH = 'fails_xccdf_rule';
@@ -12,3 +14,10 @@ export const JOB_INVOCATION_API_REQUEST_KEY = 'OPENSCAP_REX_JOB_INVOCATIONS';
12
14
 
13
15
  export const SNIPPET_SH = 'urn:xccdf:fix:script:sh';
14
16
  export const SNIPPET_ANSIBLE = 'urn:xccdf:fix:script:ansible';
17
+
18
+ export const WIZARD_TITLES = {
19
+ snippetSelect: __('Select snippet'),
20
+ reviewHosts: __('Review hosts'),
21
+ reviewRemediation: __('Review remediation'),
22
+ finish: __('Done'),
23
+ };
@@ -7,12 +7,17 @@ import { sprintf, translate as __ } from 'foremanReact/common/I18n';
7
7
  import { API_OPERATIONS, get } from 'foremanReact/redux/API';
8
8
 
9
9
  import OpenscapRemediationWizardContext from './OpenscapRemediationWizardContext';
10
+ import { Footer } from './Footer';
10
11
  import {
11
12
  selectLogResponse,
12
13
  selectLogError,
13
14
  selectLogStatus,
14
15
  } from './OpenscapRemediationSelectors';
15
- import { REPORT_LOG_REQUEST_KEY, FAIL_RULE_SEARCH } from './constants';
16
+ import {
17
+ REPORT_LOG_REQUEST_KEY,
18
+ FAIL_RULE_SEARCH,
19
+ WIZARD_TITLES,
20
+ } from './constants';
16
21
  import { SnippetSelect, ReviewHosts, ReviewRemediation, Finish } from './steps';
17
22
 
18
23
  const OpenscapRemediationWizard = ({
@@ -66,7 +71,7 @@ const OpenscapRemediationWizard = ({
66
71
 
67
72
  const reviewHostsStep = {
68
73
  id: 2,
69
- name: __('Review hosts'),
74
+ name: WIZARD_TITLES.reviewHosts,
70
75
  component: <ReviewHosts />,
71
76
  canJumpTo: Boolean(snippet && method === 'job'),
72
77
  enableNext: Boolean(snippet && method),
@@ -74,7 +79,7 @@ const OpenscapRemediationWizard = ({
74
79
  const steps = [
75
80
  {
76
81
  id: 1,
77
- name: __('Select snippet'),
82
+ name: WIZARD_TITLES.snippetSelect,
78
83
  component: <SnippetSelect />,
79
84
  canJumpTo: true,
80
85
  enableNext: Boolean(snippet && method),
@@ -82,7 +87,7 @@ const OpenscapRemediationWizard = ({
82
87
  ...(snippet && method === 'job' ? [reviewHostsStep] : []),
83
88
  {
84
89
  id: 3,
85
- name: __('Review remediation'),
90
+ name: WIZARD_TITLES.reviewRemediation,
86
91
  component: <ReviewRemediation />,
87
92
  canJumpTo: Boolean(snippet && method),
88
93
  enableNext: method === 'job',
@@ -90,7 +95,7 @@ const OpenscapRemediationWizard = ({
90
95
  },
91
96
  {
92
97
  id: 4,
93
- name: __('Done'),
98
+ name: WIZARD_TITLES.finish,
94
99
  component: <Finish onClose={onWizardClose} />,
95
100
  isFinishedStep: true,
96
101
  },
@@ -128,6 +133,7 @@ const OpenscapRemediationWizard = ({
128
133
  isOpen={isRemediationWizardOpen}
129
134
  steps={steps}
130
135
  onClose={onWizardClose}
136
+ footer={<Footer />}
131
137
  />
132
138
  </OpenscapRemediationWizardContext.Provider>
133
139
  )}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.3
4
+ version: 9.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - slukasik@redhat.com
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -296,71 +296,39 @@ files:
296
296
  - locale/Makefile
297
297
  - locale/action_names.rb
298
298
  - locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo
299
- - locale/cs_CZ/foreman_openscap.edit.po
300
299
  - locale/cs_CZ/foreman_openscap.po
301
- - locale/cs_CZ/foreman_openscap.po.time_stamp
302
300
  - locale/de/LC_MESSAGES/foreman_openscap.mo
303
- - locale/de/foreman_openscap.edit.po
304
301
  - locale/de/foreman_openscap.po
305
- - locale/de/foreman_openscap.po.time_stamp
306
302
  - locale/en/LC_MESSAGES/foreman_openscap.mo
307
- - locale/en/foreman_openscap.edit.po
308
303
  - locale/en/foreman_openscap.po
309
- - locale/en/foreman_openscap.po.time_stamp
310
304
  - locale/en_GB/LC_MESSAGES/foreman_openscap.mo
311
- - locale/en_GB/foreman_openscap.edit.po
312
305
  - locale/en_GB/foreman_openscap.po
313
- - locale/en_GB/foreman_openscap.po.time_stamp
314
306
  - locale/es/LC_MESSAGES/foreman_openscap.mo
315
- - locale/es/foreman_openscap.edit.po
316
307
  - locale/es/foreman_openscap.po
317
- - locale/es/foreman_openscap.po.time_stamp
318
308
  - locale/foreman_openscap.pot
319
309
  - locale/fr/LC_MESSAGES/foreman_openscap.mo
320
- - locale/fr/foreman_openscap.edit.po
321
310
  - locale/fr/foreman_openscap.po
322
- - locale/fr/foreman_openscap.po.time_stamp
323
311
  - locale/gl/LC_MESSAGES/foreman_openscap.mo
324
- - locale/gl/foreman_openscap.edit.po
325
312
  - locale/gl/foreman_openscap.po
326
- - locale/gl/foreman_openscap.po.time_stamp
327
313
  - locale/it/LC_MESSAGES/foreman_openscap.mo
328
- - locale/it/foreman_openscap.edit.po
329
314
  - locale/it/foreman_openscap.po
330
- - locale/it/foreman_openscap.po.time_stamp
331
315
  - locale/ja/LC_MESSAGES/foreman_openscap.mo
332
- - locale/ja/foreman_openscap.edit.po
333
316
  - locale/ja/foreman_openscap.po
334
- - locale/ja/foreman_openscap.po.time_stamp
335
317
  - locale/ka/LC_MESSAGES/foreman_openscap.mo
336
- - locale/ka/foreman_openscap.edit.po
337
318
  - locale/ka/foreman_openscap.po
338
- - locale/ka/foreman_openscap.po.time_stamp
339
319
  - locale/ko/LC_MESSAGES/foreman_openscap.mo
340
- - locale/ko/foreman_openscap.edit.po
341
320
  - locale/ko/foreman_openscap.po
342
- - locale/ko/foreman_openscap.po.time_stamp
343
321
  - locale/pt_BR/LC_MESSAGES/foreman_openscap.mo
344
- - locale/pt_BR/foreman_openscap.edit.po
345
322
  - locale/pt_BR/foreman_openscap.po
346
- - locale/pt_BR/foreman_openscap.po.time_stamp
347
323
  - locale/ru/LC_MESSAGES/foreman_openscap.mo
348
- - locale/ru/foreman_openscap.edit.po
349
324
  - locale/ru/foreman_openscap.po
350
- - locale/ru/foreman_openscap.po.time_stamp
351
325
  - locale/sv_SE/LC_MESSAGES/foreman_openscap.mo
352
- - locale/sv_SE/foreman_openscap.edit.po
353
326
  - locale/sv_SE/foreman_openscap.po
354
- - locale/sv_SE/foreman_openscap.po.time_stamp
355
327
  - locale/zanata.xml
356
328
  - locale/zh_CN/LC_MESSAGES/foreman_openscap.mo
357
- - locale/zh_CN/foreman_openscap.edit.po
358
329
  - locale/zh_CN/foreman_openscap.po
359
- - locale/zh_CN/foreman_openscap.po.time_stamp
360
330
  - locale/zh_TW/LC_MESSAGES/foreman_openscap.mo
361
- - locale/zh_TW/foreman_openscap.edit.po
362
331
  - locale/zh_TW/foreman_openscap.po
363
- - locale/zh_TW/foreman_openscap.po.time_stamp
364
332
  - package.json
365
333
  - test/factories/arf_report_factory.rb
366
334
  - test/factories/asset_factory.rb
@@ -418,6 +386,7 @@ files:
418
386
  - webpack/components/IndexTable/IndexTableHelper.js
419
387
  - webpack/components/IndexTable/index.js
420
388
  - webpack/components/LinkButton.js
389
+ - webpack/components/OpenscapRemediationWizard/Footer.js
421
390
  - webpack/components/OpenscapRemediationWizard/OpenscapRemediationSelectors.js
422
391
  - webpack/components/OpenscapRemediationWizard/OpenscapRemediationWizardContext.js
423
392
  - webpack/components/OpenscapRemediationWizard/ViewSelectedHostsLink.js
@@ -457,7 +426,7 @@ homepage: https://github.com/theforeman/foreman_openscap
457
426
  licenses:
458
427
  - GPL-3.0
459
428
  metadata: {}
460
- post_install_message:
429
+ post_install_message:
461
430
  rdoc_options: []
462
431
  require_paths:
463
432
  - lib
@@ -472,8 +441,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
472
441
  - !ruby/object:Gem::Version
473
442
  version: '0'
474
443
  requirements: []
475
- rubygems_version: 3.2.33
476
- signing_key:
444
+ rubygems_version: 3.3.26
445
+ signing_key:
477
446
  specification_version: 4
478
447
  summary: Foreman plug-in for displaying OpenSCAP audit reports
479
448
  test_files: