@rh-support/troubleshoot 2.2.59 → 2.2.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +1 -8
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -5
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +2 -12
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -6
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +4 -35
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +0 -7
- package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +0 -1
- package/lib/esm/reducers/CaseReducer.d.ts +0 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +0 -9
- package/lib/esm/scss/_pf-overrides.scss +2 -3
- package/package.json +12 -11
- package/lib/esm/components/Recommendations/ShowRank.d.ts +0 -12
- package/lib/esm/components/Recommendations/ShowRank.d.ts.map +0 -1
- package/lib/esm/components/Recommendations/ShowRank.js +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eA6fxC"}
|
|
@@ -34,7 +34,6 @@ import { PDFContext } from '../../PDFContainer';
|
|
|
34
34
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
35
35
|
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
36
36
|
export function PostComment(props) {
|
|
37
|
-
var _a;
|
|
38
37
|
const { t } = useTranslation();
|
|
39
38
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
40
39
|
let { caseNumber } = props;
|
|
@@ -78,10 +77,8 @@ export function PostComment(props) {
|
|
|
78
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
79
78
|
}, []);
|
|
80
79
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
81
|
-
const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
|
|
82
80
|
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
83
81
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
84
|
-
const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
|
|
85
82
|
const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
|
|
86
83
|
caseNumber,
|
|
87
84
|
secureSupport: loggedInUsersAccount.data.secureSupport,
|
|
@@ -315,10 +312,7 @@ export function PostComment(props) {
|
|
|
315
312
|
let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
|
|
316
313
|
return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
317
314
|
};
|
|
318
|
-
const isSubmitDisabled = isReplyDisabled() ||
|
|
319
|
-
isCommentEmpty ||
|
|
320
|
-
isPostCommentDisabled ||
|
|
321
|
-
(isConfirmedStateSideSupport && !cssCommentAgreed);
|
|
315
|
+
const isSubmitDisabled = isReplyDisabled() || isCommentEmpty || isPostCommentDisabled;
|
|
322
316
|
return (React.createElement("div", { className: `pf-v5-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
323
317
|
React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
|
|
324
318
|
? 'Add a comment using markdown'
|
|
@@ -334,7 +328,6 @@ export function PostComment(props) {
|
|
|
334
328
|
isUploadingFile: isMarkdownFileUploadInProgress,
|
|
335
329
|
onClipboardPaste,
|
|
336
330
|
} }),
|
|
337
|
-
isConfirmedStateSideSupport && (React.createElement(Checkbox, { id: "css-case-comment-agreement", name: "css-case-comment-agreement", className: "pf-v5-u-mt-md pf-v5-u-mb-xl", isRequired: true, label: t('I will not transmit controlled, unclassified information to or export it from the Red Hat Customer Portal.'), isChecked: cssCommentAgreed, onChange: (_, c) => setCssCommentAgreed(c) })),
|
|
338
331
|
isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
|
|
339
332
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
340
333
|
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eA6NzC"}
|
|
@@ -26,7 +26,6 @@ import { RecommendationsConstants } from '../../reducers/RecommendationsReducer'
|
|
|
26
26
|
import { showSidebarRecommendationsSections } from '../../reducers/RouteConstNTypes';
|
|
27
27
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
28
28
|
import RouteUtils from '../../utils/routeUtils';
|
|
29
|
-
import { ShowRank } from './ShowRank';
|
|
30
29
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
31
30
|
export function AsideResults(props) {
|
|
32
31
|
/*
|
|
@@ -34,7 +33,7 @@ export function AsideResults(props) {
|
|
|
34
33
|
*/
|
|
35
34
|
const { globalMetadataState: { loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
36
35
|
const isRerankEnabled = getConfigField(pcmConfig.data, 'isRerankEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
37
|
-
const { isSelectedAccounntSecureSupport, product, version, caseResourceLinks, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType,
|
|
36
|
+
const { isSelectedAccounntSecureSupport, product, version, caseResourceLinks, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, } = useCaseSelector((state) => ({
|
|
38
37
|
isSelectedAccounntSecureSupport: state.selectedAccountDetails.data.secureSupport,
|
|
39
38
|
product: state.caseDetails.product,
|
|
40
39
|
version: state.caseDetails.version,
|
|
@@ -45,7 +44,6 @@ export function AsideResults(props) {
|
|
|
45
44
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
46
45
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
47
46
|
caseType: state.caseDetails.caseType,
|
|
48
|
-
isFetchingRecommendationsFromWatsonX: state.isFetchingRecommendationsFromWatsonX,
|
|
49
47
|
}), isEqual);
|
|
50
48
|
const caseDispatch = useCaseDispatch();
|
|
51
49
|
// getting recommendation dispatch and state via context
|
|
@@ -81,7 +79,7 @@ export function AsideResults(props) {
|
|
|
81
79
|
const queryFilters = {
|
|
82
80
|
id: { values: recommendationState.insightsKcsIds, exclude: true },
|
|
83
81
|
};
|
|
84
|
-
const response =
|
|
82
|
+
const response = !loggedInUsersAccount.data.secureSupport
|
|
85
83
|
? yield search.getWatsonXRecommendationsForCase(Object.assign(Object.assign(Object.assign(Object.assign({ product: product, version: version }, ((payload === null || payload === void 0 ? void 0 : payload.summary) && {
|
|
86
84
|
summary: getTrimmedSpecialCharacters(payload.summary, WATSONX_SUMMARY_LIMIT),
|
|
87
85
|
})), ((payload === null || payload === void 0 ? void 0 : payload.description) && {
|
|
@@ -148,7 +146,6 @@ export function AsideResults(props) {
|
|
|
148
146
|
return (React.createElement("li", { className: "result", key: doc.id },
|
|
149
147
|
React.createElement("header", { className: "result-header" },
|
|
150
148
|
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) })),
|
|
151
|
-
isFetchingRecommendationsFromWatsonX && !isRerankEnabled && (React.createElement(ShowRank, { index: index, originalRank: doc.original_rank, routeProps: props.routeProps })),
|
|
152
149
|
React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 150) })));
|
|
153
150
|
})))));
|
|
154
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAUpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAmPpD"}
|
|
@@ -20,7 +20,6 @@ import { fetchRecommendations, fetchWatsonXRecommendations, RecommendationsConst
|
|
|
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';
|
|
24
23
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
25
24
|
export default function Recommendations(props) {
|
|
26
25
|
var _a, _b, _c;
|
|
@@ -35,9 +34,6 @@ export default function Recommendations(props) {
|
|
|
35
34
|
// Use Case Number
|
|
36
35
|
const { caseNumber } = useParams();
|
|
37
36
|
const { globalMetadataState: { navBarRef, loggedInUsersAccount, pcmConfig }, } = useGlobalStateContext();
|
|
38
|
-
const { isFetchingRecommendationsFromWatsonX } = useCaseSelector((state) => ({
|
|
39
|
-
isFetchingRecommendationsFromWatsonX: state.isFetchingRecommendationsFromWatsonX,
|
|
40
|
-
}), isEqual);
|
|
41
37
|
const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
|
|
42
38
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
43
39
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
@@ -46,7 +42,6 @@ export default function Recommendations(props) {
|
|
|
46
42
|
const [pageSize, setPageSize] = useState(null);
|
|
47
43
|
const { recommendationState } = useContext(RecommendationStateContext);
|
|
48
44
|
const prevMainRecommendations = usePrevious((_a = recommendationState === null || recommendationState === void 0 ? void 0 : recommendationState.visibleDocs) !== null && _a !== void 0 ? _a : []);
|
|
49
|
-
const prevIsFetchingRecommendationsFromWatsonX = usePrevious(isFetchingRecommendationsFromWatsonX);
|
|
50
45
|
const recommendationDispatch = useContext(RecommendationDispatchContext);
|
|
51
46
|
const isRerankEnabled = getConfigField(pcmConfig.data, 'isRerankEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
52
47
|
const DEFAULTPAGESIZE = 8;
|
|
@@ -71,10 +66,7 @@ export default function Recommendations(props) {
|
|
|
71
66
|
* Also, log the newly presented resources on the session
|
|
72
67
|
*/
|
|
73
68
|
useDebounce(() => {
|
|
74
|
-
if (activeSection !== AppRouteSections.SUMMARIZE ||
|
|
75
|
-
!summary ||
|
|
76
|
-
(isRecSearchPayloadSame &&
|
|
77
|
-
prevIsFetchingRecommendationsFromWatsonX === isFetchingRecommendationsFromWatsonX)) {
|
|
69
|
+
if (activeSection !== AppRouteSections.SUMMARIZE || !summary || isRecSearchPayloadSame) {
|
|
78
70
|
return;
|
|
79
71
|
}
|
|
80
72
|
setCurrentPage(recommendationDispatch, 1);
|
|
@@ -88,7 +80,7 @@ export default function Recommendations(props) {
|
|
|
88
80
|
// recreate a new AbortController for each call
|
|
89
81
|
let controller = new AbortController();
|
|
90
82
|
abortControllerRef.current = controller;
|
|
91
|
-
|
|
83
|
+
!loggedInUsersAccount.data.secureSupport
|
|
92
84
|
? fetchWatsonXRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, caseNumber, isSecureSupportAccount, queryFilters, controller.signal, isRerankEnabled)
|
|
93
85
|
: fetchRecommendations(recommendationDispatch, payload, MAXROW, recPageSize, 0, true, caseNumber, isSecureSupportAccount, queryFilters, controller.signal);
|
|
94
86
|
}, [
|
|
@@ -100,7 +92,6 @@ export default function Recommendations(props) {
|
|
|
100
92
|
summary,
|
|
101
93
|
version,
|
|
102
94
|
recommendationState.insightsKcsIds,
|
|
103
|
-
isFetchingRecommendationsFromWatsonX,
|
|
104
95
|
], 1000);
|
|
105
96
|
useEffect(() => {
|
|
106
97
|
const visibleRecs = [];
|
|
@@ -154,7 +145,6 @@ export default function Recommendations(props) {
|
|
|
154
145
|
React.createElement("span", { className: "meta" }, doc.documentKind),
|
|
155
146
|
React.createElement("span", { className: "list-separator" }, "\u2013"),
|
|
156
147
|
React.createElement("time", { className: "moment_date meta", title: doc.lastModifiedDate.toString() }, formatDate(doc.lastModifiedDate)))),
|
|
157
|
-
isFetchingRecommendationsFromWatsonX && !isRerankEnabled && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps, perPage: recPageSize, pageNo: recommendationState.currentPage })),
|
|
158
148
|
React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 300) })));
|
|
159
149
|
})),
|
|
160
150
|
recommendationState.numFound !== 0 && recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
|
|
@@ -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;AAiBzC,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;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA6U3C"}
|
|
@@ -35,13 +35,12 @@ 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
|
|
38
|
+
const { selectedNotificationContacts, cepDetails, caseDetails, caseCreation500ErrorStatus } = 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
|
|
45
44
|
}), isEqual);
|
|
46
45
|
const caseDispatch = useCaseDispatch();
|
|
47
46
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, referrerUrl }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -88,9 +87,8 @@ export function SessionRestore(props) {
|
|
|
88
87
|
const needsNewSessionId = hasProductVersionOrSummary && isEmpty(relevantSession);
|
|
89
88
|
if (needsNewSessionId) {
|
|
90
89
|
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
91
|
-
const userAgentAB = userAgent + (isFetchingRecommendationsFromWatsonX ? '-A-1' : '-B-1');
|
|
92
90
|
let session = {
|
|
93
|
-
userAgent
|
|
91
|
+
userAgent,
|
|
94
92
|
originatingSystem: userAgent,
|
|
95
93
|
referrerUrl: (caseDetails.referrer || referrerUrl).substring(0, SESSION_REFERRER_URL_LIMIT),
|
|
96
94
|
};
|
|
@@ -141,9 +139,8 @@ export function SessionRestore(props) {
|
|
|
141
139
|
: !isEmpty(existingUserAgent) && existingUserAgent !== userAgent
|
|
142
140
|
? existingUserAgent
|
|
143
141
|
: userAgent;
|
|
144
|
-
const userAgentAB = userAgent + (isFetchingRecommendationsFromWatsonX ? '-A-1' : '-B-1');
|
|
145
142
|
let session = {
|
|
146
|
-
userAgent
|
|
143
|
+
userAgent,
|
|
147
144
|
originatingSystem,
|
|
148
145
|
caseCreationError: caseCreation500ErrorStatus,
|
|
149
146
|
};
|
|
@@ -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":"AASA,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,eAgJzC"}
|
|
@@ -11,16 +11,15 @@ 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 {
|
|
14
|
+
import { getVersionIfOnlyVersion, pendoTrackEvent, PreviousCaseTypes } from '@rh-support/utils';
|
|
15
15
|
import findIndex from 'lodash/findIndex';
|
|
16
|
-
import isEmpty from 'lodash/isEmpty';
|
|
17
16
|
import isEqual from 'lodash/isEqual';
|
|
18
|
-
import React, { useContext,
|
|
17
|
+
import React, { useContext, useRef, useState } from 'react';
|
|
19
18
|
import { Trans } from 'react-i18next';
|
|
20
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
20
|
import { RouteContext } from '../../context/RouteContext';
|
|
22
21
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
23
|
-
import {
|
|
22
|
+
import { submitCase } from '../../reducers/CaseReducer';
|
|
24
23
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
25
24
|
import RouteUtils from '../../utils/routeUtils';
|
|
26
25
|
import PreCaseConfirmationModals, { PreCaseConfirmationModalsEnum, } from '../ConfirmationModals/PreCaseConfirmationModals';
|
|
@@ -37,42 +36,12 @@ export function WizardLayout(props) {
|
|
|
37
36
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
38
37
|
const caseDispatch = useCaseDispatch();
|
|
39
38
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
40
|
-
const { globalMetadataState: { allProducts, loggedInUser,
|
|
39
|
+
const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
41
40
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
42
41
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
43
42
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
44
43
|
const [confirmationModalType, setConfirmationModalType] = useState(null);
|
|
45
44
|
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
|
-
if (sessionItem && trafficSplit(testVariationWeight, sessionItem.session.createdDate) === 'A') {
|
|
64
|
-
setFetchingRecommendationsFromWatsonXFlag(caseDispatch, true);
|
|
65
|
-
}
|
|
66
|
-
}, [
|
|
67
|
-
caseDispatch,
|
|
68
|
-
isWatsonXEnabled,
|
|
69
|
-
activeSessionId,
|
|
70
|
-
previousSessions,
|
|
71
|
-
testVariationWeight,
|
|
72
|
-
isShowRerankingForInternalUsers,
|
|
73
|
-
rerankingFromUrl,
|
|
74
|
-
props.routeProps,
|
|
75
|
-
]);
|
|
76
45
|
const closeROCMProductModal = () => {
|
|
77
46
|
const productName = 'OpenShift Container Platform';
|
|
78
47
|
// if user click on Cancel then change product selection.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,2BAA2B,EAAE,OAAO,EAAE,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClH;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAmGhC;AACD,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core/deprecated';
|
|
2
2
|
import { LoadingIndicator } from '@rh-support/components';
|
|
3
|
-
import { CSSUserModal, GlobalMetadataStateContext, updateTroubleshootTraditionalSupportAgreed, useGlobalDispatchContext, } from '@rh-support/react-context';
|
|
4
3
|
import isEqual from 'lodash/isEqual';
|
|
5
4
|
import React, { Suspense, useContext, useState } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -19,8 +18,6 @@ function WizardMain(props) {
|
|
|
19
18
|
const { isCreatingCase } = useCaseSelector((state) => ({
|
|
20
19
|
isCreatingCase: state.isCreatingCase,
|
|
21
20
|
}), isEqual);
|
|
22
|
-
const { globalMetadataState: { troubleshootTraditionalSupportAgreed }, } = useContext(GlobalMetadataStateContext);
|
|
23
|
-
const globalDispatchContext = useGlobalDispatchContext();
|
|
24
21
|
const { getStepsSequece } = useWizard(props.routeProps);
|
|
25
22
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
26
23
|
const { t } = useTranslation();
|
|
@@ -43,9 +40,6 @@ function WizardMain(props) {
|
|
|
43
40
|
setActiveSectionChanged(dispatchToRouteReducer, step.id);
|
|
44
41
|
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
|
|
45
42
|
};
|
|
46
|
-
const onConfirmTraditionalSupportAgreement = () => {
|
|
47
|
-
updateTroubleshootTraditionalSupportAgreed(globalDispatchContext, true);
|
|
48
|
-
};
|
|
49
43
|
const CustomFooter = (React.createElement(WizardFooter, null,
|
|
50
44
|
React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
|
|
51
45
|
return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext, onBack: onBack, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag) }));
|
|
@@ -54,7 +48,6 @@ function WizardMain(props) {
|
|
|
54
48
|
// in useWizard file then add it to step squences in RouteConstNTypes
|
|
55
49
|
const steps = getStepsSequece(showRestFlag);
|
|
56
50
|
return (React.createElement(React.Fragment, null,
|
|
57
|
-
React.createElement(CSSUserModal, { onConfirmTraditionalSupportAgreement: onConfirmTraditionalSupportAgreement, display: !troubleshootTraditionalSupportAgreed }),
|
|
58
51
|
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { navAriaLabel: ` navAriaLabel steps `, mainAriaLabel: ` mainAriaLabel content `, steps: steps, footer: CustomFooter, onNext: onNext, onBack: onBack, hideClose: true, backButtonText: t('Go back'), onCurrentStepChanged: onCurrentStepChanged })) })),
|
|
59
52
|
React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
|
|
60
53
|
}
|
|
@@ -209,7 +209,6 @@ export interface ICaseState {
|
|
|
209
209
|
caseNoOfCreatedCase?: string;
|
|
210
210
|
isPostingRemoteRequestCommentCompleted?: boolean;
|
|
211
211
|
isPostingRemoteRequestCommentCompletedErrorMessage?: string | undefined;
|
|
212
|
-
isFetchingRecommendationsFromWatsonX: boolean;
|
|
213
212
|
}
|
|
214
213
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
215
214
|
}
|
|
@@ -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,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E,OAAO,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,kDAAkD,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3E;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"}
|
|
@@ -203,7 +203,6 @@ export const initialCaseState = {
|
|
|
203
203
|
caseNoOfCreatedCase: '',
|
|
204
204
|
isPostingRemoteRequestCommentCompleted: false,
|
|
205
205
|
isPostingRemoteRequestCommentCompletedErrorMessage: '',
|
|
206
|
-
isFetchingRecommendationsFromWatsonX: false,
|
|
207
206
|
};
|
|
208
207
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
209
208
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -12,7 +12,6 @@ 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;
|
|
16
15
|
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport: boolean, isResubmit: boolean) => Promise<void>;
|
|
17
16
|
/**
|
|
18
17
|
* 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.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAUxD,OAAO,EAEH,uBAAuB,EAEvB,UAAU,EAEb,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,0BAA0B,EAAiB,MAAM,yBAAyB,CAAC;AAEpF,eAAO,MAAM,WAAW,WAAY,UAAU,UAAU,GAAG,KAAG,
|
|
1
|
+
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,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,YAAY,CAAC,mBACjB,OAAO,mBAiB3B,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,SAC1B,aAAa,EAAE,gBACR,MAAM,kBAmCvB,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,yEAInB,MAAM,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,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,9 +61,6 @@ 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
|
-
}
|
|
67
64
|
case CaseReducerConstants.setCaseCreationError: {
|
|
68
65
|
return Object.assign(Object.assign({}, pState), { isCreatingCase: false, caseCreationError: true, caseCreationErrorMessage: action.payload.caseCreationErrorMessage });
|
|
69
66
|
}
|
|
@@ -162,12 +159,6 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
162
159
|
payload: { selectedNotificationContacts },
|
|
163
160
|
});
|
|
164
161
|
};
|
|
165
|
-
export const setFetchingRecommendationsFromWatsonXFlag = (dispatch, isFetchingRecommendationsFromWatsonX) => {
|
|
166
|
-
dispatch({
|
|
167
|
-
type: CaseReducerConstants.setFetchingRecommendationsFromWatsonXFlag,
|
|
168
|
-
payload: { isFetchingRecommendationsFromWatsonX: isFetchingRecommendationsFromWatsonX },
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
162
|
export const submitCase = (dispatch, sessionRestoreDispatch, caseDetails, sessionItem, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit) => __awaiter(void 0, void 0, void 0, function* () {
|
|
172
163
|
var _a;
|
|
173
164
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
@@ -627,9 +627,8 @@ button.pf-v5-c-toggle-group__button {
|
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
.top-content-suggestion-accordion {
|
|
630
|
-
.pf-v5-c-accordion__toggle {
|
|
631
|
-
padding
|
|
632
|
-
padding-bottom: 10px !important;
|
|
630
|
+
.pf-v5-c-accordion .pf-v5-c-accordion__toggle {
|
|
631
|
+
padding: 7px !important;
|
|
633
632
|
}
|
|
634
633
|
.pf-v5-c-accordion__expandable-content-body {
|
|
635
634
|
padding-top: 4px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.61",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react-i18next": "^11.2.5",
|
|
49
49
|
"react-redux": "^7.2.2",
|
|
50
50
|
"react-router-dom": "^5.1.2",
|
|
51
|
-
"react-test-renderer": "
|
|
52
|
-
"react-virtualized": "
|
|
51
|
+
"react-test-renderer": "17.0.2",
|
|
52
|
+
"react-virtualized": "9.22.5"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@cee-eng/hydrajs": "4.16.43",
|
|
@@ -58,12 +58,13 @@
|
|
|
58
58
|
"@patternfly/react-core": "5.1.1",
|
|
59
59
|
"@patternfly/react-table": "^5.1.1",
|
|
60
60
|
"@progress/kendo-drawing": "^1.6.0",
|
|
61
|
-
"@progress/kendo-
|
|
62
|
-
"@
|
|
63
|
-
"@rh-support/
|
|
61
|
+
"@progress/kendo-licensing": "1.3.5",
|
|
62
|
+
"@progress/kendo-react-pdf": "4.6.0",
|
|
63
|
+
"@rh-support/components": "2.1.33",
|
|
64
|
+
"@rh-support/react-context": "2.1.36",
|
|
64
65
|
"@rh-support/types": "2.0.2",
|
|
65
|
-
"@rh-support/user-permissions": "2.1.
|
|
66
|
-
"@rh-support/utils": "2.1.
|
|
66
|
+
"@rh-support/user-permissions": "2.1.23",
|
|
67
|
+
"@rh-support/utils": "2.1.16",
|
|
67
68
|
"@types/react-redux": "^7.1.12",
|
|
68
69
|
"@types/redux": "^3.6.0",
|
|
69
70
|
"dompurify": "^2.4.1",
|
|
@@ -84,8 +85,8 @@
|
|
|
84
85
|
"react-i18next": "^11.2.5",
|
|
85
86
|
"react-redux": "^7.2.2",
|
|
86
87
|
"react-router-dom": "^5.1.2",
|
|
87
|
-
"react-test-renderer": "17.0.
|
|
88
|
-
"react-virtualized": "
|
|
88
|
+
"react-test-renderer": "17.0.2",
|
|
89
|
+
"react-virtualized": "9.22.5",
|
|
89
90
|
"redux": "^4.0.5",
|
|
90
91
|
"redux-devtools-extension": "^2.13.8",
|
|
91
92
|
"timers": "^0.1.1"
|
|
@@ -124,5 +125,5 @@
|
|
|
124
125
|
"defaults and supports es6-module",
|
|
125
126
|
"maintained node versions"
|
|
126
127
|
],
|
|
127
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "031565d4fcd752c2962e59c9e7fbf593e78acae9"
|
|
128
129
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|