@rh-support/troubleshoot 2.2.39 → 2.2.40-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts +7 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +10 -3
- package/lib/esm/components/Recommendations/InsightsResults.js +2 -2
- package/lib/esm/components/Recommendations/Recommendations.d.ts +3 -0
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +9 -2
- package/lib/esm/components/Recommendations/ShowRank.d.ts +12 -0
- package/lib/esm/components/Recommendations/ShowRank.d.ts.map +1 -0
- package/lib/esm/components/Recommendations/ShowRank.js +27 -0
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +10 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts +7 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +2 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +33 -4
- package/lib/esm/components/wizardLayout/WizardMain.js +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +2 -0
- package/lib/esm/reducers/CaseReducer.d.ts +1 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +9 -0
- package/lib/esm/reducers/RecommendationsReducer.d.ts +2 -1
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +28 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,mBAkBrC,CAAC"}
|
|
@@ -4,6 +4,6 @@ import React from 'react';
|
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
5
5
|
export const ContactPhoneNumberPopOver = () => {
|
|
6
6
|
return (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
|
|
7
|
-
React.createElement(Trans, null, "
|
|
7
|
+
React.createElement(Trans, null, "When you change the phone number, it affects both this case and your contact info in the Red Hat support system.")), closeBtnAriaLabel: "Close" },
|
|
8
8
|
React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Contact Phone Number Info" })));
|
|
9
9
|
};
|
|
@@ -52,5 +52,5 @@ export default function ProductSelector(props) {
|
|
|
52
52
|
React.createElement(EARuleWidget, null)),
|
|
53
53
|
React.createElement("div", { className: "suggestions-result-section" },
|
|
54
54
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
|
|
55
|
-
React.createElement(Recommendations,
|
|
55
|
+
React.createElement(Recommendations, { routeProps: props.routeProps })))))))));
|
|
56
56
|
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
2
|
+
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
3
|
+
interface IProps {
|
|
4
|
+
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
5
|
+
}
|
|
6
|
+
export declare function AsideResults(props: IProps): JSX.Element;
|
|
7
|
+
export {};
|
|
2
8
|
//# sourceMappingURL=AsideResults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAWtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eAoNzC"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { pcm, search } from '@cee-eng/hydrajs';
|
|
11
11
|
import { useDebounce } from '@rh-support/components';
|
|
12
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
13
|
import { computeRecommendationAbstract, computeRecommendationTitle, getSolrParams, PreviousCaseTypes, replaceHighlightingData, } from '@rh-support/utils';
|
|
13
14
|
import isEmpty from 'lodash/isEmpty';
|
|
14
15
|
import isEqual from 'lodash/isEqual';
|
|
@@ -24,12 +25,14 @@ import { RecommendationsConstants } from '../../reducers/RecommendationsReducer'
|
|
|
24
25
|
import { showSidebarRecommendationsSections } from '../../reducers/RouteConstNTypes';
|
|
25
26
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
26
27
|
import RouteUtils from '../../utils/routeUtils';
|
|
28
|
+
import { ShowRank } from './ShowRank';
|
|
27
29
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
28
|
-
export function AsideResults() {
|
|
30
|
+
export function AsideResults(props) {
|
|
29
31
|
/*
|
|
30
32
|
* Sidebar recommendation logic
|
|
31
33
|
*/
|
|
32
|
-
const {
|
|
34
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
35
|
+
const { isSelectedAccounntSecureSupport, product, version, caseResourceLinks, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, isFetchingRecommendationsFromWatsonX, } = useCaseSelector((state) => ({
|
|
33
36
|
isSelectedAccounntSecureSupport: state.selectedAccountDetails.data.secureSupport,
|
|
34
37
|
product: state.caseDetails.product,
|
|
35
38
|
version: state.caseDetails.version,
|
|
@@ -40,6 +43,7 @@ export function AsideResults() {
|
|
|
40
43
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
41
44
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
42
45
|
caseType: state.caseDetails.caseType,
|
|
46
|
+
isFetchingRecommendationsFromWatsonX: state.isFetchingRecommendationsFromWatsonX,
|
|
43
47
|
}), isEqual);
|
|
44
48
|
const caseDispatch = useCaseDispatch();
|
|
45
49
|
// getting recommendation dispatch and state via context
|
|
@@ -75,7 +79,9 @@ export function AsideResults() {
|
|
|
75
79
|
const queryFilters = {
|
|
76
80
|
id: { values: recommendationState.insightsKcsIds, exclude: true },
|
|
77
81
|
};
|
|
78
|
-
const response =
|
|
82
|
+
const response = isFetchingRecommendationsFromWatsonX && !loggedInUsersAccount.data.secureSupport
|
|
83
|
+
? yield search.getWatsonXRecommendationsForCase(payload, controllerRef.current.signal)
|
|
84
|
+
: yield search.getRecommendationsForCase(payload, getSolrParams(PAGE_SIZE, 129, queryFilters), controllerRef.current.signal);
|
|
79
85
|
const sideDocs = replaceHighlightingData(response.response.docs, response.highlighting);
|
|
80
86
|
recommendationDispatch({
|
|
81
87
|
type: RecommendationsConstants.receiveSidebarRecommendation,
|
|
@@ -136,6 +142,7 @@ export function AsideResults() {
|
|
|
136
142
|
return (React.createElement("li", { className: "result", key: doc.id },
|
|
137
143
|
React.createElement("header", { className: "result-header" },
|
|
138
144
|
React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS_ASIDE]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS_ASIDE)}`, className: "se-recommended ts-result-aside", "data-tracking-id": `se-recommended-sidebar-recommendations-${index}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, index), dangerouslySetInnerHTML: computeRecommendationTitle(doc) })),
|
|
145
|
+
isFetchingRecommendationsFromWatsonX && (React.createElement(ShowRank, { index: index, originalRank: doc.original_rank, routeProps: props.routeProps })),
|
|
139
146
|
React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
|
|
140
147
|
})))));
|
|
141
148
|
}
|
|
@@ -87,7 +87,7 @@ function InsightsResults(props) {
|
|
|
87
87
|
payload: { isRuleModalVisible: isVisible },
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function fetchFileRecommendations(localFile) {
|
|
91
91
|
var _a, _b, _c;
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
const analysisResults = (_a = localFile === null || localFile === void 0 ? void 0 : localFile.analysisMetadata) === null || _a === void 0 ? void 0 : _a.analysisResults;
|
|
@@ -190,7 +190,7 @@ function InsightsResults(props) {
|
|
|
190
190
|
!(insightResultsMap[localFile.attachmentId] || recommendedResultsMap[localFile.attachmentId]) &&
|
|
191
191
|
isAnalysisComplete(localFile.analysisMetadata.analysisStatus) &&
|
|
192
192
|
((_b = (_a = localFile.analysisMetadata.analysisResults) === null || _a === void 0 ? void 0 : _a.kcs_ids) !== null && _b !== void 0 ? _b : []).length > 0 &&
|
|
193
|
-
|
|
193
|
+
fetchFileRecommendations(localFile);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
2
|
+
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
1
3
|
interface IProps {
|
|
4
|
+
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
2
5
|
}
|
|
3
6
|
export default function Recommendations(props: IProps): JSX.Element;
|
|
4
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eA6PpD"}
|
|
@@ -16,10 +16,11 @@ import { RouteContext } from '../../context/RouteContext';
|
|
|
16
16
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
17
17
|
import { getRecommendationObject } from '../../reducers/CaseHelpers';
|
|
18
18
|
import { setCaseRecommendations } from '../../reducers/CaseReducer';
|
|
19
|
-
import { fetchRecommendations, RecommendationsConstants, setCurrentPage, setVisibleDocs, } from '../../reducers/RecommendationsReducer';
|
|
19
|
+
import { fetchRecommendations, fetchWatsonXRecommendations, RecommendationsConstants, setCurrentPage, setVisibleDocs, } from '../../reducers/RecommendationsReducer';
|
|
20
20
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
21
21
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
22
22
|
import RouteUtils from '../../utils/routeUtils';
|
|
23
|
+
import { ShowRank } from './ShowRank';
|
|
23
24
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
24
25
|
export default function Recommendations(props) {
|
|
25
26
|
var _a, _b, _c;
|
|
@@ -34,6 +35,9 @@ export default function Recommendations(props) {
|
|
|
34
35
|
// Use Case Number
|
|
35
36
|
const { caseNumber } = useParams();
|
|
36
37
|
const { globalMetadataState: { navBarRef, loggedInUsersAccount }, } = useGlobalStateContext();
|
|
38
|
+
const { isFetchingRecommendationsFromWatsonX } = useCaseSelector((state) => ({
|
|
39
|
+
isFetchingRecommendationsFromWatsonX: state.isFetchingRecommendationsFromWatsonX,
|
|
40
|
+
}), isEqual);
|
|
37
41
|
const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
|
|
38
42
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
39
43
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
@@ -79,7 +83,9 @@ export default function Recommendations(props) {
|
|
|
79
83
|
// recreate a new AbortController for each call
|
|
80
84
|
let controller = new AbortController();
|
|
81
85
|
abortControllerRef.current = controller;
|
|
82
|
-
|
|
86
|
+
isFetchingRecommendationsFromWatsonX && !loggedInUsersAccount.data.secureSupport
|
|
87
|
+
? fetchWatsonXRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, caseNumber, isSecureSupportAccount, queryFilters, controller.signal)
|
|
88
|
+
: fetchRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, caseNumber, isSecureSupportAccount, queryFilters, controller.signal);
|
|
83
89
|
}, [
|
|
84
90
|
activeSection,
|
|
85
91
|
environment,
|
|
@@ -142,6 +148,7 @@ export default function Recommendations(props) {
|
|
|
142
148
|
React.createElement("span", { className: "meta" }, doc.documentKind),
|
|
143
149
|
React.createElement("span", { className: "list-separator" }, "\u2013"),
|
|
144
150
|
React.createElement("time", { className: "moment_date meta", title: doc.lastModifiedDate.toString() }, formatDate(doc.lastModifiedDate)))),
|
|
151
|
+
isFetchingRecommendationsFromWatsonX && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps, perPage: recPageSize, pageNo: recommendationState.currentPage })),
|
|
145
152
|
React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 300) })));
|
|
146
153
|
})),
|
|
147
154
|
recommendationState.numFound !== 0 && recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
2
|
+
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
3
|
+
interface IProps {
|
|
4
|
+
index: number;
|
|
5
|
+
originalRank: number;
|
|
6
|
+
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
7
|
+
perPage?: number;
|
|
8
|
+
pageNo?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function ShowRank(props: IProps): JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ShowRank.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShowRank.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ShowRank.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAuBrC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import RouteUtils from '../../utils/routeUtils';
|
|
4
|
+
export function ShowRank(props) {
|
|
5
|
+
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
6
|
+
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
7
|
+
const rerankingFromUrl = urlQueryParams.reranking;
|
|
8
|
+
const isShowRerankingForInternalUsers = rerankingFromUrl === 'true' || rerankingFromUrl === 'false';
|
|
9
|
+
const getCurrentRank = () => {
|
|
10
|
+
if (props.perPage && props.pageNo) {
|
|
11
|
+
return props.perPage * (props.pageNo - 1) + props.index + 1;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return props.index + 1;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
if (!loggedInUserRights.data.isInternal() || !isShowRerankingForInternalUsers)
|
|
18
|
+
return React.createElement(React.Fragment, null);
|
|
19
|
+
return (React.createElement("div", { className: "result-body" },
|
|
20
|
+
React.createElement("strong", null, "New rank:"),
|
|
21
|
+
" ",
|
|
22
|
+
getCurrentRank(),
|
|
23
|
+
" ",
|
|
24
|
+
React.createElement("strong", null, "Old rank:"),
|
|
25
|
+
" ",
|
|
26
|
+
props.originalRank));
|
|
27
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAgBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAgBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA6U3C"}
|
|
@@ -35,12 +35,13 @@ export function SessionRestore(props) {
|
|
|
35
35
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
36
36
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
37
37
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
38
|
-
const { selectedNotificationContacts, cepDetails, caseDetails, caseCreation500ErrorStatus } = useCaseSelector((state) => ({
|
|
38
|
+
const { selectedNotificationContacts, cepDetails, caseDetails, caseCreation500ErrorStatus, isFetchingRecommendationsFromWatsonX, } = useCaseSelector((state) => ({
|
|
39
39
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
40
40
|
cepDetails: state.cepDetails,
|
|
41
41
|
selectedNotificationContacts: state.selectedNotificationContacts,
|
|
42
42
|
caseDetails: state.caseDetails,
|
|
43
43
|
caseCreation500ErrorStatus: state.caseCreation500ErrorStatus,
|
|
44
|
+
isFetchingRecommendationsFromWatsonX: state.isFetchingRecommendationsFromWatsonX, //use this here bool
|
|
44
45
|
}), isEqual);
|
|
45
46
|
const caseDispatch = useCaseDispatch();
|
|
46
47
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, referrerUrl }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -78,8 +79,9 @@ export function SessionRestore(props) {
|
|
|
78
79
|
const needsNewSessionId = hasProductVersionOrSummary && isEmpty(relevantSession);
|
|
79
80
|
if (needsNewSessionId) {
|
|
80
81
|
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
82
|
+
const userAgentAB = userAgent + (isFetchingRecommendationsFromWatsonX ? '-A-1' : '-B-1');
|
|
81
83
|
let session = {
|
|
82
|
-
userAgent,
|
|
84
|
+
userAgent: userAgentAB,
|
|
83
85
|
originatingSystem: userAgent,
|
|
84
86
|
referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
|
|
85
87
|
};
|
|
@@ -130,7 +132,12 @@ export function SessionRestore(props) {
|
|
|
130
132
|
: !isEmpty(existingUserAgent) && existingUserAgent !== userAgent
|
|
131
133
|
? existingUserAgent
|
|
132
134
|
: userAgent;
|
|
133
|
-
|
|
135
|
+
const userAgentAB = userAgent + (isFetchingRecommendationsFromWatsonX ? '-A-1' : '-B-1');
|
|
136
|
+
let session = {
|
|
137
|
+
userAgent: userAgentAB,
|
|
138
|
+
originatingSystem,
|
|
139
|
+
caseCreationError: caseCreation500ErrorStatus,
|
|
140
|
+
};
|
|
134
141
|
// PCM-12337 - Moved the session patch call to submit case function in CaseReducer.ts
|
|
135
142
|
isEmpty(caseDetails.caseNumber) &&
|
|
136
143
|
updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, getSessionDetailsFromCase(caseDetails, selectedNotificationContacts), session);
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
2
|
+
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
3
|
+
interface IProps {
|
|
4
|
+
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
5
|
+
}
|
|
6
|
+
export default function SubmitCase(props: IProps): JSX.Element;
|
|
7
|
+
export {};
|
|
2
8
|
//# sourceMappingURL=SubmitCase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAQ,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,eAsT/C"}
|
|
@@ -24,7 +24,7 @@ import FileUploader from '../shared/fileUpload/FileUploader';
|
|
|
24
24
|
import { isUploadingAttachment } from '../shared/fileUpload/reducer/AttachmentHelper';
|
|
25
25
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
26
26
|
import Suggestions from '../Suggestions/Suggestions';
|
|
27
|
-
export default function SubmitCase() {
|
|
27
|
+
export default function SubmitCase(props) {
|
|
28
28
|
var _a;
|
|
29
29
|
const { entitlementSla, severity, caseType, version, versionsDetails, addNotifiedUserError, isCreatingCase, caseCreationError, caseCreationErrorMessage, selectedAccountDetails, caseNoOfCreatedCase, product, screenSessionRequested, } = useCaseSelector((state) => ({
|
|
30
30
|
entitlementSla: state.caseDetails.entitlementSla,
|
|
@@ -143,6 +143,6 @@ export default function SubmitCase() {
|
|
|
143
143
|
React.createElement("div", { className: isIdea ? 'pf-u-mt-lg' : '' },
|
|
144
144
|
React.createElement(InsightsResults, { isDisplayOnMain: true })),
|
|
145
145
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsModal: false }))),
|
|
146
|
-
React.createElement("div", { className: "pf-u-mt-lg" }, isIdea ? (React.createElement(AsideResults,
|
|
146
|
+
React.createElement("div", { className: "pf-u-mt-lg" }, isIdea ? (React.createElement(AsideResults, { routeProps: props.routeProps })) : (!isEmpty(topContent.data) &&
|
|
147
147
|
isNotAnIdea && (React.createElement(Suggestions, { title: isIdea ? t('Search recommendations') : t('Product recommendations'), showTitleDescription: true, showMax: 6 })))))))));
|
|
148
148
|
}
|
|
@@ -32,7 +32,7 @@ function WizardAside(props) {
|
|
|
32
32
|
canshowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
33
33
|
React.createElement(InsightsResults, null),
|
|
34
34
|
" ",
|
|
35
|
-
!(isIdea && activeSection === 'submit-case') && React.createElement(AsideResults,
|
|
35
|
+
!(isIdea && activeSection === 'submit-case') && React.createElement(AsideResults, { routeProps: props.routeProps }),
|
|
36
36
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
37
37
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget }),
|
|
38
38
|
canUseSessionManagement && !isCreatingCase && React.createElement(SessionRestore, { routeProps: props.routeProps }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eAuLzC"}
|
|
@@ -11,15 +11,16 @@ import { Grid, GridItem } from '@patternfly/react-core';
|
|
|
11
11
|
import { SupportFeedbackForm } from '@rh-support/components';
|
|
12
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
13
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
|
|
14
|
+
import { getConfigField, getVersionIfOnlyVersion, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent, PreviousCaseTypes, trafficSplit, } from '@rh-support/utils';
|
|
15
15
|
import findIndex from 'lodash/findIndex';
|
|
16
|
+
import isEmpty from 'lodash/isEmpty';
|
|
16
17
|
import isEqual from 'lodash/isEqual';
|
|
17
|
-
import React, { useContext, useRef, useState } from 'react';
|
|
18
|
+
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
18
19
|
import { Trans } from 'react-i18next';
|
|
19
20
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
21
|
import { RouteContext } from '../../context/RouteContext';
|
|
21
22
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
22
|
-
import { submitCase } from '../../reducers/CaseReducer';
|
|
23
|
+
import { setFetchingRecommendationsFromWatsonXFlag, submitCase } from '../../reducers/CaseReducer';
|
|
23
24
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
24
25
|
import RouteUtils from '../../utils/routeUtils';
|
|
25
26
|
import PreCaseConfirmationModals, { PreCaseConfirmationModalsEnum, } from '../ConfirmationModals/PreCaseConfirmationModals';
|
|
@@ -36,12 +37,40 @@ export function WizardLayout(props) {
|
|
|
36
37
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
37
38
|
const caseDispatch = useCaseDispatch();
|
|
38
39
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
39
|
-
const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
40
|
+
const { globalMetadataState: { allProducts, loggedInUser, loggedInUserRights, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
40
41
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
41
42
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
42
43
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
43
44
|
const [confirmationModalType, setConfirmationModalType] = useState(null);
|
|
44
45
|
const viewedConfirmationModalsList = useRef([]);
|
|
46
|
+
const isWatsonXEnabled = getConfigField(pcmConfig.data, 'isWatsonxEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
47
|
+
const testVariationWeight = getConfigField(pcmConfig.data, 'testVariationWeightZeroToTen', PCM_CONFIG_FIELD_TYPE.NUMBER);
|
|
48
|
+
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
49
|
+
const rerankingFromUrl = urlQueryParams.reranking;
|
|
50
|
+
const isShowRerankingForInternalUsers = (rerankingFromUrl === 'true' || rerankingFromUrl === 'false') && loggedInUserRights.data.isInternal();
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (isEmpty(activeSessionId) || !isWatsonXEnabled || !testVariationWeight)
|
|
53
|
+
return;
|
|
54
|
+
if (isShowRerankingForInternalUsers && rerankingFromUrl === 'true') {
|
|
55
|
+
setFetchingRecommendationsFromWatsonXFlag(caseDispatch, true);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (isShowRerankingForInternalUsers && rerankingFromUrl === 'false') {
|
|
59
|
+
setFetchingRecommendationsFromWatsonXFlag(caseDispatch, false);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const sessionItem = previousSessions.data[activeSessionId];
|
|
63
|
+
trafficSplit(testVariationWeight, sessionItem.session.createdDate) === 'A' &&
|
|
64
|
+
setFetchingRecommendationsFromWatsonXFlag(caseDispatch, true);
|
|
65
|
+
}, [
|
|
66
|
+
caseDispatch,
|
|
67
|
+
isWatsonXEnabled,
|
|
68
|
+
activeSessionId,
|
|
69
|
+
previousSessions,
|
|
70
|
+
testVariationWeight,
|
|
71
|
+
isShowRerankingForInternalUsers,
|
|
72
|
+
rerankingFromUrl,
|
|
73
|
+
]);
|
|
45
74
|
const closeROCMProductModal = () => {
|
|
46
75
|
const productName = 'OpenShift Container Platform';
|
|
47
76
|
// if user click on Cancel then change product selection.
|
|
@@ -23,7 +23,7 @@ function WizardMain(props) {
|
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const renderSubmitCasePage = () => (React.createElement(MainSection, { section: AppRouteSections.SUBMIT_CASE, title: t('Case has been submitted'), isLoading: isCreatingCase, description: t("We'll be in contact with you shortly. Look for updates on this case."), className: "case-submit-page" },
|
|
25
25
|
React.createElement(Suspense, { fallback: React.createElement(LoadingIndicator, { size: "sm" }) },
|
|
26
|
-
React.createElement(SubmitCase,
|
|
26
|
+
React.createElement(SubmitCase, { routeProps: props.routeProps }))));
|
|
27
27
|
const onNext = (step) => {
|
|
28
28
|
RouteUtils.navigateToSection(props.routeProps, `${props.routeProps.location.pathname}/${step.id}`, false);
|
|
29
29
|
};
|
|
@@ -155,7 +155,8 @@ export declare enum CaseReducerConstants {
|
|
|
155
155
|
updateEmailList = "updateEmailList",
|
|
156
156
|
getVersionDetails = "getVersionDetails",
|
|
157
157
|
caseCreation500ErrorStatus = "caseCreation500ErrorStatus",
|
|
158
|
-
resetCaseNoOfCreatedCase = "resetCaseNoOfCreatedCase"
|
|
158
|
+
resetCaseNoOfCreatedCase = "resetCaseNoOfCreatedCase",
|
|
159
|
+
setFetchingRecommendationsFromWatsonXFlag = "setFetchingRecommendationsFromWatsonXFlag"
|
|
159
160
|
}
|
|
160
161
|
export declare const initialCaseState: ICaseState;
|
|
161
162
|
export interface ICaseState {
|
|
@@ -202,6 +203,7 @@ export interface ICaseState {
|
|
|
202
203
|
isCaseOwnerUpdating: boolean;
|
|
203
204
|
isFileRecommendationsTriggered?: boolean;
|
|
204
205
|
caseNoOfCreatedCase?: string;
|
|
206
|
+
isFetchingRecommendationsFromWatsonX: boolean;
|
|
205
207
|
}
|
|
206
208
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
207
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,mCAAmC,MAAM,CAAC;AACvD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAC9C,eAAO,MAAM,iCAAiC,QAAQ,CAAC;AACvD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,uBAAu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,CAAC,UAAU,EAAE,CAAC,CAAC;IAC1D,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC;IAC7E,kBAAkB,EAAE,mBAAmB,CAAC,YAAY,EAAE,CAAC,CAAC;IACxD,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oCAAoC,EAAE,OAAO,CAAC;IAC9C,sCAAsC,EAAE,OAAO,CAAC;IAChD,eAAe,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oCAAoC,EAAE,OAAO,CAAC;CACjD;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,oBAAY,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
|
|
@@ -106,6 +106,7 @@ export var CaseReducerConstants;
|
|
|
106
106
|
CaseReducerConstants["getVersionDetails"] = "getVersionDetails";
|
|
107
107
|
CaseReducerConstants["caseCreation500ErrorStatus"] = "caseCreation500ErrorStatus";
|
|
108
108
|
CaseReducerConstants["resetCaseNoOfCreatedCase"] = "resetCaseNoOfCreatedCase";
|
|
109
|
+
CaseReducerConstants["setFetchingRecommendationsFromWatsonXFlag"] = "setFetchingRecommendationsFromWatsonXFlag";
|
|
109
110
|
})(CaseReducerConstants || (CaseReducerConstants = {}));
|
|
110
111
|
export const initialCaseState = {
|
|
111
112
|
isCreatingCase: false,
|
|
@@ -196,6 +197,7 @@ export const initialCaseState = {
|
|
|
196
197
|
isCaseOwnerUpdating: false,
|
|
197
198
|
isFileRecommendationsTriggered: false,
|
|
198
199
|
caseNoOfCreatedCase: '',
|
|
200
|
+
isFetchingRecommendationsFromWatsonX: false,
|
|
199
201
|
};
|
|
200
202
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
201
203
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -12,6 +12,7 @@ export declare const caseReducer: (pState: ICaseState, action: any) => ICaseStat
|
|
|
12
12
|
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<ICasePayload>) => void;
|
|
13
13
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
14
14
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
15
|
+
export declare const setFetchingRecommendationsFromWatsonXFlag: (dispatch: CaseReducerDispatchType, isFetchingRecommendationsFromWatsonX: boolean) => void;
|
|
15
16
|
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport?: boolean) => Promise<void>;
|
|
16
17
|
/**
|
|
17
18
|
* Update case details if there is HTTP 500 error while submitting case
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer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uB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
|
|
@@ -61,6 +61,9 @@ export const caseReducer = (pState, action) => {
|
|
|
61
61
|
case CaseReducerConstants.resetCaseNoOfCreatedCase: {
|
|
62
62
|
return Object.assign(Object.assign({}, pState), { caseNoOfCreatedCase: action.payload.caseNoOfCreatedCase });
|
|
63
63
|
}
|
|
64
|
+
case CaseReducerConstants.setFetchingRecommendationsFromWatsonXFlag: {
|
|
65
|
+
return Object.assign(Object.assign({}, pState), { isFetchingRecommendationsFromWatsonX: action.payload.isFetchingRecommendationsFromWatsonX });
|
|
66
|
+
}
|
|
64
67
|
case CaseReducerConstants.setCaseCreationError: {
|
|
65
68
|
return Object.assign(Object.assign({}, pState), { isCreatingCase: false, caseCreationError: true, caseCreationErrorMessage: action.payload.caseCreationErrorMessage });
|
|
66
69
|
}
|
|
@@ -153,6 +156,12 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
153
156
|
payload: { selectedNotificationContacts },
|
|
154
157
|
});
|
|
155
158
|
};
|
|
159
|
+
export const setFetchingRecommendationsFromWatsonXFlag = (dispatch, isFetchingRecommendationsFromWatsonX) => {
|
|
160
|
+
dispatch({
|
|
161
|
+
type: CaseReducerConstants.setFetchingRecommendationsFromWatsonXFlag,
|
|
162
|
+
payload: { isFetchingRecommendationsFromWatsonX: isFetchingRecommendationsFromWatsonX },
|
|
163
|
+
});
|
|
164
|
+
};
|
|
156
165
|
export const submitCase = (dispatch, sessionRestoreDispatch, caseDetails, sessionItem, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false) => __awaiter(void 0, void 0, void 0, function* () {
|
|
157
166
|
var _a;
|
|
158
167
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRecommendationsPayload } from '@cee-eng/hydrajs/@types/api/search';
|
|
1
|
+
import { IRecommendationsPayload, ISearchWatsonXQuery } from '@cee-eng/hydrajs/@types/api/search';
|
|
2
2
|
import { Highlighting, ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
3
3
|
import { IAction } from '@rh-support/types/shared';
|
|
4
4
|
import { IRecommendationAdditionalFilters } from '@rh-support/utils';
|
|
@@ -32,6 +32,7 @@ export declare enum RecommendationsConstants {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const recommandationsReducer: (state: IRecommendationsState, action: IActionType) => IRecommendationsState;
|
|
34
34
|
export declare const fetchRecommendations: (dispatch: RecommendationsReducerDispatchType, body: IRecommendationsPayload, max_rows: number, page_size: number, highlighted_fragment_size: number, seQueryFields: boolean, caseNumber: string, isSecureSupportAccount: boolean, additionalFilters?: IRecommendationAdditionalFilters, abortSignal?: AbortSignal) => Promise<void>;
|
|
35
|
+
export declare const fetchWatsonXRecommendations: (dispatch: RecommendationsReducerDispatchType, query: ISearchWatsonXQuery, max_rows: number, page_size: number, highlighted_fragment_size: number, seQueryFields: boolean, caseNumber: string, isSecureSupportAccount: boolean, additionalFilters?: IRecommendationAdditionalFilters, abortSignal?: AbortSignal) => Promise<void>;
|
|
35
36
|
export declare const setVisibleDocs: (dispatch: RecommendationsReducerDispatchType, visDocs: ISolrRecommendation[]) => void;
|
|
36
37
|
export declare const setCurrentPage: (dispatch: RecommendationsReducerDispatchType, pageNum: number) => void;
|
|
37
38
|
export declare const setInsighResultsKcsIds: (dispatch: RecommendationsReducerDispatchType, insightsKcsIds: string[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAiB,gCAAgC,EAA2B,MAAM,mBAAmB,CAAC;AAE7G,aAAK,WAAW,GAAG,OAAO,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAC5E,oBAAY,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,MAAM,WAAW,qBAAqB;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,6BAA6B,EAAE,OAAO,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;CACpD;AAED,eAAO,MAAM,2BAA2B,EAAE,qBAYzC,CAAC;AAEF,oBAAY,wBAAwB;IAChC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,4BAA4B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;CAChD;AAGD,eAAO,MAAM,sBAAsB,UAAW,qBAAqB,0BAAwB,qBAmD1F,CAAC;AAGF,eAAO,MAAM,oBAAoB,aACnB,kCAAkC,QACtC,uBAAuB,YACnB,MAAM,aACL,MAAM,6BACU,MAAM,sCAErB,MAAM,0BACM,OAAO,sBACX,gCAAgC,gBACtC,WAAW,kBAsC5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,aAC1B,kCAAkC,SACrC,mBAAmB,YAChB,MAAM,aACL,MAAM,6BACU,MAAM,sCAErB,MAAM,0BACM,OAAO,sBACX,gCAAgC,gBACtC,WAAW,kBAiC5B,CAAC;AAEF,eAAO,MAAM,cAAc,aAAc,kCAAkC,WAAW,mBAAmB,EAAE,SAE1G,CAAC;AAEF,eAAO,MAAM,cAAc,aAAc,kCAAkC,WAAW,MAAM,SAE3F,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,kCAAkC,kBAAkB,MAAM,EAAE,SAE5G,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAAc,kCAAkC,SAEhF,CAAC"}
|
|
@@ -85,7 +85,8 @@ export const fetchRecommendations = (dispatch, body, max_rows, page_size, highli
|
|
|
85
85
|
body.description = body.description && body.description.replace(/\?\?/g, '');
|
|
86
86
|
}
|
|
87
87
|
const searchParams = getSolrParams(max_rows, highlighted_fragment_size, additionalFilters, seQueryFields);
|
|
88
|
-
const response = yield search.getRecommendationsForCase(body, Object.assign(Object.assign({}, searchParams), { caseNumber,
|
|
88
|
+
const response = yield search.getRecommendationsForCase(body, Object.assign(Object.assign({}, searchParams), { caseNumber,
|
|
89
|
+
isSecureSupportAccount }), // Need to pass caseNumber and isSecureSupportAccount flag with SOLR parameter which will be used in service worker strategy.
|
|
89
90
|
abortSignal);
|
|
90
91
|
const docs = replaceHighlightingData(response.response.docs, response.highlighting);
|
|
91
92
|
dispatch({
|
|
@@ -101,6 +102,32 @@ export const fetchRecommendations = (dispatch, body, max_rows, page_size, highli
|
|
|
101
102
|
dispatch({ type: RecommendationsConstants.receivedRecommendationsError });
|
|
102
103
|
}
|
|
103
104
|
});
|
|
105
|
+
export const fetchWatsonXRecommendations = (dispatch, query, max_rows, page_size, highlighted_fragment_size, seQueryFields = false, caseNumber, isSecureSupportAccount, additionalFilters, abortSignal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
106
|
+
dispatch({
|
|
107
|
+
type: RecommendationsConstants.requestRecommendations,
|
|
108
|
+
payload: { prevRecommendationsBody: Object.assign({}, query) },
|
|
109
|
+
});
|
|
110
|
+
try {
|
|
111
|
+
if (query) {
|
|
112
|
+
query.summary = query.summary && query.summary.replace(/\?\?/g, '');
|
|
113
|
+
query.description = query.description && query.description.replace(/\?\?/g, '').slice(0, 8000); //limit to 8000
|
|
114
|
+
query.rerank = true;
|
|
115
|
+
}
|
|
116
|
+
const response = yield search.getWatsonXRecommendationsForCase(Object.assign(Object.assign({}, query), getSolrParams(max_rows, highlighted_fragment_size, additionalFilters, seQueryFields)), abortSignal);
|
|
117
|
+
const docs = replaceHighlightingData(response.response.docs, response.highlighting);
|
|
118
|
+
dispatch({
|
|
119
|
+
type: RecommendationsConstants.receivedRecommendations,
|
|
120
|
+
payload: {
|
|
121
|
+
allDocs: docs,
|
|
122
|
+
visibleDocs: docs.slice(0, page_size),
|
|
123
|
+
numFound: response.response.numFound,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
dispatch({ type: RecommendationsConstants.receivedRecommendationsError });
|
|
129
|
+
}
|
|
130
|
+
});
|
|
104
131
|
export const setVisibleDocs = (dispatch, visDocs) => {
|
|
105
132
|
dispatch({ type: RecommendationsConstants.setVisibleDocs, payload: { visibleDocs: visDocs } });
|
|
106
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACrD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UA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5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.16.
|
|
29
|
+
"@cee-eng/hydrajs": "4.16.43",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.196.7",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-virtualized": "^9.21.2"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@cee-eng/hydrajs": "4.16.
|
|
59
|
+
"@cee-eng/hydrajs": "4.16.43",
|
|
60
60
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
61
61
|
"@patternfly/patternfly": "4.196.7",
|
|
62
62
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"@patternfly/react-core": "4.264.0",
|
|
67
67
|
"@progress/kendo-drawing": "^1.6.0",
|
|
68
68
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
69
|
-
"@rh-support/components": "2.1.23",
|
|
70
|
-
"@rh-support/react-context": "2.1.25",
|
|
69
|
+
"@rh-support/components": "2.1.23-beta.1",
|
|
70
|
+
"@rh-support/react-context": "2.1.25-beta.1",
|
|
71
71
|
"@rh-support/types": "2.0.2",
|
|
72
|
-
"@rh-support/user-permissions": "2.1.17",
|
|
73
|
-
"@rh-support/utils": "2.1.11",
|
|
72
|
+
"@rh-support/user-permissions": "2.1.17-beta.1",
|
|
73
|
+
"@rh-support/utils": "2.1.11-beta.1",
|
|
74
74
|
"@types/react-redux": "^7.1.12",
|
|
75
75
|
"@types/redux": "^3.6.0",
|
|
76
76
|
"dompurify": "^2.4.1",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"defaults and supports es6-module",
|
|
134
134
|
"maintained node versions"
|
|
135
135
|
],
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "8c179f70b71ca5a120cf3c379daef67435e24533"
|
|
137
137
|
}
|