foreman_openscap 10.0.0 → 10.0.2

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_openscap/locale/cs_CZ/foreman_openscap.js +115 -118
  3. data/app/assets/javascripts/foreman_openscap/locale/de/foreman_openscap.js +12 -15
  4. data/app/assets/javascripts/foreman_openscap/locale/en/foreman_openscap.js +1 -4
  5. data/app/assets/javascripts/foreman_openscap/locale/en_GB/foreman_openscap.js +3 -6
  6. data/app/assets/javascripts/foreman_openscap/locale/es/foreman_openscap.js +12 -15
  7. data/app/assets/javascripts/foreman_openscap/locale/fr/foreman_openscap.js +83 -86
  8. data/app/assets/javascripts/foreman_openscap/locale/gl/foreman_openscap.js +4 -7
  9. data/app/assets/javascripts/foreman_openscap/locale/it/foreman_openscap.js +10 -13
  10. data/app/assets/javascripts/foreman_openscap/locale/ja/foreman_openscap.js +68 -71
  11. data/app/assets/javascripts/foreman_openscap/locale/ka/foreman_openscap.js +28 -31
  12. data/app/assets/javascripts/foreman_openscap/locale/ko/foreman_openscap.js +12 -15
  13. data/app/assets/javascripts/foreman_openscap/locale/pt_BR/foreman_openscap.js +9 -12
  14. data/app/assets/javascripts/foreman_openscap/locale/ru/foreman_openscap.js +8 -11
  15. data/app/assets/javascripts/foreman_openscap/locale/sv_SE/foreman_openscap.js +6 -9
  16. data/app/assets/javascripts/foreman_openscap/locale/zh_CN/foreman_openscap.js +67 -70
  17. data/app/assets/javascripts/foreman_openscap/locale/zh_TW/foreman_openscap.js +9 -12
  18. data/app/services/foreman_openscap/lookup_key_overrider.rb +6 -5
  19. data/app/views/job_templates/run_openscap_remediation_-_ansible_default.erb +2 -0
  20. data/config/routes.rb +9 -16
  21. data/lib/foreman_openscap/version.rb +1 -1
  22. data/locale/Makefile +12 -2
  23. data/locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo +0 -0
  24. data/locale/cs_CZ/foreman_openscap.po +120 -121
  25. data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
  26. data/locale/de/foreman_openscap.po +13 -16
  27. data/locale/en/LC_MESSAGES/foreman_openscap.mo +0 -0
  28. data/locale/en/foreman_openscap.po +1 -4
  29. data/locale/en_GB/LC_MESSAGES/foreman_openscap.mo +0 -0
  30. data/locale/en_GB/foreman_openscap.po +3 -6
  31. data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
  32. data/locale/es/foreman_openscap.po +12 -15
  33. data/locale/foreman_openscap.pot +2 -6
  34. data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
  35. data/locale/fr/foreman_openscap.po +83 -86
  36. data/locale/gl/LC_MESSAGES/foreman_openscap.mo +0 -0
  37. data/locale/gl/foreman_openscap.po +4 -7
  38. data/locale/it/LC_MESSAGES/foreman_openscap.mo +0 -0
  39. data/locale/it/foreman_openscap.po +10 -13
  40. data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
  41. data/locale/ja/foreman_openscap.po +68 -71
  42. data/locale/ka/LC_MESSAGES/foreman_openscap.mo +0 -0
  43. data/locale/ka/foreman_openscap.po +28 -31
  44. data/locale/ko/LC_MESSAGES/foreman_openscap.mo +0 -0
  45. data/locale/ko/foreman_openscap.po +12 -15
  46. data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
  47. data/locale/pt_BR/foreman_openscap.po +9 -12
  48. data/locale/ru/LC_MESSAGES/foreman_openscap.mo +0 -0
  49. data/locale/ru/foreman_openscap.po +8 -11
  50. data/locale/sv_SE/LC_MESSAGES/foreman_openscap.mo +0 -0
  51. data/locale/sv_SE/foreman_openscap.po +6 -9
  52. data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
  53. data/locale/zh_CN/foreman_openscap.po +67 -70
  54. data/locale/zh_TW/LC_MESSAGES/foreman_openscap.mo +0 -0
  55. data/locale/zh_TW/foreman_openscap.po +9 -12
  56. data/test/functional/openscap_proxies_controller_test.rb +0 -1
  57. metadata +3 -39
  58. data/locale/action_names.rb +0 -2
  59. data/locale/cs_CZ/foreman_openscap.edit.po +0 -1443
  60. data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
  61. data/locale/de/foreman_openscap.edit.po +0 -1468
  62. data/locale/de/foreman_openscap.po.time_stamp +0 -0
  63. data/locale/en/foreman_openscap.edit.po +0 -1443
  64. data/locale/en/foreman_openscap.po.time_stamp +0 -0
  65. data/locale/en_GB/foreman_openscap.edit.po +0 -1443
  66. data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
  67. data/locale/es/foreman_openscap.edit.po +0 -1463
  68. data/locale/es/foreman_openscap.po.time_stamp +0 -0
  69. data/locale/fr/foreman_openscap.edit.po +0 -1469
  70. data/locale/fr/foreman_openscap.po.time_stamp +0 -0
  71. data/locale/gl/foreman_openscap.edit.po +0 -1443
  72. data/locale/gl/foreman_openscap.po.time_stamp +0 -0
  73. data/locale/it/foreman_openscap.edit.po +0 -1445
  74. data/locale/it/foreman_openscap.po.time_stamp +0 -0
  75. data/locale/ja/foreman_openscap.edit.po +0 -1460
  76. data/locale/ja/foreman_openscap.po.time_stamp +0 -0
  77. data/locale/ka/foreman_openscap.edit.po +0 -1449
  78. data/locale/ka/foreman_openscap.po.time_stamp +0 -0
  79. data/locale/ko/foreman_openscap.edit.po +0 -1443
  80. data/locale/ko/foreman_openscap.po.time_stamp +0 -0
  81. data/locale/pt_BR/foreman_openscap.edit.po +0 -1468
  82. data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
  83. data/locale/ru/foreman_openscap.edit.po +0 -1447
  84. data/locale/ru/foreman_openscap.po.time_stamp +0 -0
  85. data/locale/sv_SE/foreman_openscap.edit.po +0 -1443
  86. data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
  87. data/locale/zh_CN/foreman_openscap.edit.po +0 -1459
  88. data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
  89. data/locale/zh_TW/foreman_openscap.edit.po +0 -1444
  90. data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
  91. data/webpack/components/EditableInput.js +0 -166
  92. data/webpack/components/EditableInput.scss +0 -3
  93. data/webpack/helpers/formFieldsHelper.js +0 -114
