foreman_openscap 5.2.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/arf_reports/show.html.erb +1 -1
  3. data/app/views/smart_proxies/plugins/_openscap.html.erb +0 -1
  4. data/lib/foreman_openscap/engine.rb +1 -1
  5. data/lib/foreman_openscap/version.rb +1 -1
  6. data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
  7. data/locale/de/foreman_openscap.po +145 -138
  8. data/locale/en_GB/LC_MESSAGES/foreman_openscap.mo +0 -0
  9. data/locale/en_GB/foreman_openscap.po +4 -4
  10. data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
  11. data/locale/es/foreman_openscap.po +96 -93
  12. data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
  13. data/locale/fr/foreman_openscap.po +99 -96
  14. data/locale/gl/LC_MESSAGES/foreman_openscap.mo +0 -0
  15. data/locale/gl/foreman_openscap.po +5 -5
  16. data/locale/it/LC_MESSAGES/foreman_openscap.mo +0 -0
  17. data/locale/it/foreman_openscap.po +7 -6
  18. data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
  19. data/locale/ja/foreman_openscap.po +112 -106
  20. data/locale/ko/LC_MESSAGES/foreman_openscap.mo +0 -0
  21. data/locale/ko/foreman_openscap.po +6 -6
  22. data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
  23. data/locale/pt_BR/foreman_openscap.po +93 -90
  24. data/locale/ru/LC_MESSAGES/foreman_openscap.mo +0 -0
  25. data/locale/ru/foreman_openscap.po +7 -7
  26. data/locale/sv_SE/LC_MESSAGES/foreman_openscap.mo +0 -0
  27. data/locale/sv_SE/foreman_openscap.po +5 -5
  28. data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
  29. data/locale/zh_CN/foreman_openscap.po +155 -155
  30. data/locale/zh_TW/LC_MESSAGES/foreman_openscap.mo +0 -0
  31. data/locale/zh_TW/foreman_openscap.po +11 -11
  32. data/package.json +7 -7
  33. data/webpack/components/HostExtentions/HostKebabItems.js +44 -0
  34. data/webpack/global_index.js +10 -1
  35. data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js +1 -1
  36. metadata +4 -3
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Foreman\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "PO-Revision-Date: 2020-05-12 09:50+0000\n"
12
- "Last-Translator: Transifex Bot <>\n"
11
+ "PO-Revision-Date: 2016-04-14 07:48+0000\n"
12
+ "Last-Translator: FIRST AUTHOR <EMAIL@ADDRESS>, 2016\n"
13
13
  "Language-Team: Chinese (Taiwan) (http://www.transifex.com/foreman/foreman/lang"
14
14
  "uage/zh_TW/)\n"
15
15
  "MIME-Version: 1.0\n"
@@ -57,10 +57,10 @@ msgid "A summary of reports for OpenSCAP policies"
57
57
  msgstr ""
58
58
 
59
59
  msgid "Action with sub plans"
60
- msgstr ""
60
+ msgstr "有子計畫的動作"
61
61
 
62
62
  msgid "Actions"
63
- msgstr ""
63
+ msgstr "動作"
64
64
 
65
65
  msgid "All messages"
66
66
  msgstr "所有訊息"
@@ -255,7 +255,7 @@ msgid "Directory to upload when using \"directory\" upload type"
255
255
  msgstr ""
256
256
 
257
257
  msgid "Documentation"
258
- msgstr ""
258
+ msgstr "文件"
259
259
 
260
260
  msgid "Download"
261
261
  msgstr "下載"
@@ -279,7 +279,7 @@ msgid "Download bzipped ARF report"
279
279
  msgstr ""
280
280
 
281
281
  msgid "Edit %s"
282
- msgstr ""
282
+ msgstr "編輯 %s"
283
283
 
284
284
  msgid "Effective Profile"
285
285
  msgstr ""
@@ -394,10 +394,10 @@ msgid "ID of OpenSCAP Proxy"
394
394
  msgstr ""
395
395
 
396
396
  msgid "Import Puppet classes"
397
- msgstr ""
397
+ msgstr "匯入 Puppet 類別"
398
398
 
399
399
  msgid "Import facts"
400
- msgstr ""
400
+ msgstr "匯入詳情"
401
401
 
402
402
  msgid "In Foreman, a compliance policy checklist is defined via %s."
403
403
  msgstr ""
@@ -476,7 +476,7 @@ msgid "More details"
476
476
  msgstr "更多詳細資訊"
477
477
 
478
478
  msgid "Name"
479
- msgstr ""
479
+ msgstr "名稱"
480
480
 
481
481
  msgid "Never audited"
482
482
  msgstr "未曾稽核"
@@ -745,7 +745,7 @@ msgid "References"
745
745
  msgstr "參照"
746
746
 
747
747
  msgid "Remote action:"
748
- msgstr ""
748
+ msgstr "遠端動作:"
749
749
 
750
750
  msgid "Report Metrics"
751
751
  msgstr "報告計量"
@@ -1082,7 +1082,7 @@ msgid "hostgroups"
1082
1082
  msgstr ""
1083
1083
 
1084
1084
  msgid "hosts"
1085
- msgstr ""
1085
+ msgstr "主機"
1086
1086
 
1087
1087
  msgid "invalid type %s"
1088
1088
  msgstr "無效的類型 %s"
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": ">= 4.13.2"
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": "^8.4.1",
32
- "@theforeman/eslint-plugin-foreman": "8.4.1",
33
- "@theforeman/find-foreman": "^8.4.1",
34
- "@theforeman/stories": "^8.4.1",
35
- "@theforeman/test": "^8.9.0",
36
- "@theforeman/vendor-dev": "^8.4.1",
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;
@@ -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('button', { name: 'CVEs' }));
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: 5.2.2
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: 2022-04-28 00:00:00.000000000 Z
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
@@ -516,7 +517,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
516
517
  - !ruby/object:Gem::Version
517
518
  version: '0'
518
519
  requirements: []
519
- rubygems_version: 3.1.4
520
+ rubygems_version: 3.1.6
520
521
  signing_key:
521
522
  specification_version: 4
522
523
  summary: Foreman plug-in for displaying OpenSCAP audit reports