foreman_openscap 9.0.1 → 9.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_openscap/locale/cs_CZ/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/de/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/en/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/en_GB/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/es/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/fr/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/gl/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/it/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/ja/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/ka/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/ko/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/pt_BR/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/ru/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/sv_SE/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/zh_CN/foreman_openscap.js +0 -306
- data/app/assets/javascripts/foreman_openscap/locale/zh_TW/foreman_openscap.js +0 -306
- data/app/controllers/api/v2/compliance/tailoring_files_controller.rb +0 -8
- data/app/models/concerns/foreman_openscap/host_extensions.rb +1 -3
- data/app/models/foreman_openscap/policy.rb +0 -4
- data/app/views/tailoring_files/welcome.html.erb +1 -8
- data/lib/foreman_openscap/version.rb +1 -1
- data/locale/action_names.rb +1 -4
- data/locale/cs_CZ/foreman_openscap.edit.po +1455 -0
- data/locale/cs_CZ/foreman_openscap.po +0 -306
- data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/de/foreman_openscap.edit.po +1667 -0
- data/locale/de/foreman_openscap.po +0 -306
- data/locale/de/foreman_openscap.po.time_stamp +0 -0
- data/locale/en/foreman_openscap.edit.po +1455 -0
- data/locale/en/foreman_openscap.po +0 -306
- data/locale/en/foreman_openscap.po.time_stamp +0 -0
- data/locale/en_GB/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/en_GB/foreman_openscap.edit.po +1467 -0
- data/locale/en_GB/foreman_openscap.po +0 -306
- data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/es/foreman_openscap.edit.po +1664 -0
- data/locale/es/foreman_openscap.po +0 -306
- data/locale/es/foreman_openscap.po.time_stamp +0 -0
- data/locale/foreman_openscap.pot +45 -498
- data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/fr/foreman_openscap.edit.po +1676 -0
- data/locale/fr/foreman_openscap.po +0 -306
- data/locale/fr/foreman_openscap.po.time_stamp +0 -0
- data/locale/gl/foreman_openscap.edit.po +1455 -0
- data/locale/gl/foreman_openscap.po +0 -306
- data/locale/gl/foreman_openscap.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/it/foreman_openscap.edit.po +1466 -0
- data/locale/it/foreman_openscap.po +0 -306
- data/locale/it/foreman_openscap.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/ja/foreman_openscap.edit.po +1659 -0
- data/locale/ja/foreman_openscap.po +0 -306
- data/locale/ja/foreman_openscap.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/ka/foreman_openscap.edit.po +1654 -0
- data/locale/ka/foreman_openscap.po +0 -306
- data/locale/ka/foreman_openscap.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/ko/foreman_openscap.edit.po +1470 -0
- data/locale/ko/foreman_openscap.po +0 -306
- data/locale/ko/foreman_openscap.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/pt_BR/foreman_openscap.edit.po +1669 -0
- data/locale/pt_BR/foreman_openscap.po +0 -306
- data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/ru/foreman_openscap.edit.po +1474 -0
- data/locale/ru/foreman_openscap.po +0 -306
- data/locale/ru/foreman_openscap.po.time_stamp +0 -0
- data/locale/sv_SE/foreman_openscap.edit.po +1455 -0
- data/locale/sv_SE/foreman_openscap.po +0 -306
- data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/zh_CN/foreman_openscap.edit.po +1656 -0
- data/locale/zh_CN/foreman_openscap.po +0 -306
- data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/foreman_openscap.mo +0 -0
- data/locale/zh_TW/foreman_openscap.edit.po +1471 -0
- data/locale/zh_TW/foreman_openscap.po +0 -306
- data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
- data/package.json +2 -0
- data/test/functional/api/v2/compliance/tailoring_files_controller_test.rb +0 -11
- data/test/unit/concerns/host_extensions_test.rb +0 -9
- data/webpack/components/ConfirmModal.js +3 -0
- data/webpack/components/EditableInput.js +3 -0
- data/webpack/components/EmptyState.js +12 -2
- data/webpack/components/IndexLayout.js +3 -1
- data/webpack/components/IndexTable/index.js +3 -0
- data/webpack/components/LinkButton.js +4 -0
- data/webpack/components/OpenscapRemediationWizard/ViewSelectedHostsLink.js +1 -0
- data/webpack/components/OpenscapRemediationWizard/index.js +1 -0
- data/webpack/components/OpenscapRemediationWizard/steps/Finish.js +8 -1
- data/webpack/components/OpenscapRemediationWizard/steps/ReviewHosts.js +1 -0
- data/webpack/components/OpenscapRemediationWizard/steps/ReviewRemediation.js +3 -0
- data/webpack/components/OpenscapRemediationWizard/steps/SnippetSelect.js +6 -1
- data/webpack/helpers/formFieldsHelper.js +1 -0
- metadata +38 -11
- data/app/helpers/tailoring_files_helper.rb +0 -5
- data/app/services/foreman_openscap/openscap_proxy_assigned_version_check.rb +0 -14
- data/app/services/foreman_openscap/openscap_proxy_version_check.rb +0 -62
- data/test/unit/services/tailoring_files_proxy_check_test.rb +0 -27
@@ -62,6 +62,7 @@ const EditableInput = props => {
|
|
62
62
|
const editBtn = (
|
63
63
|
<SplitItem>
|
64
64
|
<Button
|
65
|
+
ouiaId={`oscap-edit-${props.attrName}-edit-button`}
|
65
66
|
className="inline-edit-icon"
|
66
67
|
aria-label={`edit ${props.attrName}`}
|
67
68
|
variant="plain"
|
@@ -115,6 +116,7 @@ const EditableInput = props => {
|
|
115
116
|
</SplitItem>
|
116
117
|
<SplitItem>
|
117
118
|
<Button
|
119
|
+
ouiaId={`oscap-edit-${props.attrName}-submit-button`}
|
118
120
|
aria-label={`submit ${props.attrName}`}
|
119
121
|
variant="plain"
|
120
122
|
onClick={onSubmit}
|
@@ -125,6 +127,7 @@ const EditableInput = props => {
|
|
125
127
|
</SplitItem>
|
126
128
|
<SplitItem>
|
127
129
|
<Button
|
130
|
+
ouiaId={`oscap-edit-${props.attrName}-cancel-button`}
|
128
131
|
aria-label={`cancel editing ${props.attrName}`}
|
129
132
|
variant="plain"
|
130
133
|
onClick={onCancel}
|
@@ -29,11 +29,19 @@ const EmptyStateIcon = ({ error, search, lock }) => {
|
|
29
29
|
return <PfEmptyStateIcon icon={CubeIcon} />;
|
30
30
|
};
|
31
31
|
|
32
|
-
const EmptyState = ({
|
32
|
+
const EmptyState = ({
|
33
|
+
title,
|
34
|
+
body,
|
35
|
+
error,
|
36
|
+
search,
|
37
|
+
lock,
|
38
|
+
primaryButton,
|
39
|
+
ouiaEmptyStateTitleId,
|
40
|
+
}) => (
|
33
41
|
<Bullseye>
|
34
42
|
<PfEmptyState variant={EmptyStateVariant.small}>
|
35
43
|
<EmptyStateIcon error={!!error} search={search} lock={lock} />
|
36
|
-
<Title headingLevel="h2" size="lg">
|
44
|
+
<Title ouiaId={ouiaEmptyStateTitleId} headingLevel="h2" size="lg">
|
37
45
|
{title}
|
38
46
|
</Title>
|
39
47
|
<EmptyStateBody>{body}</EmptyStateBody>
|
@@ -65,6 +73,7 @@ EmptyState.propTypes = {
|
|
65
73
|
search: PropTypes.bool,
|
66
74
|
lock: PropTypes.bool,
|
67
75
|
primaryButton: PropTypes.node,
|
76
|
+
ouiaEmptyStateTitleId: PropTypes.string,
|
68
77
|
};
|
69
78
|
|
70
79
|
EmptyState.defaultProps = {
|
@@ -75,6 +84,7 @@ EmptyState.defaultProps = {
|
|
75
84
|
search: false,
|
76
85
|
lock: false,
|
77
86
|
primaryButton: null,
|
87
|
+
ouiaEmptyStateTitleId: 'oscap-empty-state-title',
|
78
88
|
};
|
79
89
|
|
80
90
|
export default EmptyState;
|
@@ -21,7 +21,9 @@ const IndexLayout = ({ pageTitle, children, contentWidthSpan }) => (
|
|
21
21
|
<Grid className="scap-page-grid">
|
22
22
|
<GridItem span={12} className="pf-u-pb-xl">
|
23
23
|
<TextContent>
|
24
|
-
<Text component={TextVariants.h1}>
|
24
|
+
<Text ouiaId="oscap-index-title" component={TextVariants.h1}>
|
25
|
+
{pageTitle}
|
26
|
+
</Text>
|
25
27
|
</TextContent>
|
26
28
|
</GridItem>
|
27
29
|
<GridItem span={contentWidthSpan}>{children}</GridItem>
|
@@ -11,6 +11,7 @@ const IndexTable = ({
|
|
11
11
|
totalCount,
|
12
12
|
toolbarBtns,
|
13
13
|
ariaTableLabel,
|
14
|
+
ouiaTableId,
|
14
15
|
columns,
|
15
16
|
...rest
|
16
17
|
}) => {
|
@@ -38,6 +39,7 @@ const IndexTable = ({
|
|
38
39
|
</FlexItem>
|
39
40
|
</Flex>
|
40
41
|
<Table
|
42
|
+
ouiaId={ouiaTableId}
|
41
43
|
aria-label={ariaTableLabel}
|
42
44
|
cells={columns}
|
43
45
|
{...rest}
|
@@ -56,6 +58,7 @@ IndexTable.propTypes = {
|
|
56
58
|
toolbarBtns: PropTypes.node,
|
57
59
|
totalCount: PropTypes.number.isRequired,
|
58
60
|
ariaTableLabel: PropTypes.string.isRequired,
|
61
|
+
ouiaTableId: PropTypes.string.isRequired,
|
59
62
|
columns: PropTypes.array.isRequired,
|
60
63
|
};
|
61
64
|
|
@@ -9,9 +9,11 @@ const LinkButton = ({
|
|
9
9
|
btnText,
|
10
10
|
isDisabled,
|
11
11
|
btnAriaLabel,
|
12
|
+
ouiaId,
|
12
13
|
}) => (
|
13
14
|
<Link to={path}>
|
14
15
|
<Button
|
16
|
+
ouiaId={ouiaId}
|
15
17
|
variant={btnVariant}
|
16
18
|
isDisabled={isDisabled}
|
17
19
|
aria-label={btnAriaLabel}
|
@@ -27,12 +29,14 @@ LinkButton.propTypes = {
|
|
27
29
|
btnVariant: PropTypes.string,
|
28
30
|
isDisabled: PropTypes.bool,
|
29
31
|
btnAriaLabel: PropTypes.string,
|
32
|
+
ouiaId: PropTypes.string,
|
30
33
|
};
|
31
34
|
|
32
35
|
LinkButton.defaultProps = {
|
33
36
|
btnVariant: 'primary',
|
34
37
|
isDisabled: false,
|
35
38
|
btnAriaLabel: null,
|
39
|
+
ouiaId: 'oscap-link-button',
|
36
40
|
};
|
37
41
|
|
38
42
|
export default LinkButton;
|
@@ -74,6 +74,7 @@ const Finish = ({ onClose }) => {
|
|
74
74
|
|
75
75
|
const linkToJob = (
|
76
76
|
<Button
|
77
|
+
ouiaId="oscap-rem-wiz-job-details-link"
|
77
78
|
variant="link"
|
78
79
|
icon={<ExternalLinkSquareAltIcon />}
|
79
80
|
iconPosition="right"
|
@@ -84,7 +85,11 @@ const Finish = ({ onClose }) => {
|
|
84
85
|
{__('Job details')}
|
85
86
|
</Button>
|
86
87
|
);
|
87
|
-
const closeBtn =
|
88
|
+
const closeBtn = (
|
89
|
+
<Button ouiaId="oscap-rem-wiz-close-button-fin-step" onClick={onClose}>
|
90
|
+
{__('Close')}
|
91
|
+
</Button>
|
92
|
+
);
|
88
93
|
const errorComponent =
|
89
94
|
statusCode === 403 ? (
|
90
95
|
<PermissionDenied
|
@@ -93,6 +98,7 @@ const Finish = ({ onClose }) => {
|
|
93
98
|
/>
|
94
99
|
) : (
|
95
100
|
<EmptyState
|
101
|
+
ouiaEmptyStateTitleId="oscap-rem-wiz-empty-state-title"
|
96
102
|
error
|
97
103
|
title={__('Error!')}
|
98
104
|
body={errorMsg(data)}
|
@@ -102,6 +108,7 @@ const Finish = ({ onClose }) => {
|
|
102
108
|
const body =
|
103
109
|
status === STATUS.RESOLVED ? (
|
104
110
|
<EmptyState
|
111
|
+
ouiaEmptyStateTitleId="oscap-rem-wiz-empty-state-title"
|
105
112
|
title={__(
|
106
113
|
'The job has started on selected host(s), you can check the status on the job details page.'
|
107
114
|
)}
|
@@ -118,6 +118,7 @@ const ReviewRemediation = () => {
|
|
118
118
|
</GridItem>
|
119
119
|
<GridItem md={12} span={4} rowSpan={1}>
|
120
120
|
<Button
|
121
|
+
ouiaId={`oscap-wiz-host-details-button-${hostName}-revrem-step`}
|
121
122
|
variant="link"
|
122
123
|
icon={<ExternalLinkSquareAltIcon />}
|
123
124
|
iconPosition="right"
|
@@ -130,6 +131,7 @@ const ReviewRemediation = () => {
|
|
130
131
|
</GridItem>
|
131
132
|
<GridItem md={12} span={8} rowSpan={1}>
|
132
133
|
<Button
|
134
|
+
ouiaId={`oscap-wiz-ext-link-to-hosts-${source}-revrem-step`}
|
133
135
|
variant="link"
|
134
136
|
icon={<ExternalLinkSquareAltIcon />}
|
135
137
|
iconPosition="right"
|
@@ -154,6 +156,7 @@ const ReviewRemediation = () => {
|
|
154
156
|
{method === 'manual' ? null : (
|
155
157
|
<GridItem span={4} rowSpan={1}>
|
156
158
|
<Checkbox
|
159
|
+
ouiaId="oscap-wiz-reboot-checkbox-revrem-step"
|
157
160
|
id="reboot-checkbox"
|
158
161
|
label={__('Reboot the system(s)')}
|
159
162
|
name="reboot-checkbox"
|
@@ -141,7 +141,12 @@ const SnippetSelect = () => {
|
|
141
141
|
)}
|
142
142
|
</Form>
|
143
143
|
) : (
|
144
|
-
<EmptyState
|
144
|
+
<EmptyState
|
145
|
+
ouiaEmptyStateTitleId="oscap-rem-wiz-empty-state-title"
|
146
|
+
error
|
147
|
+
title={__('Error!')}
|
148
|
+
body={errorMsg(logError)}
|
149
|
+
/>
|
145
150
|
);
|
146
151
|
|
147
152
|
return (
|
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.
|
4
|
+
version: 9.0.3
|
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-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -91,7 +91,6 @@ files:
|
|
91
91
|
- app/helpers/foreman_openscap_helper.rb
|
92
92
|
- app/helpers/policies_helper.rb
|
93
93
|
- app/helpers/policy_dashboard_helper.rb
|
94
|
-
- app/helpers/tailoring_files_helper.rb
|
95
94
|
- app/lib/proxy_api/migration.rb
|
96
95
|
- app/lib/proxy_api/openscap.rb
|
97
96
|
- app/mailers/foreman_openscap/policy_mailer.rb
|
@@ -127,8 +126,6 @@ files:
|
|
127
126
|
- app/services/foreman_openscap/hostgroup_overrider_common.rb
|
128
127
|
- app/services/foreman_openscap/lookup_key_overrider.rb
|
129
128
|
- app/services/foreman_openscap/lookup_key_overrides_common.rb
|
130
|
-
- app/services/foreman_openscap/openscap_proxy_assigned_version_check.rb
|
131
|
-
- app/services/foreman_openscap/openscap_proxy_version_check.rb
|
132
129
|
- app/services/foreman_openscap/policy_dashboard/data.rb
|
133
130
|
- app/services/foreman_openscap/report_dashboard/data.rb
|
134
131
|
- app/services/proxy_status/openscap_spool.rb
|
@@ -299,39 +296,71 @@ files:
|
|
299
296
|
- locale/Makefile
|
300
297
|
- locale/action_names.rb
|
301
298
|
- locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo
|
299
|
+
- locale/cs_CZ/foreman_openscap.edit.po
|
302
300
|
- locale/cs_CZ/foreman_openscap.po
|
301
|
+
- locale/cs_CZ/foreman_openscap.po.time_stamp
|
303
302
|
- locale/de/LC_MESSAGES/foreman_openscap.mo
|
303
|
+
- locale/de/foreman_openscap.edit.po
|
304
304
|
- locale/de/foreman_openscap.po
|
305
|
+
- locale/de/foreman_openscap.po.time_stamp
|
305
306
|
- locale/en/LC_MESSAGES/foreman_openscap.mo
|
307
|
+
- locale/en/foreman_openscap.edit.po
|
306
308
|
- locale/en/foreman_openscap.po
|
309
|
+
- locale/en/foreman_openscap.po.time_stamp
|
307
310
|
- locale/en_GB/LC_MESSAGES/foreman_openscap.mo
|
311
|
+
- locale/en_GB/foreman_openscap.edit.po
|
308
312
|
- locale/en_GB/foreman_openscap.po
|
313
|
+
- locale/en_GB/foreman_openscap.po.time_stamp
|
309
314
|
- locale/es/LC_MESSAGES/foreman_openscap.mo
|
315
|
+
- locale/es/foreman_openscap.edit.po
|
310
316
|
- locale/es/foreman_openscap.po
|
317
|
+
- locale/es/foreman_openscap.po.time_stamp
|
311
318
|
- locale/foreman_openscap.pot
|
312
319
|
- locale/fr/LC_MESSAGES/foreman_openscap.mo
|
320
|
+
- locale/fr/foreman_openscap.edit.po
|
313
321
|
- locale/fr/foreman_openscap.po
|
322
|
+
- locale/fr/foreman_openscap.po.time_stamp
|
314
323
|
- locale/gl/LC_MESSAGES/foreman_openscap.mo
|
324
|
+
- locale/gl/foreman_openscap.edit.po
|
315
325
|
- locale/gl/foreman_openscap.po
|
326
|
+
- locale/gl/foreman_openscap.po.time_stamp
|
316
327
|
- locale/it/LC_MESSAGES/foreman_openscap.mo
|
328
|
+
- locale/it/foreman_openscap.edit.po
|
317
329
|
- locale/it/foreman_openscap.po
|
330
|
+
- locale/it/foreman_openscap.po.time_stamp
|
318
331
|
- locale/ja/LC_MESSAGES/foreman_openscap.mo
|
332
|
+
- locale/ja/foreman_openscap.edit.po
|
319
333
|
- locale/ja/foreman_openscap.po
|
334
|
+
- locale/ja/foreman_openscap.po.time_stamp
|
320
335
|
- locale/ka/LC_MESSAGES/foreman_openscap.mo
|
336
|
+
- locale/ka/foreman_openscap.edit.po
|
321
337
|
- locale/ka/foreman_openscap.po
|
338
|
+
- locale/ka/foreman_openscap.po.time_stamp
|
322
339
|
- locale/ko/LC_MESSAGES/foreman_openscap.mo
|
340
|
+
- locale/ko/foreman_openscap.edit.po
|
323
341
|
- locale/ko/foreman_openscap.po
|
342
|
+
- locale/ko/foreman_openscap.po.time_stamp
|
324
343
|
- locale/pt_BR/LC_MESSAGES/foreman_openscap.mo
|
344
|
+
- locale/pt_BR/foreman_openscap.edit.po
|
325
345
|
- locale/pt_BR/foreman_openscap.po
|
346
|
+
- locale/pt_BR/foreman_openscap.po.time_stamp
|
326
347
|
- locale/ru/LC_MESSAGES/foreman_openscap.mo
|
348
|
+
- locale/ru/foreman_openscap.edit.po
|
327
349
|
- locale/ru/foreman_openscap.po
|
350
|
+
- locale/ru/foreman_openscap.po.time_stamp
|
328
351
|
- locale/sv_SE/LC_MESSAGES/foreman_openscap.mo
|
352
|
+
- locale/sv_SE/foreman_openscap.edit.po
|
329
353
|
- locale/sv_SE/foreman_openscap.po
|
354
|
+
- locale/sv_SE/foreman_openscap.po.time_stamp
|
330
355
|
- locale/zanata.xml
|
331
356
|
- locale/zh_CN/LC_MESSAGES/foreman_openscap.mo
|
357
|
+
- locale/zh_CN/foreman_openscap.edit.po
|
332
358
|
- locale/zh_CN/foreman_openscap.po
|
359
|
+
- locale/zh_CN/foreman_openscap.po.time_stamp
|
333
360
|
- locale/zh_TW/LC_MESSAGES/foreman_openscap.mo
|
361
|
+
- locale/zh_TW/foreman_openscap.edit.po
|
334
362
|
- locale/zh_TW/foreman_openscap.po
|
363
|
+
- locale/zh_TW/foreman_openscap.po.time_stamp
|
335
364
|
- package.json
|
336
365
|
- test/factories/arf_report_factory.rb
|
337
366
|
- test/factories/asset_factory.rb
|
@@ -377,7 +406,6 @@ files:
|
|
377
406
|
- test/unit/services/hostgroup_overrider_test.rb
|
378
407
|
- test/unit/services/lookup_key_overrider_test.rb
|
379
408
|
- test/unit/services/report_dashboard/data_test.rb
|
380
|
-
- test/unit/services/tailoring_files_proxy_check_test.rb
|
381
409
|
- test/unit/tailoring_file_test.rb
|
382
410
|
- webpack/components/ConfirmModal.js
|
383
411
|
- webpack/components/ConfirmModal.scss
|
@@ -429,7 +457,7 @@ homepage: https://github.com/theforeman/foreman_openscap
|
|
429
457
|
licenses:
|
430
458
|
- GPL-3.0
|
431
459
|
metadata: {}
|
432
|
-
post_install_message:
|
460
|
+
post_install_message:
|
433
461
|
rdoc_options: []
|
434
462
|
require_paths:
|
435
463
|
- lib
|
@@ -444,8 +472,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
444
472
|
- !ruby/object:Gem::Version
|
445
473
|
version: '0'
|
446
474
|
requirements: []
|
447
|
-
rubygems_version: 3.
|
448
|
-
signing_key:
|
475
|
+
rubygems_version: 3.2.33
|
476
|
+
signing_key:
|
449
477
|
specification_version: 4
|
450
478
|
summary: Foreman plug-in for displaying OpenSCAP audit reports
|
451
479
|
test_files:
|
@@ -493,5 +521,4 @@ test_files:
|
|
493
521
|
- test/unit/services/hostgroup_overrider_test.rb
|
494
522
|
- test/unit/services/lookup_key_overrider_test.rb
|
495
523
|
- test/unit/services/report_dashboard/data_test.rb
|
496
|
-
- test/unit/services/tailoring_files_proxy_check_test.rb
|
497
524
|
- test/unit/tailoring_file_test.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module ForemanOpenscap
|
2
|
-
class OpenscapProxyAssignedVersionCheck < OpenscapProxyVersionCheck
|
3
|
-
def initialize(host)
|
4
|
-
@host = host
|
5
|
-
super()
|
6
|
-
end
|
7
|
-
|
8
|
-
private
|
9
|
-
|
10
|
-
def get_openscap_proxies
|
11
|
-
@host.openscap_proxy ? [@host.openscap_proxy] : []
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module ForemanOpenscap
|
2
|
-
class OpenscapProxyVersionCheck
|
3
|
-
def initialize
|
4
|
-
@versions = {}
|
5
|
-
@message = ''
|
6
|
-
@down = []
|
7
|
-
end
|
8
|
-
|
9
|
-
def run
|
10
|
-
@versions = openscap_proxy_versions.select do |key, value|
|
11
|
-
Gem::Version.new(value) < Gem::Version.new("0.6.1")
|
12
|
-
end
|
13
|
-
self
|
14
|
-
end
|
15
|
-
|
16
|
-
def pass?
|
17
|
-
!any_outdated? && !any_unreachable?
|
18
|
-
end
|
19
|
-
|
20
|
-
def any_outdated?
|
21
|
-
!@versions.empty?
|
22
|
-
end
|
23
|
-
|
24
|
-
def any_unreachable?
|
25
|
-
!@down.empty?
|
26
|
-
end
|
27
|
-
|
28
|
-
def message
|
29
|
-
if pass?
|
30
|
-
@message
|
31
|
-
else
|
32
|
-
build_message
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
def build_message
|
39
|
-
@message = _('This feature is temporarily disabled. ')
|
40
|
-
@message << _('The following Smart Proxies need to be updated to unlock the feature: %s. ') % @versions.keys.to_sentence if any_outdated?
|
41
|
-
@message << _('The following proxies could not be reached: %s. Please make sure they are available so Foreman can check their versions.') % @down.to_sentence if any_unreachable?
|
42
|
-
@message
|
43
|
-
end
|
44
|
-
|
45
|
-
def get_openscap_proxies
|
46
|
-
SmartProxy.with_features "Openscap"
|
47
|
-
end
|
48
|
-
|
49
|
-
def openscap_proxy_versions
|
50
|
-
get_openscap_proxies.inject({}) do |memo, proxy|
|
51
|
-
begin
|
52
|
-
status = ProxyStatus::Version.new(proxy).version
|
53
|
-
openscap_version = status["modules"]["openscap"]
|
54
|
-
memo[proxy.name] = openscap_version
|
55
|
-
rescue Foreman::WrappedException
|
56
|
-
@down << proxy.name
|
57
|
-
end
|
58
|
-
memo
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'test_plugin_helper'
|
2
|
-
|
3
|
-
class TailoringFilesProxyCheckTest < ActiveSupport::TestCase
|
4
|
-
test 'should find proxies with old versions' do
|
5
|
-
ForemanOpenscap::OpenscapProxyVersionCheck.any_instance.stubs(:openscap_proxy_versions)
|
6
|
-
.returns('old-proxy.test.com' => "0.5.4", "outdate-proxy.test.com" => "0.6.0")
|
7
|
-
check = ForemanOpenscap::OpenscapProxyVersionCheck.new.run
|
8
|
-
refute check.pass?
|
9
|
-
refute check.message.empty?
|
10
|
-
end
|
11
|
-
|
12
|
-
test 'should not find any outdated proxies' do
|
13
|
-
ForemanOpenscap::OpenscapProxyVersionCheck.any_instance.stubs(:openscap_proxy_versions)
|
14
|
-
.returns({})
|
15
|
-
check = ForemanOpenscap::OpenscapProxyVersionCheck.new.run
|
16
|
-
assert check.pass?
|
17
|
-
assert check.message.empty?
|
18
|
-
end
|
19
|
-
|
20
|
-
test 'should fail when proxy cannot be reached' do
|
21
|
-
ProxyStatus::Version.any_instance.stubs(:version).raises(Foreman::WrappedException.new(nil, 'test message'))
|
22
|
-
ForemanOpenscap::OpenscapProxyVersionCheck.any_instance.stubs(:get_openscap_proxies).returns([FactoryBot.create(:openscap_proxy)])
|
23
|
-
check = ForemanOpenscap::OpenscapProxyVersionCheck.new.run
|
24
|
-
refute check.pass?
|
25
|
-
refute check.message.empty?
|
26
|
-
end
|
27
|
-
end
|