foreman_openscap 5.2.3 → 6.0.0
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/lib/foreman_openscap/engine.rb +1 -1
- data/lib/foreman_openscap/version.rb +1 -1
- data/package.json +7 -7
- data/webpack/components/HostExtentions/HostKebabItems.js +44 -0
- data/webpack/global_index.js +10 -1
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d17703ecb85f3b31723d710563f11e36c18215e555155459e4e7585babcb0a
|
4
|
+
data.tar.gz: e28e9b05e5103e3dd43fbadf8bfde0dc182eae32674fbb3bfc27b8302ccce227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f902c2d93e8ed9ff4d5d39ec9172d079fe2752ad9a4e54b86f9bd444152db1af2750856d0bcd4decf860bb4ac384f075b8e4dff08855d6064d2c93cf29d5701
|
7
|
+
data.tar.gz: f6aecc2a28bf566365b16138eecc33e335d22daa58a36af23d0345420188d0c80fe4333c2cf8a3ac0b68c69233e94410d3cda6ee5969db1bc38513419a76d09c
|
@@ -48,7 +48,7 @@ module ForemanOpenscap
|
|
48
48
|
|
49
49
|
initializer 'foreman_openscap.register_plugin', :before => :finisher_hook do |app|
|
50
50
|
Foreman::Plugin.register :foreman_openscap do
|
51
|
-
requires_foreman '>=
|
51
|
+
requires_foreman '>= 3.3'
|
52
52
|
|
53
53
|
apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
|
54
54
|
|
data/package.json
CHANGED
@@ -21,19 +21,19 @@
|
|
21
21
|
"url": "https://projects.theforeman.org/projects/foreman_openscap/issues"
|
22
22
|
},
|
23
23
|
"peerDependencies": {
|
24
|
-
"@theforeman/vendor": ">=
|
24
|
+
"@theforeman/vendor": ">= 10.1.0"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@babel/core": "^7.7.0",
|
28
28
|
"@testing-library/dom": "^8.9.1",
|
29
29
|
"@testing-library/jest-dom": "^5.11.9",
|
30
30
|
"@testing-library/user-event": "^13.2.1",
|
31
|
-
"@theforeman/builder": "
|
32
|
-
"@theforeman/eslint-plugin-foreman": "
|
33
|
-
"@theforeman/find-foreman": "
|
34
|
-
"@theforeman/stories": "
|
35
|
-
"@theforeman/test": "
|
36
|
-
"@theforeman/vendor-dev": "
|
31
|
+
"@theforeman/builder": ">= 10.1.0",
|
32
|
+
"@theforeman/eslint-plugin-foreman": ">= 10.1.0",
|
33
|
+
"@theforeman/find-foreman": ">= 10.1.0",
|
34
|
+
"@theforeman/stories": ">= 10.1.0",
|
35
|
+
"@theforeman/test": ">= 10.1.0",
|
36
|
+
"@theforeman/vendor-dev": ">= 10.1.0",
|
37
37
|
"babel-eslint": "^10.0.3",
|
38
38
|
"eslint": "^6.7.2",
|
39
39
|
"jed": "^1.1.1",
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useSelector } from 'react-redux';
|
3
|
+
import { DropdownItem } from '@patternfly/react-core';
|
4
|
+
import { SecurityIcon } from '@patternfly/react-icons';
|
5
|
+
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
|
6
|
+
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
7
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
8
|
+
import { HOST_DETAILS_KEY } from 'foremanReact/components/HostDetails/consts';
|
9
|
+
import { foremanUrl } from 'foremanReact/common/helpers';
|
10
|
+
|
11
|
+
const HostKebabItems = () => {
|
12
|
+
const { name, id } = useSelector(state =>
|
13
|
+
selectAPIResponse(state, HOST_DETAILS_KEY)
|
14
|
+
);
|
15
|
+
|
16
|
+
const ARFReportsAPIPath = name
|
17
|
+
? `/api/v2/compliance/arf_reports?search=host+%3D+${name}`
|
18
|
+
: null;
|
19
|
+
|
20
|
+
const {
|
21
|
+
response: { results = [] },
|
22
|
+
} = useAPI('get', ARFReportsAPIPath);
|
23
|
+
|
24
|
+
const compliancePath = foremanUrl(`/compliance/hosts/${id}`);
|
25
|
+
|
26
|
+
const isDisabled = results.length === 0;
|
27
|
+
|
28
|
+
return (
|
29
|
+
<DropdownItem
|
30
|
+
ouiaId="compliance-dropdown-item"
|
31
|
+
key="compliance-report"
|
32
|
+
icon={<SecurityIcon />}
|
33
|
+
href={compliancePath}
|
34
|
+
target="_blank"
|
35
|
+
rel="noreferrer"
|
36
|
+
isAriaDisabled={isDisabled}
|
37
|
+
tooltip={isDisabled && __("There's no available report for this host")}
|
38
|
+
>
|
39
|
+
{__('Compliance')}
|
40
|
+
</DropdownItem>
|
41
|
+
);
|
42
|
+
};
|
43
|
+
|
44
|
+
export default HostKebabItems;
|
data/webpack/global_index.js
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { registerRoutes } from 'foremanReact/routes/RoutingService';
|
2
|
-
|
3
|
+
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
4
|
+
import HostKebabItems from './components/HostExtentions/HostKebabItems';
|
3
5
|
import routes from './routes/routes';
|
4
6
|
|
5
7
|
registerRoutes('foreman_openscap', routes);
|
8
|
+
|
9
|
+
addGlobalFill(
|
10
|
+
'host-details-kebab',
|
11
|
+
`openscap-kebab-items`,
|
12
|
+
<HostKebabItems key="openscap-host-kebab" />,
|
13
|
+
400
|
14
|
+
);
|
@@ -53,7 +53,7 @@ describe('OvalPoliciesShow', () => {
|
|
53
53
|
'.pf-c-tabs__item.pf-m-current'
|
54
54
|
);
|
55
55
|
expect(within(activeTabHeader).getByText('Details')).toBeInTheDocument();
|
56
|
-
userEvent.click(screen.getByRole('
|
56
|
+
userEvent.click(screen.getByRole('tab', { name: 'CVEs' }));
|
57
57
|
expect(pushMock).toHaveBeenCalledWith(
|
58
58
|
resolvePath(ovalPoliciesShowPath, {
|
59
59
|
':id': ovalPolicyId,
|
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:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slukasik@redhat.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -415,6 +415,7 @@ files:
|
|
415
415
|
- webpack/components/EditableInput.js
|
416
416
|
- webpack/components/EditableInput.scss
|
417
417
|
- webpack/components/EmptyState.js
|
418
|
+
- webpack/components/HostExtentions/HostKebabItems.js
|
418
419
|
- webpack/components/IndexLayout.js
|
419
420
|
- webpack/components/IndexLayout.scss
|
420
421
|
- webpack/components/IndexTable/IndexTableHelper.js
|