@rh-support/troubleshoot 2.6.270 → 2.6.271
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/AccountInfo/css/accountSelector.css +3 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +5 -2
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +6 -4
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseType.js +2 -4
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +2 -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 +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +13 -33
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +11 -1
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +4 -4
- package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Description.js +17 -1
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- 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/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +5 -4
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +12 -6
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +2 -1
- package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -1
- package/lib/esm/components/Cve/CvePanel.js +16 -8
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +4 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +1 -0
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -5
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts +2 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +16 -13
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.js +3 -1
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +4 -0
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +12 -1
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts +2 -0
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +20 -3
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +3 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +8 -10
- package/lib/esm/components/TroubleshootSection/ResponseActions.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/ResponseActions.js +5 -3
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedback.js +10 -8
- package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/UserFeedbackComplete.js +5 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -1
- package/lib/esm/components/shared/useIsSectionValid.js +6 -6
- package/lib/esm/constants/caseDetailsConstants.d.ts +10 -10
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +27 -11
- package/lib/esm/hooks/useARHResponse.d.ts.map +1 -1
- package/lib/esm/hooks/useARHResponse.js +4 -1
- package/lib/esm/i18n/template-de.d.ts +6 -0
- package/lib/esm/i18n/template-de.d.ts.map +1 -1
- package/lib/esm/i18n/template-de.js +6 -0
- package/lib/esm/i18n/template-es.d.ts +6 -0
- package/lib/esm/i18n/template-es.d.ts.map +1 -1
- package/lib/esm/i18n/template-es.js +6 -0
- package/lib/esm/i18n/template-fr.d.ts +6 -0
- package/lib/esm/i18n/template-fr.d.ts.map +1 -1
- package/lib/esm/i18n/template-fr.js +6 -0
- package/lib/esm/i18n/template-it.d.ts +6 -0
- package/lib/esm/i18n/template-it.d.ts.map +1 -1
- package/lib/esm/i18n/template-it.js +6 -0
- package/lib/esm/i18n/template-jp.d.ts +6 -0
- package/lib/esm/i18n/template-jp.d.ts.map +1 -1
- package/lib/esm/i18n/template-jp.js +6 -0
- package/lib/esm/i18n/template-ko.d.ts +6 -0
- package/lib/esm/i18n/template-ko.d.ts.map +1 -1
- package/lib/esm/i18n/template-ko.js +6 -0
- package/lib/esm/i18n/template-pt.d.ts +6 -0
- package/lib/esm/i18n/template-pt.d.ts.map +1 -1
- package/lib/esm/i18n/template-pt.js +6 -0
- package/lib/esm/i18n/template-ru.d.ts +6 -0
- package/lib/esm/i18n/template-ru.d.ts.map +1 -1
- package/lib/esm/i18n/template-ru.js +6 -0
- package/lib/esm/i18n/template-zh.d.ts +6 -0
- package/lib/esm/i18n/template-zh.d.ts.map +1 -1
- package/lib/esm/i18n/template-zh.js +6 -0
- package/lib/esm/reducers/CaseConstNTypes.js +4 -4
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +1 -1
- package/lib/esm/reducers/CaseHelpers.d.ts +8 -6
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +20 -10
- package/lib/esm/reducers/CaseReducer.d.ts +1 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +37 -2
- package/lib/esm/reducers/RulesReducer.d.ts +11 -4
- package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RulesReducer.js +6 -1
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +7 -4
- package/lib/esm/reducers/TopContentReducer.js +1 -1
- package/lib/esm/scss/_pf-overrides.scss +28 -2
- package/package.json +8 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.css +0 -0
|
@@ -97,7 +97,7 @@ function SupportLevel(props) {
|
|
|
97
97
|
"Learn more about our",
|
|
98
98
|
' ',
|
|
99
99
|
React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
|
|
100
|
-
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size cursor-pointer
|
|
100
|
+
React.createElement(QuestionCircleIcon, { color: "#5e40be", className: "pf-v6-u-ml-xs icon-size cursor-pointer", "aria-label": "Support Level Info" })),
|
|
101
101
|
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') }),
|
|
102
102
|
isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
|
|
103
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoClusterIDReasonSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/NoClusterIDReasonSelector.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4BAA4B,EAAE,MAAM,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,yBAAyB,GAAI,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"NoClusterIDReasonSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/NoClusterIDReasonSelector.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4BAA4B,EAAE,MAAM,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,yBAAyB,GAAI,OAAO,MAAM,sBAkK/C,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -37,9 +37,10 @@ const NoClusterIDReasonSelector = (props) => {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const handleInputChange = (_event, value) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const cleaned = value.trim().length === 0 ? '' : value;
|
|
41
|
+
setInputValue(cleaned);
|
|
42
|
+
setHasLargeReasonExplanation(cleaned.length > SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT);
|
|
43
|
+
props.onReasonInputBoxChanged(cleaned);
|
|
43
44
|
};
|
|
44
45
|
const getDropdownOptions = () => {
|
|
45
46
|
return map(caseNoClusterIdReasonsList || [], (option) => ({
|
|
@@ -78,7 +79,7 @@ const NoClusterIDReasonSelector = (props) => {
|
|
|
78
79
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true },
|
|
79
80
|
' ',
|
|
80
81
|
"*")),
|
|
81
|
-
React.createElement("div", { className: "cluster-ID-counter" }, `${(_a = inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) !== null && _a !== void 0 ? _a : 0} / ${SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT}`)),
|
|
82
|
+
props.noClusterIdReason === 'Other' && (React.createElement("div", { className: "cluster-ID-counter" }, `${(_a = inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) !== null && _a !== void 0 ? _a : 0} / ${SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT}`))),
|
|
82
83
|
React.createElement("div", { className: "no-cluster-id-reason-container" },
|
|
83
84
|
React.createElement("div", { className: props.noClusterIdReason === 'Other' ? 'd-none' : '' },
|
|
84
85
|
React.createElement(SingleSelectDropdown, { placeholder: t('Select an option or briefly describe your reason'), dataTrackingId: "no-openshift-cluster-id-reason", options: getDropdownOptions(), selected: getSelectedOption(), isDisabled: caseNoClusterIdReasons.isFetching || props.isDisabled, isLoading: caseNoClusterIdReasons.isFetching, isInvalid: props.isInValid, onSelect: handleReasonChange, "aria-labelledby": titleId, "aria-invalid": props.isInValid, "aria-describedby": "validate-reason-helper" })),
|
|
@@ -209,7 +209,7 @@ export function OpenShiftClusterId(props) {
|
|
|
209
209
|
};
|
|
210
210
|
const onReasonExplanationInputBoxChanged = (noClusterIdReasonExplanation) => {
|
|
211
211
|
if (noClusterIdReason === 'Other') {
|
|
212
|
-
setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: noClusterIdReasonExplanation
|
|
212
|
+
setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: noClusterIdReasonExplanation });
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
const v3ClusterNameInputBoxChanged = (v3Cluster) => {
|
|
@@ -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;AAgB5E,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;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,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;AAgB5E,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;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA+dzC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -71,12 +71,18 @@ function OpenshiftDropdownV4(props) {
|
|
|
71
71
|
});
|
|
72
72
|
const onToggle = () => setIsOpen(!isOpen);
|
|
73
73
|
const onViewMoreClick = () => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
setClustersRawResponse((prev) => {
|
|
75
|
+
const page = Math.floor(prev.length / PER_PAGE) + 1;
|
|
76
|
+
fetchAccountClusters(inputVal, page).then((fetchedClusters) => {
|
|
77
|
+
setClustersRawResponse((latest) => {
|
|
78
|
+
const clusterResponse = [...latest, ...((fetchedClusters === null || fetchedClusters === void 0 ? void 0 : fetchedClusters.items) || [])];
|
|
79
|
+
setTotalResultsNo(fetchedClusters.total);
|
|
80
|
+
setClustersSelectOptions(getClusterOptions(clusterResponse));
|
|
81
|
+
return clusterResponse;
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
return prev;
|
|
85
|
+
});
|
|
80
86
|
});
|
|
81
87
|
const onSelect = (event, selectedCluster) => __awaiter(this, void 0, void 0, function* () {
|
|
82
88
|
if (selectedCluster.type === 'checkbox') {
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA+NxD"}
|
|
@@ -22,6 +22,7 @@ import { accounts } from '@cee-eng/hydrajs';
|
|
|
22
22
|
import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper, TextInputGroup, TextInputGroupMain, } from '@patternfly/react-core';
|
|
23
23
|
import { getHydraContactLabel, useFetch } from '@rh-support/components';
|
|
24
24
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
25
|
+
import { haltEvent } from '@rh-support/utils';
|
|
25
26
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
26
27
|
import { Trans } from 'react-i18next';
|
|
27
28
|
const isCustomEmailAddress = (user) => {
|
|
@@ -154,7 +155,7 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
154
155
|
const isContactOption = isContact(option);
|
|
155
156
|
const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
|
|
156
157
|
const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
|
|
157
|
-
return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline", color: "blue" }, getHydraContactLabel(option)));
|
|
158
|
+
return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline", color: "blue", onClick: haltEvent }, getHydraContactLabel(option)));
|
|
158
159
|
})));
|
|
159
160
|
};
|
|
160
161
|
const menu = (React.createElement(Menu, { ref: menuRef },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CvePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CvePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"CvePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CvePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,sBAkDrC,CAAC"}
|
|
@@ -2,22 +2,30 @@ import { Accordion, AccordionContent, AccordionItem, AccordionToggle } from '@pa
|
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
3
|
import map from 'lodash/map';
|
|
4
4
|
import slice from 'lodash/slice';
|
|
5
|
-
import React, { useState } from 'react';
|
|
5
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
7
7
|
import { CveItem } from './CveItem';
|
|
8
8
|
export const CvePanel = (props) => {
|
|
9
|
-
var _a;
|
|
10
9
|
const { cveWorkflowRecommendation } = useCaseSelector((state) => ({
|
|
11
10
|
cveWorkflowRecommendation: state.cveWorkflowRecommendation,
|
|
12
11
|
}), isEqual);
|
|
13
|
-
const [expanded, setExpanded] = useState(
|
|
14
|
-
const
|
|
12
|
+
const [expanded, setExpanded] = useState(true);
|
|
13
|
+
const prevCveIds = useRef([]);
|
|
14
|
+
// Auto-expand accordion whenever CVE data changes
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const currentCveIds = (cveWorkflowRecommendation === null || cveWorkflowRecommendation === void 0 ? void 0 : cveWorkflowRecommendation.map((cve) => cve.title || cve.nid)) || [];
|
|
17
|
+
const cveIdsChanged = !isEqual(prevCveIds.current, currentCveIds);
|
|
18
|
+
if (cveIdsChanged && currentCveIds.length > 0) {
|
|
19
|
+
setExpanded(true);
|
|
20
|
+
prevCveIds.current = currentCveIds;
|
|
21
|
+
}
|
|
22
|
+
}, [cveWorkflowRecommendation]);
|
|
23
|
+
const handleToggle = () => setExpanded(!expanded);
|
|
15
24
|
const renderAccordionItem = (cve, index) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React.createElement(AccordionToggle, { onClick: () => handleToggle(cve.title), id: `cve-toggle-${index}`, "data-tracking-id": "cve-accordion-toggle" }, cve.title),
|
|
25
|
+
return (React.createElement(AccordionItem, { isExpanded: expanded, key: `cve-item-${index}` },
|
|
26
|
+
React.createElement(AccordionToggle, { onClick: handleToggle, id: `cve-toggle-${index}`, "data-tracking-id": "cve-accordion-toggle" }, cve.title),
|
|
19
27
|
React.createElement(AccordionContent, { id: `cve-content-${index}` },
|
|
20
|
-
React.createElement(CveItem, { cve: cve, isExpanded:
|
|
28
|
+
React.createElement(CveItem, { cve: cve, isExpanded: expanded, index: index }))));
|
|
21
29
|
};
|
|
22
30
|
return (React.createElement(Accordion, { isBordered: false, displaySize: 'default', asDefinitionList: false, className: `${props.className ? props.className : ''}` }, map(slice(cveWorkflowRecommendation, 0, 4), renderAccordionItem)));
|
|
23
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,
|
|
1
|
+
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBA8ItC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
2
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
3
3
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
4
|
-
import {
|
|
4
|
+
import { haventLoadedMetadata } from '@rh-support/utils';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
import React, { useContext, useEffect } from 'react';
|
|
@@ -21,7 +21,7 @@ import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContact
|
|
|
21
21
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
22
22
|
export default function IdeaInformation() {
|
|
23
23
|
const { t } = useTranslation();
|
|
24
|
-
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
|
|
24
|
+
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
25
25
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
26
26
|
const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
27
27
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
@@ -73,7 +73,7 @@ export default function IdeaInformation() {
|
|
|
73
73
|
return (React.createElement(React.Fragment, null,
|
|
74
74
|
React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
|
|
75
75
|
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v6-u-mb-md", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError(), isInline: true }),
|
|
76
|
-
React.createElement(AlertMessage, { show: !
|
|
76
|
+
React.createElement(AlertMessage, { show: !loggedInUserRights.data.canManageCases(), variant: AlertType.DANGER, className: "pf-v6-u-mb-md", isInline: true },
|
|
77
77
|
React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
|
|
78
78
|
"You need additional access to manage cases.\u00A0 Please contact",
|
|
79
79
|
' ',
|
|
@@ -88,7 +88,7 @@ export default function IdeaInformation() {
|
|
|
88
88
|
!hasInvalidEntitlements &&
|
|
89
89
|
!isMetadataLoading() &&
|
|
90
90
|
!isMetadataLoadingError() &&
|
|
91
|
-
|
|
91
|
+
loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
|
|
92
92
|
React.createElement("form", null,
|
|
93
93
|
React.createElement(KtQuestions, { onlyShowKT4: true }),
|
|
94
94
|
React.createElement(SupportLevel, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -38,6 +38,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
38
38
|
version: state.caseDetails.version,
|
|
39
39
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
40
40
|
}), isEqual);
|
|
41
|
+
//test
|
|
41
42
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
42
43
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
43
44
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -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;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,GAAI,OAAO,MAAM,
|
|
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,GAAI,OAAO,MAAM,sBA2MvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -55,11 +55,7 @@ export const NewProductDropdownSelector = (props) => {
|
|
|
55
55
|
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
56
56
|
};
|
|
57
57
|
const onSelect = (selection) => {
|
|
58
|
-
if (isEqual(selection.name,
|
|
59
|
-
props.onProductChange('');
|
|
60
|
-
setInputValue('');
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
58
|
+
if (!isEqual(selection.name, product)) {
|
|
63
59
|
props.onProductChange(selection.name);
|
|
64
60
|
setInputValue(selection.name);
|
|
65
61
|
}
|
|
@@ -2,6 +2,8 @@ import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseD
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface IProps {
|
|
4
4
|
clusterRecommendations: IClusterRecommendation[];
|
|
5
|
+
onViewMoreRecommendation?: () => void;
|
|
6
|
+
displayVeiwMoreBtn?: boolean;
|
|
5
7
|
}
|
|
6
8
|
export declare function ClusterRecommendationItems(props: IProps): React.JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAI5F,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAI5F,OAAO,KAAgC,MAAM,OAAO,CAAC;AAYrD,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;IACjD,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBA4FvD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
|
-
import { Label } from '@patternfly/react-core';
|
|
2
|
+
import { Button, Label } from '@patternfly/react-core';
|
|
3
3
|
import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-icon';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
5
|
import React, { useContext, useEffect } from 'react';
|
|
@@ -29,16 +29,19 @@ export function ClusterRecommendationItems(props) {
|
|
|
29
29
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.CLUSTER_RECOMMENDATION, getRulesToSave('', '', recsWithUrl), JSON.stringify({ product, version, openshiftClusterID }));
|
|
30
30
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
31
|
}, [props.clusterRecommendations, activeSessionId]);
|
|
32
|
-
return (React.createElement("pfe-accordion", null,
|
|
33
|
-
React.createElement(
|
|
34
|
-
React.createElement("
|
|
35
|
-
|
|
36
|
-
React.createElement("
|
|
37
|
-
React.createElement(
|
|
38
|
-
React.createElement(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
React.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
return (React.createElement("pfe-accordion", null,
|
|
33
|
+
props.clusterRecommendations.map((rule, i) => (React.createElement(React.Fragment, null,
|
|
34
|
+
React.createElement("pfe-accordion-header", null,
|
|
35
|
+
React.createElement("p", null, rule.description)),
|
|
36
|
+
React.createElement("pfe-accordion-panel", null,
|
|
37
|
+
React.createElement("p", null,
|
|
38
|
+
React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, className: riskLabels[rule.total_risk].className },
|
|
39
|
+
React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
|
|
40
|
+
React.createElement("p", null, rule.details || ''),
|
|
41
|
+
React.createElement("a", { onClick: (e) => onResourceClick(e, rule, i), className: "pf-v6-u-font-weight-bold", "data-tracking-id": "cluster-recommendations", href: detailsUrl, target: "_blank", rel: "noopener noreferrer" },
|
|
42
|
+
React.createElement(Trans, null,
|
|
43
|
+
"View details and remediation steps ",
|
|
44
|
+
React.createElement(ArrowRightIcon, { "aria-hidden": "true" }))))))),
|
|
45
|
+
props.displayVeiwMoreBtn && (React.createElement(Button, { className: "pf-v6-u-p-md", variant: "link", onClick: props.onViewMoreRecommendation, "data-tracking-id": "cluster-recs-view-more" },
|
|
46
|
+
React.createElement(Trans, null, "View more recommendations")))));
|
|
44
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClusterRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendations.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAa1C,UAAU,MAAM;IACZ,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAuD3D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Button } from '@patternfly/react-core';
|
|
2
1
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
3
2
|
import isEqual from 'lodash/isEqual';
|
|
4
3
|
import React, { useContext } from 'react';
|
|
@@ -35,8 +34,6 @@ export default function ClusterRecommendations(props) {
|
|
|
35
34
|
React.createElement("h3", { className: "card-heading popular-solutions" },
|
|
36
35
|
React.createElement(Trans, null, "Cluster recommendations")),
|
|
37
36
|
React.createElement("div", null,
|
|
38
|
-
React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data.slice(0, NUMBER_OF_RULES_TO_DISPLAY) }),
|
|
39
|
-
clusterRecommendations.data.length > NUMBER_OF_RULES_TO_DISPLAY && (React.createElement(Button, { className: "pf-v6-u-p-md", variant: "link", isBlock: true, onClick: onViewMoreRecommendation, "data-tracking-id": "cluster-recs-view-more" },
|
|
40
|
-
React.createElement(Trans, null, "View more recommendations")))))),
|
|
37
|
+
React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data.slice(0, NUMBER_OF_RULES_TO_DISPLAY), onViewMoreRecommendation: onViewMoreRecommendation, displayVeiwMoreBtn: clusterRecommendations.data.length > NUMBER_OF_RULES_TO_DISPLAY })))),
|
|
41
38
|
showClusterRecommendationsModal && React.createElement(ClusterRecommendationsModal, null)));
|
|
42
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,
|
|
1
|
+
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAwClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA8BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -29,9 +29,11 @@ export function EARule({ children, rule, ruleRank }) {
|
|
|
29
29
|
summary: state.caseDetails.summary,
|
|
30
30
|
}), isEqual);
|
|
31
31
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
32
|
-
const onCtaClick = (link, title) => () => {
|
|
32
|
+
const onCtaClick = (link, title) => (event) => {
|
|
33
33
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromEA(link, SessionResourceVisibility.VISITED, ruleRank, rule.rule_id)], JSON.stringify({ product, version, summary }));
|
|
34
34
|
trackClickedResourcesSequence('Automated Support Assistant (ASA) recommendations', link, title || rule.title);
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
window.open(link, '_blank', 'noopener,noreferrer');
|
|
35
37
|
};
|
|
36
38
|
return (React.createElement(EARuleContext.Provider, { value: {
|
|
37
39
|
rule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAmBvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAmBvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkRrC;kBAlRQ,eAAe;;;AAqRxB,eAAe,eAAe,CAAC"}
|
|
@@ -206,6 +206,10 @@ function InsightsResults(props) {
|
|
|
206
206
|
type: RulesReducerConstants.setInsightRules,
|
|
207
207
|
payload: { rules: allResults },
|
|
208
208
|
});
|
|
209
|
+
rulesDispatch({
|
|
210
|
+
type: RulesReducerConstants.setAllResults,
|
|
211
|
+
payload: { allResults },
|
|
212
|
+
});
|
|
209
213
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
210
214
|
}, [allResults.length, includeAnalysisResults]);
|
|
211
215
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBAwD/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAqF3C"}
|
|
@@ -3,7 +3,7 @@ import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@
|
|
|
3
3
|
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
|
-
import React, { useContext } from 'react';
|
|
6
|
+
import React, { useContext, useEffect, useRef } from 'react';
|
|
7
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
8
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
9
9
|
import { AccountSelector } from '../AccountInfo/AccountSelector';
|
|
@@ -30,6 +30,17 @@ export default function Review(props) {
|
|
|
30
30
|
contactInfo24x7: state.caseDetails.contactInfo24x7,
|
|
31
31
|
caseType: state.caseDetails.caseType,
|
|
32
32
|
}), isEqual);
|
|
33
|
+
const previousCaseTypeRef = useRef(caseType);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (previousCaseTypeRef.current !== caseType && caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
|
|
36
|
+
setCaseDetails(caseDispatch, {
|
|
37
|
+
environment: '',
|
|
38
|
+
periodicityOfIssue: '',
|
|
39
|
+
description: '',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
previousCaseTypeRef.current = caseType;
|
|
43
|
+
}, [caseType, caseDispatch]);
|
|
33
44
|
const ability = useContext(AbilityContext);
|
|
34
45
|
const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
|
|
35
46
|
const onSeverityChange = (payload) => {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { ISessionItem } from '@cee-eng/hydrajs/@types/api/pcm/troubleshootSession';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { RouteComponentProps } from 'react-router-dom';
|
|
3
4
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
5
|
interface IProps {
|
|
5
6
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
6
7
|
}
|
|
8
|
+
export declare const isSessionFromCurrentAuthCycle: (sessionItem: ISessionItem | undefined, currentLoginStartTime: number) => boolean;
|
|
7
9
|
export declare function SessionRestore(props: IProps): React.JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=SessionRestore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgC,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAQjH,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAmBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,6BAA6B,GAAI,aAAa,YAAY,GAAG,SAAS,EAAE,uBAAuB,MAAM,YAKjH,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAiX3C"}
|
|
@@ -32,7 +32,17 @@ import { restoreFilesFromSession } from '../shared/fileUpload/reducer/Attachment
|
|
|
32
32
|
import { AttachmentDispatchContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
33
33
|
import { RestoreLastSessionModal } from './RestoreLastSessionModal';
|
|
34
34
|
import { SessionRestoreCard } from './SessionRestoreCard';
|
|
35
|
+
export const isSessionFromCurrentAuthCycle = (sessionItem, currentLoginStartTime) => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
if (isEmpty(sessionItem) || !currentLoginStartTime)
|
|
38
|
+
return true;
|
|
39
|
+
const sessionModifiedTime = Date.parse((_b = (_a = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.session) === null || _a === void 0 ? void 0 : _a.modifiedDate) !== null && _b !== void 0 ? _b : '');
|
|
40
|
+
if (Number.isNaN(sessionModifiedTime))
|
|
41
|
+
return true;
|
|
42
|
+
return sessionModifiedTime >= currentLoginStartTime;
|
|
43
|
+
};
|
|
35
44
|
export function SessionRestore(props) {
|
|
45
|
+
var _a;
|
|
36
46
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
37
47
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
38
48
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
@@ -45,7 +55,7 @@ export function SessionRestore(props) {
|
|
|
45
55
|
ABTestVariation: state.ABTestVariation,
|
|
46
56
|
}), isEqual);
|
|
47
57
|
const caseDispatch = useCaseDispatch();
|
|
48
|
-
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, referrerUrl }, } = useContext(GlobalMetadataStateContext);
|
|
58
|
+
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, referrerUrl, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
49
59
|
const queryParamsFromUrl = RouteUtils.getQueryParams(props.routeProps);
|
|
50
60
|
const currentUrlSeSessionId = queryParamsFromUrl.seSessionId;
|
|
51
61
|
const previousUrlSeSessionId = usePrevious(currentUrlSeSessionId);
|
|
@@ -55,6 +65,7 @@ export function SessionRestore(props) {
|
|
|
55
65
|
const previousActiveSessionId = usePrevious(sessionRestore.activeSessionId);
|
|
56
66
|
const isFirstMountRef = useRef(true);
|
|
57
67
|
const { getMetadata } = useMetadata();
|
|
68
|
+
const currentLoginStartTime = ((_a = loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.iat) !== null && _a !== void 0 ? _a : 0) * 1000;
|
|
58
69
|
/**
|
|
59
70
|
* Fetching previous sessions on load
|
|
60
71
|
*/
|
|
@@ -90,8 +101,9 @@ export function SessionRestore(props) {
|
|
|
90
101
|
}
|
|
91
102
|
const currentRelevantSession = getRelevantSessionFromSessions(sessionRestoreDispatch, currentUrlSeSessionId, sessionRestore.previousSessions.data, caseDetails);
|
|
92
103
|
const relevantSession = sessionRestore.previousSessions.data[currentRelevantSession];
|
|
104
|
+
const canReuseRelevantSession = !isEmpty(relevantSession) && isSessionFromCurrentAuthCycle(relevantSession, currentLoginStartTime);
|
|
93
105
|
const setSession = () => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const needsNewSessionId = hasProductVersionOrSummary &&
|
|
106
|
+
const needsNewSessionId = hasProductVersionOrSummary && !canReuseRelevantSession;
|
|
95
107
|
if (needsNewSessionId) {
|
|
96
108
|
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
97
109
|
const userAgentAB = userAgent + (isEqual(ABTestVariation, 'A') ? '-A-1' : '-B-1');
|
|
@@ -105,7 +117,7 @@ export function SessionRestore(props) {
|
|
|
105
117
|
yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase(caseDetails, selectedNotificationContacts), session);
|
|
106
118
|
}
|
|
107
119
|
}
|
|
108
|
-
else if (
|
|
120
|
+
else if (canReuseRelevantSession) {
|
|
109
121
|
// Checking if session needs to be restored based on found relevant session
|
|
110
122
|
// Found relevent session is not same as activeSessionId and is not being restored
|
|
111
123
|
if (currentRelevantSession !== sessionRestore.activeSessionId && !isRestoring) {
|
|
@@ -114,6 +126,9 @@ export function SessionRestore(props) {
|
|
|
114
126
|
}
|
|
115
127
|
else if (isEmpty(relevantSession) && !isEmpty(currentUrlSeSessionId)) {
|
|
116
128
|
updateActiveSessionId(sessionRestoreDispatch, undefined);
|
|
129
|
+
const currentParams = RouteUtils.getQueryParams(props.routeProps);
|
|
130
|
+
delete currentParams.seSessionId;
|
|
131
|
+
RouteUtils.updateQueryParams(props.routeProps, currentParams, true);
|
|
117
132
|
}
|
|
118
133
|
});
|
|
119
134
|
setSession();
|
|
@@ -283,6 +298,7 @@ export function SessionRestore(props) {
|
|
|
283
298
|
if (sessionItem.session.id !== sessionRestore.activeSessionId &&
|
|
284
299
|
sessionItem.session.isActive &&
|
|
285
300
|
!sessionItem.session.isResolved &&
|
|
301
|
+
isSessionFromCurrentAuthCycle(sessionItem, currentLoginStartTime) &&
|
|
286
302
|
sessionItem.sessionDetails.summary &&
|
|
287
303
|
sessionItem.sessionDetails.product) {
|
|
288
304
|
previousSessions.push(sessionItem);
|
|
@@ -295,6 +311,7 @@ export function SessionRestore(props) {
|
|
|
295
311
|
var _a, _b, _c, _d, _e, _f;
|
|
296
312
|
return s.session.isActive &&
|
|
297
313
|
!s.session.isResolved &&
|
|
314
|
+
isSessionFromCurrentAuthCycle(s, currentLoginStartTime) &&
|
|
298
315
|
s.session.id !== sessionRestore.activeSessionId &&
|
|
299
316
|
((!isEmpty(caseDetails.product) && caseDetails.product === s.sessionDetails.product) ||
|
|
300
317
|
includes(((_a = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.summary) !== null && _a !== void 0 ? _a : '').toLowerCase(), ((_c = (_b = s === null || s === void 0 ? void 0 : s.sessionDetails) === null || _b === void 0 ? void 0 : _b.summary) !== null && _c !== void 0 ? _c : '').toLowerCase()) ||
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface IProps {
|
|
3
3
|
onChatWithAIClick?: () => void;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
onToggleExpanded?: (value: boolean | ((prev: boolean) => boolean)) => void;
|
|
4
6
|
}
|
|
5
|
-
export declare const AskRedHat: ({ onChatWithAIClick }: IProps) => React.JSX.Element;
|
|
7
|
+
export declare const AskRedHat: ({ onChatWithAIClick, isExpanded: isExpandedProp, onToggleExpanded }: IProps) => React.JSX.Element;
|
|
6
8
|
export {};
|
|
7
9
|
//# sourceMappingURL=AskRedHat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAmChF,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAmChF,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,CAAC;CAC9E;AAED,eAAO,MAAM,SAAS,GAAI,qEAAqE,MAAM,sBA2iBpG,CAAC"}
|
|
@@ -44,10 +44,12 @@ const getSessResFromAISources = (sources, visibilityStatus) => {
|
|
|
44
44
|
return;
|
|
45
45
|
return sources.map((source, index) => getSessResFromARHSource(source, visibilityStatus, index + 1));
|
|
46
46
|
};
|
|
47
|
-
export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
47
|
+
export const AskRedHat = ({ onChatWithAIClick, isExpanded: isExpandedProp, onToggleExpanded }) => {
|
|
48
48
|
var _a, _b, _c, _d;
|
|
49
49
|
const { t } = useTranslation();
|
|
50
|
-
const [
|
|
50
|
+
const [isExpandedLocal, setIsExpandedLocal] = useState(false);
|
|
51
|
+
const isExpanded = onToggleExpanded ? isExpandedProp !== null && isExpandedProp !== void 0 ? isExpandedProp : false : isExpandedLocal;
|
|
52
|
+
const setIsExpanded = onToggleExpanded !== null && onToggleExpanded !== void 0 ? onToggleExpanded : setIsExpandedLocal;
|
|
51
53
|
const [showFeedbackCard, setShowFeedbackCard] = useState(false);
|
|
52
54
|
const [showFeedbackComplete, setShowFeedbackComplete] = useState(false);
|
|
53
55
|
const [feedbackType, setFeedbackType] = useState('');
|
|
@@ -246,15 +248,10 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
246
248
|
React.createElement(Icon, { iconSize: "lg", status: "danger", className: "pf-v6-u-mr-sm" },
|
|
247
249
|
React.createElement(ExclamationCircleIcon, null)),
|
|
248
250
|
' ',
|
|
249
|
-
"Chat limit reached"),
|
|
251
|
+
React.createElement(Trans, null, "Chat limit reached")),
|
|
250
252
|
React.createElement(EmptyStateBody, null,
|
|
251
253
|
React.createElement(Content, { component: ContentVariants.p },
|
|
252
|
-
"You've reached the maximum number of chats. You can start up to",
|
|
253
|
-
' ',
|
|
254
|
-
aiResponseState.quotaLimit,
|
|
255
|
-
" chats within a",
|
|
256
|
-
React.createElement("br", null),
|
|
257
|
-
"24-hour period. Please try again after your limit resets."))))));
|
|
254
|
+
React.createElement(Trans, { i18nKey: "You've reached the maximum number of chats. You can start up to {{quotaLimit}} chats within a <br/>24-hour period. Please try again after your limit resets.", values: { quotaLimit: aiResponseState.quotaLimit }, components: { br: React.createElement("br", null) } })))))));
|
|
258
255
|
}
|
|
259
256
|
if (aiResponseState.error) {
|
|
260
257
|
return (React.createElement("div", { className: "ask-redhat" },
|
|
@@ -326,7 +323,8 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
326
323
|
React.createElement("div", null,
|
|
327
324
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: parseMarkdown(answer) } }),
|
|
328
325
|
sourcesCount > 0 && (React.createElement(React.Fragment, null,
|
|
329
|
-
React.createElement("p", null,
|
|
326
|
+
React.createElement("p", null,
|
|
327
|
+
React.createElement(Trans, { i18nKey: "{{count}} sources", values: { count: sourcesCount } })),
|
|
330
328
|
React.createElement("div", { className: "ask-redhat-cards" }, sources.map((source, index) => (React.createElement(Card, { className: "ask-redhat-card", key: index },
|
|
331
329
|
React.createElement(CardHeader, null,
|
|
332
330
|
React.createElement("h3", { className: "ask-redhat-card-title" },
|
|
@@ -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;
|
|
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;AAKpG,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,CA0FlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|