File without changes
@@ -1,166 +0,0 @@
1
- import React, { useState } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { translate as __ } from 'foremanReact/common/I18n';
4
- import {
5
- Button,
6
- Split,
7
- SplitItem,
8
- Spinner,
9
- FormGroup,
10
- } from '@patternfly/react-core';
11
- import {
12
- TimesIcon,
13
- CheckIcon,
14
- PencilAltIcon,
15
- ExclamationCircleIcon,
16
- } from '@patternfly/react-icons';
17
-
18
- import './EditableInput.scss';
19
-
20
- const EditableInput = props => {
21
- const [editing, setEditing] = useState(false);
22
- const [submitting, setSubmitting] = useState(false);
23
- const [inputValue, setInputValue] = useState(props.value);
24
- const [error, setError] = useState('');
25
- const [touched, setTouched] = useState(false);
26
-
27
- const stopSubmitting = () => setSubmitting(false);
28
-
29
- const handleSubmit = event => {
30
- event.preventDefault();
31
- onSubmit();
32
- };
33
-
34
- const onFinish = () => {
35
- setSubmitting(false);
36
- setEditing(false);
37
- };
38
-
39
- const onSubmit = () => {
40
- setSubmitting(true);
41
- props.onConfirm(inputValue, onFinish, stopSubmitting, onError);
42
- };
43
-
44
- const onError = err => {
45
- setTouched(false);
46
- setError(err);
47
- };
48
-
49
- const onCancel = () => {
50
- setInputValue(props.value);
51
- setEditing(false);
52
- setError('');
53
- };
54
-
55
- const onChange = value => {
56
- if (!touched) {
57
- setTouched(true);
58
- }
59
- setInputValue(value);
60
- };
61
-
62
- const editBtn = (
63
- <SplitItem>
64
- <Button
65
- ouiaId={`oscap-edit-${props.attrName}-edit-button`}
66
- className="inline-edit-icon"
67
- aria-label={`edit ${props.attrName}`}
68
- variant="plain"
69
- onClick={() => setEditing(true)}
70
- >
71
- <PencilAltIcon />
72
- </Button>
73
- </SplitItem>
74
- );
75
-
76
- if (!editing) {
77
- return (
78
- <Split>
79
- <SplitItem>{props.value || <i>{__('None provided')}</i>}</SplitItem>
80
- {props.allowed && editBtn}
81
- </Split>
82
- );
83
- }
84
-
85
- const Component = props.component;
86
-
87
- const shouldValidate = (isTouched, err) => {
88
- if (!isTouched) {
89
- return err ? 'error' : 'success';
90
- }
91
- return 'noval';
92
- };
93
-
94
- const valid = shouldValidate(touched, error);
95
-
96
- return (
97
- <Split>
98
- <SplitItem>
99
- <form onSubmit={handleSubmit} className="pf-c-form">
100
- <FormGroup
101
- helperTextInvalid={error}
102
- helperTextInvalidIcon={<ExclamationCircleIcon />}
103
- validated={valid}
104
- >
105
- <Component
106
- {...props.inputProps}
107
- type="text"
108
- aria-label={`${props.attrName} text input`}
109
- isDisabled={submitting}
110
- value={inputValue || ''}
111
- onChange={onChange}
112
- validated={valid}
113
- />
114
- </FormGroup>
115
- </form>
116
- </SplitItem>
117
- <SplitItem>
118
- <Button
119
- ouiaId={`oscap-edit-${props.attrName}-submit-button`}
120
- aria-label={`submit ${props.attrName}`}
121
- variant="plain"
122
- onClick={onSubmit}
123
- isDisabled={submitting}
124
- >
125
- <CheckIcon />
126
- </Button>
127
- </SplitItem>
128
- <SplitItem>
129
- <Button
130
- ouiaId={`oscap-edit-${props.attrName}-cancel-button`}
131
- aria-label={`cancel editing ${props.attrName}`}
132
- variant="plain"
133
- onClick={onCancel}
134
- isDisabled={submitting}
135
- >
136
- <TimesIcon />
137
- </Button>
138
- </SplitItem>
139
- <SplitItem>
140
- {submitting && (
141
- <Spinner
142
- key="spinner"
143
- size="lg"
144
- id={`edit-${props.attrName}-spinner`}
145
- />
146
- )}
147
- </SplitItem>
148
- </Split>
149
- );
150
- };
151
-
152
- EditableInput.propTypes = {
153
- allowed: PropTypes.bool.isRequired,
154
- value: PropTypes.string,
155
- onConfirm: PropTypes.func.isRequired,
156
- attrName: PropTypes.string.isRequired,
157
- component: PropTypes.object.isRequired,
158
- inputProps: PropTypes.object,
159
- };
160
-
161
- EditableInput.defaultProps = {
162
- inputProps: {},
163
- value: '',
164
- };
165
-
166
- export default EditableInput;
@@ -1,3 +0,0 @@
1
- .inline-edit-icon {
2
- padding-top: 2px;
3
- }
@@ -1,114 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import {
5
- FormGroup,
6
- TextInput,
7
- TextArea,
8
- FormSelect,
9
- FormSelectOption,
10
- } from '@patternfly/react-core';
11
- import { ExclamationCircleIcon } from '@patternfly/react-icons';
12
-
13
- export const SelectField = props => {
14
- const { selectItems, field, form } = props;
15
- const fieldProps = wrapFieldProps(field);
16
-
17
- const valid = shouldValidate(form, field.name);
18
-
19
- return (
20
- <FormGroup
21
- label={props.label}
22
- isRequired={props.isRequired}
23
- helperTextInvalid={form.errors[field.name]}
24
- helperTextInvalidIcon={<ExclamationCircleIcon />}
25
- validated={valid}
26
- >
27
- <FormSelect
28
- ouiaId={`oscap-form-sel-${field.name}`}
29
- {...fieldProps}
30
- className="without_select2"
31
- aria-label={fieldProps.name}
32
- validated={valid}
33
- isDisabled={form.isSubmitting}
34
- >
35
- <FormSelectOption key={0} value="" label={props.blankLabel} />
36
- {selectItems.map((item, idx) => (
37
- <FormSelectOption key={idx + 1} value={item.id} label={item.name} />
38
- ))}
39
- </FormSelect>
40
- </FormGroup>
41
- );
42
- };
43
-
44
- SelectField.propTypes = {
45
- selectItems: PropTypes.array,
46
- label: PropTypes.string.isRequired,
47
- isRequired: PropTypes.bool,
48
- field: PropTypes.object.isRequired,
49
- form: PropTypes.object.isRequired,
50
- blankLabel: PropTypes.string.isRequired,
51
- };
52
- SelectField.defaultProps = {
53
- selectItems: [],
54
- isRequired: false,
55
- };
56
-
57
- const wrapFieldProps = fieldProps => {
58
- const { onChange } = fieldProps;
59
- // modify onChange args to correctly wire formik with pf4 input handlers
60
- const wrappedOnChange = (value, event) => {
61
- onChange(event);
62
- };
63
-
64
- return { ...fieldProps, onChange: wrappedOnChange };
65
- };
66
-
67
- const shouldValidate = (form, fieldName) => {
68
- if (form.touched[fieldName]) {
69
- return form.errors[fieldName] ? 'error' : 'success';
70
- }
71
-
72
- return 'noval';
73
- };
74
-
75
- const fieldWithHandlers = Component => {
76
- const Subcomponent = ({ label, form, field, isRequired, ...rest }) => {
77
- const fieldProps = wrapFieldProps(field);
78
- const valid = shouldValidate(form, field.name);
79
-
80
- return (
81
- <FormGroup
82
- label={label}
83
- isRequired={isRequired}
84
- helperTextInvalid={form.errors[field.name]}
85
- helperTextInvalidIcon={<ExclamationCircleIcon />}
86
- validated={valid}
87
- >
88
- <Component
89
- aria-label={fieldProps.name}
90
- {...fieldProps}
91
- {...rest}
92
- validated={valid}
93
- isDisabled={form.isSubmitting}
94
- />
95
- </FormGroup>
96
- );
97
- };
98
-
99
- Subcomponent.propTypes = {
100
- form: PropTypes.object.isRequired,
101
- field: PropTypes.object.isRequired,
102
- label: PropTypes.string.isRequired,
103
- isRequired: PropTypes.bool,
104
- };
105
-
106
- Subcomponent.defaultProps = {
107
- isRequired: false,
108
- };
109
-
110
- return Subcomponent;
111
- };
112
-
113
- export const TextField = fieldWithHandlers(TextInput);
114
- export const TextAreaField = fieldWithHandlers(TextArea);