@rh-support/troubleshoot 2.4.5-beta.2 → 2.4.5-beta.20
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/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +24 -19
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +2 -2
- package/lib/esm/components/Cve/CveItem.d.ts +2 -0
- package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveItem.js +78 -20
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +9 -5
- package/lib/esm/components/Cve/CvePanel.js +1 -1
- package/lib/esm/components/Cve/CveSidebar.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveSidebar.js +1 -2
- package/lib/esm/components/OpenCase/OpenCase.d.ts +3 -0
- package/lib/esm/components/OpenCase/OpenCase.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/OpenCase.js +9 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +3 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +26 -5
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +2 -2
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts +4 -2
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +41 -23
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +6 -1
- package/lib/esm/components/Recommendations/AsideResults.js +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleWidget.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleWidget.js +5 -6
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +66 -31
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +5 -3
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +5 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +8 -3
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -13
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +69 -13
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +10 -9
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +31 -4
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +50 -10
- package/lib/esm/css/results.css +6 -0
- package/lib/esm/hooks/useFetchCVEData.d.ts.map +1 -1
- package/lib/esm/hooks/useFetchCVEData.js +58 -21
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +9 -8
- package/lib/esm/models/caseCreationWorkflows.d.ts +2 -0
- package/lib/esm/models/caseCreationWorkflows.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +2 -0
- package/lib/esm/reducers/CaseReducer.d.ts +1 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +9 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts +2 -2
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +9 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +7 -4
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +26 -13
- package/lib/esm/scss/_main.scss +65 -0
- package/lib/esm/scss/_pf-overrides.scss +1 -1
- package/lib/esm/utils/caseUtils.d.ts +13 -1
- package/lib/esm/utils/caseUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseUtils.js +32 -5
- package/package.json +9 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAqKhD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { Popover, TextArea } from '@patternfly/react-core';
|
|
2
|
+
import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/outlined-question-circle-icon';
|
|
3
3
|
// import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-icon'; This will be used for the Learn More button
|
|
4
|
-
import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
|
|
5
4
|
import { InlineEdit, useBreakpoint } from '@rh-support/components';
|
|
6
5
|
import isEmpty from 'lodash/isEmpty';
|
|
7
6
|
import isEqual from 'lodash/isEqual';
|
|
@@ -13,8 +12,7 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
|
13
12
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
14
13
|
export default function Description(props) {
|
|
15
14
|
const { t } = useTranslation();
|
|
16
|
-
const { issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName,
|
|
17
|
-
summary: state.caseDetails.summary,
|
|
15
|
+
const { issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, version, product, summary } = useCaseSelector((state) => ({
|
|
18
16
|
description: state.caseDetails.description,
|
|
19
17
|
issue: state.caseDetails.issue,
|
|
20
18
|
environment: state.caseDetails.environment,
|
|
@@ -23,6 +21,8 @@ export default function Description(props) {
|
|
|
23
21
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
24
22
|
hasLargeCaseDescription: state.hasLargeCaseDescription,
|
|
25
23
|
v3ClusterName: state.v3ClusterName,
|
|
24
|
+
product: state.caseDetails.product,
|
|
25
|
+
summary: state.caseDetails.summary,
|
|
26
26
|
}), isEqual);
|
|
27
27
|
const caseDispatch = useCaseDispatch();
|
|
28
28
|
const breakPoint = useBreakpoint();
|
|
@@ -57,23 +57,28 @@ export default function Description(props) {
|
|
|
57
57
|
};
|
|
58
58
|
const isKT1Required = true;
|
|
59
59
|
const headerPopoverContent = (React.createElement("div", null,
|
|
60
|
-
React.createElement(
|
|
61
|
-
|
|
62
|
-
React.createElement(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
" ",
|
|
66
|
-
React.createElement(
|
|
67
|
-
|
|
68
|
-
React.createElement("
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
React.createElement(Trans, null, "Tips for describing your problem")));
|
|
61
|
+
const PopoverContent = (React.createElement("div", { className: "popover-body-info-description" },
|
|
62
|
+
React.createElement(Trans, null, "Example:"),
|
|
63
|
+
React.createElement("p", { className: "pf-v5-u-color-200" },
|
|
64
|
+
React.createElement(Trans, null,
|
|
65
|
+
"I'm unable to start the SSHD service receiving the error message",
|
|
66
|
+
React.createElement("br", null),
|
|
67
|
+
"\"Bad yes/no argument for ShowPatchLevel parameter\"")),
|
|
68
|
+
React.createElement(Trans, null, "To expedite your case, include these details:"),
|
|
69
|
+
React.createElement("p", { className: "pf-v5-u-color-200" },
|
|
70
|
+
React.createElement(Trans, null,
|
|
71
|
+
"Problem",
|
|
72
|
+
React.createElement("br", null),
|
|
73
|
+
"Steps you've taken",
|
|
74
|
+
React.createElement("br", null),
|
|
75
|
+
"Error Messages"))));
|
|
71
76
|
return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null, props.customTitle ? (props.customTitle) : (React.createElement(React.Fragment, null,
|
|
72
77
|
React.createElement(Trans, null, "Describe your problem. Include specific actions and error messages."),
|
|
73
78
|
isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
74
|
-
React.createElement(Popover, {
|
|
75
|
-
React.createElement(
|
|
76
|
-
React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${
|
|
79
|
+
React.createElement(Popover, { isVisible: isOpen, shouldClose: handleClose, headerContent: headerPopoverContent, bodyContent: PopoverContent },
|
|
80
|
+
React.createElement(OutlinedQuestionCircleIcon, { className: "pf-v5-u-ml-xs icon-size", onClick: handleToggle }))))), labelProps: { htmlFor: 'get-support-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
|
|
81
|
+
React.createElement(TextArea, { id: "get-support-ktQ1-issue", name: "get-support-ktQ1-issue", className: `description-textarea ${isEmpty(version) || isEmpty(summary) || isEmpty(product) ? 'kt1-disabled' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, disabled: isEmpty(version) || isEmpty(summary) || isEmpty(product), onChange: (e, value) => onKTQ1IssueChange(value, e), "data-tracking-id": "get-support-ktQ1-issue", placeholder: t(`The more detail that you include, the easier it is for us to help you. \nExample: \nI'm unable to start the SSHD service and am receiving the error message "Bad yes/no \nargument for ShowPatchLevel parameter"`), resizeOrientation: "vertical", validated: props.isSummarizeInvalid ? 'error' : 'default', rows: isLgScreenHeight ? 10 : 4, ref: textAreaRef, onClick: handleTextAreaClick }),
|
|
77
82
|
React.createElement("p", { className: "form-instructions pf-v5-u-danger-color-100", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DETAILS_ISSUE_LIMIT
|
|
78
83
|
? `This description exceeds ${CASE_DETAILS_ISSUE_LIMIT} characters. Try shortening it.`
|
|
79
84
|
: ''}`)));
|
|
@@ -86,16 +86,16 @@ export function OpenShiftClusterId(props) {
|
|
|
86
86
|
*/
|
|
87
87
|
useEffect(() => {
|
|
88
88
|
var _a;
|
|
89
|
-
if (isEmpty(product)
|
|
89
|
+
if (isEmpty(product))
|
|
90
90
|
return;
|
|
91
91
|
const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
var _a, _b;
|
|
93
93
|
const hasCluster = yield isClusterIdEnabledForProduct(product, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
|
|
94
|
+
setShowClusterId(hasCluster);
|
|
94
95
|
if (!hasCluster) {
|
|
95
96
|
resetClusterData();
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
|
-
setShowClusterId(hasCluster);
|
|
99
99
|
// if clusterId is already populated it means it comes from session and
|
|
100
100
|
// we ignore url clusterId otherwise we get cluster id from url and validate it
|
|
101
101
|
const clusterIdFromUrl = queryParams === null || queryParams === void 0 ? void 0 : queryParams.clusterId;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { ICVEWorkflowRecommendation } from '../../models/caseCreationWorkflows';
|
|
3
3
|
interface IProp {
|
|
4
4
|
cve: ICVEWorkflowRecommendation;
|
|
5
|
+
isExpanded: boolean;
|
|
6
|
+
index: number;
|
|
5
7
|
}
|
|
6
8
|
export declare const CveItem: (props: IProp) => React.JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,oCAAoC,CAAC;AAShG,UAAU,KAAK;IACX,GAAG,EAAE,0BAA0B,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,OAAO,UAAW,KAAK,sBA2NnC,CAAC"}
|
|
@@ -1,56 +1,110 @@
|
|
|
1
|
+
import { pcm } from '@cee-eng/hydrajs';
|
|
1
2
|
import { Button, Flex, FlexItem, Label, LabelGroup, Text, TextVariants } from '@patternfly/react-core';
|
|
2
3
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
3
4
|
import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon';
|
|
4
5
|
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
5
|
-
import { format } from 'date-fns';
|
|
6
|
+
import { format, isValid, parseISO } from 'date-fns';
|
|
6
7
|
import DOMPurify from 'dompurify';
|
|
7
8
|
import isEmpty from 'lodash/isEmpty';
|
|
9
|
+
import isEqual from 'lodash/isEqual';
|
|
8
10
|
import map from 'lodash/map';
|
|
9
11
|
import slice from 'lodash/slice';
|
|
10
|
-
import React from 'react';
|
|
12
|
+
import React, { useContext, useEffect } from 'react';
|
|
11
13
|
import { Trans } from 'react-i18next';
|
|
14
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
15
|
+
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
16
|
+
import { createOrUpdateSessionResources, getSessResFromCve, getSessResFromErrata, } from '../../reducers/SessionRestoreReducer';
|
|
17
|
+
import RouteUtils from '../../utils/routeUtils';
|
|
18
|
+
const { SessionResourceVisibility, SessionResourceWorkflowComponent, SessionResourceSource } = pcm.preCase.session;
|
|
12
19
|
const sanitize = (html) => ({ __html: DOMPurify.sanitize(html) });
|
|
20
|
+
function formatDate(dateString) {
|
|
21
|
+
const date = parseISO(dateString);
|
|
22
|
+
if (isValid(date)) {
|
|
23
|
+
return format(date, 'MMM dd, yyyy');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return dateString;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
13
29
|
export const CveItem = (props) => {
|
|
14
|
-
|
|
15
|
-
const
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const { cve, isExpanded, index } = props;
|
|
32
|
+
const { product, version, summary, issue, isCveModalOpened } = useCaseSelector((state) => ({
|
|
33
|
+
product: state.caseDetails.product,
|
|
34
|
+
version: state.caseDetails.version,
|
|
35
|
+
summary: state.caseDetails.summary,
|
|
36
|
+
issue: state.caseDetails.issue,
|
|
37
|
+
isCveModalOpened: state.isCveModalOpened,
|
|
38
|
+
}), isEqual);
|
|
39
|
+
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
40
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
41
|
+
const workflowSource = `${cve.title}-${isCveModalOpened ? 'model' : 'aside'}`;
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (isExpanded) {
|
|
44
|
+
onPresentOrVisitedCveErrataData();
|
|
45
|
+
}
|
|
46
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
+
}, [isExpanded]);
|
|
48
|
+
const updateSessionDb = (resources) => {
|
|
49
|
+
const payload = {
|
|
50
|
+
product: product,
|
|
51
|
+
version: version,
|
|
52
|
+
summary: summary,
|
|
53
|
+
description: issue,
|
|
54
|
+
};
|
|
55
|
+
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.DRUPAL, resources, JSON.stringify(payload), workflowSource);
|
|
56
|
+
};
|
|
57
|
+
const onClickErrataLink = (errataDetails, index = 0) => {
|
|
58
|
+
updateSessionDb([
|
|
59
|
+
getSessResFromErrata(errataDetails, SessionResourceVisibility.VISITED, index + 1, isCveModalOpened
|
|
60
|
+
? SessionResourceWorkflowComponent.CVE_MODEl
|
|
61
|
+
: SessionResourceWorkflowComponent.CVE_ASIDE),
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
const onPresentOrVisitedCveErrataData = (isVisited = false) => {
|
|
65
|
+
updateSessionDb(getSessResFromCve(cve, isVisited ? SessionResourceVisibility.VISITED : SessionResourceVisibility.PRESENTED, index + 1, isCveModalOpened
|
|
66
|
+
? SessionResourceWorkflowComponent.CVE_MODEl
|
|
67
|
+
: SessionResourceWorkflowComponent.CVE_ASIDE, isVisited ? true : false, isCveModalOpened ? 3 : 2));
|
|
68
|
+
};
|
|
69
|
+
const renderDate = () => (cve === null || cve === void 0 ? void 0 : cve.publicDate) && (React.createElement("div", { className: "pf-v5-u-disabled-color-100" },
|
|
16
70
|
React.createElement(Trans, null, "Public on"),
|
|
17
71
|
" - ",
|
|
18
|
-
|
|
72
|
+
formatDate(cve.publicDate)));
|
|
19
73
|
const renderLabels = () => (React.createElement(LabelGroup, { defaultIsOpen: true, numLabels: 10 },
|
|
20
74
|
React.createElement(Label, { color: "green", isCompact: true, icon: React.createElement(StarIcon, null) },
|
|
21
75
|
React.createElement(Trans, null, "Exact match")),
|
|
22
|
-
React.createElement(Label, { color: cve.severity === 'Critical'
|
|
76
|
+
!isEmpty(cve === null || cve === void 0 ? void 0 : cve.severity) && (React.createElement(Label, { color: cve.severity === 'Critical'
|
|
23
77
|
? 'red'
|
|
24
78
|
: cve.severity === 'Important'
|
|
25
79
|
? 'orange'
|
|
26
80
|
: cve.severity === 'Moderate'
|
|
27
81
|
? 'gold'
|
|
28
|
-
: undefined, isCompact: true }, cve.severity),
|
|
82
|
+
: undefined, isCompact: true }, cve.severity)),
|
|
29
83
|
!isEmpty(cve.errataData) && (React.createElement(Label, { color: "blue", isCompact: true },
|
|
30
84
|
React.createElement(Trans, null, "Fixed"))),
|
|
31
85
|
!isEmpty(cve.mitigation) && (React.createElement(Label, { isCompact: true },
|
|
32
|
-
React.createElement(Trans,
|
|
86
|
+
React.createElement(Trans, { color: "grey" }, "Mitigation available")))));
|
|
33
87
|
const displayErrataTable = () => {
|
|
34
88
|
if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.errataData)) {
|
|
35
89
|
return null;
|
|
36
90
|
}
|
|
37
|
-
return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact' },
|
|
91
|
+
return (React.createElement(Table, { "aria-label": "Errata table", variant: 'compact', className: "pf-v5-u-mt-md", style: { borderTop: 'var(--pf-v5-global--BorderColor--light-100) solid 1px' } },
|
|
38
92
|
React.createElement(Thead, null,
|
|
39
93
|
React.createElement(Tr, null,
|
|
40
|
-
React.createElement(Th, { width: 30 },
|
|
41
|
-
React.createElement(Trans, null, "Errata link")),
|
|
42
94
|
React.createElement(Th, null,
|
|
43
|
-
React.createElement(Trans, null, "
|
|
95
|
+
React.createElement(Trans, null, "Errata link")),
|
|
44
96
|
React.createElement(Th, { width: 30 },
|
|
97
|
+
React.createElement(Trans, null, "Component")),
|
|
98
|
+
React.createElement(Th, null,
|
|
45
99
|
React.createElement(Trans, null, "Status")))),
|
|
46
|
-
React.createElement(Tbody, null, map(slice(cve.errataData, 0, 3), (errata, index) => {
|
|
100
|
+
React.createElement(Tbody, null, map(slice(cve.errataData, 0, isCveModalOpened ? 3 : 2), (errata, index) => {
|
|
47
101
|
var _a, _b, _c;
|
|
48
102
|
return (React.createElement(Tr, Object.assign({ key: (_a = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _a === void 0 ? void 0 : _a.name }, (index % 2 === 0 && { isStriped: true })),
|
|
49
103
|
React.createElement(Td, null,
|
|
50
|
-
React.createElement(Text, { component: TextVariants.a, href: (_b = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _b === void 0 ? void 0 : _b.url, target: "_blank", ouiaSafe: true, "data-tracking-id": "errata-link" }, (_c = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _c === void 0 ? void 0 :
|
|
104
|
+
React.createElement(Text, { component: TextVariants.a, href: (_b = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _b === void 0 ? void 0 : _b.url, target: "_blank", ouiaSafe: true, "data-tracking-id": "errata-link", onClick: () => onClickErrataLink(errata, index) }, (_c = errata === null || errata === void 0 ? void 0 : errata.advisory) === null || _c === void 0 ? void 0 :
|
|
51
105
|
_c.name,
|
|
52
106
|
React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" }))),
|
|
53
|
-
React.createElement(Td,
|
|
107
|
+
React.createElement(Td, { modifier: "truncate" }, errata === null || errata === void 0 ? void 0 : errata.package),
|
|
54
108
|
React.createElement(Td, null,
|
|
55
109
|
React.createElement(Trans, null, errata === null || errata === void 0 ? void 0 : errata.state))));
|
|
56
110
|
}))));
|
|
@@ -58,24 +112,28 @@ export const CveItem = (props) => {
|
|
|
58
112
|
const displayDescription = () => {
|
|
59
113
|
var _a;
|
|
60
114
|
if (isEmpty(cve === null || cve === void 0 ? void 0 : cve.mitigation) && ((_a = cve === null || cve === void 0 ? void 0 : cve.errataData) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
61
|
-
return (React.createElement("p", { className: "pf-v5-u-mt-md" },
|
|
115
|
+
return (React.createElement("p", { className: "pf-v5-u-mt-md" },
|
|
116
|
+
React.createElement(Trans, null, "for this CVE, mitigation and fix is not available, for more details, go to the CVE page.")));
|
|
62
117
|
}
|
|
63
|
-
const MAX_DESCRIPTION_LENGTH = 300;
|
|
118
|
+
const MAX_DESCRIPTION_LENGTH = isCveModalOpened ? 300 : 120;
|
|
64
119
|
const description = !isEmpty(cve === null || cve === void 0 ? void 0 : cve.mitigation) ? cve === null || cve === void 0 ? void 0 : cve.mitigation : cve === null || cve === void 0 ? void 0 : cve.details;
|
|
65
120
|
if (!description)
|
|
66
121
|
return '';
|
|
67
122
|
const trimmedDescription = description.length <= MAX_DESCRIPTION_LENGTH
|
|
68
123
|
? description
|
|
69
124
|
: description.slice(0, MAX_DESCRIPTION_LENGTH).trim() + '...';
|
|
70
|
-
return React.createElement("p", { className: "pf-v5-u-mt-md", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
|
|
125
|
+
return React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-color-300", dangerouslySetInnerHTML: sanitize(trimmedDescription) });
|
|
126
|
+
};
|
|
127
|
+
const onClickGoToCveButtonPage = () => {
|
|
128
|
+
onPresentOrVisitedCveErrataData(true);
|
|
71
129
|
};
|
|
72
|
-
return (React.createElement("
|
|
130
|
+
return (React.createElement("div", null,
|
|
73
131
|
React.createElement(Flex, null,
|
|
74
132
|
React.createElement(FlexItem, { spacer: { default: 'spacerXs' } }, renderLabels()),
|
|
75
133
|
React.createElement(FlexItem, null, renderDate())),
|
|
76
134
|
displayErrataTable(),
|
|
77
135
|
displayDescription(),
|
|
78
|
-
(cve === null || cve === void 0 ? void 0 : cve.cveLink) && (React.createElement(Button, { variant: "primary", className:
|
|
136
|
+
(cve === null || cve === void 0 ? void 0 : cve.cveLink) && (React.createElement(Button, { variant: "primary", className: isCveModalOpened ? 'pf-v5-u-my-md' : '', "data-tracking-id": "go-to-CVE-button", component: "a", href: `${cve.cveLink}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[workflowSource]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.DRUPAL)}`, target: "_blank", rel: "noopener noreferrer", onClick: onClickGoToCveButtonPage },
|
|
79
137
|
React.createElement(Trans, null, "Go to CVE"),
|
|
80
138
|
React.createElement(ExternalLinkAltIcon, { className: "pf-v5-u-ml-sm" })))));
|
|
81
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,eAAO,MAAM,QAAQ,yBAoEpB,CAAC"}
|
|
@@ -5,10 +5,13 @@ import isEqual from 'lodash/isEqual';
|
|
|
5
5
|
import join from 'lodash/join';
|
|
6
6
|
import map from 'lodash/map';
|
|
7
7
|
import size from 'lodash/size';
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React, { useContext } from 'react';
|
|
9
9
|
import { Trans } from 'react-i18next';
|
|
10
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
|
+
import { RouteContext } from '../../context/RouteContext';
|
|
12
|
+
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
11
13
|
import { setCaseState } from '../../reducers/CaseReducer';
|
|
14
|
+
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
12
15
|
import { CvePanel } from './CvePanel';
|
|
13
16
|
export const CveModal = () => {
|
|
14
17
|
const caseDispatch = useCaseDispatch();
|
|
@@ -16,6 +19,8 @@ export const CveModal = () => {
|
|
|
16
19
|
cveWorkflowRecommendation: state.cveWorkflowRecommendation,
|
|
17
20
|
isCveModalOpened: state.isCveModalOpened,
|
|
18
21
|
}), isEqual);
|
|
22
|
+
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
23
|
+
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
19
24
|
const handleModalToggle = () => {
|
|
20
25
|
setCaseState(caseDispatch, { isCveModalOpened: !isCveModalOpened });
|
|
21
26
|
};
|
|
@@ -25,12 +30,11 @@ export const CveModal = () => {
|
|
|
25
30
|
};
|
|
26
31
|
const generateCveCheckerUrl = () => {
|
|
27
32
|
const cveTitles = join(map(cveWorkflowRecommendation, 'title'), ',');
|
|
28
|
-
return `https://${getAccessHostname()}/labs/cvechecker/?id=${cveTitles}`;
|
|
33
|
+
return `https://${getAccessHostname()}/labs/cvechecker/?source=pcm&session=${activeSessionId}&id=${cveTitles}`;
|
|
29
34
|
};
|
|
30
35
|
return (React.createElement(Modal, { variant: ModalVariant.medium, title: React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' } },
|
|
31
|
-
React.createElement(FlexItem, { spacer: { default: 'spacerSm' } },
|
|
32
|
-
|
|
33
|
-
React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))), isOpen: isCveModalOpened, onClose: handleModalToggle, titleIconVariant: "info", disableFocusTrap: true, onEscapePress: handleEscapePress, actions: [
|
|
36
|
+
React.createElement(FlexItem, { spacer: { default: 'spacerSm' } }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
|
|
37
|
+
React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))), isOpen: isCveModalOpened && activeSection === AppRouteSections.SUMMARIZE, onClose: handleModalToggle, titleIconVariant: "info", disableFocusTrap: true, className: "cve-modal-fade-in-effect", onEscapePress: handleEscapePress, actions: [
|
|
34
38
|
React.createElement(Button, { key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
|
|
35
39
|
React.createElement(Trans, null, "Red Hat CVE Checker"),
|
|
36
40
|
" ",
|
|
@@ -17,7 +17,7 @@ export const CvePanel = (props) => {
|
|
|
17
17
|
return (React.createElement(AccordionItem, { key: `cve-item-${index}` },
|
|
18
18
|
React.createElement(AccordionToggle, { onClick: () => handleToggle(cve.title), isExpanded: isExpanded, id: `cve-toggle-${index}`, "data-tracking-id": "cve-accordion-toggle" }, cve.title),
|
|
19
19
|
React.createElement(AccordionContent, { id: `cve-content-${index}`, isHidden: !isExpanded },
|
|
20
|
-
React.createElement(CveItem, { cve: cve }))));
|
|
20
|
+
React.createElement(CveItem, { cve: cve, isExpanded: isExpanded, index: index }))));
|
|
21
21
|
};
|
|
22
22
|
return (React.createElement(Accordion, { isBordered: true, displaySize: 'default', asDefinitionList: false, className: `${props.className ? props.className : ''}` }, map(slice(cveWorkflowRecommendation, 0, 4), renderAccordionItem)));
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveSidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"CveSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveSidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,UAAU,yBA6BtB,CAAC"}
|
|
@@ -16,8 +16,7 @@ export const CveSidebar = () => {
|
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
17
|
React.createElement("div", { className: "card card-white card-support file-diag pf-v5-u-mb-md" },
|
|
18
18
|
React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
|
|
19
|
-
React.createElement("span", { className: "pf-v5-u-mr-sm" },
|
|
20
|
-
React.createElement(Trans, null, "Handpicked for this CVEs")),
|
|
19
|
+
React.createElement("span", { className: "pf-v5-u-mr-sm" }, cveWorkflowRecommendation.length > 1 ? (React.createElement(Trans, null, "Handpicked for these CVEs")) : (React.createElement(Trans, null, "Handpicked for this CVE"))),
|
|
21
20
|
React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))),
|
|
22
21
|
React.createElement("div", { className: "card-body" },
|
|
23
22
|
React.createElement(CvePanel, null)))));
|
|
@@ -3,6 +3,9 @@ import { RouteComponentProps } from 'react-router-dom';
|
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
export interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
|
+
userSeenRecommendations?: (value: React.SetStateAction<boolean>) => void;
|
|
7
|
+
userClickedNextonRecommendations: boolean;
|
|
8
|
+
resultsRowRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
6
9
|
}
|
|
7
10
|
export default function OpenCase(props: IProps): React.JSX.Element;
|
|
8
11
|
//# sourceMappingURL=OpenCase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenCase.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/OpenCase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,EAAE,OAAO,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAuC7C"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
2
|
+
import isEqual from 'lodash/isEqual';
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
3
5
|
import { AccountSelector } from '../AccountInfo/AccountSelector';
|
|
4
6
|
import { OwnerSelector } from '../AccountInfo/OwnerSelector';
|
|
7
|
+
import ProductSelector from '../ProductSelector/ProductSelector';
|
|
5
8
|
import SupportTypeSelectorPage from './SupportTypeSelectorPage';
|
|
6
9
|
export default function OpenCase(props) {
|
|
7
10
|
const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
|
|
11
|
+
const { ABTestVariation } = useCaseSelector((state) => ({
|
|
12
|
+
ABTestVariation: state.ABTestVariation,
|
|
13
|
+
}), isEqual);
|
|
14
|
+
const isATestvariation = ABTestVariation === 'A';
|
|
8
15
|
return (React.createElement("form", null,
|
|
9
16
|
canChangeAccountInfo && (React.createElement(React.Fragment, null,
|
|
10
17
|
React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
|
|
11
18
|
React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
|
|
19
|
+
isATestvariation && (React.createElement("div", { className: "form-group" },
|
|
20
|
+
React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true }))),
|
|
12
21
|
React.createElement(SupportTypeSelectorPage, null)));
|
|
13
22
|
}
|
|
@@ -8,6 +8,9 @@ interface IProps {
|
|
|
8
8
|
showTCAfterButtonClicked?: boolean;
|
|
9
9
|
checkEntitledProduct?: boolean;
|
|
10
10
|
isOnSummaryPage?: boolean;
|
|
11
|
+
isOnGetSupportPage?: boolean;
|
|
12
|
+
isOnReviewPage?: boolean;
|
|
13
|
+
caseCreateExperience?: boolean;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Renders a dropdown list to select all products.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EA0KvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -8,8 +8,10 @@ import isEqual from 'lodash/isEqual';
|
|
|
8
8
|
import React, { forwardRef, useContext, useEffect, useState } from 'react';
|
|
9
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
10
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
|
+
import { RouteContext } from '../../context/RouteContext';
|
|
11
12
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
12
13
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
14
|
+
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
13
15
|
import RouteUtils from '../../utils/routeUtils';
|
|
14
16
|
import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
|
|
15
17
|
import Suggestions from '../Suggestions/Suggestions';
|
|
@@ -31,12 +33,14 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
31
33
|
var _a, _b;
|
|
32
34
|
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
33
35
|
const caseDispatch = useCaseDispatch();
|
|
34
|
-
const { product, version, contactSSOName } = useCaseSelector((state) => ({
|
|
36
|
+
const { product, version, contactSSOName, ABTestVariation } = useCaseSelector((state) => ({
|
|
35
37
|
product: state.caseDetails.product,
|
|
36
38
|
version: state.caseDetails.version,
|
|
37
39
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
40
|
+
ABTestVariation: state.ABTestVariation,
|
|
38
41
|
}), isEqual);
|
|
39
42
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
43
|
+
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
40
44
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
41
45
|
const [showModal, setShowModal] = useState(false);
|
|
42
46
|
const [showModalButton, setShowModalButton] = useState(false);
|
|
@@ -76,12 +80,29 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
76
80
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
77
81
|
}
|
|
78
82
|
const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
|
|
83
|
+
const isATestvariation = ABTestVariation === 'A';
|
|
84
|
+
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
85
|
+
// Determine whether to render the ProductVersionDropdownSelector
|
|
86
|
+
const renderProductVersionDropdownSelector = (activeSection === AppRouteSections.SUMMARIZE && !props.caseCreateExperience) ||
|
|
87
|
+
activeSection === AppRouteSections.GET_SUPPORT ||
|
|
88
|
+
isBTestvariation ||
|
|
89
|
+
(isATestvariation && (props.isOnGetSupportPage || props.isOnReviewPage));
|
|
90
|
+
// Determine whether to render the OpenCaseIssue component
|
|
91
|
+
const renderOpenCaseIssue = (isBTestvariation &&
|
|
92
|
+
(activeSection === AppRouteSections.SUMMARIZE ||
|
|
93
|
+
activeSection === AppRouteSections.REVIEW ||
|
|
94
|
+
activeSection === AppRouteSections.SUBMIT_CASE)) ||
|
|
95
|
+
(isATestvariation &&
|
|
96
|
+
(activeSection === AppRouteSections.SUMMARIZE ||
|
|
97
|
+
activeSection === AppRouteSections.REVIEW ||
|
|
98
|
+
activeSection === AppRouteSections.SUBMIT_CASE)) ||
|
|
99
|
+
(!props.caseCreateExperience && activeSection === AppRouteSections.SUMMARIZE);
|
|
79
100
|
return (React.createElement(React.Fragment, null,
|
|
80
|
-
React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
101
|
+
renderProductVersionDropdownSelector && (React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
81
102
|
React.createElement("div", { className: "all-product-selector-dropdown" },
|
|
82
|
-
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching }))),
|
|
83
|
-
React.createElement("div", { className: "case-details-summary" },
|
|
84
|
-
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage })),
|
|
103
|
+
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
|
|
104
|
+
renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
|
|
105
|
+
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage }))),
|
|
85
106
|
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
86
107
|
? 'You are'
|
|
87
108
|
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAOD,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBAyHvD,CAAC"}
|
|
@@ -73,8 +73,8 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
73
73
|
setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(product, allProducts.data.productsResult));
|
|
74
74
|
}, [allProducts.data.productsResult, product, props.isOnSummaryPage]);
|
|
75
75
|
return (React.createElement("div", null,
|
|
76
|
-
React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector" }, getOptions()),
|
|
77
|
-
!isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v5-u-ml-xs pf-v5-u-mt-sm form-instructions" },
|
|
76
|
+
React.createElement(Select, { variant: SelectVariant.typeahead, typeAheadAriaLabel: t('Search for or select a product'), onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Search for or select a product'), "aria-labelledby": t('Product-selector'), onFilter: onFilter, selections: product, validated: isEmpty(product) && showValidationLocal ? 'error' : 'default', "data-tracking-id": "get-support-product-dropdown-selector", isDisabled: props.isLoading }, getOptions()),
|
|
77
|
+
!props.isLoading && !isSelectedProductSupportedForCustomer && (React.createElement("div", { className: "pf-v5-u-ml-xs pf-v5-u-mt-sm form-instructions" },
|
|
78
78
|
React.createElement(Trans, null, "Red Hat must confirm your subscription status before providing support."),
|
|
79
79
|
React.createElement("br", null),
|
|
80
80
|
React.createElement(Trans, null, "We'll contact you if we have any questions.")))));
|
|
@@ -91,5 +91,5 @@ export const NewProductVersionSelector = (props) => {
|
|
|
91
91
|
setIsOpen(false);
|
|
92
92
|
};
|
|
93
93
|
const titleId = 'version-selector';
|
|
94
|
-
return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), toggleAriaLabel: t('Select a version'), "aria-labelledby": titleId, selections: version, validated: isEmpty(version) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(product), "data-tracking-id": "get-support-version-dropdown-selector" }, (isSEProductApiIsDown && versionsDetails.isFetching && { loadingVariant: 'spinner' })), selectVersionOptions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })))));
|
|
94
|
+
return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), toggleAriaLabel: t('Select a version'), "aria-labelledby": titleId, selections: version, validated: isEmpty(version) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(product) || allProducts.isFetching, "data-tracking-id": "get-support-version-dropdown-selector" }, (isSEProductApiIsDown && versionsDetails.isFetching && { loadingVariant: 'spinner' })), selectVersionOptions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })))));
|
|
95
95
|
};
|
|
@@ -4,8 +4,10 @@ import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
6
|
userSeenRecommendations?: (value: React.SetStateAction<boolean>) => void;
|
|
7
|
-
userClickedNextonRecommendations
|
|
8
|
-
resultsRowRef
|
|
7
|
+
userClickedNextonRecommendations?: boolean;
|
|
8
|
+
resultsRowRef?: React.MutableRefObject<HTMLDivElement | null>;
|
|
9
|
+
isOnGetSupportPage?: boolean;
|
|
10
|
+
caseCreateExperience?: boolean;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Responsible for:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA0GpD"}
|