@rh-support/troubleshoot 0.2.24 → 0.2.28
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/ConfirmationModals/ReopenCaseModal.js +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +18 -5
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +4 -4
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -6
- package/lib/esm/components/ImproveCase/KtQuestions.d.ts.map +1 -1
- package/lib/esm/components/ImproveCase/KtQuestions.js +25 -16
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts +7 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +40 -0
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts +2 -0
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -0
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +24 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts +9 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +48 -0
- package/lib/esm/components/Recommendations/RulesModal.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +4 -4
- package/lib/esm/components/shared/Constants.d.ts +18 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +6 -0
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +4 -1
- package/lib/esm/context/ClusterRecommendationsContext.d.ts +13 -0
- package/lib/esm/context/ClusterRecommendationsContext.d.ts.map +1 -0
- package/lib/esm/context/ClusterRecommendationsContext.js +13 -0
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +4 -2
- package/lib/esm/hooks/useParseRuleMarkdown.d.ts +7 -0
- package/lib/esm/hooks/useParseRuleMarkdown.d.ts.map +1 -0
- package/lib/esm/hooks/useParseRuleMarkdown.js +24 -0
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +4 -0
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +4 -0
- package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts +14 -0
- package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts.map +1 -0
- package/lib/esm/reducers/ClusterRecommendationsReducer.js +57 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -0
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +6 -0
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +4 -3
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +31 -34
- package/lib/esm/utils/routeUtils.d.ts.map +1 -1
- package/lib/esm/utils/routeUtils.js +3 -0
- package/package.json +9 -9
|
@@ -69,7 +69,7 @@ export function ReopenCaseModal(props) {
|
|
|
69
69
|
React.createElement(Trans, null, "Cancel")),
|
|
70
70
|
], variant: ModalVariant.medium },
|
|
71
71
|
React.createElement(Form, null,
|
|
72
|
-
(!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : '
|
|
72
|
+
(!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : 'Reason'), isRequired: true, fieldId: "case-resolution", helperTextInvalid: "Required field", validated: showValidationError && (props.isInternal ? !selectedStatus : !selectedReason)
|
|
73
73
|
? 'error'
|
|
74
74
|
: 'default', helperTextInvalidIcon: React.createElement(ExclamationCircleIcon, null) }, props.isInternal ? (React.createElement(Select, { "aria-label": t('Select an option that best fits'), id: "reopen-case-status", selections: selectedStatus, onSelect: onStatusChange, isOpen: showDropdown, isDisabled: props.isUpdating, menuAppendTo: document.body, validated: showValidationError && !selectedStatus ? 'error' : 'default', placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle }, props.allStatuses
|
|
75
75
|
.filter((status) => status !== CaseStatusEnum.CLOSED)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAqBF,wBAAgB,kBAAkB,gBAqQjC"}
|
|
@@ -16,9 +16,11 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
16
16
|
import { Trans } from 'react-i18next';
|
|
17
17
|
import { useLocation } from 'react-router';
|
|
18
18
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
19
|
+
import { ClusterRecommendationsDispatchContext } from '../../context/ClusterRecommendationsContext';
|
|
19
20
|
import { RouteContext } from '../../context/RouteContext';
|
|
20
21
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
21
22
|
import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
23
|
+
import { fetchClusterRecommendations } from '../../reducers/ClusterRecommendationsReducer';
|
|
22
24
|
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
23
25
|
import { NoClusterIDReasonSelector } from './NoClusterIDReasonSelector';
|
|
24
26
|
import { fetchClusterIdDetails, OpenshiftDropdownV4 } from './OpenshiftDropdownV4';
|
|
@@ -55,6 +57,7 @@ export function OpenShiftClusterId() {
|
|
|
55
57
|
const caseDispatch = useCaseDispatch();
|
|
56
58
|
const { globalMetadataState: { pcmConfig, allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
57
59
|
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
60
|
+
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
58
61
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
59
62
|
const isOpenShiftV3 = majorVersion === '3';
|
|
60
63
|
const isCustomer = loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber);
|
|
@@ -135,7 +138,9 @@ export function OpenShiftClusterId() {
|
|
|
135
138
|
* we also fetch the details for the cluster id so that we can have fields like cluster version while creating the case
|
|
136
139
|
*/
|
|
137
140
|
useEffect(() => {
|
|
138
|
-
|
|
141
|
+
const isClusterIdInvalid = getIsClusterIdInvalid(openshiftClusterID);
|
|
142
|
+
setIsClusterIdInValid(isClusterIdInvalid);
|
|
143
|
+
if (openshiftClusterID && !isClusterIdInvalid && isEmpty(openshiftClusterVersion)) {
|
|
139
144
|
setClusterVersion(openshiftClusterID);
|
|
140
145
|
}
|
|
141
146
|
// when user click on back and continue button, need to show v3 text box or reasons dropdown
|
|
@@ -147,10 +152,15 @@ export function OpenShiftClusterId() {
|
|
|
147
152
|
setDontKnowSelected(true);
|
|
148
153
|
setSelectedReason('dont-have-id');
|
|
149
154
|
}
|
|
155
|
+
!isClusterIdInvalid &&
|
|
156
|
+
!isEmpty(openshiftClusterID) &&
|
|
157
|
+
fetchClusterRecommendations(clusterRecommendationsDispatch, openshiftClusterID);
|
|
150
158
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
151
159
|
}, [v3ClusterName, noClusterIdReason]);
|
|
152
160
|
const onClusterIdStateUpdate = (selectedCluster) => {
|
|
153
161
|
const selectedId = selectedCluster.external_id;
|
|
162
|
+
if (isEmpty(selectedId))
|
|
163
|
+
return;
|
|
154
164
|
resetClusterData();
|
|
155
165
|
if (selectedId === 'dont-have-id') {
|
|
156
166
|
setDontKnowSelected(true);
|
|
@@ -162,8 +172,10 @@ export function OpenShiftClusterId() {
|
|
|
162
172
|
setSelectedReason(selectedId);
|
|
163
173
|
return;
|
|
164
174
|
}
|
|
165
|
-
|
|
175
|
+
const isClusterInvalid = getIsClusterIdInvalid(selectedId);
|
|
176
|
+
setIsClusterIdInValid(isClusterInvalid);
|
|
166
177
|
setCusterId(selectedId, selectedCluster);
|
|
178
|
+
!isClusterInvalid && fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId);
|
|
167
179
|
};
|
|
168
180
|
const clusterIdDropdownFormInstructions = () => {
|
|
169
181
|
const errorMessage = isClusterIdInvalid
|
|
@@ -176,10 +188,11 @@ export function OpenShiftClusterId() {
|
|
|
176
188
|
};
|
|
177
189
|
const onReasonExplanationInputBoxChanged = (noClusterIdReasonExplanation) => {
|
|
178
190
|
if (noClusterIdReason === 'Other') {
|
|
179
|
-
setCaseDetails(caseDispatch, { noClusterIdReasonExplanation });
|
|
191
|
+
setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: noClusterIdReasonExplanation.trim() });
|
|
180
192
|
}
|
|
181
193
|
};
|
|
182
|
-
const v3ClusterNameInputBoxChanged = (
|
|
194
|
+
const v3ClusterNameInputBoxChanged = (v3Cluster) => {
|
|
195
|
+
const v3ClusterName = isEmpty(v3Cluster.trim()) ? '' : v3Cluster;
|
|
183
196
|
const description = getUpdatedDescription(issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
|
|
184
197
|
setCaseState(caseDispatch, { v3ClusterName });
|
|
185
198
|
setCaseDetails(caseDispatch, { description });
|
|
@@ -195,5 +208,5 @@ export function OpenShiftClusterId() {
|
|
|
195
208
|
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: showValidationErrorAlert &&
|
|
196
209
|
((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV4: majorVersion === '4' })),
|
|
197
210
|
dontKnowSelected && !isOpenShiftV3 && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
|
|
198
|
-
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName) && showValidationErrorAlert, v3Selected: v3Selected }))));
|
|
211
|
+
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && showValidationErrorAlert, v3Selected: v3Selected }))));
|
|
199
212
|
}
|
|
@@ -176,10 +176,10 @@ function OpenshiftDropdownV4(props) {
|
|
|
176
176
|
}, [props.isClusterIdInvalid]);
|
|
177
177
|
const onTypeaheadInputChanged = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
178
178
|
setInputVal(input);
|
|
179
|
+
props.onClusterIdStateUpdate(createState(input, input));
|
|
179
180
|
const fetchedClusters = yield fetchAccountClusters(input);
|
|
180
181
|
setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
|
|
181
182
|
setClustersRawResponse(fetchedClusters.items);
|
|
182
|
-
props.onClusterIdStateUpdate(createState(input, input));
|
|
183
183
|
});
|
|
184
184
|
const getSelectedItem = () => {
|
|
185
185
|
if (!isEmpty(inputVal)) {
|
|
@@ -21,7 +21,7 @@ export function AddCustomEmailToAccount(props) {
|
|
|
21
21
|
const [isSaveButtonClicked, setIsSaveButtonClicked] = useState(false);
|
|
22
22
|
const onAdd = () => __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
setIsSaveButtonClicked(true);
|
|
24
|
-
if (isEmpty(firstName))
|
|
24
|
+
if (isEmpty(firstName.trim()))
|
|
25
25
|
return;
|
|
26
26
|
try {
|
|
27
27
|
yield request(props.accountNumber, props.customEmailAddress, firstName, lastName);
|
|
@@ -41,7 +41,7 @@ export function AddCustomEmailToAccount(props) {
|
|
|
41
41
|
props.onClose && props.onClose();
|
|
42
42
|
};
|
|
43
43
|
return (React.createElement(Modal, { variant: ModalVariant.medium, title: t('Add a notification email to your account'), isOpen: true, onClose: handleClose, onEscapePress: handleClose, actions: [
|
|
44
|
-
React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName)) },
|
|
44
|
+
React.createElement(Button, { spinnerAriaValueText: isFetching ? t('Adding') : undefined, isLoading: isFetching, key: "confirm", variant: "primary", onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())) },
|
|
45
45
|
React.createElement(Trans, null, "Add to account")),
|
|
46
46
|
React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose, isDisabled: isFetching },
|
|
47
47
|
React.createElement(Trans, null, "Cancel")),
|
|
@@ -53,12 +53,12 @@ export function AddCustomEmailToAccount(props) {
|
|
|
53
53
|
React.createElement(TextInput, { id: "custom-email", isDisabled: true, value: props.customEmailAddress, className: "form-control", isRequired: true })),
|
|
54
54
|
React.createElement(FormGroup, { label: t('First name'), fieldId: "custom-email-firstName", validated: !isSaveButtonClicked
|
|
55
55
|
? ValidatedOptions.default
|
|
56
|
-
: isEmpty(firstName)
|
|
56
|
+
: isEmpty(firstName.trim())
|
|
57
57
|
? ValidatedOptions.error
|
|
58
58
|
: ValidatedOptions.default, isRequired: true, helperTextInvalid: t('First name cannot be empty') },
|
|
59
59
|
React.createElement(TextInput, { id: "custom-email-firstName", value: firstName, className: "form-control", isRequired: true, type: "text", validated: !isSaveButtonClicked
|
|
60
60
|
? ValidatedOptions.default
|
|
61
|
-
: isEmpty(firstName)
|
|
61
|
+
: isEmpty(firstName.trim())
|
|
62
62
|
? ValidatedOptions.error
|
|
63
63
|
: ValidatedOptions.default, onChange: onFirstNameChange, "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 })),
|
|
64
64
|
React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName", className: "pf-u-mb-md" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA4CA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AA4CA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA8bzC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Button } from '@patternfly/react-core';
|
|
10
|
+
import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
|
|
11
11
|
import { CaseContactsSelectorExternal, getHydraContactLabel, PromisifyModal, ToastNotification, usePrevious, } from '@rh-support/components';
|
|
12
12
|
import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeatureLabel, useCanEditCase, } from '@rh-support/react-context';
|
|
13
13
|
import { filter, find, map, remove } from 'lodash';
|
|
@@ -55,6 +55,7 @@ function CaseContactSelector(props) {
|
|
|
55
55
|
const [emailToAdd, setEmailToAdd] = useState('');
|
|
56
56
|
const nonOrgTypeaheadRef = useRef(null);
|
|
57
57
|
const canEditCase = useCanEditCase();
|
|
58
|
+
const toolTipRef = useRef();
|
|
58
59
|
const onCaseContactAdded = (addedUsers) => __awaiter(this, void 0, void 0, function* () {
|
|
59
60
|
const addesUsersSso = map(addedUsers, (u) => ({ ssoUsername: u.ssoUsername }));
|
|
60
61
|
setIsAssociatesUpdating(true);
|
|
@@ -269,11 +270,11 @@ function CaseContactSelector(props) {
|
|
|
269
270
|
React.createElement(Button, { variant: "link", isInline: true, component: "span", onClick: onAddEmailToAccountBtnClick }, "add them at the account level"))))),
|
|
270
271
|
caseNumber && showAddWatchButton() && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-watcher" },
|
|
271
272
|
React.createElement(Trans, null, "Add me as a watcher"))),
|
|
272
|
-
caseNumber && showRemoveWatchButton() && (React.createElement("
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
caseNumber && showRemoveWatchButton() && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
|
|
274
|
+
React.createElement(Tooltip, { trigger: 'mouseenter focus', reference: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
|
|
275
|
+
React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-watcher" },
|
|
276
|
+
React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-watcher" },
|
|
277
|
+
React.createElement(Trans, null, "Remove me as a watcher"))))))) : (React.createElement(NonOrgCaseNotifyeesSelector, { id: "open-case-notifications", placeholder: "Enter an email address or username for the person you want to notify", isDisabled: isAssociatesUpdating || customEmailsList.isFetching || isUpdatingCustomEmails, selectedItems: [
|
|
277
278
|
...customEmailsList.data,
|
|
278
279
|
...filter(selectedNotificationContacts, (c) => !c.isInternal),
|
|
279
280
|
], dataTrackingId: "non-org-admin-contact-selector", onChange: onNotifiedUserChange, isChipDisabled: !isCurrentUserCaseCreator && !!caseNumber, accountNumber: accountNumber, groupNumber: groupNumber, typeaheadRef: nonOrgTypeaheadRef, contactSsoUsername: contactSsoUsername }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA+NjC;kBA/NQ,WAAW;;;AAiOpB,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InlineEdit, TextAreaAutosize } from '@rh-support/components';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
3
|
import isEqual from 'lodash/isEqual';
|
|
4
|
-
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
7
|
+
import { RouteContext } from '../../context/RouteContext';
|
|
7
8
|
import { DESCRIPTION_LENGTH_LIMIT, KtQuestionConstant, LargeDescriptionErrorMessage, } from '../../reducers/CaseConstNTypes';
|
|
8
9
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
9
10
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
@@ -20,6 +21,7 @@ function KtQuestions(props) {
|
|
|
20
21
|
v3ClusterName: state.v3ClusterName,
|
|
21
22
|
}), isEqual);
|
|
22
23
|
const caseDispatch = useCaseDispatch();
|
|
24
|
+
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
23
25
|
const [isKTQ2TextAreaActive, setKTQ2TextAreaActive] = useState(false);
|
|
24
26
|
const [hasFocusedLostKT2, setHasFocusedLostKT2] = useState(false);
|
|
25
27
|
const [isKTQ2InValid, setKTQ2InValid] = useState(false);
|
|
@@ -45,36 +47,49 @@ function KtQuestions(props) {
|
|
|
45
47
|
e.type === 'blur' && setHasFocusedLostKT4(true);
|
|
46
48
|
};
|
|
47
49
|
useEffect(() => {
|
|
48
|
-
hasFocusedLostKT2 && setKTQ2InValid(isEmpty(description));
|
|
49
|
-
hasFocusedLostKT3 && setKTQ3InValid(isEmpty(description));
|
|
50
|
-
hasFocusedLostKT4 && setKTQ4InValid(isEmpty(description));
|
|
51
|
-
}, [description, hasFocusedLostKT2, hasFocusedLostKT3, hasFocusedLostKT4]);
|
|
50
|
+
hasFocusedLostKT2 && setKTQ2InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
|
|
51
|
+
hasFocusedLostKT3 && setKTQ3InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
|
|
52
|
+
hasFocusedLostKT4 && setKTQ4InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
|
|
53
|
+
}, [description, timeFramesAndUrgency, hasFocusedLostKT2, hasFocusedLostKT3, hasFocusedLostKT4]);
|
|
52
54
|
const onCaseDetailsChange = (caseDetails) => {
|
|
53
55
|
setCaseDetails(caseDispatch, caseDetails);
|
|
54
56
|
};
|
|
57
|
+
// Troubleshoot Page Question 3
|
|
55
58
|
const onKtQ2Change = (e) => {
|
|
56
59
|
var _a;
|
|
57
60
|
const ktQ2Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
|
|
58
61
|
const newDescription = getUpdatedDescription(issue, ktQ2Local, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
|
|
59
62
|
onCaseDetailsChange({ environment: ktQ2Local, description: newDescription });
|
|
60
63
|
};
|
|
64
|
+
// Troubleshoot Page Question 4
|
|
61
65
|
const onKtQ3Change = (e) => {
|
|
62
66
|
var _a;
|
|
63
67
|
const ktQ3Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
|
|
64
68
|
const newDescription = getUpdatedDescription(issue, environment, ktQ3Local, timeFramesAndUrgency, v3ClusterName);
|
|
65
|
-
onCaseDetailsChange({
|
|
69
|
+
onCaseDetailsChange({
|
|
70
|
+
periodicityOfIssue: ktQ3Local,
|
|
71
|
+
description: newDescription,
|
|
72
|
+
});
|
|
66
73
|
};
|
|
74
|
+
// Troubleshoot Page Question 2
|
|
67
75
|
const onKtQ4Change = (e) => {
|
|
68
76
|
var _a;
|
|
69
77
|
const ktQ4Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
|
|
70
78
|
const newDescription = getUpdatedDescription(issue, environment, periodicityOfIssue, ktQ4Local, v3ClusterName);
|
|
71
79
|
onCaseDetailsChange({ timeFramesAndUrgency: ktQ4Local, description: newDescription });
|
|
72
80
|
};
|
|
73
|
-
const isKT2Required = isEmpty(issue) && isEmpty(
|
|
74
|
-
const isKT3Required = isEmpty(issue) && isEmpty(
|
|
75
|
-
const isKT4Required =
|
|
81
|
+
const isKT2Required = isEmpty(issue) && isEmpty(timeFramesAndUrgency) && isEmpty(periodicityOfIssue);
|
|
82
|
+
const isKT3Required = isEmpty(issue) && isEmpty(timeFramesAndUrgency) && isEmpty(environment);
|
|
83
|
+
const isKT4Required = true;
|
|
76
84
|
const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
|
|
85
|
+
const isBusinessImpactInvalid = (isEmpty(timeFramesAndUrgency) || hasLargeCaseDescription) && showValidationErrorAlert;
|
|
77
86
|
return (React.createElement(React.Fragment, null,
|
|
87
|
+
React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ4-timeFramesAndUrgency' }, labelContent: React.createElement(React.Fragment, null,
|
|
88
|
+
t(KtQuestionConstant.timeFramesAndUrgency),
|
|
89
|
+
' ',
|
|
90
|
+
isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
|
|
91
|
+
React.createElement(TextAreaAutosize, { className: `form-control${isBusinessImpactInvalid || isKTQ4InValid ? ' form-invalid' : ''}`, "aria-invalid": isBusinessImpactInvalid, id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, disabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, required: isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency" }),
|
|
92
|
+
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ4-timeFramesAndUrgency" }, `${hasLargeCaseDescription && isKTQ4TextAreaActive ? descriptionErrorMessage : ''}`)),
|
|
78
93
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ2-environment' }, labelContent: React.createElement(React.Fragment, null,
|
|
79
94
|
t(KtQuestionConstant.environment),
|
|
80
95
|
' ',
|
|
@@ -86,13 +101,7 @@ function KtQuestions(props) {
|
|
|
86
101
|
' ',
|
|
87
102
|
isKT3Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(periodicityOfIssue), usePreformattedTag: true, saveOnBlur: true, content: periodicityOfIssue },
|
|
88
103
|
React.createElement(TextAreaAutosize, { className: `form-control${isKTQ3InValid || hasLargeCaseDescription ? ' form-invalid' : ''}`, id: "ktQ3-periodicityOfIssue", value: periodicityOfIssue, disabled: isEmpty(periodicityOfIssue) && hasLargeCaseDescription && !isKTQ3TextAreaActive, onChange: onKtQ3Change, onFocus: onKTQ3FocusChange, onBlur: onKTQ3FocusChange, "aria-required": isKT3Required, required: isKT3Required, "data-tracking-id": "open-case-ktQ3-periodicityOfIssue" }),
|
|
89
|
-
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ3-periodicityOfIssue" }, `${hasLargeCaseDescription && isKTQ3TextAreaActive ? descriptionErrorMessage : ''}`))
|
|
90
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ4-timeFramesAndUrgency' }, labelContent: React.createElement(React.Fragment, null,
|
|
91
|
-
t(KtQuestionConstant.timeFramesAndUrgency),
|
|
92
|
-
' ',
|
|
93
|
-
isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
|
|
94
|
-
React.createElement(TextAreaAutosize, { className: `form-control${isKTQ4InValid || hasLargeCaseDescription ? ' form-invalid' : ''}`, id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, disabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, required: isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency" }),
|
|
95
|
-
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ4-timeFramesAndUrgency" }, `${hasLargeCaseDescription && isKTQ4TextAreaActive ? descriptionErrorMessage : ''}`))));
|
|
104
|
+
React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ3-periodicityOfIssue" }, `${hasLargeCaseDescription && isKTQ3TextAreaActive ? descriptionErrorMessage : ''}`))));
|
|
96
105
|
}
|
|
97
106
|
KtQuestions.defaultProps = defaultProps;
|
|
98
107
|
export default KtQuestions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
|
+
interface IProps {
|
|
3
|
+
clusterRecommendations: IClusterRecommendation[];
|
|
4
|
+
}
|
|
5
|
+
export declare function ClusterRecommendationItems(props: IProps): JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=ClusterRecommendationItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAW5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAiFvD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { pcm } from '@cee-eng/hydrajs';
|
|
2
|
+
import { Label } from '@patternfly/react-core';
|
|
3
|
+
import isEqual from 'lodash/isEqual';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { Trans } from 'react-i18next';
|
|
6
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
7
|
+
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
8
|
+
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
9
|
+
import { createOrUpdateSessionResources, getSessResFromInsights } from '../../reducers/SessionRestoreReducer';
|
|
10
|
+
import { riskLabels } from '../shared/Constants';
|
|
11
|
+
export function ClusterRecommendationItems(props) {
|
|
12
|
+
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
13
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
14
|
+
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
15
|
+
const { version, product } = useCaseSelector((state) => ({
|
|
16
|
+
version: state.caseDetails.version,
|
|
17
|
+
product: state.caseDetails.product,
|
|
18
|
+
}), isEqual);
|
|
19
|
+
const { parse } = useParseRuleMarkdown();
|
|
20
|
+
const onResourceClick = (e, rule) => {
|
|
21
|
+
if (e.target.tagName.toLowerCase() === 'a') {
|
|
22
|
+
const url = e.target.href.split('?')[0];
|
|
23
|
+
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.CLUSTER_RECOMMENDATION, [getSessResFromInsights(url, SessionResourceVisibility.VISITED, rule.rule_id)], JSON.stringify({ product, version }));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return (React.createElement("pfe-accordion", null, props.clusterRecommendations.map((rule) => (React.createElement(React.Fragment, null,
|
|
27
|
+
React.createElement("pfe-accordion-header", null,
|
|
28
|
+
React.createElement("h3", null, rule.description)),
|
|
29
|
+
React.createElement("pfe-accordion-panel", null,
|
|
30
|
+
React.createElement("p", null,
|
|
31
|
+
React.createElement(Label, { color: riskLabels[rule.total_risk].color },
|
|
32
|
+
React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
|
|
33
|
+
React.createElement("p", null, rule.details || ''),
|
|
34
|
+
rule.reason && (React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement("h3", { className: "subheading subheading-sm" }, "Reason: "),
|
|
36
|
+
React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parse(rule.reason, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'cluster-recommendation', 'cluster-recommendation') }))),
|
|
37
|
+
rule.resolution && (React.createElement(React.Fragment, null,
|
|
38
|
+
React.createElement("h3", { className: "subheading subheading-sm" }, "Resolution: "),
|
|
39
|
+
React.createElement("p", { onClick: (e) => onResourceClick(e, rule), dangerouslySetInnerHTML: parse(rule.resolution, rule.extra_data, SessionResourceSource.CLUSTER_RECOMMENDATION, 'cluster-recommendation', 'cluster-recommendation') })))))))));
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendations.tsx"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,UAAU,qBAAqB,gBAkC5C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Button } from '@patternfly/react-core';
|
|
2
|
+
import React, { useContext, useState } from 'react';
|
|
3
|
+
import { Trans } from 'react-i18next';
|
|
4
|
+
import { ClusterRecommendationsContext } from '../../context/ClusterRecommendationsContext';
|
|
5
|
+
import { ClusterRecommendationItems } from './ClusterRecommendationItems';
|
|
6
|
+
import { ClusterRecommendationsModal } from './ClusterRecommendationsModal';
|
|
7
|
+
export default function ClusteRecommendations() {
|
|
8
|
+
const { clusterRecommendations } = useContext(ClusterRecommendationsContext);
|
|
9
|
+
const [showModal, setShowModal] = useState(false);
|
|
10
|
+
const NUMBER_OF_RULES_TO_DISPLAY = 3;
|
|
11
|
+
const onModalClose = () => {
|
|
12
|
+
setShowModal(false);
|
|
13
|
+
};
|
|
14
|
+
if (clusterRecommendations.data.length === 0 || clusterRecommendations.isError || clusterRecommendations.isFetching)
|
|
15
|
+
return React.createElement(React.Fragment, null);
|
|
16
|
+
return (React.createElement("div", { className: "card card-white card-support top-recommendations" },
|
|
17
|
+
React.createElement("h3", { className: "card-heading" },
|
|
18
|
+
React.createElement(Trans, null, "Cluster recommendations")),
|
|
19
|
+
React.createElement("div", null,
|
|
20
|
+
React.createElement(ClusterRecommendationItems, { clusterRecommendations: clusterRecommendations.data.slice(0, NUMBER_OF_RULES_TO_DISPLAY) }),
|
|
21
|
+
clusterRecommendations.data.length > NUMBER_OF_RULES_TO_DISPLAY && (React.createElement(Button, { className: "pf-u-p-md", variant: "link", isBlock: true, onClick: () => setShowModal(true) },
|
|
22
|
+
React.createElement(Trans, null, "View more recommendations"))),
|
|
23
|
+
React.createElement(ClusterRecommendationsModal, { clusterRecommendations: clusterRecommendations.data, isOpen: showModal, onModalClose: onModalClose }))));
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
|
+
interface IProps {
|
|
3
|
+
clusterRecommendations: IClusterRecommendation[];
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onModalClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ClusterRecommendationsModal(props: IProps): JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ClusterRecommendationsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationsModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAU5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eAkExD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { pcm } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, Modal } from '@patternfly/react-core';
|
|
12
|
+
import { useFetch } from '@rh-support/components';
|
|
13
|
+
import React, { useContext, useState } from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
16
|
+
import { ClusterRecommendationItems } from './ClusterRecommendationItems';
|
|
17
|
+
import { RecommendationFeedbackModal } from './RecommendationFeedbackModal';
|
|
18
|
+
export function ClusterRecommendationsModal(props) {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
21
|
+
const { request: resolveSessionRequest, isFetching } = useFetch(pcm.preCase.session.resolveSession);
|
|
22
|
+
const { SessionResourceSource } = pcm.preCase.session;
|
|
23
|
+
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
24
|
+
const handleSolvedIssue = () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
try {
|
|
27
|
+
yield resolveSessionRequest(activeSessionId, {
|
|
28
|
+
sessionId: activeSessionId,
|
|
29
|
+
sessionResourceOriginId: (_b = (_a = sessionResourceTracking[SessionResourceSource.CLUSTER_RECOMMENDATION]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '',
|
|
30
|
+
type: SessionResourceSource.CLUSTER_RECOMMENDATION,
|
|
31
|
+
url: '',
|
|
32
|
+
});
|
|
33
|
+
setIsModalVisible(true);
|
|
34
|
+
props.onModalClose();
|
|
35
|
+
}
|
|
36
|
+
catch (e) { }
|
|
37
|
+
});
|
|
38
|
+
const onModalToggle = () => {
|
|
39
|
+
setIsModalVisible((visible) => !visible);
|
|
40
|
+
};
|
|
41
|
+
return (React.createElement(React.Fragment, null,
|
|
42
|
+
React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
43
|
+
React.createElement(Modal, { className: "critical-solutions-modal", title: t('Cluster recommendations'), description: t('Recommendations have been triggered for your cluster.'), "data-tracking-id": "cluster-recommendations-modal-body", onClose: props.onModalClose, isOpen: props.isOpen, actions: [
|
|
44
|
+
React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "cluster-recommendations-solutions-modal" }, t('I solved my issue')),
|
|
45
|
+
React.createElement(Button, { onClick: props.onModalClose, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-cluster-recommendations-modal" }, t('Cancel')),
|
|
46
|
+
] },
|
|
47
|
+
React.createElement(ClusterRecommendationItems, { clusterRecommendations: props.clusterRecommendations }))));
|
|
48
|
+
}
|
|
@@ -81,7 +81,7 @@ export function InsightResultModal(props) {
|
|
|
81
81
|
React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "solved-my-issue-critical-solutions-modal" }, t('I solved my issue')),
|
|
82
82
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel')),
|
|
83
83
|
] },
|
|
84
|
-
React.createElement(Accordion, { className: "push-top-narrow
|
|
84
|
+
React.createElement(Accordion, { className: "push-top-narrow", headingLevel: "h2", asDefinitionList: false },
|
|
85
85
|
props.insightResults.map((doc) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc }))),
|
|
86
86
|
props.EARule.length > 0 &&
|
|
87
87
|
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule })))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,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":"AAUA,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,eAmU3C"}
|
|
@@ -88,10 +88,10 @@ export function SessionRestore(props) {
|
|
|
88
88
|
}
|
|
89
89
|
else if (!isEmpty(relevantSession)) {
|
|
90
90
|
// Checking if session needs to be restored based on found relevant session
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
// Found relevent session is not same as activeSessionId and is not being restored
|
|
92
|
+
if (currentRelevantSession !== sessionRestore.activeSessionId && !isRestoring) {
|
|
93
|
+
restoreSession(relevantSession, true);
|
|
94
|
+
}
|
|
95
95
|
}
|
|
96
96
|
else if (isEmpty(relevantSession) && !isEmpty(currentUrlSeSessionId)) {
|
|
97
97
|
updateActiveSessionId(sessionRestoreDispatch, undefined);
|
|
@@ -50,4 +50,22 @@ export declare const preferredSSModalOpenPendoEvent = "PCM-Next > Preferred-secu
|
|
|
50
50
|
export declare const recsViewedFromNoAttachmentModalEvent = "PCM-Next > No-Attachment-modal-view-recommendations";
|
|
51
51
|
export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolbar-file-select";
|
|
52
52
|
export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
|
|
53
|
+
export declare const riskLabels: {
|
|
54
|
+
1: {
|
|
55
|
+
label: string;
|
|
56
|
+
color: string;
|
|
57
|
+
};
|
|
58
|
+
2: {
|
|
59
|
+
label: string;
|
|
60
|
+
color: string;
|
|
61
|
+
};
|
|
62
|
+
3: {
|
|
63
|
+
label: string;
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
4: {
|
|
67
|
+
label: string;
|
|
68
|
+
color: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
53
71
|
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
|
|
@@ -50,3 +50,9 @@ export const preferredSSModalOpenPendoEvent = 'PCM-Next > Preferred-secured-supp
|
|
|
50
50
|
export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-modal-view-recommendations';
|
|
51
51
|
export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
|
|
52
52
|
export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
|
|
53
|
+
export const riskLabels = {
|
|
54
|
+
1: { label: 'Low', color: 'blue' },
|
|
55
|
+
2: { label: 'Moderate', color: 'orange' },
|
|
56
|
+
3: { label: 'Important', color: 'red' },
|
|
57
|
+
4: { label: 'Critical', color: 'red' },
|
|
58
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAEH,eAAe,
|
|
1
|
+
{"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAEH,eAAe,EAGlB,MAAM,iCAAiC,CAAC;AAQzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA6CjC;kBA7CQ,WAAW;;;AA+CpB,eAAe,WAAW,CAAC"}
|
|
@@ -5,9 +5,10 @@ import React, { useContext } from 'react';
|
|
|
5
5
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
6
6
|
import { RouteContext } from '../../context/RouteContext';
|
|
7
7
|
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
8
|
-
import { hideFileUploadSidebarWidgetSections, showSideBarEARuleWidgetSections, } from '../../reducers/RouteConstNTypes';
|
|
8
|
+
import { hideFileUploadSidebarWidgetSections, showSideBarClusterIdRuleWidgetSections, showSideBarEARuleWidgetSections, } from '../../reducers/RouteConstNTypes';
|
|
9
9
|
import { FileDiag } from '../CaseInformation/FileDiag';
|
|
10
10
|
import { AsideResults } from '../Recommendations/AsideResults';
|
|
11
|
+
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
11
12
|
import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
|
|
12
13
|
import InsightsResults from '../Recommendations/InsightsResults';
|
|
13
14
|
import { SessionRestore } from '../SessionRestore';
|
|
@@ -27,6 +28,7 @@ function WizardAside(props) {
|
|
|
27
28
|
(!isEmpty(product) || !isEmpty(summary)) &&
|
|
28
29
|
(!canUseSessionManagement || !isEmpty(activeSessionId));
|
|
29
30
|
const canshowEARuleWidget = showSideBarEARuleWidgetSections.includes(activeSection);
|
|
31
|
+
const canShowClusterIdWidgets = showSideBarClusterIdRuleWidgetSections.includes(activeSection);
|
|
30
32
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
31
33
|
if (appRouteConfugurations[activeSection].hideAside) {
|
|
32
34
|
return null;
|
|
@@ -34,6 +36,7 @@ function WizardAside(props) {
|
|
|
34
36
|
return (React.createElement("aside", { className: "grid-aside" },
|
|
35
37
|
React.createElement("section", { className: "grid-aside-content" },
|
|
36
38
|
canshowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
39
|
+
canShowClusterIdWidgets && React.createElement(ClusterRecommendations, null),
|
|
37
40
|
React.createElement(InsightsResults, null),
|
|
38
41
|
canUseSessionManagement && React.createElement(SessionRestore, { routeProps: props.routeProps }),
|
|
39
42
|
React.createElement(AsideResults, null),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
|
+
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ClusterRecommendationsDispatchType } from '../reducers/ClusterRecommendationsReducer';
|
|
5
|
+
export interface IRulesStateContext {
|
|
6
|
+
clusterRecommendations: IApiResponseDetails<IClusterRecommendation[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ClusterRecommendationsContext: React.Context<IRulesStateContext>;
|
|
9
|
+
export declare const ClusterRecommendationsDispatchContext: React.Context<ClusterRecommendationsDispatchType>;
|
|
10
|
+
export declare function ClusterRecommendationsContextProvider({ children }: {
|
|
11
|
+
children: any;
|
|
12
|
+
}): JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ClusterRecommendationsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsContext.d.ts","sourceRoot":"","sources":["../../../src/context/ClusterRecommendationsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EACH,kCAAkC,EAGrC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IAC/B,sBAAsB,EAAE,mBAAmB,CAAC,sBAAsB,EAAE,CAAC,CAAC;CACzE;AAMD,eAAO,MAAM,6BAA6B,mCAAoD,CAAC;AAC/F,eAAO,MAAM,qCAAqC,mDAA6C,CAAC;AAEhG,wBAAgB,qCAAqC,CAAC,EAAE,QAAQ,EAAE;;CAAA,eAUjE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { useReducer } from 'react';
|
|
2
|
+
import { clusterRecommendationsReducer, initialClusterRecommendations, } from '../reducers/ClusterRecommendationsReducer';
|
|
3
|
+
const initialClusterIdStateContext = {
|
|
4
|
+
clusterRecommendations: initialClusterRecommendations,
|
|
5
|
+
};
|
|
6
|
+
const initalDispatchContext = null;
|
|
7
|
+
export const ClusterRecommendationsContext = React.createContext(initialClusterIdStateContext);
|
|
8
|
+
export const ClusterRecommendationsDispatchContext = React.createContext(initalDispatchContext);
|
|
9
|
+
export function ClusterRecommendationsContextProvider({ children }) {
|
|
10
|
+
const [clusterRecommendations, dispatch] = useReducer(clusterRecommendationsReducer, initialClusterRecommendations);
|
|
11
|
+
return (React.createElement(ClusterRecommendationsContext.Provider, { value: { clusterRecommendations } },
|
|
12
|
+
React.createElement(ClusterRecommendationsDispatchContext.Provider, { value: dispatch }, children)));
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RootTroubleshootProvider.d.ts","sourceRoot":"","sources":["../../../src/context/RootTroubleshootProvider.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,eAoBrD"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AttachmentContextProvider } from '../components/shared/fileUpload/reducer/AttachmentReducerContext';
|
|
3
3
|
import { AppMetadataContextProvider } from './AppMetadataContext';
|
|
4
4
|
import { CaseContextProvider } from './CaseContext';
|
|
5
|
+
import { ClusterRecommendationsContextProvider } from './ClusterRecommendationsContext';
|
|
5
6
|
import { RecommendationContextProvider } from './RecommendationContext';
|
|
6
7
|
import { RouteContextProvider } from './RouteContext';
|
|
7
8
|
import { RulesContextProvider } from './RulesContext';
|
|
@@ -14,6 +15,7 @@ export function RootTroubleshootProvider(props) {
|
|
|
14
15
|
React.createElement(RecommendationContextProvider, null,
|
|
15
16
|
React.createElement(AttachmentContextProvider, null,
|
|
16
17
|
React.createElement(RulesContextProvider, null,
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement(
|
|
18
|
+
React.createElement(ClusterRecommendationsContextProvider, null,
|
|
19
|
+
React.createElement(TCContextProvider, null,
|
|
20
|
+
React.createElement(SessionRestoreContextProvider, null, props.children))))))))));
|
|
19
21
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SessionResourceSource } from '@cee-eng/hydrajs/@types/api/pcm/troubleshootSession';
|
|
2
|
+
export declare const useParseRuleMarkdown: () => {
|
|
3
|
+
parse: (dotString: string, reportDetails: any, source: SessionResourceSource, trackingClassName: string, trackingId: string) => {
|
|
4
|
+
__html: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=useParseRuleMarkdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useParseRuleMarkdown.d.ts","sourceRoot":"","sources":["../../../src/hooks/useParseRuleMarkdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAQ5F,eAAO,MAAM,oBAAoB;uBAed,MAAM,8BAET,qBAAqB,qBACV,MAAM,cACb,MAAM;;;CAmBzB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { markdownToHTML } from '@cee-eng/ui-toolkit';
|
|
2
|
+
import { parseDotTemplate } from '@rh-support/utils';
|
|
3
|
+
import { useContext } from 'react';
|
|
4
|
+
import { SessionRestoreStateContext } from '../context/SessionRestoreContext';
|
|
5
|
+
import RouteUtils from '../utils/routeUtils';
|
|
6
|
+
export const useParseRuleMarkdown = () => {
|
|
7
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
8
|
+
const getTrackingQueryParams = (source) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[source]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', source, 'se');
|
|
11
|
+
};
|
|
12
|
+
function parse(dotString, reportDetails, source, trackingClassName, trackingId) {
|
|
13
|
+
const markdown = parseDotTemplate(dotString, reportDetails);
|
|
14
|
+
const anchorHrefRegex = /href="(.*?)"/g;
|
|
15
|
+
return {
|
|
16
|
+
__html: markdownToHTML(markdown, {
|
|
17
|
+
openLinksInNewTab: true,
|
|
18
|
+
})
|
|
19
|
+
.replace(anchorHrefRegex, `href="$1?${getTrackingQueryParams(source)}"`)
|
|
20
|
+
.replace('target="blank"', `target="blank" class="se-recommended ts-${trackingClassName} data-tracking-id="se-${trackingId}-rule"`),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return { parse };
|
|
24
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,kBAAkB;;EAsCjC"}
|
|
@@ -2,12 +2,14 @@ import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadat
|
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
|
|
4
4
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
5
|
+
import { ClusterRecommendationsDispatchContext } from '../context/ClusterRecommendationsContext';
|
|
5
6
|
import { useRecommendationDispatchContext } from '../context/RecommendationContext';
|
|
6
7
|
import { RouteDispatchContext } from '../context/RouteContext';
|
|
7
8
|
import { RulesDispatchContext } from '../context/RulesContext';
|
|
8
9
|
import { TCDispatchContext } from '../context/TopContentContext';
|
|
9
10
|
import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
|
|
10
11
|
import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
|
|
12
|
+
import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
|
|
11
13
|
import { resetRecommendations } from '../reducers/RecommendationsReducer';
|
|
12
14
|
import { RouteReducerConstants } from '../reducers/RouteReducer';
|
|
13
15
|
import { resetEARules } from '../reducers/RulesReducer';
|
|
@@ -20,6 +22,7 @@ export function useResetCaseCreate() {
|
|
|
20
22
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
21
23
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
22
24
|
const rulesDispatch = useContext(RulesDispatchContext);
|
|
25
|
+
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
23
26
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
24
27
|
const resetCaseCreateState = () => {
|
|
25
28
|
resetAttachment(dispatchToAttachmentReducer);
|
|
@@ -33,6 +36,7 @@ export function useResetCaseCreate() {
|
|
|
33
36
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), '', undefined, undefined, true);
|
|
34
37
|
dispatchToRouteReducer({ type: RouteReducerConstants.resetRouteState });
|
|
35
38
|
resetEARules(rulesDispatch);
|
|
39
|
+
resetClusterRecommendations(clusterRecommendationsDispatch);
|
|
36
40
|
};
|
|
37
41
|
return {
|
|
38
42
|
resetCaseCreateState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAW3D,OAAO,EAMH,UAAU,EAcb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mB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,MAAM,kBACb,MAAM,KACvB,MAwBF,CAAC;AAEF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAkC5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
|
|
@@ -124,6 +124,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
|
|
|
124
124
|
? hasValidClusterId() || hasValidReason() || hasValidReasonExplanation() || hasValidV3ClusterName()
|
|
125
125
|
: true;
|
|
126
126
|
};
|
|
127
|
+
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseStateValid
|
|
127
128
|
export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
128
129
|
const case_details = caseState.caseDetails;
|
|
129
130
|
return (isEmpty(case_details.caseNumber) &&
|
|
@@ -134,6 +135,7 @@ export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
134
135
|
case_details.summary.length <= SUMMARY_LENGTH_LIMIT &&
|
|
135
136
|
!isEmpty(case_details.description) &&
|
|
136
137
|
case_details.description.length <= DESCRIPTION_LENGTH_LIMIT &&
|
|
138
|
+
!isEmpty(case_details.timeFramesAndUrgency) &&
|
|
137
139
|
(!isEmpty(case_details.hostname) ? case_details.hostname.length <= HOSTNAME_LENGTH_LIMIT : true) &&
|
|
138
140
|
(!isEmpty(case_details.contactInfo24x7)
|
|
139
141
|
? case_details.contactInfo24x7.length <= CONTACT_INFO_24X7_LIMIT
|
|
@@ -164,6 +166,7 @@ export const isCaseManagementStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
164
166
|
: true) &&
|
|
165
167
|
canManageCase(loggedInUserJwtToken));
|
|
166
168
|
};
|
|
169
|
+
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseInformationSectionValid
|
|
167
170
|
export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) => {
|
|
168
171
|
const case_details = caseState.caseDetails;
|
|
169
172
|
return (isEmpty(case_details.caseNumber) &&
|
|
@@ -174,6 +177,7 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) =
|
|
|
174
177
|
case_details.summary.length <= SUMMARY_LENGTH_LIMIT &&
|
|
175
178
|
!isEmpty(case_details.description) &&
|
|
176
179
|
case_details.description.length <= DESCRIPTION_LENGTH_LIMIT &&
|
|
180
|
+
!isEmpty(case_details.timeFramesAndUrgency) &&
|
|
177
181
|
!isEmpty(case_details.accountNumberRef) &&
|
|
178
182
|
!isEmpty(case_details.contactSSOName) &&
|
|
179
183
|
canManageCase(loggedInUserJwtToken));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
|
+
import { IAction, IApiResponseDetails } from '@rh-support/types/shared';
|
|
3
|
+
export declare enum RulesReducerConstants {
|
|
4
|
+
requestClusterRecommendations = "requestClusterRecommendations",
|
|
5
|
+
resetClusterRecommendations = "resetClusterRecommendations"
|
|
6
|
+
}
|
|
7
|
+
declare type IActionType = IAction<RulesReducerConstants, IApiResponseDetails<IClusterRecommendation[]>>;
|
|
8
|
+
export declare type ClusterRecommendationsDispatchType = (value: IActionType) => void;
|
|
9
|
+
export declare const initialClusterRecommendations: IApiResponseDetails<IClusterRecommendation[]>;
|
|
10
|
+
export declare const clusterRecommendationsReducer: (state: IApiResponseDetails<IClusterRecommendation[]>, action: IActionType) => IApiResponseDetails<IClusterRecommendation[]>;
|
|
11
|
+
export declare const resetClusterRecommendations: (dispatch: ClusterRecommendationsDispatchType) => void;
|
|
12
|
+
export declare const fetchClusterRecommendations: (dispatch: ClusterRecommendationsDispatchType, clusterId: string) => Promise<void>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ClusterRecommendationsReducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/ClusterRecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,sBAAsB,EAEzB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,oBAAY,qBAAqB;IAC7B,6BAA6B,kCAAkC;IAC/D,2BAA2B,gCAAgC;CAC9D;AAED,aAAK,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC;AACjG,oBAAY,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,CAAC,sBAAsB,EAAE,CAA4B,CAAC;AAErH,eAAO,MAAM,6BAA6B,UAC/B,oBAAoB,sBAAsB,EAAE,CAAC,0BAErD,oBAAoB,sBAAsB,EAAE,CAa9C,CAAC;AAGF,eAAO,MAAM,2BAA2B,aAAc,kCAAkC,SAEvF,CAAC;AACF,eAAO,MAAM,2BAA2B,aAAoB,kCAAkC,aAAa,MAAM,kBAuBhH,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { pcm } from '@cee-eng/hydrajs';
|
|
11
|
+
import { getApiResourceObject } from '@rh-support/utils';
|
|
12
|
+
export var RulesReducerConstants;
|
|
13
|
+
(function (RulesReducerConstants) {
|
|
14
|
+
RulesReducerConstants["requestClusterRecommendations"] = "requestClusterRecommendations";
|
|
15
|
+
RulesReducerConstants["resetClusterRecommendations"] = "resetClusterRecommendations";
|
|
16
|
+
})(RulesReducerConstants || (RulesReducerConstants = {}));
|
|
17
|
+
export const initialClusterRecommendations = getApiResourceObject([]);
|
|
18
|
+
export const clusterRecommendationsReducer = (state, action) => {
|
|
19
|
+
switch (action.type) {
|
|
20
|
+
case RulesReducerConstants.requestClusterRecommendations: {
|
|
21
|
+
return Object.assign(Object.assign({}, state), action.payload);
|
|
22
|
+
}
|
|
23
|
+
// used for reseting the rules when reseting on a new troubleshoot issue.
|
|
24
|
+
case RulesReducerConstants.resetClusterRecommendations: {
|
|
25
|
+
return Object.assign({}, initialClusterRecommendations);
|
|
26
|
+
}
|
|
27
|
+
default: {
|
|
28
|
+
return state;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
// Actions
|
|
33
|
+
export const resetClusterRecommendations = (dispatch) => {
|
|
34
|
+
dispatch({ type: RulesReducerConstants.resetClusterRecommendations });
|
|
35
|
+
};
|
|
36
|
+
export const fetchClusterRecommendations = (dispatch, clusterId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
+
var _a;
|
|
38
|
+
dispatch({
|
|
39
|
+
type: RulesReducerConstants.requestClusterRecommendations,
|
|
40
|
+
payload: getApiResourceObject([], true),
|
|
41
|
+
});
|
|
42
|
+
try {
|
|
43
|
+
const clusterInsight = yield pcm.preCase.diag.getClusterRecommendations(clusterId);
|
|
44
|
+
const rules = ((_a = clusterInsight === null || clusterInsight === void 0 ? void 0 : clusterInsight.report) === null || _a === void 0 ? void 0 : _a.data) || [];
|
|
45
|
+
dispatch({
|
|
46
|
+
type: RulesReducerConstants.requestClusterRecommendations,
|
|
47
|
+
payload: getApiResourceObject(rules),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
console.log(e.message);
|
|
52
|
+
dispatch({
|
|
53
|
+
type: RulesReducerConstants.requestClusterRecommendations,
|
|
54
|
+
payload: getApiResourceObject([], false, true, e.message),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -21,4 +21,5 @@ export declare const sessionRestoreCardSections: AppRouteSections[];
|
|
|
21
21
|
export declare const hideFileUploadSidebarWidgetSections: AppRouteSections[];
|
|
22
22
|
export declare const showSidebarRecommendationsSections: AppRouteSections[];
|
|
23
23
|
export declare const showSideBarEARuleWidgetSections: AppRouteSections[];
|
|
24
|
+
export declare const showSideBarClusterIdRuleWidgetSections: AppRouteSections[];
|
|
24
25
|
//# sourceMappingURL=RouteConstNTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,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;IAIrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,eAAe;CAAG;AACnC,oBAAY,gBAAgB;IACxB,SAAS,cAAc;IACvB,gBAAgB,mBAAmB;IACnC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,QAAQ,oBAAoB;IAC5B,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC9B;AAED,eAAO,MAAM,0BAA0B,oBAItC,CAAC;AACF,eAAO,MAAM,mCAAmC,oBAAoE,CAAC;AACrH,eAAO,MAAM,kCAAkC,oBAK9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAI3C,CAAC"}
|
|
1
|
+
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,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;IAIrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,eAAe;CAAG;AACnC,oBAAY,gBAAgB;IACxB,SAAS,cAAc;IACvB,gBAAgB,mBAAmB;IACnC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,QAAQ,oBAAoB;IAC5B,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC9B;AAED,eAAO,MAAM,0BAA0B,oBAItC,CAAC;AACF,eAAO,MAAM,mCAAmC,oBAAoE,CAAC;AACrH,eAAO,MAAM,kCAAkC,oBAK9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAI3C,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAKlD,CAAC"}
|
|
@@ -25,3 +25,9 @@ export const showSideBarEARuleWidgetSections = [
|
|
|
25
25
|
AppRouteSections.CASE_MGM,
|
|
26
26
|
AppRouteSections.OPEN_CASE,
|
|
27
27
|
];
|
|
28
|
+
export const showSideBarClusterIdRuleWidgetSections = [
|
|
29
|
+
AppRouteSections.CASE_INFORMATION,
|
|
30
|
+
AppRouteSections.CASE_MGM,
|
|
31
|
+
AppRouteSections.REVIEW,
|
|
32
|
+
AppRouteSections.SUBMIT_CASE,
|
|
33
|
+
];
|
|
@@ -62,13 +62,14 @@ export declare function createOrUpdateSessionResources(dispatch: SessionReducerD
|
|
|
62
62
|
export declare function createSessionResourcesLocal(dispatch: SessionReducerDispatchType, activeSessionId: string, currentSessionResourceTracking: ISessionResourcesTracking, source: ISessionResourceSource, payload: string, resources?: ISessionResource[]): Promise<void>;
|
|
63
63
|
export declare function updateSessionResourcesLocal(dispatch: SessionReducerDispatchType, activeSessionId: string, currentSessionResourceTracking: ISessionResourcesTracking, source: ISessionResourceSource, resources: ISessionResource[]): Promise<void>;
|
|
64
64
|
export declare function getSessResFromTCCategories(tcCategories: ITopContentList[], visibilityStatus: ISessionResourceVisibility): ISessionResource[];
|
|
65
|
-
export declare const getSessResTCCategory: (tcCategory: ITopContentList, visibilityStatus: ISessionResourceVisibility
|
|
66
|
-
export declare function getSessResFromRecs(recs: ISolrRecommendation[], visibilityStatus: ISessionResourceVisibility): ISessionResource[];
|
|
65
|
+
export declare const getSessResTCCategory: (tcCategory: ITopContentList, visibilityStatus: ISessionResourceVisibility) => ISessionResource[];
|
|
67
66
|
export declare const getSessResTC: (tc: ITopContent, visibilityStatus: ISessionResourceVisibility, resourceEntityId?: any) => ISessionResource;
|
|
68
|
-
export declare
|
|
67
|
+
export declare function getSessResFromRecs(recs: ISolrRecommendation[], visibilityStatus: ISessionResourceVisibility): ISessionResource[];
|
|
68
|
+
export declare const getSessResFromRec: (rec: ISolrRecommendation, visibilityStatus: ISessionResourceVisibility, rank?: number) => ISessionResource;
|
|
69
69
|
export declare const getSessResFromInsights: (url: string, visibilityStatus: ISessionResourceVisibility, resourceEntityId?: any) => ISessionResource;
|
|
70
70
|
export declare const getSessResFromEARules: (rules: IRule[], visibilityStatus: ISessionResourceVisibility) => ISessionResource[];
|
|
71
71
|
export declare const getSessResFromEA: (cta: string, visibilityStatus: ISessionResourceVisibility, resourceEntityId?: any) => ISessionResource;
|
|
72
|
+
export declare const getSessResFromClusterRecommendation: (cta: string, visibilityStatus: ISessionResourceVisibility, resourceEntityId?: any) => ISessionResource;
|
|
72
73
|
export declare const getRecToSave: (visitedRec: ISolrRecommendation, allPresentedRec: ISolrRecommendation[], allDocs?: ISolrRecommendation[]) => ISessionResource[];
|
|
73
74
|
export {};
|
|
74
75
|
//# sourceMappingURL=SessionRestoreReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestoreReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/SessionRestoreReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AACrE,OAAO,EACH,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,IAAI,sBAAsB,EAC/C,yBAAyB,IAAI,0BAA0B,EAC1D,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACv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,0BAA0B,CACtC,YAAY,EAAE,eAAe,EAAE,EAC/B,gBAAgB,EAAE,0BAA0B,GAC7C,gBAAgB,EAAE,CAIpB;AAID,eAAO,MAAM,oBAAoB,eACjB,eAAe,oBACT,0BAA0B,KAC7C,gBAAgB,EAIlB,CAAC;AAIF,eAAO,MAAM,YAAY,OACjB,WAAW,oBACG,0BAA0B,6BAE7C,gBAMD,CAAC;AAIH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,mBAAmB,EAAE,EAC3B,gBAAgB,EAAE,0BAA0B,GAC7C,gBAAgB,EAAE,CAIpB;AAID,eAAO,MAAM,iBAAiB,QACrB,mBAAmB,oBACN,0BAA0B,SACrC,MAAM,KACd,gBAMD,CAAC;AAIH,eAAO,MAAM,sBAAsB,QAC1B,MAAM,oBACO,0BAA0B,6BAE7C,gBAKD,CAAC;AAIH,eAAO,MAAM,qBAAqB,UACvB,KAAK,EAAE,oBACI,0BAA0B,KAC7C,gBAAgB,EAIlB,CAAC;AAIF,eAAO,MAAM,gBAAgB,QACpB,MAAM,oBACO,0BAA0B,6BAE7C,gBAKD,CAAC;AAIH,eAAO,MAAM,mCAAmC,QACvC,MAAM,oBACO,0BAA0B,6BAE7C,gBAKD,CAAC;AAIH,eAAO,MAAM,YAAY,eACT,mBAAmB,mBACd,mBAAmB,EAAE,YAC7B,mBAAmB,EAAE,uBAWjC,CAAC"}
|
|
@@ -113,6 +113,7 @@ export const sessionRestoreReducer = (state, action) => {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
+
// Function to Load Previous Session
|
|
116
117
|
export const loadPreviousSessions = (dispatch) => __awaiter(void 0, void 0, void 0, function* () {
|
|
117
118
|
dispatch({
|
|
118
119
|
type: SessionRestoreConstants.getSessions,
|
|
@@ -143,6 +144,7 @@ export const loadPreviousSessions = (dispatch) => __awaiter(void 0, void 0, void
|
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
});
|
|
147
|
+
// Function to Create Session
|
|
146
148
|
export const createSession = (dispatch, sessionDetails, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
147
149
|
try {
|
|
148
150
|
dispatch({
|
|
@@ -161,6 +163,7 @@ export const createSession = (dispatch, sessionDetails, session) => __awaiter(vo
|
|
|
161
163
|
console.error(error);
|
|
162
164
|
}
|
|
163
165
|
});
|
|
166
|
+
// Function to Update Session
|
|
164
167
|
export const updateSession = (dispatch, sessionId, sessionDetails, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
165
168
|
try {
|
|
166
169
|
dispatch({
|
|
@@ -178,6 +181,7 @@ export const updateSession = (dispatch, sessionId, sessionDetails, session) => _
|
|
|
178
181
|
console.error(error);
|
|
179
182
|
}
|
|
180
183
|
});
|
|
184
|
+
// Function to Update Active SessionID
|
|
181
185
|
export const updateActiveSessionId = (dispatch, activeSessionId) => {
|
|
182
186
|
dispatch({ type: SessionRestoreConstants.setActiveSessionId, payload: { activeSessionId } });
|
|
183
187
|
};
|
|
@@ -210,6 +214,7 @@ export function getRelevantSessionFromSessions(dispatch, currentRelevantSessionI
|
|
|
210
214
|
}
|
|
211
215
|
}
|
|
212
216
|
}
|
|
217
|
+
// Mark All Sessions UnResolved
|
|
213
218
|
export function markAllSessionsUnresolved(dispatch, sessionData, userAgent) {
|
|
214
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
220
|
const updatedSessionObj = {};
|
|
@@ -236,6 +241,7 @@ export function markAllSessionsUnresolved(dispatch, sessionData, userAgent) {
|
|
|
236
241
|
});
|
|
237
242
|
});
|
|
238
243
|
}
|
|
244
|
+
// Create or Update Session Resource Helper
|
|
239
245
|
export function createOrUpdateSessionResources(dispatch, activeSessionId, currentSessionResourceTracking, source, resources = [], payload = JSON.stringify({})) {
|
|
240
246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
241
247
|
if (isEmpty(payload) || isEmpty(activeSessionId) || isEmpty(source))
|
|
@@ -249,6 +255,7 @@ export function createOrUpdateSessionResources(dispatch, activeSessionId, curren
|
|
|
249
255
|
}
|
|
250
256
|
});
|
|
251
257
|
}
|
|
258
|
+
// Create Session Resource Helper
|
|
252
259
|
export function createSessionResourcesLocal(dispatch, activeSessionId, currentSessionResourceTracking, source, payload, resources = []) {
|
|
253
260
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
261
|
if (isEmpty(payload) || isEmpty(activeSessionId) || isEmpty(source))
|
|
@@ -287,6 +294,7 @@ export function createSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
287
294
|
}
|
|
288
295
|
});
|
|
289
296
|
}
|
|
297
|
+
// Update Session Resource Helper
|
|
290
298
|
export function updateSessionResourcesLocal(dispatch, activeSessionId, currentSessionResourceTracking, source, resources) {
|
|
291
299
|
var _a;
|
|
292
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -328,56 +336,45 @@ export function updateSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
328
336
|
}
|
|
329
337
|
});
|
|
330
338
|
}
|
|
331
|
-
//
|
|
339
|
+
// Session Resource Helper Functions
|
|
340
|
+
// Top Content Category Helper Function
|
|
332
341
|
export function getSessResFromTCCategories(tcCategories, visibilityStatus) {
|
|
333
342
|
const toReturn = [];
|
|
334
|
-
forEach(tcCategories, (tcCategory) => toReturn.push(...getSessResTCCategory(tcCategory, visibilityStatus
|
|
343
|
+
forEach(tcCategories, (tcCategory) => toReturn.push(...getSessResTCCategory(tcCategory, visibilityStatus)));
|
|
335
344
|
return toReturn;
|
|
336
345
|
}
|
|
337
|
-
|
|
346
|
+
// Top Content Helper Function Call
|
|
347
|
+
export const getSessResTCCategory = (tcCategory, visibilityStatus) => {
|
|
338
348
|
const toReturn = [];
|
|
339
|
-
forEach(tcCategory.content, (tc) => toReturn.push(getSessResTC(tc, visibilityStatus
|
|
349
|
+
forEach(tcCategory.content, (tc) => toReturn.push(getSessResTC(tc, visibilityStatus)));
|
|
340
350
|
return toReturn;
|
|
341
351
|
};
|
|
352
|
+
// Top Content Helper Function
|
|
353
|
+
export const getSessResTC = (tc, visibilityStatus, resourceEntityId) => {
|
|
354
|
+
var _a, _b, _c, _d;
|
|
355
|
+
return (Object.assign(Object.assign({ visibilityStatus }, ((tc === null || tc === void 0 ? void 0 : tc.topContentId) && { resourceEntityId: `${(_a = tc === null || tc === void 0 ? void 0 : tc.topContentId) !== null && _a !== void 0 ? _a : null}` })), { type: getResTypeFromUrl((_b = tc === null || tc === void 0 ? void 0 : tc.contentUrl) !== null && _b !== void 0 ? _b : ''), url: (_c = tc === null || tc === void 0 ? void 0 : tc.contentUrl) !== null && _c !== void 0 ? _c : '', rank: (_d = tc === null || tc === void 0 ? void 0 : tc.contentRank) !== null && _d !== void 0 ? _d : 0 }));
|
|
356
|
+
};
|
|
357
|
+
// Recommendations Helper Function Call
|
|
342
358
|
export function getSessResFromRecs(recs, visibilityStatus) {
|
|
343
359
|
const toReturn = [];
|
|
344
|
-
forEach(recs, (rec) => toReturn.push(getSessResFromRec(rec, visibilityStatus
|
|
360
|
+
forEach(recs, (rec) => toReturn.push(getSessResFromRec(rec, visibilityStatus)));
|
|
345
361
|
return toReturn;
|
|
346
362
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
type: getResTypeFromUrl((_b = tc === null || tc === void 0 ? void 0 : tc.contentUrl) !== null && _b !== void 0 ? _b : ''),
|
|
353
|
-
url: (_c = tc === null || tc === void 0 ? void 0 : tc.contentUrl) !== null && _c !== void 0 ? _c : '',
|
|
354
|
-
rank: (_d = tc === null || tc === void 0 ? void 0 : tc.contentRank) !== null && _d !== void 0 ? _d : 0,
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
|
-
export const getSessResFromRec = (rec, visibilityStatus, resourceEntityId, rank) => ({
|
|
358
|
-
visibilityStatus,
|
|
359
|
-
resourceEntityId,
|
|
360
|
-
type: getResTypeFromUrl(rec.view_uri),
|
|
361
|
-
url: rec.view_uri,
|
|
362
|
-
rank,
|
|
363
|
-
});
|
|
364
|
-
export const getSessResFromInsights = (url, visibilityStatus, resourceEntityId) => ({
|
|
365
|
-
visibilityStatus,
|
|
366
|
-
resourceEntityId,
|
|
367
|
-
type: getResTypeFromUrl(url),
|
|
368
|
-
url: url,
|
|
369
|
-
});
|
|
363
|
+
// Recommendations Helper Function
|
|
364
|
+
export const getSessResFromRec = (rec, visibilityStatus, rank) => (Object.assign(Object.assign({ visibilityStatus }, (rec.id && { resourceEntityId: rec.id })), { type: getResTypeFromUrl(rec.view_uri), url: rec.view_uri, rank }));
|
|
365
|
+
// Insights Helper Function
|
|
366
|
+
export const getSessResFromInsights = (url, visibilityStatus, resourceEntityId) => (Object.assign(Object.assign({ visibilityStatus }, (resourceEntityId && { resourceEntityId })), { type: getResTypeFromUrl(url), url: url }));
|
|
367
|
+
// EARules Helper Function Call
|
|
370
368
|
export const getSessResFromEARules = (rules, visibilityStatus) => {
|
|
371
369
|
const toReturn = [];
|
|
372
370
|
forEach(rules, (rule) => toReturn.push(getSessResFromEA(rule.cta, visibilityStatus, rule.rule_id)));
|
|
373
371
|
return toReturn;
|
|
374
372
|
};
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
});
|
|
373
|
+
// EARules Helper Function
|
|
374
|
+
export const getSessResFromEA = (cta, visibilityStatus, resourceEntityId) => (Object.assign(Object.assign({ visibilityStatus }, (resourceEntityId && { resourceEntityId })), { type: getResTypeFromUrl(`${window.location.origin}${cta}`), url: cta.startsWith('http') ? cta : `${window.location.origin}/${cta}` }));
|
|
375
|
+
// Cluster Recommendation Helper Function
|
|
376
|
+
export const getSessResFromClusterRecommendation = (cta, visibilityStatus, resourceEntityId) => (Object.assign(Object.assign({ visibilityStatus }, (resourceEntityId && { resourceEntityId })), { type: 'rule', url: cta }));
|
|
377
|
+
// Save Recommendations Helper Function
|
|
381
378
|
export const getRecToSave = (visitedRec, allPresentedRec, allDocs = []) => {
|
|
382
379
|
var _a, _b;
|
|
383
380
|
const isNotOnFirstPage = ((_a = allDocs === null || allDocs === void 0 ? void 0 : allDocs[0]) === null || _a === void 0 ? void 0 : _a.view_uri) !== ((_b = allPresentedRec === null || allPresentedRec === void 0 ? void 0 : allPresentedRec[0]) === null || _b === void 0 ? void 0 : _b.view_uri);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/routeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAM5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpG,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,MAAM,CAAC,UAAU,SAAM;IAEvB;;;;;;;OAOG;IACH,MAAM,CAAC,cAAc,CACjB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,kBAAkB,GAAE,iBAAsB;IAe9C,MAAM,CAAC,gBAAgB,CACnB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,wBAAwB,EAAE,gBAAgB,EAAE,EAC5C,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,GACxB,gBAAgB;IAiBnB,MAAM,CAAC,cAAc,CACjB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,iBAAiB,UAAQ,EACzB,UAAU,GAAE,eAAoB,GACjC,MAAM;IAKT,MAAM,CAAC,mCAAmC,CACtC,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,UAAU,EAAE,gBAAgB,EAC5B,wBAAwB,EAAE,gBAAgB,EAAE,EAC5C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,EACvB,cAAc,EAAE,OAAO;IAc3B,MAA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AAO,GACxB,gBAAgB,EAAE;IAarB,MAAM,CAAC,4BAA4B,CAC/B,aAAa,EAAE,gBAAgB,EAC/B,wBAAwB,EAAE,gBAAgB,EAAE,EAC5C,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,GACxB,MAAM;IAeT,MAAM,CAAC,iBAAiB,CACpB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAChD,SAAS,EAAE,iBAAiB,EAC5B,cAAc,UAAQ;IAY1B,MAAM,CAAC,wBAAwB,CAC3B,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,qBAAqB,EAC/B,IAAI,SAAO;CAMlB"}
|
|
@@ -83,6 +83,9 @@ export default class RouteUtils {
|
|
|
83
83
|
const navigationObj = { pathname: routeProps.location.pathname, search: getStringifiedParams(params) };
|
|
84
84
|
routeProps.history.replace(navigationObj);
|
|
85
85
|
}
|
|
86
|
+
// a rule has two seactions: reason and resolution.
|
|
87
|
+
// when user click on a link in the rule, we add couple of params and
|
|
88
|
+
// only when link is in the resolution section we add se band
|
|
86
89
|
static getSEResourceQueryParams(seSessionId, seResourceOriginID, seSource, band = 'se') {
|
|
87
90
|
return isEmpty(seSessionId)
|
|
88
91
|
? `band=${band}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"publishConfig": {
|
|
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.
|
|
29
|
+
"@cee-eng/hydrajs": "4.6.0",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.3",
|
|
31
31
|
"@patternfly/patternfly": "4.102.2",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.1.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react-virtualized": "^9.21.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@cee-eng/hydrajs": "4.
|
|
66
|
+
"@cee-eng/hydrajs": "4.6.0",
|
|
67
67
|
"@cee-eng/ui-toolkit": "1.1.3",
|
|
68
68
|
"@patternfly/patternfly": "4.102.2",
|
|
69
69
|
"@patternfly/pfe-accordion": "1.1.0",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"@patternfly/react-core": "4.128.2",
|
|
73
73
|
"@progress/kendo-drawing": "^1.6.0",
|
|
74
74
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
75
|
-
"@rh-support/api": "0.3.
|
|
76
|
-
"@rh-support/components": "1.1.
|
|
77
|
-
"@rh-support/react-context": "0.2.
|
|
75
|
+
"@rh-support/api": "0.3.7",
|
|
76
|
+
"@rh-support/components": "1.1.13",
|
|
77
|
+
"@rh-support/react-context": "0.2.15",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
|
-
"@rh-support/user-permissions": "0.2.
|
|
80
|
-
"@rh-support/utils": "0.2.
|
|
79
|
+
"@rh-support/user-permissions": "0.2.9",
|
|
80
|
+
"@rh-support/utils": "0.2.9",
|
|
81
81
|
"@types/react-redux": "^7.1.12",
|
|
82
82
|
"@types/redux": "^3.6.0",
|
|
83
83
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "6e0c6103e776d314540f06fffa80be12601c08d3"
|
|
146
146
|
}
|