@rh-support/troubleshoot 2.6.48 → 2.6.49
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/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -31
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +34 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -3
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +18 -14
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +22 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +2 -2
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +102 -53
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +21 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +4 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +9 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +8 -0
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -6
- 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 +0 -3
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +24 -16
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +7 -5
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +18 -20
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +9 -6
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +15 -22
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +3 -2
- package/lib/esm/components/Cve/CveSidebar.js +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +9 -6
- 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.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -2
- 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/InsightsResults.js +1 -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/Recommendations.js +1 -1
- 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/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +5 -3
- package/lib/esm/components/SessionRestore/SessionRestore.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/TroubleshootSection/AskRedHat.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +14 -6
- package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/ResponseActions.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts +1 -0
- package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.js +2 -2
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -3
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +1 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +6 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +7 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +45 -45
- 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/AskRedHat.css +40 -7
- package/lib/esm/css/app.css +5 -4
- package/lib/esm/css/case.css +39 -6
- package/lib/esm/css/results.css +2 -2
- package/lib/esm/scss/_main.scss +70 -7
- package/lib/esm/scss/_pf-overrides.scss +37 -10
- package/package.json +6 -6
|
@@ -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")))));
|
|
@@ -184,7 +184,7 @@ export default function Recommendations(props) {
|
|
|
184
184
|
isATestvariation
|
|
185
185
|
? (recommendationState.visibleDocs.length !== 0 ||
|
|
186
186
|
recommendationState.isLoadingRecommendations) && (React.createElement("div", { className: `${recommendationState.isLoadingRecommendations ? 'gradient' : ''} label-container-icon` },
|
|
187
|
-
React.createElement("div", { id: "DeepPurpleColorAILabel"
|
|
187
|
+
React.createElement("div", { id: "DeepPurpleColorAILabel" },
|
|
188
188
|
recommendationState.isLoadingRecommendations ? (React.createElement(React.Fragment, null,
|
|
189
189
|
React.createElement("span", { className: "loading-text" },
|
|
190
190
|
React.createElement(Spinner, { size: "sm", className: "pf-v6-u-mr-xs" }),
|
|
@@ -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":"RestoreLastSessionModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/RestoreLastSessionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAGnF,OAAc,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAQ9C,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"RestoreLastSessionModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/RestoreLastSessionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAGnF,OAAc,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAQ9C,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,MAAM,CAuE9C,CAAC"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Button, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
10
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
11
11
|
import isEqual from 'lodash/isEqual';
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -38,8 +38,10 @@ export const RestoreLastSessionModal = ({ onRestore, errorSession }) => {
|
|
|
38
38
|
updateCaseCreationErrorStatus(caseDispatch, false);
|
|
39
39
|
updateSession(sessionDispatch, errorSession.session.id, errorSession.sessionDetails, Object.assign(Object.assign({}, errorSession.session), { caseCreationError: false }));
|
|
40
40
|
};
|
|
41
|
-
return (React.createElement(Modal, { "data-tracking-id": "restore-session-modal", variant: ModalVariant.small,
|
|
42
|
-
React.createElement(
|
|
41
|
+
return (React.createElement(Modal, { "data-tracking-id": "restore-session-modal", variant: ModalVariant.small, isOpen: !caseCreationError && caseCreation500ErrorStatus, onClose: onOpenNewCase, "aria-labelledby": "restore-session-modal-title", "aria-describedby": "restore-session-modal-body" },
|
|
42
|
+
React.createElement(ModalHeader, { title: t('Restore last session?'), labelId: "restore-session-modal-title" }),
|
|
43
|
+
React.createElement(ModalBody, { id: "restore-session-modal-body" },
|
|
44
|
+
React.createElement(Trans, null, "It looks like an error prevented your last case from being submitted. Would you like to restore the last session or open a new case?")),
|
|
43
45
|
React.createElement(ModalFooter, null,
|
|
44
46
|
React.createElement(Button, { key: "restore", variant: "primary", onClick: onRestoreClick, "data-tracking-id": "restore-session-button" },
|
|
45
47
|
React.createElement(Trans, null, " Restore")),
|
|
@@ -305,7 +305,7 @@ export function SessionRestore(props) {
|
|
|
305
305
|
], 1000);
|
|
306
306
|
if (!sessionRestoreCardSections.includes(activeSection))
|
|
307
307
|
return React.createElement(React.Fragment, null);
|
|
308
|
-
return (React.createElement("div", { className: "pf-v6-u-mb-
|
|
308
|
+
return (React.createElement("div", { className: "pf-v6-u-mb-lg pf-v6-u-mt-0" },
|
|
309
309
|
' ',
|
|
310
310
|
React.createElement(SessionRestoreCard, { onRestore: restoreSession, previousSessions: previousSessions, onCardDismiss: onSessionRestoreCardDismiss }),
|
|
311
311
|
React.createElement(RestoreLastSessionModal, { onRestore: restoreSession, errorSession: sessionRestore.sessionOfCaseCreationError })));
|
|
@@ -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":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAwTtC,CAAC"}
|
|
@@ -10,9 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Env } from '@cee-eng/hydrajs';
|
|
11
11
|
import { sendRHDirectMessageFeedback } from '@ifd-ui/ask-redhat-core';
|
|
12
12
|
import { Button, Card, CardBody, CardHeader, Modal, ModalVariant, Spinner } from '@patternfly/react-core';
|
|
13
|
-
import React, { useRef, useState } from 'react';
|
|
13
|
+
import React, { useContext, useRef, useState } from 'react';
|
|
14
14
|
import { MODAL_MESSAGES, QUICK_RESPONSES, TOOLTIP_MESSAGES } from '../../constants/askRedHatMessages';
|
|
15
15
|
import { useAIResponseState } from '../../context/AIResponseContext';
|
|
16
|
+
import { RouteContext } from '../../context/RouteContext';
|
|
16
17
|
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
17
18
|
import { appSourceId_ARH } from '../../reducers/CaseConstNTypes';
|
|
18
19
|
import { CollapseIcon } from './icons/CollapseIcon';
|
|
@@ -27,8 +28,10 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
27
28
|
const [showFeedbackComplete, setShowFeedbackComplete] = useState(false);
|
|
28
29
|
const [feedbackType, setFeedbackType] = useState('');
|
|
29
30
|
const [submittedFeedbackTypes, setSubmittedFeedbackTypes] = useState([]);
|
|
31
|
+
const [isSubmittingFeedback, setIsSubmittingFeedback] = useState(false);
|
|
30
32
|
const aiResponseState = useAIResponseState();
|
|
31
33
|
const contentRef = useRef(null);
|
|
34
|
+
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
32
35
|
const onToggle = () => {
|
|
33
36
|
if (isExpanded && contentRef.current) {
|
|
34
37
|
contentRef.current.scrollTop = 0;
|
|
@@ -56,20 +59,24 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
56
59
|
appEnv: Env.getEnvName(),
|
|
57
60
|
};
|
|
58
61
|
const handleFeedbackSubmit = (selectedResponse, additionalFeedback) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
-
|
|
62
|
+
setIsSubmittingFeedback(true);
|
|
60
63
|
try {
|
|
61
64
|
const payload = {
|
|
62
65
|
rating: (feedbackType === 'positive' ? 'positive' : 'negative'),
|
|
63
66
|
freeform: additionalFeedback || undefined,
|
|
64
|
-
predefined_response: selectedResponse,
|
|
67
|
+
predefined_response: selectedResponse || '',
|
|
65
68
|
};
|
|
66
69
|
yield sendRHDirectMessageFeedback(conversationId, messageId, payload, config);
|
|
70
|
+
setShowFeedbackCard(false);
|
|
67
71
|
setShowFeedbackComplete(true);
|
|
68
72
|
setSubmittedFeedbackTypes((prev) => [...prev, feedbackType]);
|
|
69
73
|
}
|
|
70
74
|
catch (error) {
|
|
71
75
|
setShowFeedbackCard(false);
|
|
72
76
|
}
|
|
77
|
+
finally {
|
|
78
|
+
setIsSubmittingFeedback(false);
|
|
79
|
+
}
|
|
73
80
|
});
|
|
74
81
|
const responseActions = {
|
|
75
82
|
positive: Object.assign({ onClick: () => {
|
|
@@ -88,7 +95,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
88
95
|
return (React.createElement("div", { className: "ask-redhat" },
|
|
89
96
|
React.createElement("p", { className: "ask-redhat-title" },
|
|
90
97
|
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
91
|
-
|
|
98
|
+
isCaseCreate ? 'Resolve your issue now with AI insights' : 'Troubleshoot with AI insights'),
|
|
92
99
|
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
93
100
|
React.createElement("div", { className: "ask-redhat-content", style: { textAlign: 'center', padding: '2rem' } },
|
|
94
101
|
React.createElement(Spinner, { size: "lg" }),
|
|
@@ -129,7 +136,7 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
129
136
|
return (React.createElement("div", { className: "ask-redhat" },
|
|
130
137
|
React.createElement("p", { className: "ask-redhat-title" },
|
|
131
138
|
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
132
|
-
|
|
139
|
+
isCaseCreate ? 'Resolve your issue now with AI insights' : 'Troubleshoot with AI insights'),
|
|
133
140
|
React.createElement("div", { className: "ask-redhat-content-wrapper" },
|
|
134
141
|
React.createElement("div", { ref: contentRef, className: `ask-redhat-content ${isExpanded ? 'ask-redhat-content--expanded' : ''}` },
|
|
135
142
|
React.createElement("div", { className: `ask-redhat-content-scrollable ${isExpanded ? 'ask-redhat-content--expanded-scrollable' : ''}` },
|
|
@@ -158,13 +165,14 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
158
165
|
React.createElement(Modal, { variant: ModalVariant.small, isOpen: showFeedbackCard, onClose: () => {
|
|
159
166
|
setShowFeedbackCard(false);
|
|
160
167
|
setFeedbackType('');
|
|
168
|
+
setIsSubmittingFeedback(false);
|
|
161
169
|
} },
|
|
162
170
|
React.createElement(UserFeedback, { title: feedbackType === 'positive'
|
|
163
171
|
? MODAL_MESSAGES.feedback.positive
|
|
164
172
|
: MODAL_MESSAGES.feedback.negative, hasTextArea: true, quickResponses: feedbackType === 'positive' ? QUICK_RESPONSES.positive : QUICK_RESPONSES.negative, onSubmit: handleFeedbackSubmit, onClose: () => {
|
|
165
173
|
setShowFeedbackCard(false);
|
|
166
174
|
setFeedbackType('');
|
|
167
|
-
} })),
|
|
175
|
+
}, isSubmitting: isSubmittingFeedback })),
|
|
168
176
|
React.createElement(Modal, { variant: ModalVariant.small, isOpen: showFeedbackComplete, onClose: () => {
|
|
169
177
|
setShowFeedbackComplete(false);
|
|
170
178
|
setFeedbackType('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/ResponseActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAA+B,MAAM,OAAO,CAAC;AAIpG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,IAAI,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ResponseActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/ResponseActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAA+B,MAAM,OAAO,CAAC;AAIpG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,IAAI,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,CAyFlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -3,7 +3,7 @@ import OutlinedThumbsDownIcon from '@patternfly/react-icons/dist/esm/icons/outli
|
|
|
3
3
|
import OutlinedThumbsUpIcon from '@patternfly/react-icons/dist/esm/icons/outlined-thumbs-up-icon';
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import ResponseActionButton from './ResponseActionButton';
|
|
6
|
-
export const ResponseActions = ({ actions, submittedFeedbackTypes = []
|
|
6
|
+
export const ResponseActions = ({ actions, submittedFeedbackTypes = [] }) => {
|
|
7
7
|
var _a, _b, _c, _d, _e, _f;
|
|
8
8
|
const [activeButton, setActiveButton] = useState();
|
|
9
9
|
const [clickStatePersisted, setClickStatePersisted] = useState(false);
|
|
@@ -127,7 +127,7 @@ function TroubleshootSection(props) {
|
|
|
127
127
|
return (React.createElement(React.Fragment, null, isAIChatMode ? (React.createElement(React.Fragment, null,
|
|
128
128
|
React.createElement(AskRedHatChat, { initConfig: initConfig }),
|
|
129
129
|
React.createElement("div", { className: "fullscreen-chat-footer" },
|
|
130
|
-
React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('
|
|
130
|
+
React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-case-btn" }, isCaseCreate ? t('Return to case creation') : t('Back to resources'))))) : (React.createElement(React.Fragment, null,
|
|
131
131
|
React.createElement("section", null,
|
|
132
132
|
shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
|
|
133
133
|
!isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
|
|
@@ -6,6 +6,7 @@ export interface UserFeedbackProps extends Omit<CardProps, 'onSubmit'>, OUIAProp
|
|
|
6
6
|
hasTextArea?: boolean;
|
|
7
7
|
onSubmit: (selectedResponse?: string, additionalFeedback?: string) => void;
|
|
8
8
|
onClose: () => void;
|
|
9
|
+
isSubmitting?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const UserFeedback: FunctionComponent<UserFeedbackProps>;
|
|
11
12
|
export default UserFeedback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,SAAS,EAET,SAAS,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAc,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"UserFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/UserFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAMH,SAAS,EAET,SAAS,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAc,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGhE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA4EtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -14,7 +14,7 @@ import React, { useState } from 'react';
|
|
|
14
14
|
import CloseButton from './CloseButton';
|
|
15
15
|
import QuickResponse from './QuickResponse';
|
|
16
16
|
const UserFeedback = (_a) => {
|
|
17
|
-
var { title = 'Why did you choose this rating?', hasTextArea, quickResponses, onSubmit, onClose, isCompact } = _a, props = __rest(_a, ["title", "hasTextArea", "quickResponses", "onSubmit", "onClose", "isCompact"]);
|
|
17
|
+
var { title = 'Why did you choose this rating?', hasTextArea, quickResponses, onSubmit, onClose, isCompact, isSubmitting = false } = _a, props = __rest(_a, ["title", "hasTextArea", "quickResponses", "onSubmit", "onClose", "isCompact", "isSubmitting"]);
|
|
18
18
|
const [selectedResponse, setSelectedResponse] = useState();
|
|
19
19
|
const [value, setValue] = useState('');
|
|
20
20
|
return (React.createElement(Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__feedback-card" }, props),
|
|
@@ -39,6 +39,6 @@ const UserFeedback = (_a) => {
|
|
|
39
39
|
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" }, "Red Hat Privacy Statement"),
|
|
40
40
|
".")))),
|
|
41
41
|
React.createElement(ActionGroup, null,
|
|
42
|
-
React.createElement(Button, { onClick: () => onSubmit(selectedResponse, value) }, "Send Feedback"))))));
|
|
42
|
+
React.createElement(Button, { onClick: () => onSubmit(selectedResponse, value), isDisabled: isSubmitting, isLoading: isSubmitting }, "Send Feedback"))))));
|
|
43
43
|
};
|
|
44
44
|
export default UserFeedback;
|
|
@@ -146,12 +146,12 @@ function WidgetFileUploader(props) {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
-
return (React.createElement(Card, { id: "file-uploader-card", className:
|
|
149
|
+
return (React.createElement(Card, { id: "file-uploader-card", className: "file-diag", onPaste: handlePaste },
|
|
150
150
|
React.createElement(CardHeader, { "aria-label": t('File uploader') },
|
|
151
151
|
React.createElement("h3", { id: "file-uploader-title" }, props.isIdea || props.isSecureSupport ? (React.createElement(Trans, null, "File uploader")) : (React.createElement(Trans, null, "Upload a file for Red Hat to analyze")))),
|
|
152
|
-
React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body
|
|
152
|
+
React.createElement(CardBody, { "aria-label": t('File upload area'), className: "file-upload-body" },
|
|
153
153
|
React.createElement(WidgetFileSelector, { isSessionId: props.isSessionId, isPrivate: props.isPrivate, isIdea: props.isIdea, showFileExceed: fileExceedInfo }),
|
|
154
|
-
!hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-
|
|
154
|
+
!hasSomeSelectedFiles(selectedLocalFiles) ? ((!props.isIdea && props.helperText) || (React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
155
155
|
!props.isIdea ? (React.createElement(React.Fragment, null,
|
|
156
156
|
React.createElement(Trans, null, "To help us provide the right guidance, upload a sosreport."),
|
|
157
157
|
React.createElement("br", null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"ContactSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/input/ContactSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAsBrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxE,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAQ;IAC5C,QAAQ,oCAAuC;IAE/C,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,CAalC;gBAEU,KAAK,EAAE,MAAM;IAYzB,gBAAgB,YAAa,QAAQ,KAAG,MAAM,CAS5C;IAEF,mBAAmB,aAAc,QAAQ,EAAE,KAAG,QAAQ,EAAE,CAGtD;IAEF,sBAAsB,MAAO,QAAQ,KAAG,OAAO,CAE7C;IAEF,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAmBpC,QAAQ,aAAoB,QAAQ,EAAE,mBAKpC;IAEF,YAAY,UAAiB,MAAM,mBA0CjC;IAEF,iBAAiB,UAAW,MAAM,UAiBhC;IAEF,YAAY,UAAW,GAAG,aAAa,GAAG,UAkBxC;IAEF,mBAAmB,oBAAqB,QAAQ,UAI9C;IAEF,aAAa,UAAW,KAAK,CAAC,aAAa,UAkCzC;IAEF,WAAW,aAIT;IAEF,UAAU,aAKR;IAEF,WAAW,aAGT;IAEF,QAAQ,aAEN;IAEF,MAAM;CA6GT"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { contacts } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
12
12
|
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
|
|
13
|
+
import { haltEvent } from '@rh-support/utils';
|
|
13
14
|
import assign from 'lodash/assign';
|
|
14
15
|
import differenceBy from 'lodash/differenceBy';
|
|
15
16
|
import filter from 'lodash/filter';
|
|
@@ -212,7 +213,11 @@ export class ContactSelectorInternal extends React.Component {
|
|
|
212
213
|
: searchValue;
|
|
213
214
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: this.onToggle, isExpanded: isOpen, isDisabled: this.props.disabled || this.props.isUpdating, isFullWidth: true },
|
|
214
215
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
215
|
-
React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) =>
|
|
216
|
+
React.createElement(TextInputGroupMain, { value: displayValue, onChange: (_, value) => this.handleInputChange(value), onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, placeholder: this.props.placeholder || 'Search contact by name or username', ref: this.inputRef, autoComplete: "off", isExpanded: isOpen, role: "combobox" }, this.props.multiple && selectedContacts.length > 0 && (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, selectedContacts.map((contact, index) => {
|
|
217
|
+
var _a, _b;
|
|
218
|
+
const isDisabled = !!((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.disableContactRemoval) === null || _b === void 0 ? void 0 : _b.find((v) => v.ssoUsername === contact.ssoUsername));
|
|
219
|
+
return (React.createElement(Label, { key: contact.ssoUsername, variant: "outline", color: "blue", onClick: haltEvent, onClose: () => this.handleRemoveContact(contact), isDisabled: isDisabled }, this.getSelectedLabel(contact)));
|
|
220
|
+
})))),
|
|
216
221
|
React.createElement(TextInputGroupUtilities, null,
|
|
217
222
|
isLoading && React.createElement(Spinner, { size: "sm" }),
|
|
218
223
|
this.props.clearButton && (searchValue || selectedContacts.length > 0) && (React.createElement(Button, { variant: "plain", icon: React.createElement(TimesCircleIcon, null), onClick: this.handleClear, "aria-label": "Clear input" }))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAmU9D"}
|
|
@@ -161,6 +161,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
161
161
|
!isEmpty(version) &&
|
|
162
162
|
!isEmpty(summary) &&
|
|
163
163
|
!isEmpty(issue) &&
|
|
164
|
+
isEntitlement === true &&
|
|
164
165
|
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
|
|
165
166
|
return isValid;
|
|
166
167
|
}
|
|
@@ -252,7 +253,12 @@ export function useIsSectionValid(sectionName) {
|
|
|
252
253
|
return '';
|
|
253
254
|
switch (sectionNameLocal) {
|
|
254
255
|
case AppRouteSections.RESOURCES:
|
|
255
|
-
|
|
256
|
+
if (isCaseCreate === false) {
|
|
257
|
+
return getSupportSectionError();
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
return recommendationSectionError();
|
|
261
|
+
}
|
|
256
262
|
case AppRouteSections.GET_SUPPORT:
|
|
257
263
|
return getSupportSectionError();
|
|
258
264
|
default:
|
|
@@ -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,
|
|
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,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAuTtD"}
|
|
@@ -24,7 +24,8 @@ 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 {
|
|
27
|
+
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
28
|
+
import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
|
|
28
29
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
29
30
|
import { fetchTopContent } from '../../reducers/TopContentReducer';
|
|
30
31
|
import RouteUtils from '../../utils/routeUtils';
|
|
@@ -117,6 +118,8 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
117
118
|
}, [allProducts.data.productsResult, caseDispatch, props.routeProps]);
|
|
118
119
|
// if you want to hide any section on page load then the logic will go here..
|
|
119
120
|
useEffect(() => {
|
|
121
|
+
// Reset validation error state when the troubleshoot app loads freshly
|
|
122
|
+
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
|
|
120
123
|
if (!isFirstMount.current && loggedInUser.data && managedAccounts.data)
|
|
121
124
|
return;
|
|
122
125
|
if (isFirstMount.current) {
|
|
@@ -143,11 +146,14 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
143
146
|
*/
|
|
144
147
|
useEffect(() => {
|
|
145
148
|
if (props.routeProps.location.pathname === RouteUtils.seBasePath) {
|
|
149
|
+
// Set the active section to the default section when navigating to base path
|
|
150
|
+
const defaultSection = isCaseCreate ? AppRouteSections.GET_SUPPORT : AppRouteSections.TROUBLESHOOT;
|
|
151
|
+
setActiveSectionChanged(dispatchToRouteReducer, defaultSection, '');
|
|
146
152
|
RouteUtils.navigateToDefaltSection(props.routeProps, isCaseCreate, isSearchIntent, false);
|
|
147
153
|
!isSearchIntent && resetCaseCreateState();
|
|
148
154
|
}
|
|
149
155
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
|
-
}, [dispatchToRouteReducer, props.routeProps, isCaseCreate, isSearchIntent]);
|
|
156
|
+
}, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
|
|
151
157
|
/**
|
|
152
158
|
* Setting Default AccountNumber and ContactSsoUsername from loggedInUsersAccount
|
|
153
159
|
* Disabling exhaustive-deps rule as we don't want to reset default values if user manually clears these from UI.
|
|
@@ -39,14 +39,14 @@ function WizardAside(props) {
|
|
|
39
39
|
React.createElement("section", { className: "grid-aside-content" },
|
|
40
40
|
canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
|
|
41
41
|
canShowFileUploadWidget() && React.createElement(InsightsResults, null),
|
|
42
|
-
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-
|
|
42
|
+
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v6-u-mb-lg" }),
|
|
43
43
|
activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
|
|
44
44
|
!isCveModalOpened && React.createElement(CveSidebar, null),
|
|
45
45
|
activeSection === AppRouteSections.RESOURCES && React.createElement(CveSidebar, null),
|
|
46
46
|
canShowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
47
|
-
!(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-
|
|
47
|
+
!(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" })),
|
|
48
48
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
49
|
-
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-
|
|
49
|
+
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v6-u-mb-lg pf-v6-u-mt-0" }))));
|
|
50
50
|
}
|
|
51
51
|
WizardAside.defaultProps = defaultProps;
|
|
52
52
|
export default WizardAside;
|