@redhat-cloud-services/frontend-components-advisor-components 1.0.1 → 1.0.3
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/README.md +14 -1
- package/RebootRequired/index.js +5 -1
- package/RebootRequired/index.js.map +1 -1
- package/ReportDetails/ReportDetails.css +47 -0
- package/ReportDetails/ReportDetails.d.ts +18 -0
- package/ReportDetails/ReportDetails.js +81 -0
- package/ReportDetails/ReportDetails.js.map +1 -0
- package/ReportDetails/ReportDetails.scss +53 -0
- package/ReportDetails/index.d.ts +2 -0
- package/ReportDetails/index.js +24 -0
- package/ReportDetails/index.js.map +1 -0
- package/ReportDetails/package.json +1 -0
- package/RuleDescription/RuleDescription.js.map +1 -1
- package/RuleDescription/index.js +5 -1
- package/RuleDescription/index.js.map +1 -1
- package/RuleDetails/RuleDetails.d.ts +19 -18
- package/RuleDetails/RuleDetails.js +14 -13
- package/RuleDetails/RuleDetails.js.map +1 -1
- package/RuleDetails/index.js +5 -1
- package/RuleDetails/index.js.map +1 -1
- package/RuleRating/RuleRating.d.ts +1 -0
- package/RuleRating/RuleRating.js +8 -2
- package/RuleRating/RuleRating.js.map +1 -1
- package/RuleRating/index.js +5 -1
- package/RuleRating/index.js.map +1 -1
- package/TemplateProcessor/TemplateProcessor.d.ts +8 -0
- package/TemplateProcessor/TemplateProcessor.js +70 -0
- package/TemplateProcessor/TemplateProcessor.js.map +1 -0
- package/TemplateProcessor/index.d.ts +2 -0
- package/TemplateProcessor/index.js +24 -0
- package/TemplateProcessor/index.js.map +1 -0
- package/TemplateProcessor/package.json +1 -0
- package/ViewAffectedLink/index.js +5 -1
- package/ViewAffectedLink/index.js.map +1 -1
- package/common.d.ts +4 -0
- package/common.js +9 -1
- package/common.js.map +1 -1
- package/cypress/cypress.webpack.config.js +36 -0
- package/cypress/fixtures/messages.json +16 -0
- package/cypress/fixtures/report.json +39 -0
- package/cypress/fixtures/rule.json +18 -0
- package/cypress/plugins/index.js +32 -0
- package/cypress/support/commands.js +25 -0
- package/cypress/support/index.js +21 -0
- package/cypress.json +9 -0
- package/esm/ReportDetails/ReportDetails.css +47 -0
- package/esm/ReportDetails/ReportDetails.js +56 -0
- package/esm/ReportDetails/ReportDetails.js.map +1 -0
- package/esm/ReportDetails/ReportDetails.scss +53 -0
- package/esm/ReportDetails/index.js +3 -0
- package/esm/ReportDetails/index.js.map +1 -0
- package/esm/RuleDescription/RuleDescription.js.map +1 -1
- package/esm/RuleDetails/RuleDetails.js +14 -13
- package/esm/RuleDetails/RuleDetails.js.map +1 -1
- package/esm/RuleRating/RuleRating.js +2 -1
- package/esm/RuleRating/RuleRating.js.map +1 -1
- package/esm/TemplateProcessor/TemplateProcessor.js +42 -0
- package/esm/TemplateProcessor/TemplateProcessor.js.map +1 -0
- package/esm/TemplateProcessor/index.js +3 -0
- package/esm/TemplateProcessor/index.js.map +1 -0
- package/esm/common.js +7 -0
- package/esm/common.js.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +6 -1
- package/index.js.map +1 -1
- package/package.json +23 -9
- package/types.d.ts +3 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var react_1 = __importDefault(require("react"));
|
|
41
|
+
var dot_1 = __importDefault(require("dot"));
|
|
42
|
+
var marked_1 = require("marked");
|
|
43
|
+
var sanitize_html_1 = __importStar(require("sanitize-html"));
|
|
44
|
+
var DOT_SETTINGS = __assign(__assign({}, dot_1.default.templateSettings), { varname: 'pydata', strip: false });
|
|
45
|
+
var TemplateProcessor = function (_a) {
|
|
46
|
+
var template = _a.template, definitions = _a.definitions, onError = _a.onError;
|
|
47
|
+
try {
|
|
48
|
+
var compiledDot = definitions ? dot_1.default.template(template, DOT_SETTINGS)(definitions) : template;
|
|
49
|
+
var compiledMd = (0, marked_1.marked)(compiledDot);
|
|
50
|
+
var sanitized = (0, sanitize_html_1.default)(compiledMd, {
|
|
51
|
+
allowedAttributes: { '*': ['href', 'target', 'class', 'style', 'rel'] },
|
|
52
|
+
allowedSchemes: ['https'],
|
|
53
|
+
transformTags: {
|
|
54
|
+
ul: (0, sanitize_html_1.simpleTransform)('ul', { class: 'pf-c-list', style: 'font-size: inherit' }),
|
|
55
|
+
a: (0, sanitize_html_1.simpleTransform)('a', { rel: 'noopener noreferrer', target: '_blank' }),
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
return (react_1.default.createElement("div", { dangerouslySetInnerHTML: {
|
|
59
|
+
__html: sanitized.replace(/<\/a>/gim, " <i class=\"fas fa-external-link-alt\"></i></a>"),
|
|
60
|
+
} }));
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
console.warn(error, definitions, template);
|
|
64
|
+
onError && onError(error);
|
|
65
|
+
return (react_1.default.createElement("pre", null,
|
|
66
|
+
react_1.default.createElement("code", null, template)));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.default = TemplateProcessor;
|
|
70
|
+
//# sourceMappingURL=TemplateProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateProcessor.js","sourceRoot":"","sources":["../src/TemplateProcessor/TemplateProcessor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,4CAAsB;AACtB,iCAAgC;AAChC,6DAA0D;AAQ1D,IAAM,YAAY,yBACb,aAAG,CAAC,gBAAgB,KACvB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,KAAK,GACb,CAAC;AAEF,IAAM,iBAAiB,GAAqC,UAAC,EAAkC;QAAhC,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA;IAC3F,IAAI;QACF,IAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,aAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/F,IAAM,UAAU,GAAG,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC;QACvC,IAAM,SAAS,GAAG,IAAA,uBAAQ,EAAC,UAAU,EAAE;YACrC,iBAAiB,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE;YACvE,cAAc,EAAE,CAAC,OAAO,CAAC;YACzB,aAAa,EAAE;gBACb,EAAE,EAAE,IAAA,+BAAe,EAAC,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;gBAC9E,CAAC,EAAE,IAAA,+BAAe,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;aAC1E;SACF,CAAC,CAAC;QAEH,OAAO,CACL,uCACE,uBAAuB,EAAE;gBACvB,MAAM,EAAE,SAAS,CAAC,OAAO,CACvB,UAAU,EACV,iDAA+C,CAChD;aACF,GACD,CACH,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC3C,OAAO,IAAI,OAAO,CAAC,KAAc,CAAC,CAAC;QACnC,OAAO,CACL;YACE,4CAAO,QAAQ,CAAQ,CACnB,CACP,CAAC;KACH;AACH,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.TemplateProcessor = void 0;
|
|
21
|
+
__exportStar(require("./TemplateProcessor"), exports);
|
|
22
|
+
var TemplateProcessor_1 = require("./TemplateProcessor");
|
|
23
|
+
Object.defineProperty(exports, "TemplateProcessor", { enumerable: true, get: function () { return __importDefault(TemplateProcessor_1).default; } });
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/TemplateProcessor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"main":"index.js","module":"../esm/TemplateProcessor/index.js","typings":"index.d.ts"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/ViewAffectedLink/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/ViewAffectedLink/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB"}
|
package/common.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { RuleContentRhel, TopicRhel } from './types';
|
|
2
2
|
export declare const barDividedList: (list: JSX.Element[]) => JSX.Element[];
|
|
3
3
|
export declare const topicLinks: (rule: RuleContentRhel, topics: TopicRhel[], Link: any) => JSX.Element[];
|
|
4
|
+
export declare const ExternalLink: ({ href, content }: {
|
|
5
|
+
href: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}) => JSX.Element;
|
package/common.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.topicLinks = exports.barDividedList = void 0;
|
|
6
|
+
exports.ExternalLink = exports.topicLinks = exports.barDividedList = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var compact_1 = __importDefault(require("lodash/compact"));
|
|
9
9
|
var intersection_1 = __importDefault(require("lodash/intersection"));
|
|
@@ -21,4 +21,12 @@ var topicLinks = function (rule, topics, Link) {
|
|
|
21
21
|
: [];
|
|
22
22
|
};
|
|
23
23
|
exports.topicLinks = topicLinks;
|
|
24
|
+
var ExternalLink = function (_a) {
|
|
25
|
+
var href = _a.href, content = _a.content;
|
|
26
|
+
return (react_1.default.createElement("a", { rel: "noopener noreferrer", target: "_blank", href: href },
|
|
27
|
+
content,
|
|
28
|
+
" ",
|
|
29
|
+
react_1.default.createElement("i", { className: "fas fa-external-link-alt" })));
|
|
30
|
+
};
|
|
31
|
+
exports.ExternalLink = ExternalLink;
|
|
24
32
|
//# sourceMappingURL=common.js.map
|
package/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["src/common.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AAC1B,2DAAqC;AACrC,qEAA+C;AAKxC,IAAM,cAAc,GAAG,UAAC,IAAmB;IAChD,OAAA,IAAI,CAAC,GAAG,CAAC,UAAC,OAAO,EAAE,KAAK,IAAK,OAAA,CAC3B,8BAAC,eAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK;QACvB,OAAO;QACP,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,0CAAQ,SAAS,EAAC,iBAAiB,oBAA4B,CAC9E,CAClB,EAL4B,CAK5B,CAAC;AALF,CAKE,CAAC;AANQ,QAAA,cAAc,kBAMtB;AAEE,IAAM,UAAU,GAAG,UAAC,IAAqB,EAAE,MAAmB,EAAE,IAAS;IAC9E,OAAA,MAAM;QACJ,CAAC,CAAC,IAAA,iBAAO,EACL,MAAM,CAAC,GAAG,CACR,UAAC,KAAK;YACJ,OAAA,IAAA,sBAAY,EAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CACjE,8BAAC,IAAI,IAAC,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,kBAAW,KAAK,CAAC,IAAI,CAAE,IAAG,UAAG,KAAK,CAAC,IAAI,CAAE,CAAQ,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B,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI;QACpD,OAAO;;QAAE,qCAAG,SAAS,EAAC,0BAA0B,GAAG,CAClD,CACL;AAJqF,CAIrF,CAAC;AAJW,QAAA,YAAY,gBAIvB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: '../src/index.ts',
|
|
5
|
+
module: {
|
|
6
|
+
rules: [
|
|
7
|
+
{
|
|
8
|
+
test: /\.tsx?$/,
|
|
9
|
+
use: 'ts-loader',
|
|
10
|
+
exclude: /node_modules/,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
test: /\.jsx?$/,
|
|
14
|
+
exclude: /node_modules/,
|
|
15
|
+
use: {
|
|
16
|
+
loader: 'babel-loader',
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
test: /\.s?[ac]ss$/,
|
|
21
|
+
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
test: /\.(png|svg|jpg|jpeg)/,
|
|
25
|
+
type: 'asset/resource'
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
resolve: {
|
|
30
|
+
extensions: ['.tsx', '.ts', '.js'],
|
|
31
|
+
},
|
|
32
|
+
output: {
|
|
33
|
+
filename: 'bundle.js',
|
|
34
|
+
path: path.resolve(__dirname, 'dist'),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"systemReboot": "System reboot is required.",
|
|
3
|
+
"knowledgebaseArticle": "Knowledgebase article",
|
|
4
|
+
"topicRelatedToRule": "Topics related to this recommendation",
|
|
5
|
+
"totalRisk": "Total risk",
|
|
6
|
+
"rulesDetailsTotalRiskBody": "The total risk of this remediation is low, based on the combination of likelihood and impact to remediate.",
|
|
7
|
+
"likelihoodLevel": "Low likelihood",
|
|
8
|
+
"likelihoodDescription": "The likelihood that this will be a problem is low.",
|
|
9
|
+
"impactLevel": "Low impact",
|
|
10
|
+
"impactDescription": "he impact of the problem would be low if it occurred.",
|
|
11
|
+
"riskOfChange": "Risk of change",
|
|
12
|
+
"riskOfChangeText": "The risk of change is low, because the change takes very little time to implement and there is minimal impact to system operations.",
|
|
13
|
+
"riskOfChangeLabel": "Low",
|
|
14
|
+
"ruleHelpful": "Is this recommendation helpful?",
|
|
15
|
+
"feedbackThankYou": "Thank you for your feedback!"
|
|
16
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
/**
|
|
16
|
+
* @type {Cypress.PluginConfig}
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line no-unused-vars
|
|
19
|
+
module.exports = (on, config) => {
|
|
20
|
+
// `on` is used to hook into various events Cypress emits
|
|
21
|
+
// `config` is the resolved Cypress config
|
|
22
|
+
if (config.testingType === 'component') {
|
|
23
|
+
const { startDevServer } = require('@cypress/webpack-dev-server')
|
|
24
|
+
|
|
25
|
+
// Your project's Webpack configuration
|
|
26
|
+
const webpackConfig = require('../cypress.webpack.config.js')
|
|
27
|
+
|
|
28
|
+
on('dev-server:start', (options) =>
|
|
29
|
+
startDevServer({ options, webpackConfig })
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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) => { ... })
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/index.js is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands';
|
|
18
|
+
import '@patternfly/patternfly/patternfly.scss';
|
|
19
|
+
|
|
20
|
+
// Alternatively you can use CommonJS syntax:
|
|
21
|
+
// require('./commands')
|
package/cypress.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.ins-c-report-details__cards-stack pre {
|
|
2
|
+
display: block;
|
|
3
|
+
color: var(--pf-global--Color--100);
|
|
4
|
+
word-break: break-all;
|
|
5
|
+
word-wrap: break-word;
|
|
6
|
+
background-color: var(--pf-global--BackgroundColor--light-200);
|
|
7
|
+
border: 1px solid var(--pf-global--BorderColor--100);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
padding: 10px;
|
|
10
|
+
padding: 0.625rem;
|
|
11
|
+
margin: 10px 0px;
|
|
12
|
+
margin: 0.625rem 0rem;
|
|
13
|
+
}
|
|
14
|
+
.ins-c-report-details__cards-stack pre code {
|
|
15
|
+
white-space: pre-wrap;
|
|
16
|
+
}
|
|
17
|
+
.ins-c-report-details__cards-stack ol {
|
|
18
|
+
margin-top: 10px;
|
|
19
|
+
margin-top: 0.625rem;
|
|
20
|
+
margin-left: 15px;
|
|
21
|
+
margin-left: 0.9375rem;
|
|
22
|
+
}
|
|
23
|
+
.ins-c-report-details__cards-stack pre + p,
|
|
24
|
+
.ins-c-report-details__cards-stack pre + ul {
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
margin-top: 0.625rem;
|
|
27
|
+
}
|
|
28
|
+
.ins-c-report-details__cards-stack .pf-c-list {
|
|
29
|
+
margin: 5px 0px;
|
|
30
|
+
margin: 0.3125rem 0rem;
|
|
31
|
+
}
|
|
32
|
+
.ins-c-report-details__cards-stack table {
|
|
33
|
+
width: 100%;
|
|
34
|
+
margin-top: 10px;
|
|
35
|
+
margin-top: 0.625rem;
|
|
36
|
+
}
|
|
37
|
+
.ins-c-report-details__cards-stack table tr {
|
|
38
|
+
border-bottom: 1px solid var(--pf-global--BorderColor--300);
|
|
39
|
+
}
|
|
40
|
+
.ins-c-report-details__cards-stack table th,
|
|
41
|
+
.ins-c-report-details__cards-stack table td {
|
|
42
|
+
padding: 8px;
|
|
43
|
+
padding: 0.5rem;
|
|
44
|
+
}
|
|
45
|
+
.ins-c-report-details__icon {
|
|
46
|
+
margin-right: var(--pf-global--spacer--sm);
|
|
47
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import './ReportDetails.scss';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Alert, Card, CardBody, CardHeader, Divider, Stack, StackItem } from '@patternfly/react-core';
|
|
4
|
+
import { BullseyeIcon, InfoCircleIcon, LightbulbIcon, ThumbsUpIcon } from '@patternfly/react-icons';
|
|
5
|
+
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/Skeleton';
|
|
6
|
+
import { TemplateProcessor } from '../TemplateProcessor';
|
|
7
|
+
import { ExternalLink } from '../common';
|
|
8
|
+
var ReportDetails = function (_a) {
|
|
9
|
+
var report = _a.report, kbaDetail = _a.kbaDetail, kbaLoading = _a.kbaLoading;
|
|
10
|
+
var rule = report.rule, details = report.details, resolution = report.resolution;
|
|
11
|
+
var _b = useState(null), error = _b[0], setError = _b[1];
|
|
12
|
+
var handleError = function (e) {
|
|
13
|
+
if (error === null) {
|
|
14
|
+
setError(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement(Card, { className: "ins-c-report-details", style: { boxShadow: 'none' } },
|
|
18
|
+
React.createElement(CardBody, null,
|
|
19
|
+
error && (React.createElement(React.Fragment, null,
|
|
20
|
+
React.createElement(Alert, { variant: "danger", title: "Sorry, there was an error rendering the content correctly.", isInline: true }),
|
|
21
|
+
React.createElement("br", null))),
|
|
22
|
+
React.createElement(Stack, { className: "ins-c-report-details__cards-stack", "widget-type": "InsightsRulesCard", hasGutter: true },
|
|
23
|
+
React.createElement(StackItem, null,
|
|
24
|
+
React.createElement(Card, { isCompact: true, isPlain: true },
|
|
25
|
+
React.createElement(CardHeader, null,
|
|
26
|
+
React.createElement(BullseyeIcon, { className: "ins-c-report-details__icon" }),
|
|
27
|
+
React.createElement("strong", null, "Detected issues")),
|
|
28
|
+
React.createElement(CardBody, null, rule.reason && React.createElement(TemplateProcessor, { template: rule.reason, definitions: details, onError: handleError })))),
|
|
29
|
+
React.createElement(Divider, null),
|
|
30
|
+
React.createElement(StackItem, null,
|
|
31
|
+
React.createElement(Card, { isCompact: true, isPlain: true },
|
|
32
|
+
React.createElement(CardHeader, null,
|
|
33
|
+
React.createElement(ThumbsUpIcon, { className: "ins-c-report-details__icon" }),
|
|
34
|
+
React.createElement("strong", null, "Steps to resolve")),
|
|
35
|
+
React.createElement(CardBody, null, resolution && React.createElement(TemplateProcessor, { template: resolution, definitions: details, onError: handleError })))),
|
|
36
|
+
rule.node_id && (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(Divider, null),
|
|
38
|
+
React.createElement(StackItem, null,
|
|
39
|
+
React.createElement(Card, { className: "ins-c-report-details__kba", isCompact: true, isPlain: true },
|
|
40
|
+
React.createElement(CardHeader, null,
|
|
41
|
+
React.createElement(LightbulbIcon, { className: "ins-c-report-details__icon" }),
|
|
42
|
+
React.createElement("strong", null, "Related Knowledgebase article")),
|
|
43
|
+
React.createElement(CardBody, null, kbaLoading ? (React.createElement(Skeleton, { size: SkeletonSize.sm })) : (React.createElement(React.Fragment, null,
|
|
44
|
+
React.createElement(ExternalLink, { href: "".concat(kbaDetail.view_uri), content: kbaDetail.publishedTitle ? kbaDetail.publishedTitle : "Knowledgebase article" }),
|
|
45
|
+
"."))))))),
|
|
46
|
+
rule.more_info && (React.createElement(React.Fragment, null,
|
|
47
|
+
React.createElement(Divider, null),
|
|
48
|
+
React.createElement(StackItem, null,
|
|
49
|
+
React.createElement(Card, { isCompact: true, isPlain: true },
|
|
50
|
+
React.createElement(CardHeader, null,
|
|
51
|
+
React.createElement(InfoCircleIcon, { className: "ins-c-report-details__icon" }),
|
|
52
|
+
React.createElement("strong", null, "Additional info")),
|
|
53
|
+
React.createElement(CardBody, null, React.createElement(TemplateProcessor, { template: rule.more_info, definitions: details, onError: handleError }))))))))));
|
|
54
|
+
};
|
|
55
|
+
export default ReportDetails;
|
|
56
|
+
//# sourceMappingURL=ReportDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportDetails.js","sourceRoot":"","sources":["../../src/ReportDetails/ReportDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAG7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC,IAAM,aAAa,GAAiC,UAAC,EAAiC;QAA/B,MAAM,YAAA,EAAE,SAAS,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,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@import '~@redhat-cloud-services/frontend-components-utilities/styles/_mixins';
|
|
2
|
+
|
|
3
|
+
.ins-c-report-details {
|
|
4
|
+
&__cards-stack {
|
|
5
|
+
pre {
|
|
6
|
+
display: block;
|
|
7
|
+
color: var(--pf-global--Color--100);
|
|
8
|
+
word-break: break-all;
|
|
9
|
+
word-wrap: break-word;
|
|
10
|
+
background-color: var(--pf-global--BackgroundColor--light-200);
|
|
11
|
+
border: 1px solid var(--pf-global--BorderColor--100);
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
@include rem('padding', 10px);
|
|
14
|
+
@include rem('margin', (10px, 0));
|
|
15
|
+
|
|
16
|
+
code {
|
|
17
|
+
white-space: pre-wrap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ol {
|
|
22
|
+
@include rem('margin-top', 10px);
|
|
23
|
+
@include rem('margin-left', 15px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
pre + p,
|
|
27
|
+
pre + ul {
|
|
28
|
+
@include rem('margin-top', 10px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pf-c-list {
|
|
32
|
+
@include rem('margin', 5px 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
table {
|
|
36
|
+
width: 100%;
|
|
37
|
+
@include rem('margin-top', 10px);
|
|
38
|
+
|
|
39
|
+
tr {
|
|
40
|
+
border-bottom: 1px solid var(--pf-global--BorderColor--300);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
th,
|
|
44
|
+
td {
|
|
45
|
+
@include rem('padding', 8px);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__icon {
|
|
51
|
+
margin-right: var(--pf-global--spacer--sm);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ReportDetails/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleDescription.js","sourceRoot":"","sources":["../../src/RuleDescription/RuleDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAmC,MAAM,UAAU,CAAC;AAQ3E,IAAM,eAAe,GAAmC,UAAC,EAAgC;QAA9B,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,aAAa,mBAAA;IAAO,OAAA,CAC5F,oBAAC,KAAK,CAAC,QAAQ,QACZ,CAAC,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"RuleDescription.js","sourceRoot":"","sources":["../../src/RuleDescription/RuleDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAmC,MAAM,UAAU,CAAC;AAQ3E,IAAM,eAAe,GAAmC,UAAC,EAAgC;QAA9B,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,aAAa,mBAAA;IAAO,OAAA,CAC5F,oBAAC,KAAK,CAAC,QAAQ,QACZ,CAAC,IAAI,CAAC,OAAO,IAAK,IAAwB,CAAC,OAAO,CAAC,IAAI,CACtD,8BAAM,SAAS,EAAE,OAAO,KAAK,cAAc,CAAC,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE;QAC/F,oBAAC,QAAQ,IAAC,aAAa,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,IACjD,OAAO,KAAK,cAAc,CAAC,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAE,IAAwB,CAAC,OAAO,CAC1F,CACN,CACR,CACc,CAClB;AAV6F,CAU7F,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -12,23 +12,24 @@ import { ViewAffectedLink } from '../ViewAffectedLink';
|
|
|
12
12
|
import { RuleDescription } from '../RuleDescription';
|
|
13
13
|
var RuleDetails = function (_a) {
|
|
14
14
|
var messages = _a.messages, product = _a.product, header = _a.header, rule = _a.rule, isDetailsPage = _a.isDetailsPage, topics = _a.topics, onVoteClick = _a.onVoteClick, showViewAffected = _a.showViewAffected, resolutionRisk = _a.resolutionRisk, resolutionRiskDesc = _a.resolutionRiskDesc, children = _a.children, Link = _a.linkComponent, knowledgebaseUrl = _a.knowledgebaseUrl;
|
|
15
|
-
return (React.createElement(Flex, { flexWrap: { default: 'nowrap' }, direction: { default: isDetailsPage ? 'column' : 'columnReverse', lg: 'row' } },
|
|
15
|
+
return (React.createElement(Flex, { className: "ins-c-rule-details", flexWrap: { default: 'nowrap' }, direction: { default: isDetailsPage ? 'column' : 'columnReverse', lg: 'row' } },
|
|
16
16
|
React.createElement(FlexItem, null,
|
|
17
17
|
React.createElement(Stack, { hasGutter: true },
|
|
18
|
-
header && React.createElement(StackItem,
|
|
19
|
-
React.createElement(StackItem,
|
|
18
|
+
header && React.createElement(StackItem, { className: "ins-c-rule-details__header" }, header),
|
|
19
|
+
React.createElement(StackItem, { className: "ins-c-rule-details__description" },
|
|
20
20
|
React.createElement(RuleDescription, { product: product, rule: rule, isDetailsPage: isDetailsPage })),
|
|
21
|
-
knowledgebaseUrl && (React.createElement(StackItem,
|
|
21
|
+
knowledgebaseUrl && (React.createElement(StackItem, { className: "ins-c-rule-details__kbs" },
|
|
22
22
|
React.createElement("a", { rel: "noopener noreferrer", target: "_blank", href: knowledgebaseUrl },
|
|
23
23
|
messages.knowledgebaseArticle,
|
|
24
24
|
"\u00A0",
|
|
25
25
|
React.createElement(ExternalLinkAltIcon, { size: "sm" })))),
|
|
26
|
-
topics && rule.tags && topicLinks(rule, topics, Link).length > 0 && (React.createElement(StackItem,
|
|
26
|
+
topics && rule.tags && topicLinks(rule, topics, Link).length > 0 && (React.createElement(StackItem, { className: "ins-c-rule-details__topics" },
|
|
27
27
|
React.createElement("strong", null, messages.topicRelatedToRule),
|
|
28
28
|
React.createElement("br", null),
|
|
29
29
|
barDividedList(topicLinks(rule, topics, Link)))),
|
|
30
|
-
isDetailsPage && onVoteClick && React.createElement(
|
|
31
|
-
|
|
30
|
+
isDetailsPage && onVoteClick && (React.createElement(StackItem, { className: "ins-c-rule-details__vote" },
|
|
31
|
+
React.createElement(RuleRating, { messages: messages, ruleId: rule.rule_id, ruleRating: rule.rating, onVoteClick: onVoteClick }))),
|
|
32
|
+
!isDetailsPage && showViewAffected && Link && (React.createElement(StackItem, { className: "ins-c-rule-details__view-affected" },
|
|
32
33
|
React.createElement(ViewAffectedLink, { messages: messages, rule: rule, product: product, linkComponent: Link }))))),
|
|
33
34
|
React.createElement(FlexItem, { align: { lg: 'alignRight' } },
|
|
34
35
|
React.createElement(Stack, null,
|
|
@@ -39,11 +40,11 @@ var RuleDetails = function (_a) {
|
|
|
39
40
|
React.createElement("strong", null, messages.totalRisk)),
|
|
40
41
|
React.createElement(FlexItem, null,
|
|
41
42
|
React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
|
42
|
-
React.createElement(FlexItem,
|
|
43
|
+
React.createElement(FlexItem, { className: "ins-c-rule-details__total-risk" },
|
|
43
44
|
React.createElement(InsightsLabel, { value: rule.total_risk, isCompact: true, className: "pf-m-compact", rest: {} })),
|
|
44
|
-
React.createElement(FlexItem,
|
|
45
|
+
React.createElement(FlexItem, null,
|
|
45
46
|
React.createElement(Stack, { hasGutter: true },
|
|
46
|
-
React.createElement(StackItem,
|
|
47
|
+
React.createElement(StackItem, { className: "ins-c-rule-details__total-risk-body" },
|
|
47
48
|
React.createElement(TextContent, null,
|
|
48
49
|
React.createElement(Text, { component: TextVariants.p }, messages.rulesDetailsTotalRiskBody))),
|
|
49
50
|
React.createElement(Stack, null,
|
|
@@ -58,13 +59,13 @@ var RuleDetails = function (_a) {
|
|
|
58
59
|
React.createElement(FlexItem, { className: "pf-u-display-inline-flex alignCenterOverride pf-u-pb-sm pf-u-pt-sm" },
|
|
59
60
|
React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
|
60
61
|
React.createElement(FlexItem, null,
|
|
61
|
-
React.createElement(InsightsLabel, { text: messages.riskOfChangeLabel, value: resolutionRisk, hideIcon: true, className: "pf-m-compact", rest: {} })),
|
|
62
|
-
React.createElement(FlexItem, { className: "ins-c-
|
|
62
|
+
React.createElement(InsightsLabel, { text: messages.riskOfChangeLabel, value: resolutionRisk, hideIcon: true, className: "ins-c-rule-details__risk-of-ch-label pf-m-compact", rest: {} })),
|
|
63
|
+
React.createElement(FlexItem, { className: "ins-c-rule-details__risk-of-ch-desc" },
|
|
63
64
|
React.createElement(Stack, { hasGutter: true },
|
|
64
65
|
React.createElement(StackItem, null,
|
|
65
66
|
React.createElement(TextContent, null,
|
|
66
67
|
React.createElement(Text, { component: TextVariants.p }, resolutionRiskDesc))),
|
|
67
|
-
product === AdvisorProduct.rhel && (React.createElement(StackItem,
|
|
68
|
+
product === AdvisorProduct.rhel && (React.createElement(StackItem, { className: "ins-c-rule-details__reboot" },
|
|
68
69
|
React.createElement(RebootRequired, { messages: messages, rebootRequired: rule.reboot_required })))))))))))))));
|
|
69
70
|
};
|
|
70
71
|
export default RuleDetails;
|