@rh-support/troubleshoot 2.6.21 → 2.6.22
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/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +4 -3
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +5 -12
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -3
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +13 -1
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +3 -2
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +10 -1
- package/lib/esm/components/Recommendations/AsideResults.js +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +7 -4
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +3 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +9 -2
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +4 -4
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +7 -4
- package/lib/esm/components/Recommendations/WatsonxAiIcon.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +17 -12
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +13 -13
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +3 -1
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +20 -21
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -2
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -10
- package/lib/esm/css/app.css +5 -4
- package/lib/esm/scss/_pf-overrides.scss +5 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmW7C"}
|
|
@@ -113,7 +113,7 @@ export function NewEssTermsModal(props) {
|
|
|
113
113
|
};
|
|
114
114
|
// Function to ack remote session terms and post comment
|
|
115
115
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
const requestComment = t(
|
|
116
|
+
const requestComment = t(`**[What is a Remote Support Session and how to acknowledge the Remote Access Rider? Read more.](https://access.redhat.com/articles/3566571)**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations for Remote Session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n[${sessionLink}](${sessionLink})\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
117
117
|
try {
|
|
118
118
|
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
119
119
|
remoteSessionTermsAcked: true,
|
|
@@ -174,8 +174,9 @@ export function NewEssTermsModal(props) {
|
|
|
174
174
|
// To check and if I agree button is loading
|
|
175
175
|
const isAgreeLoading = agreeLoading || isPostingComment;
|
|
176
176
|
const modalActions = [
|
|
177
|
-
React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: !
|
|
178
|
-
|
|
177
|
+
React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: (isRemoteSessionForm ? !sessionExpectations.trim() || !impact.trim() : !isTermsChecked) ||
|
|
178
|
+
isAgreeLoading }, t(isRemoteSessionForm ? 'Submit' : 'I agree')),
|
|
179
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, isDisabled: isAgreeLoading }, "Cancel"),
|
|
179
180
|
];
|
|
180
181
|
const renderRemoteSessionForm = (React.createElement("div", { id: "remoteSessionForm", className: "form-group" },
|
|
181
182
|
React.createElement(Alert, { variant: "info", isInline: true, title: React.createElement(React.Fragment, null,
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA+VxD"}
|
|
@@ -215,21 +215,14 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
215
215
|
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
|
|
216
216
|
// Body of RSA Modal
|
|
217
217
|
const RemoteSessionAgreementModalBody = () => {
|
|
218
|
-
return isRemoteSessionForm
|
|
218
|
+
return isRemoteSessionForm ? renderRemoteSessionForm : renderRemoteSessionAgreement;
|
|
219
219
|
};
|
|
220
|
-
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm
|
|
221
|
-
? t('Request remote session')
|
|
222
|
-
: t('Remote session agreement'), isOpen: props.show, onClose: onCancel },
|
|
220
|
+
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm ? t('Request remote session') : t('Remote session agreement'), isOpen: props.show, onClose: onCancel },
|
|
223
221
|
React.createElement(ModalHeader, null,
|
|
224
|
-
React.createElement("h2", null, isRemoteSessionForm
|
|
225
|
-
? t('Request remote session')
|
|
226
|
-
: t('Remote session agreement'))),
|
|
222
|
+
React.createElement("h2", null, isRemoteSessionForm ? t('Request remote session') : t('Remote session agreement'))),
|
|
227
223
|
React.createElement(ModalBody, null, RemoteSessionAgreementModalBody()),
|
|
228
224
|
React.createElement(ModalFooter, null,
|
|
229
|
-
React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm
|
|
230
|
-
? '
|
|
231
|
-
: 'remote-session-agreement-check', isLoading: isAgreeLoading, isDisabled: (isRemoteSessionForm || remoteSessionTermsAcked
|
|
232
|
-
? !sessionExpectations.trim() || !impact.trim()
|
|
233
|
-
: !isTermsChecked) || isAgreeLoading }, t(isRemoteSessionForm || remoteSessionTermsAcked ? 'Submit' : 'I agree')),
|
|
225
|
+
React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": isRemoteSessionForm ? 'remote-session-details-submission' : 'remote-session-agreement-check', isLoading: isAgreeLoading, isDisabled: (isRemoteSessionForm ? !sessionExpectations.trim() || !impact.trim() : !isTermsChecked) ||
|
|
226
|
+
isAgreeLoading }, t(isRemoteSessionForm ? 'Submit' : 'I agree')),
|
|
234
227
|
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, isDisabled: isAgreeLoading }, "Cancel"))));
|
|
235
228
|
}
|
|
@@ -109,9 +109,7 @@ function CaseHostname(props) {
|
|
|
109
109
|
const lengthError = (hostnameState === null || hostnameState === void 0 ? void 0 : hostnameState.length) > HOSTNAME_LENGTH_LIMIT;
|
|
110
110
|
return (React.createElement(React.Fragment, null,
|
|
111
111
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
|
|
112
|
-
React.createElement(Trans,
|
|
113
|
-
"*",
|
|
114
|
-
' ',
|
|
112
|
+
React.createElement(Trans, { className: "pf-v6-u-mr-xs" }, "Hostname"),
|
|
115
113
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
|
|
116
114
|
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size pf-v6-u-text-color-status-custom cursor-pointer", "aria-label": "Hostname Info" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
117
115
|
React.createElement(TextInput, { type: "text", id: "case-details-hostname", className: `${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: (e, phone) => onHostnameChange(phone), isDisabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
|
|
@@ -160,7 +160,7 @@ function Severity(props) {
|
|
|
160
160
|
' ',
|
|
161
161
|
React.createElement("a", { href: "/support/policy/severity", target: "_blank" },
|
|
162
162
|
React.createElement(Trans, null, "Red Hat Support Severity Level Definitions"))), closeBtnAriaLabel: "Close" },
|
|
163
|
-
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", "aria-label": t(`Support Severity Level info`) }))),
|
|
163
|
+
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size cursor-pointer pf-v6-u-text-color-status-custom", "aria-label": t(`Support Severity Level info`) }))),
|
|
164
164
|
"\u00A0",
|
|
165
165
|
filteredSeverities.filter((s) => s.disabled).length !== 0 && (React.createElement(Tooltip, { position: TooltipPosition.top, content: React.createElement(Trans, null, "Only the enabled severity levels are supported for selected product and version.") },
|
|
166
166
|
React.createElement(Icon, { size: "sm" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoIlC;kBApIQ,YAAY;;;AAsIrB,eAAe,YAAY,CAAC"}
|
|
@@ -92,7 +92,7 @@ function SupportLevel(props) {
|
|
|
92
92
|
"Learn more about our",
|
|
93
93
|
' ',
|
|
94
94
|
React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
|
|
95
|
-
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size", "aria-label": "Support Level Info" })),
|
|
95
|
+
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size cursor-pointer pf-v6-u-text-color-status-custom", "aria-label": "Support Level Info" })),
|
|
96
96
|
React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') }),
|
|
97
97
|
isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAiB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAiB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA8czC;kBA9cQ,mBAAmB;;;AAid5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -84,11 +84,11 @@ function OpenshiftDropdownV4(props) {
|
|
|
84
84
|
setClustersSelectOptions(getClusterOptions(clusterResponse));
|
|
85
85
|
});
|
|
86
86
|
const onSelect = (event, selectedCluster) => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
setInputVal('');
|
|
88
87
|
if (selectedCluster.type === 'checkbox') {
|
|
89
88
|
setShowArchivedClusters(!showArchivedClusters);
|
|
90
89
|
props.onClusterClear();
|
|
91
90
|
setClustersRawResponse([]);
|
|
91
|
+
setInputVal('');
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
props.onClusterIdStateUpdate(selectedCluster);
|
|
@@ -264,6 +264,18 @@ function OpenshiftDropdownV4(props) {
|
|
|
264
264
|
// no dependency here as we want to run this once on load
|
|
265
265
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
266
266
|
}, []);
|
|
267
|
+
useEffect(() => {
|
|
268
|
+
if (!isEmpty(props.openshiftClusterIDState)) {
|
|
269
|
+
const displayName = getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState);
|
|
270
|
+
if (isEmpty(inputVal) || inputVal !== displayName) {
|
|
271
|
+
setInputVal(displayName);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else if (!isEmpty(inputVal)) {
|
|
275
|
+
setInputVal('');
|
|
276
|
+
}
|
|
277
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
278
|
+
}, [props.openshiftClusterIDState, props.openshiftDisplayName, props.noClusterIdReasonExplanation]);
|
|
267
279
|
// need to get clusters when user opens the dropdown
|
|
268
280
|
// as the api response is cached np extra call is made on open/close
|
|
269
281
|
// added observing props.isV3 because re-render
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,eAAO,MAAM,QAAQ,yBA2EpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Badge, Button, Flex, FlexItem, Modal, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Badge, Button, Flex, FlexItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
2
2
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
3
3
|
import { getAccessHostname } from '@rh-support/utils';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
@@ -37,7 +37,8 @@ export const CveModal = () => {
|
|
|
37
37
|
React.createElement(ModalHeader, { title: React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' } },
|
|
38
38
|
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"))),
|
|
39
39
|
React.createElement(Badge, { isRead: true }, size(cveWorkflowRecommendation))) }),
|
|
40
|
-
React.createElement(
|
|
40
|
+
React.createElement(ModalBody, null,
|
|
41
|
+
React.createElement(CvePanel, null)),
|
|
41
42
|
React.createElement(ModalFooter, null,
|
|
42
43
|
React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }), key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
|
|
43
44
|
React.createElement(Trans, null, "Red Hat CVE Checker")))));
|
|
@@ -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;AAoBpE,OAAO,KAAkD,MAAM,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;AAoBpE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAUvE,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;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,sBA8MvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -7,11 +7,15 @@ import isEqual from 'lodash/isEqual';
|
|
|
7
7
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
9
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
10
|
+
const isProductSupportedForCustomer = (productName, productResults) => {
|
|
11
|
+
const foundItem = productResults.filter((item) => item.name === productName)[0];
|
|
12
|
+
return foundItem ? foundItem.supportedForCustomer : false;
|
|
13
|
+
};
|
|
10
14
|
export const NewProductDropdownSelector = (props) => {
|
|
11
15
|
const { t } = useTranslation();
|
|
12
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
13
17
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
14
|
-
const [isSelectedProductSupportedForCustomer] = useState(true);
|
|
18
|
+
const [isSelectedProductSupportedForCustomer, setIsSelectedProductSupportedForCustomer] = useState(true);
|
|
15
19
|
const [filteredProducts, setFilteredProducts] = useState(props.products);
|
|
16
20
|
const [shouldFilter, setShouldFilter] = useState(false);
|
|
17
21
|
const textInputRef = useRef();
|
|
@@ -40,6 +44,11 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
40
44
|
setFilteredProducts(productsToFilter);
|
|
41
45
|
}
|
|
42
46
|
}, [inputValue, props.products, props.isCaseCreate, allProducts.data.productsResult]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
product &&
|
|
49
|
+
props.isOnSummaryPage &&
|
|
50
|
+
setIsSelectedProductSupportedForCustomer(isProductSupportedForCustomer(product, allProducts.data.productsResult));
|
|
51
|
+
}, [allProducts.data.productsResult, product, props.isOnSummaryPage]);
|
|
43
52
|
const onToggleClick = () => {
|
|
44
53
|
var _a;
|
|
45
54
|
setIsOpen(!isOpen);
|
|
@@ -137,7 +137,7 @@ export function AsideResults(props) {
|
|
|
137
137
|
React.createElement(CardBody, null,
|
|
138
138
|
React.createElement("ul", { className: "list-flat" }, recommendationState.sideRecommendation.map((doc, index) => {
|
|
139
139
|
var _a, _b;
|
|
140
|
-
return (React.createElement("li", { className:
|
|
140
|
+
return (React.createElement("li", { className: `result${index !== 0 && 'pf-v6-u-mt-sm'}`, key: doc.id },
|
|
141
141
|
React.createElement("header", { className: "result-header" },
|
|
142
142
|
React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS_ASIDE]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS_ASIDE)}`, className: "se-recommended ts-result-aside", "data-tracking-id": `se-recommended-sidebar-recommendations-${index}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, index), dangerouslySetInnerHTML: computeRecommendationTitle(doc) })),
|
|
143
143
|
React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD,UAAU,MAAM;CAAG;AAEnB,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD,UAAU,MAAM;CAAG;AAEnB,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAyFxD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Modal, ModalFooter } from '@patternfly/react-core';
|
|
11
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
14
|
import { getResTypeFromUrl } from '@rh-support/utils';
|
|
@@ -53,9 +53,12 @@ export function ClusterRecommendationsModal(props) {
|
|
|
53
53
|
};
|
|
54
54
|
return (React.createElement(React.Fragment, null,
|
|
55
55
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
56
|
-
React.createElement(Modal, { className: "critical-solutions-modal",
|
|
57
|
-
React.createElement(
|
|
58
|
-
|
|
56
|
+
React.createElement(Modal, { className: "critical-solutions-modal", "data-tracking-id": "cluster-recommendations-modal-body", onClose: onModalClose, isOpen: isClusterRecommendationsModalOpen },
|
|
57
|
+
React.createElement(ModalHeader, null,
|
|
58
|
+
React.createElement("h2", null, t('Cluster recommendations'))),
|
|
59
|
+
React.createElement(ModalBody, null,
|
|
60
|
+
React.createElement("p", null, t('Recommendations have been triggered for your cluster.')),
|
|
61
|
+
React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data })),
|
|
59
62
|
React.createElement(ModalFooter, null,
|
|
60
63
|
!isSecureSupportAccount && (React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "cluster-recommendations-solutions-modal" }, t('I solved my issue'))),
|
|
61
64
|
React.createElement(Button, { onClick: onModalClose, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-cluster-recommendations-modal" }, t('Cancel'))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,UAAU,MAAM;IACZ,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,MAAM,qBAiDrE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
2
|
import { AccordionContent, AccordionItem, AccordionToggle, Label } from '@patternfly/react-core';
|
|
3
|
+
import { haltEvent } from '@rh-support/utils';
|
|
3
4
|
import React, { useContext, useState } from 'react';
|
|
4
5
|
import { Trans } from 'react-i18next';
|
|
5
6
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
@@ -13,12 +14,13 @@ export function EARuleInfoAccordion({ rule, showNewTag, rank }) {
|
|
|
13
14
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
14
15
|
return (React.createElement(EARule, { rule: rule, ruleRank: rank },
|
|
15
16
|
React.createElement(AccordionItem, { isExpanded: isExpanded },
|
|
16
|
-
React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: () => {
|
|
17
|
+
React.createElement(AccordionToggle, { id: "ea-rule-accordion-toggle", onClick: (e) => {
|
|
17
18
|
!isExpanded &&
|
|
18
19
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [
|
|
19
20
|
getSessResFromRules(rule.cta, SessionResourceVisibility.PRESENTED_TAB, rank, rule.rule_id),
|
|
20
21
|
]);
|
|
21
22
|
setIsExpanded(!isExpanded);
|
|
23
|
+
haltEvent(e);
|
|
22
24
|
} },
|
|
23
25
|
showNewTag && ((_a = rule === null || rule === void 0 ? void 0 : rule.isNew) !== null && _a !== void 0 ? _a : false) && (React.createElement(Label, { color: "green", className: "pf-v6-u-mr-md" },
|
|
24
26
|
React.createElement(Trans, null, "NEW"))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBAgLhF"}
|
|
@@ -2,6 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Accordion, AccordionContent, AccordionItem, AccordionToggle, Label, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import BullseyeIcon from '@patternfly/react-icons/dist/js/icons/bullseye-icon';
|
|
4
4
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
5
|
+
import { haltEvent } from '@rh-support/utils';
|
|
5
6
|
import DOMPurify from 'dompurify';
|
|
6
7
|
import isEmpty from 'lodash/isEmpty';
|
|
7
8
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -69,7 +70,10 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
69
70
|
React.createElement(AccordionContent, null,
|
|
70
71
|
React.createElement(Accordion, { asDefinitionList: false, className: "push-bottom-narrow" },
|
|
71
72
|
React.createElement(AccordionItem, { isExpanded: isIssueExpanded },
|
|
72
|
-
React.createElement(AccordionToggle, { onClick: () =>
|
|
73
|
+
React.createElement(AccordionToggle, { onClick: (e) => {
|
|
74
|
+
haltEvent(e);
|
|
75
|
+
setIsIssueExpanded(!isIssueExpanded);
|
|
76
|
+
}, id: `${doc.id}-detected-issue` },
|
|
73
77
|
React.createElement(BullseyeIcon, { className: "pf-v6-u-mr-sm" }),
|
|
74
78
|
React.createElement(Trans, null, "Detected issues")),
|
|
75
79
|
React.createElement(AccordionContent, null,
|
|
@@ -78,7 +82,10 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
78
82
|
'N/A'),
|
|
79
83
|
} }))),
|
|
80
84
|
((_f = ruleData === null || ruleData === void 0 ? void 0 : ruleData.more_info) !== null && _f !== void 0 ? _f : false) && (React.createElement(AccordionItem, { isExpanded: isAdditionalExpanded },
|
|
81
|
-
React.createElement(AccordionToggle, { onClick: () =>
|
|
85
|
+
React.createElement(AccordionToggle, { onClick: (e) => {
|
|
86
|
+
haltEvent(e);
|
|
87
|
+
setIsAdditionalExpanded(!isAdditionalExpanded);
|
|
88
|
+
}, id: `${doc.id}-additional-info` },
|
|
82
89
|
React.createElement(InfoCircleIcon, { className: "pf-v6-u-mr-sm" }),
|
|
83
90
|
React.createElement(Trans, null, "Additional info")),
|
|
84
91
|
React.createElement(AccordionContent, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationFeedbackModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RecommendationFeedbackModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationFeedbackModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACxB;AACD,wBAAgB,2BAA2B,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,EAAE,MAAM,qBA4BnG"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Button, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Modal, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
5
4
|
export function RecommendationFeedbackModal({ isModalOpen, handleModalToggle, modalContent }) {
|
|
6
5
|
return (React.createElement(Modal, { variant: ModalVariant.small, id: "resolved-feedback-modal", "aria-describedby": "rec-feedback-modal", "aria-label": "Feedback modal", isOpen: isModalOpen, onClose: handleModalToggle },
|
|
7
|
-
React.createElement(
|
|
6
|
+
React.createElement(ModalHeader, null,
|
|
7
|
+
React.createElement("h2", { id: "rec-feedback-modal" }, modalContent)),
|
|
8
8
|
React.createElement(ModalFooter, null,
|
|
9
|
-
React.createElement(
|
|
9
|
+
React.createElement(Button, { "data-tracking-id": "resolved-feedback-cases", key: "view", component: "a", href: "#/case/list" },
|
|
10
10
|
React.createElement(Trans, null, "View your cases")),
|
|
11
11
|
React.createElement(Button, { "data-tracking-id": "resolved-feedback-continue", key: "continue", variant: "link", onClick: handleModalToggle },
|
|
12
12
|
React.createElement(Trans, null, "Continue troubleshooting")))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBAqM/C"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Accordion, Button, Card, CardBody, CardExpandableContent, CardHeader, CardTitle, Modal, ModalFooter, } from '@patternfly/react-core';
|
|
11
|
+
import { Accordion, Button, Card, CardBody, CardExpandableContent, CardHeader, CardTitle, Modal, ModalBody, ModalFooter, ModalHeader, } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
13
|
import { getResTypeFromUrl } from '@rh-support/utils';
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -107,9 +107,12 @@ export function InsightResultModal(props) {
|
|
|
107
107
|
}
|
|
108
108
|
return (React.createElement(React.Fragment, null,
|
|
109
109
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
110
|
-
React.createElement(Modal, { className: "critical-solutions-modal",
|
|
111
|
-
React.createElement(
|
|
112
|
-
|
|
110
|
+
React.createElement(Modal, { className: "critical-solutions-modal", "data-tracking-id": "critical-solutions-modal-body", onClose: props.onModalToggle, isOpen: props.isOpen },
|
|
111
|
+
React.createElement(ModalHeader, null,
|
|
112
|
+
React.createElement("h2", null, t('Critical solutions for your system'))),
|
|
113
|
+
React.createElement(ModalBody, null,
|
|
114
|
+
React.createElement("p", null, t('Solutions have been triggered for you based on file upload or common issues that currently have high visibility.')),
|
|
115
|
+
React.createElement(Accordion, { className: "push-top-narrow rules-modal-items", headingLevel: "h2", asDefinitionList: false, isBordered: true }, props.insightResults.map((doc, index) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc, rank: index + 1 }))))),
|
|
113
116
|
React.createElement(ModalFooter, null,
|
|
114
117
|
React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "solved-my-issue-critical-solutions-modal" }, t('I solved my issue')),
|
|
115
118
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel'))))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export const WatsonxAiIcon = (props) => {
|
|
3
3
|
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "17", viewBox: "0 0 16 17", fill: "none" },
|
|
4
|
-
React.createElement("g", {
|
|
4
|
+
React.createElement("g", { clipPath: "url(#clip0_2742_18241)" },
|
|
5
5
|
React.createElement("path", { d: "M13 12.5007C12.4477 12.5007 12 12.9484 12 13.5007C12 13.5389 12.0071 13.5751 12.0112 13.6122C10.8708 14.5103 9.47165 15.0007 8 15.0007C5.86915 15.0007 4 13.0146 4 10.7507C4 8.40722 5.9065 6.50072 8.25 6.50072H8.5V5.50072H8.25C5.3552 5.50072 3 7.85592 3 10.7507C3 11.6927 3.2652 12.5955 3.71855 13.379C2.3619 12.1868 1.5 10.4445 1.5 8.50072C1.5 7.44312 1.74585 6.43432 2.23095 5.50292L1.34375 5.04102C0.79175 6.10157 0.5 7.29787 0.5 8.50072C0.5 12.6362 3.8645 16.0007 8 16.0007C9.6872 16.0007 11.2909 15.4411 12.6024 14.4176C12.7244 14.4706 12.8586 14.5007 13 14.5007C13.5523 14.5007 14 14.053 14 13.5007C14 12.9484 13.5523 12.5007 13 12.5007Z", fill: "#1F0066" }),
|
|
6
6
|
React.createElement("path", { d: "M6.5 11.5V10.5H5.5V11.5H6.5Z", fill: "#1F0066" }),
|
|
7
7
|
React.createElement("path", { d: "M10.5 6.5V5.5H9.5V6.5H10.5Z", fill: "#1F0066" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAgIhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
|
-
import { Tooltip } from '@patternfly/react-core';
|
|
2
|
+
import { Accordion, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
4
|
import { TopContentSearch } from '@rh-support/components';
|
|
5
5
|
import { FeatureFlagKey, useIsFeatureAvailable } from '@rh-support/react-context';
|
|
@@ -17,6 +17,7 @@ export default function Suggestions(props) {
|
|
|
17
17
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
18
18
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
19
19
|
const accordionRef = useRef(null);
|
|
20
|
+
const toggleButtonRefs = useRef([]);
|
|
20
21
|
const { version, product } = useCaseSelector((state) => ({
|
|
21
22
|
version: state.caseDetails.version,
|
|
22
23
|
product: state.caseDetails.product,
|
|
@@ -35,28 +36,32 @@ export default function Suggestions(props) {
|
|
|
35
36
|
setMaxTC(topContent.data.length);
|
|
36
37
|
};
|
|
37
38
|
const onSearchChange = (searchTerm, filteredData) => {
|
|
38
|
-
var _a, _b;
|
|
39
39
|
setFilteredTC(filteredData);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
const shouldBeExpanded = Boolean(searchTerm);
|
|
42
|
+
for (const id of toggleButtonRefs.current) {
|
|
43
|
+
const button = document.getElementById(`${id}`);
|
|
44
|
+
const isExpanded = (button === null || button === void 0 ? void 0 : button.getAttribute('aria-expanded')) === 'true';
|
|
45
|
+
if (button && isExpanded !== shouldBeExpanded) {
|
|
46
|
+
button.click();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
46
50
|
};
|
|
47
51
|
return (React.createElement("div", { className: "top-content-suggestion-accordion" },
|
|
48
52
|
showTitleDescription && (React.createElement("div", { className: "card card-support top-content-card-wrapper" },
|
|
49
|
-
|
|
53
|
+
isTCSearchEnabled && (React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" },
|
|
50
54
|
props.title
|
|
51
55
|
? props.title
|
|
52
56
|
: t('i18nKeyPopularSolutions', 'Red Hat hand picked support articles'),
|
|
53
57
|
React.createElement(Tooltip, { content: React.createElement("div", null,
|
|
54
58
|
React.createElement(Trans, null, "Support articles are matched to the product and version details you selected, not the problem details you entered.")) },
|
|
55
59
|
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm", "aria-label": t('More info about how support articles are matched') })))),
|
|
56
|
-
isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
|
|
57
|
-
React.createElement(TopContentSearch, { topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
|
|
58
|
-
React.createElement(
|
|
60
|
+
!isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
|
|
61
|
+
React.createElement(TopContentSearch, { className: "pf-v6-u-text-color-regular", topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
|
|
62
|
+
React.createElement(Accordion, { className: "pf-v6-u-ml-sm pf-v6-u-mr-sm" }, map(filteredTC.slice(0, maxTC), (sug, index) => {
|
|
59
63
|
var _a, _b;
|
|
64
|
+
toggleButtonRefs.current.push(index);
|
|
60
65
|
return (React.createElement(TopContent, { seSessionId: activeSessionId, seResourceOriginID: (_b = (_a = sessionResourceTracking[SessionResourceSource.TOP_CONTENT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', topContentIndex: index, onResourceClick: onResourceClick, name: sug.categoryName, key: sug.categoryName, items: sug.content, helperText: (sug === null || sug === void 0 ? void 0 : sug.helperText) || '' }));
|
|
61
66
|
})),
|
|
62
67
|
showMax && filteredTC.length > maxTC && (React.createElement("div", { className: "text-right" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/TopContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAKxF,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,MAAM;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAmI/C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
|
-
import {
|
|
2
|
+
import { AccordionContent, AccordionItem, AccordionToggle, Tooltip } from '@patternfly/react-core';
|
|
3
|
+
import { haltEvent } from '@rh-support/utils';
|
|
3
4
|
import isEqual from 'lodash/isEqual';
|
|
4
5
|
import map from 'lodash/map';
|
|
5
6
|
import React, { useState } from 'react';
|
|
@@ -44,23 +45,22 @@ export default function TopContent(props) {
|
|
|
44
45
|
}));
|
|
45
46
|
};
|
|
46
47
|
return (React.createElement(React.Fragment, null, props.helperText ? (React.createElement(Tooltip, { content: React.createElement("div", null, props.helperText) },
|
|
47
|
-
React.createElement(Accordion, { className: "top-content-accordion" },
|
|
48
|
-
React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
|
|
49
|
-
React.createElement(AccordionToggle, { onClick: () => {
|
|
50
|
-
onToggle(`${props.topContentIndex}`);
|
|
51
|
-
}, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
|
|
52
|
-
React.createElement("h3", null, props.name)),
|
|
53
|
-
React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
|
|
54
|
-
React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
|
|
55
|
-
React.createElement("p", null,
|
|
56
|
-
React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle))))))))))) : (React.createElement(Accordion, null,
|
|
57
48
|
React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
|
|
58
|
-
React.createElement(AccordionToggle, { onClick: () => {
|
|
49
|
+
React.createElement(AccordionToggle, { onClick: (e) => {
|
|
50
|
+
haltEvent(e);
|
|
59
51
|
onToggle(`${props.topContentIndex}`);
|
|
60
52
|
}, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
|
|
61
53
|
React.createElement("h3", null, props.name)),
|
|
62
54
|
React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
|
|
63
55
|
React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
|
|
64
56
|
React.createElement("p", null,
|
|
65
|
-
React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle))))))))))
|
|
57
|
+
React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle)))))))))) : (React.createElement(AccordionItem, { isExpanded: expanded === `${props.topContentIndex}` },
|
|
58
|
+
React.createElement(AccordionToggle, { onClick: () => {
|
|
59
|
+
onToggle(`${props.topContentIndex}`);
|
|
60
|
+
}, "data-tracking-id": `top-content-accordion-header-${props.topContentIndex}`, id: `${props.topContentIndex}` },
|
|
61
|
+
React.createElement("h3", null, props.name)),
|
|
62
|
+
React.createElement(AccordionContent, { id: `${props.topContentIndex}` },
|
|
63
|
+
React.createElement("ul", { className: "list-flushleft", style: { listStyleType: 'disc' } }, map(props.items, (item, i) => (React.createElement("li", { key: i + item.contentTitle },
|
|
64
|
+
React.createElement("p", null,
|
|
65
|
+
React.createElement("a", { className: "se-recommended ts-top-problems", "data-tracking-id": "se-recommended-top-content", onClick: onLinkClick(item), href: `${item.contentUrl}?${RouteUtils.getSEResourceQueryParams(props.seSessionId, props.seResourceOriginID, SessionResourceSource.TOP_CONTENT)}`, target: "_blank", rel: "noopener noreferrer" }, item.contentTitle)))))))))));
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAmTtD"}
|
|
@@ -24,7 +24,7 @@ import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
|
|
|
24
24
|
import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
25
25
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
26
26
|
import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
|
|
27
|
-
import { setRouteFlags } from '../../reducers/RouteReducer';
|
|
27
|
+
import { setRouteFlags, updateisNextBtnClickedToShowValidationError } from '../../reducers/RouteReducer';
|
|
28
28
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
29
29
|
import { fetchTopContent } from '../../reducers/TopContentReducer';
|
|
30
30
|
import RouteUtils from '../../utils/routeUtils';
|
|
@@ -120,6 +120,8 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
120
120
|
if (!isFirstMount.current && loggedInUser.data && managedAccounts.data)
|
|
121
121
|
return;
|
|
122
122
|
if (isFirstMount.current) {
|
|
123
|
+
// Reset validation error state when the troubleshoot app first loads
|
|
124
|
+
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
|
|
123
125
|
// set the summary if redirected from portal with url query param "summary"
|
|
124
126
|
if (!isEmpty(urlQueryParams.summary)) {
|
|
125
127
|
setCaseDetails(caseDispatch, { summary: urlQueryParams.summary });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAUA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAuMhC;AACD,eAAe,UAAU,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { Wizard, WizardNav, WizardNavItem, WizardStep, } from '@patternfly/react-core';
|
|
13
13
|
import { LoadingIndicator } from '@rh-support/components';
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
15
|
import React, { Suspense, useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -38,7 +38,8 @@ function WizardMain(props) {
|
|
|
38
38
|
const [userClickedNextonRecommendations, setUserClickedNextonRecommendations] = useState(false);
|
|
39
39
|
const [userScrolledLabel, setUserScrolledLabel] = useState(false);
|
|
40
40
|
const [userCanNavigateToTroubleshoot, setUserCanNavigateToTroubleshoot] = useState(false);
|
|
41
|
-
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
const [_, setIsNextButtonClicked] = useState(false);
|
|
42
43
|
const isNextButtonClickedRef = useRef(false);
|
|
43
44
|
const isBackButtonClickedRef = useRef(false);
|
|
44
45
|
const resultsRowRef = useRef(null);
|
|
@@ -102,24 +103,22 @@ function WizardMain(props) {
|
|
|
102
103
|
const customNav = (isExpanded, steps, activeStep, goToStepByIndex) => (React.createElement(WizardNav, { isExpanded: isExpanded }, steps.map((step) => {
|
|
103
104
|
return (React.createElement(WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: activeStep.id === step.id, isDisabled: !step.canJumpTo, stepIndex: step.index, onClick: () => goToStepByIndex(step.index) }));
|
|
104
105
|
})));
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
|
|
122
|
-
};
|
|
106
|
+
// const { activeStep, steps: wizardContextSteps, goToStepByIndex } = useWizardContext(); // Correctly using the context
|
|
107
|
+
// useEffect(() => {
|
|
108
|
+
// if (wizardContextSteps?.length > 2 && activeStep?.index === 2 && isNextButtonClicked) {
|
|
109
|
+
// goToStepByIndex(3);
|
|
110
|
+
// }
|
|
111
|
+
// }, [activeStep, wizardContextSteps?.length, goToStepByIndex, isNextButtonClicked]);
|
|
112
|
+
const CustomFooter = (activeStep, goToNextStep, goToPrevStep) => (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: (e) => {
|
|
113
|
+
isNextButtonClickedRef.current = true;
|
|
114
|
+
setIsNextButtonClicked(true);
|
|
115
|
+
goToNextStep(e);
|
|
116
|
+
focusWizardMainPanel();
|
|
117
|
+
}, onBack: (e) => {
|
|
118
|
+
isBackButtonClickedRef.current = true;
|
|
119
|
+
goToPrevStep(e);
|
|
120
|
+
focusWizardMainPanel();
|
|
121
|
+
}, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag), userSeenRecommendations: userSeenRecommendations, setUserSeenRecommendations: setUserSeenRecommendations, userClickedNextonRecommendationsFn: setUserClickedNextonRecommendations, userClickedNextonRecommendationsValue: userClickedNextonRecommendations, setUserCanNavigateToTroubleshoot: setUserCanNavigateToTroubleshoot, resultsRowRef: resultsRowRef, setUserScrolledLabel: setUserScrolledLabel }));
|
|
123
122
|
const steps = getStepsSequece(showRestFlag);
|
|
124
123
|
const wizardSteps = steps.map((step) => {
|
|
125
124
|
const { component } = step, rest = __rest(step, ["component"]);
|
|
@@ -129,7 +128,7 @@ function WizardMain(props) {
|
|
|
129
128
|
// in useWizard file then add it to step squences in RouteConstNTypes
|
|
130
129
|
return (React.createElement(React.Fragment, null,
|
|
131
130
|
React.createElement(NewFeatureModal, null),
|
|
132
|
-
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer:
|
|
131
|
+
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { isVisitRequired: true, nav: customNav, navAriaLabel: ` navAriaLabel steps `, footer: CustomFooter, onStepChange: onCurrentStepChanged }, wizardSteps)) })),
|
|
133
132
|
React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
|
|
134
133
|
}
|
|
135
134
|
export default WizardMain;
|
|
@@ -3,8 +3,8 @@ import { RouteComponentProps } from 'react-router-dom';
|
|
|
3
3
|
import { IRouteUrlParams, ISectionConfiguration } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
5
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
|
-
onNext: () => void;
|
|
7
|
-
onBack: () => void;
|
|
6
|
+
onNext: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
onBack: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
8
|
activeStep: Partial<ISectionConfiguration>;
|
|
9
9
|
onSubmit: () => void;
|
|
10
10
|
confirmSupportModal: (hasPreferredSecureSupportAccount: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACxE;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA8UtC;kBA9UQ,gBAAgB;;;AAgVzB,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-core';
|
|
12
|
-
import { useFetch } from '@rh-support/components';
|
|
12
|
+
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
|
|
14
14
|
import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
|
|
15
15
|
import find from 'lodash/find';
|
|
@@ -51,6 +51,7 @@ function WizardNavigation(props) {
|
|
|
51
51
|
const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
|
|
52
52
|
const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
|
|
53
53
|
const previousRecommendationTop = useRef(0);
|
|
54
|
+
const previousStep = usePrevious(props.activeStep);
|
|
54
55
|
const { request: resolveSessionRequest } = useFetch(pcm.preCase.session.resolveSession);
|
|
55
56
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
56
57
|
const { SessionResourceSource } = pcm.preCase.session;
|
|
@@ -59,12 +60,15 @@ function WizardNavigation(props) {
|
|
|
59
60
|
}), isEqual);
|
|
60
61
|
const caseDispatch = useCaseDispatch();
|
|
61
62
|
useEffect(() => {
|
|
62
|
-
var _a;
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if ((previousStep === null || previousStep === void 0 ? void 0 : previousStep.id) === ((_a = props.activeStep) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
63
67
|
const isCreatingCase = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
64
68
|
dtmTrackEventCaseCreationStepEncountered(isCreatingCase,
|
|
65
69
|
// @ts-ignore
|
|
66
70
|
props.activeStep.name, props.activeStep.id === AppRouteSections.GET_SUPPORT ||
|
|
67
|
-
props.activeStep.id === AppRouteSections.TROUBLESHOOT, (
|
|
71
|
+
props.activeStep.id === AppRouteSections.TROUBLESHOOT, (_b = caseState.caseDetails) === null || _b === void 0 ? void 0 : _b.caseNumber, PreviousToNewCaseTypeMap[caseState.caseDetails.caseType], caseState.caseDetails.summary, caseState.caseDetails.product, caseState.caseDetails.version);
|
|
68
72
|
if (props.activeStep.id === AppRouteSections.RESOURCES) {
|
|
69
73
|
window.scrollTo({
|
|
70
74
|
top: 0,
|
|
@@ -72,7 +76,7 @@ function WizardNavigation(props) {
|
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
-
}, [props.activeStep.id]);
|
|
79
|
+
}, [previousStep === null || previousStep === void 0 ? void 0 : previousStep.id, props.activeStep.id]);
|
|
76
80
|
const [hasUserScrolled, setHasUserScrolled] = useState(false);
|
|
77
81
|
useEffect(() => {
|
|
78
82
|
if (props.activeStep.id !== (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) ||
|
|
@@ -135,7 +139,7 @@ function WizardNavigation(props) {
|
|
|
135
139
|
}
|
|
136
140
|
};
|
|
137
141
|
}, [recommendationState.numFound, hasUserScrolled, props, isCaseCreate]);
|
|
138
|
-
const onNext = () => {
|
|
142
|
+
const onNext = (e) => {
|
|
139
143
|
var _a;
|
|
140
144
|
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, true);
|
|
141
145
|
//handle the new changes for 13406:
|
|
@@ -171,19 +175,19 @@ function WizardNavigation(props) {
|
|
|
171
175
|
// to show all steps, a delay needed in order to steps array
|
|
172
176
|
// to be updated
|
|
173
177
|
window.setTimeout(() => {
|
|
174
|
-
props.onNext && props.onNext();
|
|
178
|
+
props.onNext && props.onNext(e);
|
|
175
179
|
}, 10);
|
|
176
180
|
}
|
|
177
181
|
else {
|
|
178
|
-
props.onNext && props.onNext();
|
|
182
|
+
props.onNext && props.onNext(e);
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
return;
|
|
182
186
|
};
|
|
183
|
-
const onBack = () => {
|
|
187
|
+
const onBack = (e) => {
|
|
184
188
|
if (props.activeStep.hidRestOnBack)
|
|
185
189
|
props.onShowRestUpdate(false);
|
|
186
|
-
props.onBack();
|
|
190
|
+
props.onBack(e);
|
|
187
191
|
};
|
|
188
192
|
const onRecsFeedbackModalToggle = () => {
|
|
189
193
|
setIsRecsModalVisible((visible) => !visible);
|
|
@@ -249,7 +253,7 @@ function WizardNavigation(props) {
|
|
|
249
253
|
// To handle entitled products
|
|
250
254
|
return (React.createElement(React.Fragment, null,
|
|
251
255
|
React.createElement(WizardFooterWrapper, null,
|
|
252
|
-
props.activeStep.order !== 0 && (React.createElement("button", { onClick:
|
|
256
|
+
props.activeStep.order !== 0 && (React.createElement("button", { onClick: onBack, className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
|
|
253
257
|
React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
|
|
254
258
|
activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))),
|
|
255
259
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isRecsModalVisible, handleModalToggle: onRecsFeedbackModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
package/lib/esm/css/app.css
CHANGED
|
@@ -91,10 +91,6 @@ form textarea.form-control:focus {
|
|
|
91
91
|
border-bottom-color: #06c;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
form textarea {
|
|
95
|
-
resize: vertical !important;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
94
|
.pf-v6-c-form-control.pf-m-warning {
|
|
99
95
|
border-bottom-color: var(--pf-v5-c-form-control--m-warning--BorderBottomColor);
|
|
100
96
|
border-bottom-width: 2px;
|
|
@@ -345,6 +341,7 @@ input[type='checkbox'] {
|
|
|
345
341
|
|
|
346
342
|
.list-flushleft li {
|
|
347
343
|
margin-bottom: 0.5em;
|
|
344
|
+
list-style-type: none;
|
|
348
345
|
}
|
|
349
346
|
|
|
350
347
|
.list-flushleft li:last-child {
|
|
@@ -448,3 +445,7 @@ input[type='checkbox'] {
|
|
|
448
445
|
row-gap: 9px;
|
|
449
446
|
line-height: 2px;
|
|
450
447
|
}
|
|
448
|
+
|
|
449
|
+
#additional-information-section textarea {
|
|
450
|
+
resize: none !important;
|
|
451
|
+
}
|
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
|
|
194
194
|
.pf-v6-c-accordion {
|
|
195
195
|
padding: 0;
|
|
196
|
+
margin: 0;
|
|
196
197
|
.pf-m-expanded ul {
|
|
197
198
|
list-style-type: none; //Because, FF
|
|
198
199
|
}
|
|
@@ -329,6 +330,10 @@
|
|
|
329
330
|
color: #06c;
|
|
330
331
|
}
|
|
331
332
|
|
|
333
|
+
.pf-v6-c-button.pf-m-primary {
|
|
334
|
+
color: var(--pf-v6-c-button--Color);
|
|
335
|
+
}
|
|
336
|
+
|
|
332
337
|
// Override disable color on darker backgrounds
|
|
333
338
|
.case-overview-secondary,
|
|
334
339
|
#review {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.22",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@progress/kendo-licensing": "1.3.5",
|
|
59
59
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
60
60
|
"@redux-devtools/extension": "^3.3.0",
|
|
61
|
-
"@rh-support/components": "2.5.
|
|
62
|
-
"@rh-support/react-context": "2.5.
|
|
61
|
+
"@rh-support/components": "2.5.31",
|
|
62
|
+
"@rh-support/react-context": "2.5.33",
|
|
63
63
|
"@rh-support/types": "2.0.5",
|
|
64
64
|
"@rh-support/user-permissions": "2.5.20",
|
|
65
65
|
"@rh-support/utils": "2.5.19",
|
|
@@ -134,5 +134,5 @@
|
|
|
134
134
|
"defaults and supports es6-module",
|
|
135
135
|
"maintained node versions"
|
|
136
136
|
],
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "1987aef1be6d63188e3313e7f8a6d5d563f6aae4"
|
|
138
138
|
}
|