@redhat-cloud-services/frontend-components-advisor-components 2.0.0-beta.0 → 2.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.
- package/RebootRequired/RebootRequired.d.ts +1 -1
- package/RebootRequired/RebootRequired.js +1 -1
- package/RebootRequired/RebootRequired.js.map +1 -1
- package/RebootRequired/index.js.map +1 -1
- package/ReportDetails/ReportDetails.d.ts +1 -0
- package/ReportDetails/ReportDetails.js +3 -8
- package/ReportDetails/ReportDetails.js.map +1 -1
- package/ReportDetails/ReportDetails.scss +6 -6
- package/ReportDetails/index.js.map +1 -1
- package/RuleDescription/RuleDescription.js +1 -1
- package/RuleDescription/RuleDescription.js.map +1 -1
- package/RuleDescription/index.js.map +1 -1
- package/RuleDetails/RuleDetails.d.ts +1 -16
- package/RuleDetails/RuleDetails.js +2 -2
- package/RuleDetails/RuleDetails.js.map +1 -1
- package/RuleDetails/RuleDetailsMessages.d.ts +16 -0
- package/RuleDetails/RuleDetailsMessages.js +3 -0
- package/RuleDetails/RuleDetailsMessages.js.map +1 -0
- package/RuleDetails/index.js.map +1 -1
- package/RuleRating/RuleRating.d.ts +1 -1
- package/RuleRating/RuleRating.js +1 -1
- package/RuleRating/RuleRating.js.map +1 -1
- package/RuleRating/index.js.map +1 -1
- package/TemplateProcessor/TemplateProcessor.js +1 -1
- package/TemplateProcessor/TemplateProcessor.js.map +1 -1
- package/TemplateProcessor/index.js.map +1 -1
- package/ViewAffectedLink/ViewAffectedLink.d.ts +1 -1
- package/ViewAffectedLink/ViewAffectedLink.js.map +1 -1
- package/ViewAffectedLink/index.js.map +1 -1
- package/common.d.ts +0 -1
- package/common.js.map +1 -1
- package/constants.js.map +1 -1
- package/esm/RebootRequired/RebootRequired.d.ts +9 -0
- package/esm/RebootRequired/RebootRequired.js +3 -4
- package/esm/RebootRequired/RebootRequired.js.map +1 -1
- package/esm/RebootRequired/index.d.ts +2 -0
- package/esm/RebootRequired/index.js.map +1 -1
- package/esm/ReportDetails/ReportDetails.d.ts +20 -0
- package/esm/ReportDetails/ReportDetails.js +5 -13
- package/esm/ReportDetails/ReportDetails.js.map +1 -1
- package/esm/ReportDetails/ReportDetails.scss +6 -6
- package/esm/ReportDetails/index.d.ts +2 -0
- package/esm/ReportDetails/index.js.map +1 -1
- package/esm/RuleDescription/RuleDescription.d.ts +10 -0
- package/esm/RuleDescription/RuleDescription.js +1 -1
- package/esm/RuleDescription/RuleDescription.js.map +1 -1
- package/esm/RuleDescription/index.d.ts +2 -0
- package/esm/RuleDescription/index.js.map +1 -1
- package/esm/RuleDetails/RuleDetails.d.ts +20 -0
- package/esm/RuleDetails/RuleDetails.js +4 -7
- package/esm/RuleDetails/RuleDetails.js.map +1 -1
- package/esm/RuleDetails/RuleDetailsMessages.d.ts +16 -0
- package/esm/RuleDetails/RuleDetailsMessages.js +2 -0
- package/esm/RuleDetails/RuleDetailsMessages.js.map +1 -0
- package/esm/RuleDetails/index.d.ts +2 -0
- package/esm/RuleDetails/index.js.map +1 -1
- package/esm/RuleRating/RuleRating.d.ts +13 -0
- package/esm/RuleRating/RuleRating.js +3 -7
- package/esm/RuleRating/RuleRating.js.map +1 -1
- package/esm/RuleRating/index.d.ts +2 -0
- package/esm/RuleRating/index.js.map +1 -1
- package/esm/TemplateProcessor/TemplateProcessor.d.ts +8 -0
- package/esm/TemplateProcessor/TemplateProcessor.js +1 -1
- package/esm/TemplateProcessor/TemplateProcessor.js.map +1 -1
- package/esm/TemplateProcessor/index.d.ts +2 -0
- package/esm/TemplateProcessor/index.js.map +1 -1
- package/esm/ViewAffectedLink/ViewAffectedLink.d.ts +14 -0
- package/esm/ViewAffectedLink/ViewAffectedLink.js.map +1 -1
- package/esm/ViewAffectedLink/index.d.ts +2 -0
- package/esm/ViewAffectedLink/index.js.map +1 -1
- package/esm/common.d.ts +7 -0
- package/esm/common.js.map +1 -1
- package/esm/constants.d.ts +26 -0
- package/esm/constants.js.map +1 -1
- package/esm/index.d.ts +7 -0
- package/esm/index.js.map +1 -1
- package/esm/types.d.ts +68 -0
- package/esm/types.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +45 -56
- package/types.d.ts +1 -1
- package/types.js.map +1 -1
- package/README.md +0 -36
- package/cypress/cypress.webpack.config.js +0 -91
- package/cypress/fixtures/messages.json +0 -16
- package/cypress/fixtures/report.json +0 -39
- package/cypress/fixtures/rule.json +0 -18
- package/cypress/overrideChrome.js +0 -5
- package/cypress/plugins/index.js +0 -39
- package/cypress/support/commands.js +0 -25
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.js +0 -46
- package/cypress.config.js +0 -34
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rule": {
|
|
3
|
-
"rule_id": "foobar_deprecated_something|FOOBAR_DEPRECATED_SOMETHING",
|
|
4
|
-
"node_id": "12345678",
|
|
5
|
-
"summary": "New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled.\n",
|
|
6
|
-
"reason": "This system is running Red Hat Enterprise Linux with the following SAP\napplication{{?Object.keys(pydata.inst).length>=2}}s{{?}} but the `/etc/hosts`\nis not configured correctly, which results in some functions of SAP system failure.\n\n1. SAP applications running on this host.\n {{~pydata.inst: e}}\n * {{=e}}{{~}}\n1. Issues in the `/etc/hosts`:\n {{?pydata.no_hn}}* The hostname of this host **{{=pydata.hostname}}** is not found.\n {{?}}{{?pydata.line_127}}* The hostname of this host **{{=pydata.hostname}}** is associated with the IP address **127.0.0.1**\n ~~~\n {{~pydata.line_127: e}}{{=e}}\n {{~}}\n ~~~\n {{?}}{{?pydata.line_hn}}* The FQDN is not in the second column or hostname is not followed\n ~~~\n {{~pydata.line_hn: e}}{{=e}}\n {{~}}\n ~~~\n {{?}}{{?pydata.line_ip}}* The hostname of this host **{{=pydata.hostname}}** is associated with the IP address that does not belong to this host\n ~~~\n {{~pydata.line_ip: e}}{{=e}}\n {{~}}\n ~~~\n {{?}}{{?pydata.before_local}}* The following {{?Object.keys(pydata.before_local).length>=2}}lines are{{??}}line is{{?}} before the line of **127.0.0.1** or the line of **{{=pydata.hostname}}**\n ~~~\n {{~pydata.before_local: e}}{{=e}}\n {{~}}\n ~~~{{?}}\n {{?pydata.long_before_local}}\n **Note:** There are more than 10 lines in the `/etc/hosts` impacted and only the first 10 are displayed here. Please check the full list of them manually in the `/etc/hosts`.\n {{?}}\n \nThis host is running **kernel-{{=pydata.kernel}}** and {{?Object.keys(pydata.ipv6_dev_routes).length>1}}`IPv6` routes are added for IPv6 addresses, associated with the interfaces.{{??}}`IPv6` route is added for IPv6 address, associated with the interface.{{?}} Due to a known bug in the `kernel`, when `ip6_route_dev_notify` function receives a **NULL** pointer from `snmp6_alloc_dev` while unregistering the network device, kernel panic occurs. The `snmp6_alloc_dev` returns **NULL** when CPU allocation fails.\n\nThe following IPv6 enabled {{?Object.keys(pydata.ipv6_dev_routes).length>1}}interfaces are{{??}}interface is{{?}} present on this host:\n<table>\n <tr>\n <th>Interface</th>\n <th>IPv6 Address</th>\n </tr>\n{{ for (var key in pydata.ipv6_dev_routes) { }}\n<tr>\n <td>{{=key}} </td>\n <td>{{=pydata.ipv6_dev_routes[key]}} </td>\n</tr>\n{{ } }}\n</table>\n",
|
|
7
|
-
"more_info": "* For more information regarding the dedicated Ansible Engine channel, please refer to [Ansible deprecated in the Extras channel](https://access.redhat.com/articles/3359651). \n* For how to use the dedicated Ansible Engine channel, please refer to [How do I Download and Install Red Hat Ansible Engine?](https://access.redhat.com/articles/3174981).\n",
|
|
8
|
-
"resolution_set": [
|
|
9
|
-
{
|
|
10
|
-
"system_type": 105,
|
|
11
|
-
"resolution": "Red Hat recommends that you enable the dedicated Ansible repo and update `ansible` package to the latest version.\n ~~~\n # subscription-manager repos --enable rhel-7-server-ansible-2-rpms\n # yum update ansible\n ~~~\n",
|
|
12
|
-
"resolution_risk": {
|
|
13
|
-
"name": "Update Package",
|
|
14
|
-
"risk": 1
|
|
15
|
-
},
|
|
16
|
-
"has_playbook": true
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"total_risk": 2
|
|
20
|
-
},
|
|
21
|
-
"details": {
|
|
22
|
-
"type": "rule",
|
|
23
|
-
"package": "ansible-1.8.42-5.elre",
|
|
24
|
-
"kernel": "3.9.0-862.2.3.el1.x86_64",
|
|
25
|
-
"error_key": "FOOBAR_DEPRECATED_SOMETHING",
|
|
26
|
-
"rhsm_rset": null,
|
|
27
|
-
"ipv6_dev_routes": {
|
|
28
|
-
"eth0": "fe81::c547:c849:ee14:2bdc"
|
|
29
|
-
},
|
|
30
|
-
"fqdn": "iqe-patch-rhel-75-7c99fe69-eaca-2144-a7db-69c9c792ae",
|
|
31
|
-
"inst": ["D00", "D01", "D02"],
|
|
32
|
-
"rhel": "7.1",
|
|
33
|
-
"no_hn": true,
|
|
34
|
-
"hostname": "iqe-patch-rhel-42-7c22fe69-eaca-4242-a7db-69c913c792ae",
|
|
35
|
-
"subs": ["Applications"],
|
|
36
|
-
"mis_repos": ["rhel-sap-for-rhel-42-server-rpms"]
|
|
37
|
-
},
|
|
38
|
-
"resolution": "Red Hat recommends that you enable the dedicated Ansible repo and update `ansible` package to the latest version.\n ~~~\n # subscription-manager repos --enable rhel-7-server-ansible-2-rpms\n # yum update ansible\n ~~~\n \n {{?pydata.subs&&pydata.subs.indexOf('Solutions') != -1}}\nWhen running SAP HANA on RHEL it must be ensured that only OS packages provided\nfor the specific RHEL minor release are installed. For supportability it is\ntherefore required that only either the EUS or E4S repos are active on the\nsystem.\n{{?}}\nThe following {{?pydata.mis_repos.length>1}}repositories{{??}}repository{{?}} should be enabled on this host:\n{{~pydata.mis_repos: e}}* {{=e}}\n{{~}}\nRed Hat recommends that you perform the following steps to enable {{?pydata.mis_repos.length>1}}these repos{{??}}this repo{{?}}:\n1. Find the serial number for current subscription:\n ~~~\n # subscription-manager list --consumed\n ~~~\n1. Remove the system from the current subscription:\n ~~~\n # subscription-manager remove --serial='SERIAL NUMBER'\n ~~~\n1. Find the pool ID for the **RHEL for SAP** subscription:\n ~~~\n # subscription-manager list --available\n ~~~\n1. Subscribe to **RHEL for SAP** using the pool ID:\n ~~~\n # subscription-manager attach --pool='XXXX'\n ~~~\n1. Enable the recommended yum repositories:\n ~~~\n # subscription-manager repos{{~pydata.mis_repos: e}} --enable={{=e}}{{~}}\n ~~~\n1. Review the yum repolist and ensure that **RHEL for SAP** is enabled:\n ~~~\n # yum repolist\n ~~~\n"
|
|
39
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rule_id": "external.rules.rule|ERROR_KEY",
|
|
3
|
-
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.",
|
|
4
|
-
"generic": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.",
|
|
5
|
-
"reason": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.",
|
|
6
|
-
"resolution": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.",
|
|
7
|
-
"more_info": "",
|
|
8
|
-
"total_risk": 2,
|
|
9
|
-
"risk_of_change": 1,
|
|
10
|
-
"impact": { "impact": 2 },
|
|
11
|
-
"likelihood": 3,
|
|
12
|
-
"publish_date": "2021-11-01T14:00:00Z",
|
|
13
|
-
"tags": ["fault_tolerance", "openshift", "sap"],
|
|
14
|
-
"rating": 1,
|
|
15
|
-
"impacted_clusters_count": 0,
|
|
16
|
-
"disabled": false,
|
|
17
|
-
"reboot_required": true
|
|
18
|
-
}
|
package/cypress/plugins/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
// ***********************************************************
|
|
3
|
-
// This example plugins/index.js can be used to load plugins
|
|
4
|
-
//
|
|
5
|
-
// You can change the location of this file or turn off loading
|
|
6
|
-
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
-
//
|
|
8
|
-
// You can read more here:
|
|
9
|
-
// https://on.cypress.io/plugins-guide
|
|
10
|
-
// ***********************************************************
|
|
11
|
-
|
|
12
|
-
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
-
// the project's config changing)
|
|
14
|
-
|
|
15
|
-
const {
|
|
16
|
-
initPlugin
|
|
17
|
-
} = require('@frsource/cypress-plugin-visual-regression-diff/plugins');
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @type {Cypress.PluginConfig}
|
|
21
|
-
*/
|
|
22
|
-
// eslint-disable-next-line no-unused-vars
|
|
23
|
-
module.exports = (on, config) => {
|
|
24
|
-
// `on` is used to hook into various events Cypress emits
|
|
25
|
-
// `config` is the resolved Cypress config
|
|
26
|
-
|
|
27
|
-
initPlugin(on, config);
|
|
28
|
-
|
|
29
|
-
if (config.testingType === 'component') {
|
|
30
|
-
const { startDevServer } = require('@cypress/webpack-dev-server')
|
|
31
|
-
|
|
32
|
-
// Your project's Webpack configuration
|
|
33
|
-
const webpackConfig = require('../cypress.webpack.config.js')
|
|
34
|
-
|
|
35
|
-
on('dev-server:start', (options) =>
|
|
36
|
-
startDevServer({ options, webpackConfig })
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// ***********************************************
|
|
2
|
-
// This example commands.js shows you how to
|
|
3
|
-
// create various custom commands and overwrite
|
|
4
|
-
// existing commands.
|
|
5
|
-
//
|
|
6
|
-
// For more comprehensive examples of custom
|
|
7
|
-
// commands please read more here:
|
|
8
|
-
// https://on.cypress.io/custom-commands
|
|
9
|
-
// ***********************************************
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// -- This is a parent command --
|
|
13
|
-
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// -- This is a child command --
|
|
17
|
-
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// -- This is a dual command --
|
|
21
|
-
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
// -- This will overwrite an existing command --
|
|
25
|
-
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<title>Components App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div data-cy-root></div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
-
/* eslint-disable prettier/prettier */
|
|
4
|
-
// ***********************************************************
|
|
5
|
-
// This example support/component.ts is processed and
|
|
6
|
-
// loaded automatically before your test files.
|
|
7
|
-
//
|
|
8
|
-
// This is a great place to put global configuration and
|
|
9
|
-
// behavior that modifies Cypress.
|
|
10
|
-
//
|
|
11
|
-
// You can change the location of this file or turn off
|
|
12
|
-
// automatically serving support files with the
|
|
13
|
-
// 'supportFile' configuration option.
|
|
14
|
-
//
|
|
15
|
-
// You can read more here:
|
|
16
|
-
// https://on.cypress.io/configuration
|
|
17
|
-
// ***********************************************************
|
|
18
|
-
|
|
19
|
-
// Import commands.js using ES2015 syntax:
|
|
20
|
-
import './commands'
|
|
21
|
-
import '@patternfly/patternfly/patternfly.css';
|
|
22
|
-
import '@patternfly/patternfly/patternfly-addons.css';
|
|
23
|
-
|
|
24
|
-
// Alternatively you can use CommonJS syntax:
|
|
25
|
-
// require('./commands')
|
|
26
|
-
|
|
27
|
-
import { mount } from 'cypress/react'
|
|
28
|
-
const { addMatchImageSnapshotCommand, } = require('@simonsmith/cypress-image-snapshot/command');
|
|
29
|
-
|
|
30
|
-
// configure the matcher to be less precise to adjust between the headless and normal browser rendering differences
|
|
31
|
-
addMatchImageSnapshotCommand({
|
|
32
|
-
failureThreshold: 0.03, // threshold for entire image
|
|
33
|
-
failureThresholdType: 'percent', // percent of image or number of pixels
|
|
34
|
-
customDiffConfig: { threshold: 0.1 }, // threshold for each pixel
|
|
35
|
-
capture: 'viewport', // capture viewport in screenshot
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// Augment the Cypress namespace to include type definitions for
|
|
39
|
-
// your custom command.
|
|
40
|
-
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
41
|
-
// with a <reference path="./component" /> at the top of your spec.
|
|
42
|
-
|
|
43
|
-
Cypress.Commands.add('mount', mount)
|
|
44
|
-
|
|
45
|
-
// Example use:
|
|
46
|
-
// cy.mount(<MyComponent />)
|
package/cypress.config.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const { defineConfig } = require('cypress')
|
|
2
|
-
const { addMatchImageSnapshotPlugin } = require('@simonsmith/cypress-image-snapshot/plugin');
|
|
3
|
-
|
|
4
|
-
/** @type {import('cypress').defineConfig} */
|
|
5
|
-
module.exports = defineConfig({
|
|
6
|
-
component: {
|
|
7
|
-
specPattern: "src/**/*.spec.ct.{js,ts,jsx,tsx}",
|
|
8
|
-
viewportHeight: 660,
|
|
9
|
-
viewportWidth: 1000,
|
|
10
|
-
video: false,
|
|
11
|
-
devServer: {
|
|
12
|
-
framework: 'react',
|
|
13
|
-
bundler: 'webpack',
|
|
14
|
-
webpackConfig: require('./cypress/cypress.webpack.config')
|
|
15
|
-
},
|
|
16
|
-
setupNodeEvents(on, config) {
|
|
17
|
-
addMatchImageSnapshotPlugin(on, config);
|
|
18
|
-
on('before:browser:launch', (browser, launchOptions) => {
|
|
19
|
-
if (browser.name === 'chrome' && browser.isHeadless) {
|
|
20
|
-
launchOptions.args.push('--window-size=1280,720');
|
|
21
|
-
|
|
22
|
-
// force screen to be non-retina
|
|
23
|
-
launchOptions.args.push('--force-device-scale-factor=1');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (browser.name === 'electron' && browser.isHeadless) {
|
|
27
|
-
// fullPage screenshot size is 1280x720
|
|
28
|
-
launchOptions.preferences.width = 1280;
|
|
29
|
-
launchOptions.preferences.height = 720;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
}
|
|
34
|
-
})
|