@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,13 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import '
|
|
2
|
+
import '../RuleDetails/RuleDetails.css';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Flex, FlexItem } from
|
|
5
|
-
import {
|
|
6
|
-
import { Stack, StackItem } from "@patternfly/react-core/dist/dynamic/layouts/Stack";
|
|
7
|
-
import { Text, TextContent, TextVariants } from "@patternfly/react-core/dist/dynamic/components/Text";
|
|
8
|
-
import ExternalLinkAltIcon from "@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon";
|
|
4
|
+
import { Flex, FlexItem, Icon, Stack, StackItem, Text, TextContent, TextVariants } from '@patternfly/react-core';
|
|
5
|
+
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
|
9
6
|
import InsightsLabel from '@redhat-cloud-services/frontend-components/InsightsLabel';
|
|
10
|
-
import { SeverityLine } from '@redhat-cloud-services/frontend-components
|
|
7
|
+
import { SeverityLine } from '@redhat-cloud-services/frontend-components/SeverityLine';
|
|
11
8
|
import RebootRequired from '../RebootRequired/RebootRequired';
|
|
12
9
|
import RuleRating from '../RuleRating/RuleRating';
|
|
13
10
|
import { AdvisorProduct } from '../types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleDetails.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"RuleDetails.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/RuleDetails/RuleDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,yDAAyD,CAAC;AAEvF,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAA2C,MAAM,UAAU,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAuBrD,IAAM,WAAW,GAA+B,UAAC,EAahD;QAZC,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,cAAc,oBAAA,EACd,kBAAkB,wBAAA,EAClB,QAAQ,cAAA,EACR,gBAAgB,sBAAA,EAChB,MAAM,YAAA,EACN,gBAAgB,sBAAA;IACZ,OAAA,CACJ,MAAC,IAAI,IACH,SAAS,EAAC,oBAAoB,EAC9B,QAAQ,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAC/B,SAAS,EAAE,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,EAAE,KAAK,EAAE,aAE7E,KAAC,QAAQ,cACP,MAAC,KAAK,IAAC,SAAS,mBACb,MAAM,IAAI,KAAC,SAAS,IAAC,SAAS,E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,IACZ,IAAI,EAAE,QAAQ,CAAC,iBAAiB,EAChC,KAAK,EAAE,cAAc,EACrB,QAAQ,QACR,SAAS,EAAC,mDAAmD,EAC7D,IAAI,EAAE,EAAE,GACR,GACO,EACX,KAAC,QAAQ,IAAC,SAAS,EAAC,qCAAqC,YACvD,MAAC,KAAK,IAAC,SAAS,mBACd,KAAC,SAAS,cACR,KAAC,WAAW,cACV,KAAC,IAAI,IAAC,SAAS,EAAE,YAAY,CAAC,CAAC,YAAG,kBAAkB,GAAQ,GAChD,GACJ,EACX,OAAO,KAAK,cAAc,CAAC,IAAI,IAAI,CAClC,KAAC,SAAS,IAAC,SAAS,EAAC,4BAA4B,YAC/C,KAAC,cAAc,IAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAG,IAAwB,CAAC,eAAe,GAAI,GACvF,CACb,IACK,GACC,IACN,GACE,IACI,CAClB,IACI,GACG,IACN,GACC,IACN,CACR;AAnHK,CAmHL,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Message = React.ReactNode;
|
|
2
|
+
export type RuleDetailsMessages = {
|
|
3
|
+
systemReboot: Message;
|
|
4
|
+
knowledgebaseArticle: Message;
|
|
5
|
+
totalRisk: Message;
|
|
6
|
+
rulesDetailsTotalRiskBody: Message;
|
|
7
|
+
likelihoodLevel: string;
|
|
8
|
+
likelihoodDescription: Message;
|
|
9
|
+
impactLevel: string;
|
|
10
|
+
impactDescription: Message;
|
|
11
|
+
riskOfChange: Message;
|
|
12
|
+
riskOfChangeText: Message;
|
|
13
|
+
riskOfChangeLabel: Message;
|
|
14
|
+
ruleHelpful: Message;
|
|
15
|
+
feedbackThankYou: Message;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleDetailsMessages.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/RuleDetails/RuleDetailsMessages.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/RuleDetails/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './RuleRating.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Rating } from '../types';
|
|
4
|
+
import { RuleDetailsMessages } from '../RuleDetails/RuleDetailsMessages';
|
|
5
|
+
export declare const DEBOUNCE_TIMEOUT = 2000;
|
|
6
|
+
interface RuleRatingProps {
|
|
7
|
+
ruleId: string;
|
|
8
|
+
ruleRating: Rating;
|
|
9
|
+
onVoteClick: (ruleId: string, calculatedRating: Rating) => unknown;
|
|
10
|
+
messages: RuleDetailsMessages;
|
|
11
|
+
}
|
|
12
|
+
declare const RuleRating: React.FC<RuleRatingProps>;
|
|
13
|
+
export default RuleRating;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import '
|
|
2
|
+
import '../RuleRating/RuleRating.css';
|
|
3
3
|
import { useCallback, useState } from 'react';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
|
-
import { Button } from
|
|
6
|
-
import {
|
|
7
|
-
import OutlinedThumbsDownIcon from "@patternfly/react-icons/dist/dynamic/icons/outlined-thumbs-down-icon";
|
|
8
|
-
import OutlinedThumbsUpIcon from "@patternfly/react-icons/dist/dynamic/icons/outlined-thumbs-up-icon";
|
|
9
|
-
import ThumbsDownIcon from "@patternfly/react-icons/dist/dynamic/icons/thumbs-down-icon";
|
|
10
|
-
import ThumbsUpIcon from "@patternfly/react-icons/dist/dynamic/icons/thumbs-up-icon";
|
|
5
|
+
import { Button, Icon } from '@patternfly/react-core';
|
|
6
|
+
import { OutlinedThumbsDownIcon, OutlinedThumbsUpIcon, ThumbsDownIcon, ThumbsUpIcon } from '@patternfly/react-icons';
|
|
11
7
|
export var DEBOUNCE_TIMEOUT = 2000;
|
|
12
8
|
var RuleRating = function (_a) {
|
|
13
9
|
var messages = _a.messages, ruleId = _a.ruleId, ruleRating = _a.ruleRating, onVoteClick = _a.onVoteClick;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleRating.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"RuleRating.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/RuleRating/RuleRating.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAE3B,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAKrH,MAAM,CAAC,IAAM,gBAAgB,GAAG,IAAI,CAAC;AASrC,IAAM,UAAU,GAA8B,UAAC,EAA6C;QAA3C,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,WAAW,iBAAA;IAClF,IAAA,KAAsB,QAAQ,CAAC,UAAU,CAAC,EAAzC,MAAM,QAAA,EAAE,SAAS,QAAwB,CAAC;IAC3C,IAAA,KAA4B,QAAQ,CAAC,KAAK,CAAC,EAA1C,SAAS,QAAA,EAAE,YAAY,QAAmB,CAAC;IAElD,IAAM,eAAe,GAAG,WAAW,CACjC,QAAQ,CAAC,UAAC,gBAAgB;QACxB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QACtC,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,EAAE,gBAAgB,CAAC,EACpB,EAAE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AC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/RuleRating/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TemplateProcessorProps {
|
|
3
|
+
template: string;
|
|
4
|
+
definitions: Record<string, string | number>;
|
|
5
|
+
onError?: (e: Error) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const TemplateProcessor: React.FC<TemplateProcessorProps>;
|
|
8
|
+
export default TemplateProcessor;
|
|
@@ -28,7 +28,7 @@ var TemplateProcessor = function (_a) {
|
|
|
28
28
|
.replace(/\b_|_\b/g, '\\\\_'));
|
|
29
29
|
try {
|
|
30
30
|
var compiledDot = Object.keys(definitions).length !== 0 ? doT.template(template, DOT_SETTINGS)(definitions) : template;
|
|
31
|
-
var compiledMd = marked(compiledDot);
|
|
31
|
+
var compiledMd = marked(compiledDot, { async: false });
|
|
32
32
|
var sanitized = sanitize(compiledMd, {
|
|
33
33
|
allowedAttributes: { '*': ['href', 'target', 'class', 'style', 'rel'] },
|
|
34
34
|
allowedSchemes: ['https'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateProcessor.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"TemplateProcessor.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/TemplateProcessor/TemplateProcessor.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,QAAQ,EAAE,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQ1D,IAAM,YAAY,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AAG,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,eAAe,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;gBACjF,CAAC,EAAE,eAAe,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;aAC1E;SACF,CAAC,CAAC;QAEH,OAAO,CACL,cACE,uBAAuB,EAAE;gBACvB,MAAM,EAAE,SAAS,CAAC,OAAO,CACvB,UAAU,EACV,iDAA+C,CAChD;aACF,GACD,CACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC3C,OAAO,IAAI,OAAO,CAAC,KAAc,CAAC,CAAC;QACnC,OAAO,CACL,wBACE,yBAAO,QAAQ,GAAQ,GACnB,CACP,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/TemplateProcessor/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Message } from '../RuleDetails/RuleDetailsMessages';
|
|
3
|
+
import { AdvisorProduct, RuleContentOcp, RuleContentRhel } from '../types';
|
|
4
|
+
interface ViewAffectedLinkProps {
|
|
5
|
+
messages: {
|
|
6
|
+
viewAffectedClusters: Message;
|
|
7
|
+
viewAffectedSystems: Message;
|
|
8
|
+
};
|
|
9
|
+
product: AdvisorProduct;
|
|
10
|
+
rule: RuleContentOcp | RuleContentRhel;
|
|
11
|
+
linkComponent: any;
|
|
12
|
+
}
|
|
13
|
+
declare const ViewAffectedLink: React.FC<ViewAffectedLinkProps>;
|
|
14
|
+
export default ViewAffectedLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewAffectedLink.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ViewAffectedLink.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/ViewAffectedLink/ViewAffectedLink.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAmC,MAAM,UAAU,CAAC;AAY3E,IAAM,gBAAgB,GAAoC,UAAC,EAAgD;QAA9C,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,IAAI,UAAA,EAAiB,IAAI,mBAAA;IAAO,OAAA,CAC9G,KAAC,KAAK,CAAC,QAAQ,cACZ,OAAO,KAAK,cAAc,CAAC,GAAG;YAC7B,CAAC,CAAE,IAAuB,CAAC,uBAAuB,GAAG,CAAC,IAAI,CACtD,KAAC,IAAI,IAA8B,EAAE,EAAE,2BAAoB,IAAI,CAAC,OAAO,CAAE,YACtE,QAAQ,CAAC,oBAAoB,IADrB,UAAG,IAAI,CAAC,OAAO,UAAO,CAE1B,CACR;YACH,CAAC,CAAE,IAAwB,CAAC,sBAAsB,GAAG,CAAC,IAAI,CACtD,KAAC,IAAI,IAA8B,EAAE,EAAE,2BAAoB,IAAI,CAAC,OAAO,CAAE,YACtE,QAAQ,CAAC,mBAAmB,IADpB,UAAG,IAAI,CAAC,OAAO,UAAO,CAE1B,CACR,GACU,CAClB;AAd+G,CAc/G,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/advisor-components/src/ViewAffectedLink/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/esm/common.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RuleContentRhel, TopicRhel } from './types';
|
|
2
|
+
export declare const barDividedList: (list: JSX.Element[]) => import("react/jsx-runtime").JSX.Element[];
|
|
3
|
+
export declare const topicLinks: (rule: RuleContentRhel, topics: TopicRhel[], Link: any) => import("react/jsx-runtime").JSX.Element[];
|
|
4
|
+
export declare const ExternalLink: ({ href, content }: {
|
|
5
|
+
href: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/esm/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../packages/advisor-components/src/common.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAK/C,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,IAAmB;IAChD,OAAA,IAAI,CAAC,GAAG,CAAC,UAAC,OAAO,EAAE,KAAK,IAAK,OAAA,CAC3B,MAAC,KAAK,CAAC,QAAQ,eACZ,OAAO,EACP,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,iBAAQ,SAAS,EAAC,iBAAiB,8BAA4B,KAF1E,KAAK,CAGT,CAClB,EAL4B,CAK5B,CAAC;AALF,CAKE,CAAC;AAEL,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,IAAqB,EAAE,MAAmB,EAAE,IAAS;IAC9E,OAAA,MAAM;QACJ,CAAC,CAAC,OAAO,CACL,MAAM,CAAC,GAAG,CACR,UAAC,KAAK;YACJ,OAAA,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CACjE,KAAC,IAAI,IAAkB,EAAE,EAAE,kBAAW,KAAK,CAAC,IAAI,CAAE,YAAG,UAAG,KAAK,CAAC,IAAI,CAAE,IAAzD,KAAK,CAAC,IAAI,CAAuD,CAC7E;QAFD,CAEC,CACJ,CACF;QACH,CAAC,CAAC,EAAE;AATN,CASM,CAAC;AAET,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,EAA8D;QAA5D,YAAS,EAAT,IAAI,mBAAG,EAAE,KAAA,EAAE,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA;IAA0C,OAAA,CAC9F,aAAG,GAAG,EAAC,qBAAqB,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,aACpD,OAAO,OAAE,YAAG,SAAS,EAAC,0BAA0B,GAAG,IAClD,CACL;AAJ+F,CAI/F,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const TOTAL_RISK_LABEL_KEY: {
|
|
2
|
+
1: string;
|
|
3
|
+
2: string;
|
|
4
|
+
3: string;
|
|
5
|
+
4: string;
|
|
6
|
+
};
|
|
7
|
+
declare const LIKELIHOOD_LABEL_KEY: {
|
|
8
|
+
1: string;
|
|
9
|
+
2: string;
|
|
10
|
+
3: string;
|
|
11
|
+
4: string;
|
|
12
|
+
};
|
|
13
|
+
declare const IMPACT_LABEL_KEY: {
|
|
14
|
+
1: string;
|
|
15
|
+
2: string;
|
|
16
|
+
3: string;
|
|
17
|
+
4: string;
|
|
18
|
+
};
|
|
19
|
+
declare const RISK_OF_CHANGE_LABEL_KEY: {
|
|
20
|
+
1: string;
|
|
21
|
+
2: string;
|
|
22
|
+
3: string;
|
|
23
|
+
4: string;
|
|
24
|
+
};
|
|
25
|
+
declare const RuleDetailsMessagesKeys: string[];
|
|
26
|
+
export { TOTAL_RISK_LABEL_KEY, LIKELIHOOD_LABEL_KEY, IMPACT_LABEL_KEY, RISK_OF_CHANGE_LABEL_KEY, RuleDetailsMessagesKeys };
|
package/esm/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../packages/advisor-components/src/constants.ts"],"names":[],"mappings":"AAAA,IAAM,oBAAoB,GAAG;IAC3B,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,UAAU;CACd,CAAC;AAEF,IAAM,oBAAoB,GAAG;IAC3B,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,UAAU;CACd,CAAC;AAEF,IAAM,gBAAgB,GAAG;IACvB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,UAAU;CACd,CAAC;AAEF,IAAM,wBAAwB,GAAG;IAC/B,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,MAAM;CACV,CAAC;AAEF,IAAM,uBAAuB,GAAG;IAC9B,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,sBAAsB;IACtB,oBAAoB;IACpB,WAAW;IACX,2BAA2B;IAC3B,iBAAiB;IACjB,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,aAAa;IACb,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,mBAAmB;CACpB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
|
package/esm/index.d.ts
ADDED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/advisor-components/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
package/esm/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare enum AdvisorProduct {
|
|
2
|
+
ocp = "ocp",
|
|
3
|
+
rhel = "rhel"
|
|
4
|
+
}
|
|
5
|
+
export type TotalRisk = 1 | 2 | 3 | 4;
|
|
6
|
+
export type RiskOfChange = 1 | 2 | 3 | 4;
|
|
7
|
+
export type Impact = 1 | 2 | 3 | 4;
|
|
8
|
+
export type Rating = -1 | 0 | 1;
|
|
9
|
+
export type Likelihood = 1 | 2 | 3 | 4;
|
|
10
|
+
export interface RuleContent {
|
|
11
|
+
rule_id: string;
|
|
12
|
+
generic: string;
|
|
13
|
+
total_risk: TotalRisk;
|
|
14
|
+
likelihood: Likelihood;
|
|
15
|
+
description: string;
|
|
16
|
+
publish_date: string;
|
|
17
|
+
more_info: string;
|
|
18
|
+
rating: Rating;
|
|
19
|
+
impact: {
|
|
20
|
+
impact: Impact;
|
|
21
|
+
name?: string;
|
|
22
|
+
};
|
|
23
|
+
reason: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RhelResolution {
|
|
26
|
+
system_type: number;
|
|
27
|
+
resolution: string;
|
|
28
|
+
resolution_risk: {
|
|
29
|
+
name: string;
|
|
30
|
+
risk: number;
|
|
31
|
+
};
|
|
32
|
+
has_playbook: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface RuleContentRhel extends RuleContent {
|
|
35
|
+
impacted_systems_count: number;
|
|
36
|
+
created_at: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
deleted_at: string;
|
|
39
|
+
active: boolean;
|
|
40
|
+
category: {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
playbook_count: number;
|
|
45
|
+
reboot_required: boolean;
|
|
46
|
+
reports_shown: boolean;
|
|
47
|
+
rule_status: string;
|
|
48
|
+
resolution_set: RhelResolution[];
|
|
49
|
+
node_id: string;
|
|
50
|
+
tags: string;
|
|
51
|
+
summary: string;
|
|
52
|
+
hosts_acked_count: number;
|
|
53
|
+
}
|
|
54
|
+
export interface RuleContentOcp extends RuleContent {
|
|
55
|
+
resolution: string;
|
|
56
|
+
risk_of_change: RiskOfChange;
|
|
57
|
+
impacted_clusters_count: number;
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
tags: string[];
|
|
60
|
+
}
|
|
61
|
+
export interface TopicRhel {
|
|
62
|
+
name: string;
|
|
63
|
+
slug: string;
|
|
64
|
+
tag: string;
|
|
65
|
+
featured: boolean;
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
impacted_systems_count: number;
|
|
68
|
+
}
|
package/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../packages/advisor-components/src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB"}
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/advisor-components/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC"}
|
package/package.json
CHANGED
|
@@ -1,58 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@cypress/webpack-dev-server": "^3.5.1",
|
|
50
|
-
"@types/dot": "^1.1.5",
|
|
51
|
-
"@types/marked": "^4.0.7",
|
|
52
|
-
"css-loader": "^6.7.1",
|
|
53
|
-
"cypress": "^12.17.2",
|
|
54
|
-
"eslint-plugin-cypress": "^2.12.1",
|
|
55
|
-
"sass-loader": "^12.6.0",
|
|
56
|
-
"style-loader": "^3.3.1"
|
|
57
|
-
}
|
|
2
|
+
"name": "@redhat-cloud-services/frontend-components-advisor-components",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "Components to be used in Advisor applications and integrations.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "esm/index.js",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/RedHatInsights/frontend-components.git"
|
|
14
|
+
},
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/RedHatInsights/frontend-components/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/RedHatInsights/frontend-components/tree/master/packages/advisor-components#readme",
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@patternfly/react-core": "^5.0.0",
|
|
23
|
+
"@patternfly/react-icons": "^5.0.0",
|
|
24
|
+
"prop-types": "^15.6.2",
|
|
25
|
+
"react": "^18.2.0",
|
|
26
|
+
"react-dom": "^18.2.0",
|
|
27
|
+
"react-router-dom": "^5.0.0 || ^6.0.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@redhat-cloud-services/frontend-components": "^5.0.1",
|
|
31
|
+
"dot": "^1.1.3",
|
|
32
|
+
"lodash": "^4.17.21",
|
|
33
|
+
"marked": "14.1.2",
|
|
34
|
+
"react-markdown": "^8.0.3",
|
|
35
|
+
"rehype-raw": "^6.1.1",
|
|
36
|
+
"rehype-sanitize": "^5.0.1",
|
|
37
|
+
"sanitize-html": "^2.13.1"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@cypress/webpack-dev-server": "^3.5.1",
|
|
41
|
+
"@types/dot": "^1.1.5",
|
|
42
|
+
"css-loader": "^6.7.1",
|
|
43
|
+
"eslint-plugin-cypress": "^3.0.0",
|
|
44
|
+
"sass-loader": "^16.0.2",
|
|
45
|
+
"style-loader": "^3.3.1"
|
|
46
|
+
}
|
|
58
47
|
}
|
package/types.d.ts
CHANGED
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../packages/advisor-components/src/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
package/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# RedHat Cloud Services frontend components - Advisor components
|
|
2
|
-
|
|
3
|
-
This package exports components utilized in Advisor (OCP Advisor, RHEL Advisor) and other applications that integrate the Advisor functionality. It contains the presentational layer components that display rule descriptions, reports, etc.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
With npm
|
|
8
|
-
```bash
|
|
9
|
-
npm i -S @redhat-cloud-services/frontend-components
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
With yarn
|
|
13
|
-
```bash
|
|
14
|
-
yarn add @redhat-cloud-services/frontend-components
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
This package is dependent on [@redhat-cloud-services/frontend-components](https://www.npmjs.com/package/@redhat-cloud-services/frontend-components) and it will automatically install it trough direct dependencies.
|
|
18
|
-
|
|
19
|
-
## Testing
|
|
20
|
-
|
|
21
|
-
Run cypress component tests in terminal:
|
|
22
|
-
```bash
|
|
23
|
-
npx cypress run --component
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Run cypress components tests in the interactive (window) mode:
|
|
27
|
-
```bash
|
|
28
|
-
npx cypress open --component
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Documentation Links
|
|
32
|
-
|
|
33
|
-
* Components
|
|
34
|
-
* [RuleDetails](doc/ruleDetails.md)
|
|
35
|
-
* [ReportDetails](doc/reportDetails.md)
|
|
36
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { createJoinFunction, createJoinImplementation, asGenerator, defaultJoinGenerator } = require('resolve-url-loader');
|
|
4
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
5
|
-
|
|
6
|
-
// call default generator then pair different variations of uri with each base
|
|
7
|
-
const myGenerator = asGenerator((item, ...rest) => {
|
|
8
|
-
const defaultTuples = [...defaultJoinGenerator(item, ...rest)];
|
|
9
|
-
if (item.uri.includes('./assets')) {
|
|
10
|
-
return defaultTuples.map(([base]) => {
|
|
11
|
-
if (base.includes('@patternfly/patternfly')) {
|
|
12
|
-
return [base, path.relative(base, path.resolve(__dirname, '../node_modules/@patternfly/patternfly', item.uri))];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return defaultTuples;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
module.exports = {
|
|
20
|
-
module: {
|
|
21
|
-
rules: [
|
|
22
|
-
{
|
|
23
|
-
test: /\.(js|ts)x?$/,
|
|
24
|
-
exclude: /node_modules/,
|
|
25
|
-
use: {
|
|
26
|
-
loader: 'swc-loader',
|
|
27
|
-
options: {
|
|
28
|
-
jsc: {
|
|
29
|
-
parser: {
|
|
30
|
-
syntax: 'typescript',
|
|
31
|
-
tsx: true,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
test: /\.s?[ac]ss$/,
|
|
39
|
-
use: [
|
|
40
|
-
MiniCssExtractPlugin.loader,
|
|
41
|
-
'css-loader',
|
|
42
|
-
{
|
|
43
|
-
loader: 'resolve-url-loader',
|
|
44
|
-
options: {
|
|
45
|
-
join: createJoinFunction('myJoinFn', createJoinImplementation(myGenerator)),
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
loader: 'sass-loader',
|
|
50
|
-
options: {
|
|
51
|
-
sourceMap: true,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
test: /\.(jpe?g|svg|png|gif|ico|eot|ttf|woff2?)(\?v=\d+\.\d+\.\d+)?$/i,
|
|
58
|
-
type: 'asset/resource',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
resolve: {
|
|
63
|
-
extensions: ['.tsx', '.ts', '.js'],
|
|
64
|
-
alias: {
|
|
65
|
-
'@redhat-cloud-services/frontend-components/useChrome': path.resolve(
|
|
66
|
-
__dirname,
|
|
67
|
-
'./overrideChrome.js'
|
|
68
|
-
),
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
output: {
|
|
72
|
-
filename: 'bundle.js',
|
|
73
|
-
hashFunction: 'xxhash64',
|
|
74
|
-
path: path.resolve(__dirname, 'dist'),
|
|
75
|
-
},
|
|
76
|
-
cache: {
|
|
77
|
-
type: 'filesystem',
|
|
78
|
-
buildDependencies: {
|
|
79
|
-
config: [__filename],
|
|
80
|
-
},
|
|
81
|
-
cacheDirectory: path.resolve(__dirname, '../.cypress-cache'),
|
|
82
|
-
},
|
|
83
|
-
stats: {
|
|
84
|
-
errorDetails: true,
|
|
85
|
-
},
|
|
86
|
-
plugins: [
|
|
87
|
-
new MiniCssExtractPlugin({
|
|
88
|
-
filename: '[name].[fullhash].css',
|
|
89
|
-
}),
|
|
90
|
-
],
|
|
91
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|