@rh-support/troubleshoot 0.2.49 → 0.2.50
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 +18 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts +9 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +111 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +5 -2
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +4 -2
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +5 -2
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,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,eA2bxC"}
|
|
@@ -30,6 +30,7 @@ import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles
|
|
|
30
30
|
import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
|
|
31
31
|
import FileUpload from '../../../shared/fileUpload/FileUpload';
|
|
32
32
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
33
|
+
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
33
34
|
export function PostComment(props) {
|
|
34
35
|
const { t } = useTranslation();
|
|
35
36
|
let { caseNumber } = props;
|
|
@@ -49,6 +50,7 @@ export function PostComment(props) {
|
|
|
49
50
|
const hasSomeUnUploadedFiles = hasSomeUnUploadedAttachments(attachmentState.caseFiles.selectedLocalFiles);
|
|
50
51
|
const hasSomeSelectedFilesLocal = hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles);
|
|
51
52
|
const [commentType, setCommentType] = useState(EditorMode.PLAIN);
|
|
53
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
52
54
|
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
53
55
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
54
56
|
const allowInlineImagesInMarkdown = getConfigField(pcmConfig.data, 'allowInlineImagesInMarkdown', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
@@ -146,6 +148,7 @@ export function PostComment(props) {
|
|
|
146
148
|
useEffect(() => {
|
|
147
149
|
isPublicRef.current = isPublic;
|
|
148
150
|
}, [isPublic]);
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
149
152
|
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
150
153
|
if (canEditCase.alert())
|
|
151
154
|
return;
|
|
@@ -248,6 +251,19 @@ export function PostComment(props) {
|
|
|
248
251
|
pendoTrackEvent(markdownFilePasteEvent);
|
|
249
252
|
onFileAttach(files, isPublicRef.current);
|
|
250
253
|
};
|
|
254
|
+
const onCancel = () => {
|
|
255
|
+
setIsModalOpen(false);
|
|
256
|
+
};
|
|
257
|
+
const isNotInternalConfirm = () => {
|
|
258
|
+
onPostComment();
|
|
259
|
+
};
|
|
260
|
+
const onConfirm = (commentText) => __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
yield setIsModalOpen(false);
|
|
262
|
+
isNotInternalConfirm();
|
|
263
|
+
});
|
|
264
|
+
const onBtnClick = () => {
|
|
265
|
+
setIsModalOpen(true);
|
|
266
|
+
};
|
|
251
267
|
return (React.createElement("div", { className: "pf-u-mb-md hide-in-pdf", ref: componentRef },
|
|
252
268
|
React.createElement(MarkdownEditor, { className: `${!isPublic ? '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 ? 'Add a comment using markdown' : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic ? 'Add a comment to this case' : 'Add a comment or attach a file privately', fileSelectorProps: {
|
|
253
269
|
showFileSelectorInToolbar: allowInlineImagesInMarkdown && !loggedInUsersAccount.data.secureSupport,
|
|
@@ -260,7 +276,8 @@ export function PostComment(props) {
|
|
|
260
276
|
onClipboardPaste,
|
|
261
277
|
} }),
|
|
262
278
|
isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-l-flex post-comment-btn-group push-top-narrow" },
|
|
263
|
-
React.createElement(
|
|
279
|
+
isModalOpen && loggedInUser.data.isInternal && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
280
|
+
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal ? onBtnClick : isNotInternalConfirm, isDisabled: isPostCommentDisabled, className: "postcomment-submit" },
|
|
264
281
|
React.createElement(Trans, null, "Submit")),
|
|
265
282
|
canAddAttachments &&
|
|
266
283
|
(isPublic && canPostPrivateComments ? (React.createElement(Tooltip, { content: t('You can attach files privately') }, fileUploadButton)) : (fileUploadButton)),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface IProps {
|
|
2
|
+
onConfirm: (commentBody?: string) => void;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
caseNumber?: string;
|
|
5
|
+
isUpdating: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function VerifyCaseStatusModal(props: IProps): JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=VerifyCaseStatusModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,eA8IlD"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Button, ButtonVariant, Modal, ModalVariant, Select, SelectOption } from '@patternfly/react-core';
|
|
11
|
+
import { ToastNotification } from '@rh-support/components';
|
|
12
|
+
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
|
+
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
+
import isEqual from 'lodash/isEqual';
|
|
15
|
+
import React, { useContext, useEffect, useReducer, useRef, useState } from 'react';
|
|
16
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
+
import { CaseStatusEnum } from '../../../../../constants/caseDetailsConstants';
|
|
18
|
+
import { useCaseDispatch, useCaseSelector } from '../../../../../context/CaseContext';
|
|
19
|
+
import { caseOverviewReducer, fetchAllStatuses, initialCaseViewState, setStatusUpdating, } from '../../../../../reducers/CaseOverviewReducer';
|
|
20
|
+
import { updateCaseDetails } from '../../../../../reducers/CaseReducer';
|
|
21
|
+
export function VerifyCaseStatusModal(props) {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
const [caseOverviewState, caseOverviewDispatch] = useReducer(caseOverviewReducer, initialCaseViewState);
|
|
24
|
+
const canManageCase = ability.can(resourceActions.UPDATE, resources.CASE_DETAILS);
|
|
25
|
+
const [showDropdown, setShowDropdown] = useState(false);
|
|
26
|
+
const onDropdownToggle = (toggle) => setShowDropdown(toggle);
|
|
27
|
+
const caseState = useCaseSelector((state) => ({
|
|
28
|
+
caseDetails: {
|
|
29
|
+
product: state.caseDetails.product,
|
|
30
|
+
version: state.caseDetails.version,
|
|
31
|
+
status: state.caseDetails.status,
|
|
32
|
+
caseType: state.caseDetails.caseType,
|
|
33
|
+
createdDate: state.caseDetails.createdDate,
|
|
34
|
+
createdById: state.caseDetails.createdById,
|
|
35
|
+
ownerId: state.caseDetails.ownerId,
|
|
36
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
37
|
+
entitlementSla: state.caseDetails.entitlementSla,
|
|
38
|
+
cep: state.caseDetails.cep,
|
|
39
|
+
accountNumber: state.caseDetails.accountNumberRef,
|
|
40
|
+
firstCaseInactivityWarningSentAt: state.caseDetails.firstCaseInactivityWarningSentAt,
|
|
41
|
+
secondCaseInactivityWarningSentAt: state.caseDetails.secondCaseInactivityWarningSentAt,
|
|
42
|
+
},
|
|
43
|
+
isCaseUpdating: state.isCaseUpdating,
|
|
44
|
+
contactIsPartner: state.contactIsPartner,
|
|
45
|
+
hotfixRequested: state.hotfixRequested,
|
|
46
|
+
hotfixDelivered: state.hotfixDelivered,
|
|
47
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
48
|
+
}), isEqual);
|
|
49
|
+
const { status } = caseState.caseDetails;
|
|
50
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
|
|
53
|
+
}, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
|
|
54
|
+
console.log(caseOverviewState.allCaseStatuses.data);
|
|
55
|
+
const { isCaseUpdating } = caseState;
|
|
56
|
+
const reopenStatusRef = useRef(null);
|
|
57
|
+
const canEditCase = useCanEditCase();
|
|
58
|
+
const caseDispatch = useCaseDispatch();
|
|
59
|
+
const [statusChange, setStatusChange] = useState();
|
|
60
|
+
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
props.onConfirm();
|
|
62
|
+
yield updateStatusState(statusChange);
|
|
63
|
+
});
|
|
64
|
+
const updateStatusState = (statusVal, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
setStatusUpdating(caseOverviewDispatch, true);
|
|
66
|
+
try {
|
|
67
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, { status: statusVal });
|
|
68
|
+
setStatusUpdating(caseOverviewDispatch, false);
|
|
69
|
+
onStatusUpdate && (yield onStatusUpdate());
|
|
70
|
+
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
setStatusUpdating(caseOverviewDispatch, false);
|
|
74
|
+
ToastNotification.addDangerMessage(t('Status failed to update'));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const onStatusChange = (event, newStatus) => __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (canEditCase.alert())
|
|
79
|
+
return;
|
|
80
|
+
if (status === CaseStatusEnum.CLOSED && newStatus !== CaseStatusEnum.CLOSED) {
|
|
81
|
+
onCaseReopen(newStatus);
|
|
82
|
+
}
|
|
83
|
+
else if (newStatus === CaseStatusEnum.CLOSED) {
|
|
84
|
+
onCaseClose();
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
setStatusChange(newStatus);
|
|
88
|
+
onDropdownToggle(false);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const onCaseClose = () => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
props.onClose();
|
|
93
|
+
});
|
|
94
|
+
const onCaseReopen = (selectedStatus = null) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
reopenStatusRef.current = selectedStatus;
|
|
96
|
+
props.onClose();
|
|
97
|
+
});
|
|
98
|
+
return (React.createElement(Modal, { id: "case-close-modal", title: t(`Please verify this case's status`), description: t(`Consider whether or not you're ready to nudge the customer`), "aria-describedby": "case-close-modal", isOpen: true, onClose: props.onClose, showClose: true, actions: [
|
|
99
|
+
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: props.isUpdating, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-submit" },
|
|
100
|
+
React.createElement(Trans, null, "Continue")),
|
|
101
|
+
React.createElement(Button, { key: "close-modal", variant: ButtonVariant.link, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-cancel" },
|
|
102
|
+
React.createElement(Trans, null, "Cancel")),
|
|
103
|
+
], variant: ModalVariant.medium },
|
|
104
|
+
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
105
|
+
React.createElement(Trans, null, "Status"),
|
|
106
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
107
|
+
React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections: status, onSelect: onStatusChange, isOpen: showDropdown, isDisabled: !canManageCase ||
|
|
108
|
+
caseOverviewState.allCaseStatuses.isFetching ||
|
|
109
|
+
(caseOverviewState.caseStatusUpdating && isCaseUpdating), menuAppendTo: document.body, validated: !status ? 'error' : 'default', placeholderText: t(status), onToggle: onDropdownToggle }, caseOverviewState.allCaseStatuses.data.map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
|
|
110
|
+
React.createElement(Trans, null, option)))))));
|
|
111
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eA8ExD"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, Modal } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
|
+
import { getResTypeFromUrl } from '@rh-support/utils';
|
|
13
14
|
import React, { useContext, useState } from 'react';
|
|
14
15
|
import { useTranslation } from 'react-i18next';
|
|
15
16
|
import { ClusterRecommendationsContext, ClusterRecommendationsDispatchContext, } from '../../context/ClusterRecommendationsContext';
|
|
@@ -26,12 +27,14 @@ export function ClusterRecommendationsModal(props) {
|
|
|
26
27
|
const { clusterRecommendationsState: { clusterRecommendations, isClusterRecommendationsModalOpen }, } = useContext(ClusterRecommendationsContext);
|
|
27
28
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
28
29
|
const handleSolvedIssue = () => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
var _a, _b;
|
|
30
|
+
var _a, _b, _c, _d;
|
|
30
31
|
try {
|
|
31
32
|
yield resolveSessionRequest(activeSessionId, {
|
|
32
33
|
sessionId: activeSessionId,
|
|
33
34
|
sessionResourceOriginId: (_b = (_a = sessionResourceTracking[SessionResourceSource.CLUSTER_RECOMMENDATION]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '',
|
|
34
|
-
type:
|
|
35
|
+
type: getResTypeFromUrl(''),
|
|
36
|
+
source: SessionResourceSource.CLUSTER_RECOMMENDATION,
|
|
37
|
+
resourceEntityId: (_d = (_c = sessionResourceTracking[SessionResourceSource.CLUSTER_RECOMMENDATION]) === null || _c === void 0 ? void 0 : _c.resourceEntityId) !== null && _d !== void 0 ? _d : '',
|
|
35
38
|
url: '',
|
|
36
39
|
});
|
|
37
40
|
setIsModalVisible(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAM/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AACD,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"EARuleInfoInline.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoInline.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAkD,MAAM,gCAAgC,CAAC;AAM/G,UAAU,MAAM;IACZ,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AACD,wBAAgB,gBAAgB,CAAC,EAAE,OAAY,EAAE,EAAE,MAAM,eAyHxD"}
|
|
@@ -13,7 +13,7 @@ import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-
|
|
|
13
13
|
import CloseIcon from '@patternfly/react-icons/dist/js/icons/close-icon';
|
|
14
14
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
15
15
|
import { PaginationCompact, useFetch } from '@rh-support/components';
|
|
16
|
-
import { getStyleVariantColor, StyleVariants } from '@rh-support/utils';
|
|
16
|
+
import { getResTypeFromUrl, getStyleVariantColor, StyleVariants } from '@rh-support/utils';
|
|
17
17
|
import some from 'lodash/some';
|
|
18
18
|
import React, { useContext, useEffect, useState } from 'react';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -52,7 +52,9 @@ export function EARuleInfoInline({ eaRules = [] }) {
|
|
|
52
52
|
yield resolveSessionRequest(activeSessionId, {
|
|
53
53
|
sessionId: activeSessionId,
|
|
54
54
|
sessionResourceOriginId: (_b = (_a = sessionResourceTracking[SessionResourceSource.EDMOUND_ABOTT]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '',
|
|
55
|
-
type:
|
|
55
|
+
type: getResTypeFromUrl(resolvedRule.cta),
|
|
56
|
+
source: SessionResourceSource.EDMOUND_ABOTT,
|
|
57
|
+
resourceEntityId: resolvedRule.rule_id,
|
|
56
58
|
url: resolvedRule.cta || '',
|
|
57
59
|
});
|
|
58
60
|
markEARuleResolved(rulesDispatch, resolvedRule);
|
|
@@ -130,7 +130,7 @@ function InsightsResults(props) {
|
|
|
130
130
|
var _a, _b;
|
|
131
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
try {
|
|
133
|
-
const _c = getSolrParams(
|
|
133
|
+
const _c = getSolrParams(200, 256, { id: kcsIds }), { start, rows, q } = _c, expression = __rest(_c, ["start", "rows", "q"]);
|
|
134
134
|
const res = yield search.solrSearchV2({ start, rows, q }, 'kcs', expression);
|
|
135
135
|
const docs = (_b = (_a = res === null || res === void 0 ? void 0 : res.response) === null || _a === void 0 ? void 0 : _a.docs) !== null && _b !== void 0 ? _b : [];
|
|
136
136
|
const attachmentId = localFile.attachmentId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAgI/C"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Accordion, Button, Modal } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
|
+
import { getResTypeFromUrl } from '@rh-support/utils';
|
|
13
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
14
15
|
import { useTranslation } from 'react-i18next';
|
|
15
16
|
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
@@ -38,12 +39,14 @@ export function InsightResultModal(props) {
|
|
|
38
39
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
39
40
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
40
41
|
const handleSolvedIssue = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
var _a, _b;
|
|
42
|
+
var _a, _b, _c, _d;
|
|
42
43
|
try {
|
|
43
44
|
yield resolveSessionRequest(activeSessionId, {
|
|
44
45
|
sessionId: activeSessionId,
|
|
45
46
|
sessionResourceOriginId: (_b = (_a = sessionResourceTracking[SessionResourceSource.INSIGHTS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '',
|
|
46
|
-
type:
|
|
47
|
+
type: getResTypeFromUrl(''),
|
|
48
|
+
source: SessionResourceSource.INSIGHTS,
|
|
49
|
+
resourceEntityId: (_d = (_c = sessionResourceTracking[SessionResourceSource.INSIGHTS]) === null || _c === void 0 ? void 0 : _c.resourceEntityId) !== null && _d !== void 0 ? _d : '',
|
|
47
50
|
url: '',
|
|
48
51
|
});
|
|
49
52
|
props.onModalToggle();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.50",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
76
|
"@rh-support/api": "0.3.10",
|
|
77
|
-
"@rh-support/components": "1.1.
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
77
|
+
"@rh-support/components": "1.1.25",
|
|
78
|
+
"@rh-support/react-context": "0.2.28",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.
|
|
81
|
-
"@rh-support/utils": "0.2.
|
|
80
|
+
"@rh-support/user-permissions": "0.2.19",
|
|
81
|
+
"@rh-support/utils": "0.2.17",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "2821a4eb373d262b83d3a512900eb68d1fa22d55"
|
|
147
147
|
}
|