@rh-support/troubleshoot 1.1.0 → 1.1.2
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/Recommendations/AlertToastWrapper.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AlertToastWrapper.js +7 -4
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +1 -1
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts +1 -0
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +5 -3
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -5
- package/lib/esm/components/Review/Review.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +0 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +4 -6
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +11 -5
- package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +4 -3
- package/lib/esm/reducers/RouteConstNTypes.d.ts +0 -1
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +0 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"AlertToastWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AlertToastWrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAc,EAAE,EAAE,EAAwB,MAAM,OAAO,CAAC;AAOxD,UAAU,MAAM;IACZ,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5D;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,MAAM,CAmBjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* We need to wrap Critical solution toast notification and Cluster recommendation toast notification so they don't get overlapped.
|
|
3
3
|
*/
|
|
4
4
|
import { AlertGroup } from '@patternfly/react-core';
|
|
5
|
-
import React, { useContext } from 'react';
|
|
5
|
+
import React, { useContext, useState } from 'react';
|
|
6
6
|
import { RouteContext } from '../../context/RouteContext';
|
|
7
|
-
import { hideSideBarClusterIdRuleToast
|
|
7
|
+
import { hideSideBarClusterIdRuleToast } from '../../reducers/RouteConstNTypes';
|
|
8
8
|
import { ResubmitToast } from '../SubmitCase/ResubmitToast';
|
|
9
9
|
import ClusterRecommendationToast from './ClusterRecommendationToast';
|
|
10
10
|
import CriticalSolutionsToast from './CriticalSolutionsToast';
|
|
11
11
|
const AlertToastWrapper = ({ submitCaseAndNavigate }) => {
|
|
12
12
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
13
13
|
const hideClusterIdReportModal = hideSideBarClusterIdRuleToast.includes(activeSection);
|
|
14
|
-
const
|
|
14
|
+
const [isCriticalSolutionsVisible, setIsCriticalSolutionsVisible] = useState(true);
|
|
15
|
+
const userClosed = () => {
|
|
16
|
+
setIsCriticalSolutionsVisible(false);
|
|
17
|
+
};
|
|
15
18
|
return (React.createElement(AlertGroup, { isToast: true },
|
|
16
|
-
|
|
19
|
+
isCriticalSolutionsVisible && React.createElement(CriticalSolutionsToast, { userClosed: userClosed }),
|
|
17
20
|
!hideClusterIdReportModal && React.createElement(ClusterRecommendationToast, null),
|
|
18
21
|
React.createElement(ResubmitToast, { submitCaseAndNavigate: submitCaseAndNavigate })));
|
|
19
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,YAAY,gBAkM3B"}
|
|
@@ -124,7 +124,7 @@ export function AsideResults() {
|
|
|
124
124
|
return;
|
|
125
125
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, getSessResFromRecs(recommendationState.sideRecommendation, SessionResourceVisibility.PRESENTED), JSON.stringify(payload));
|
|
126
126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
-
}, [recommendationState.sideRecommendation, activeSessionId]);
|
|
127
|
+
}, [recommendationState.sideRecommendation, activeSessionId, activeSection]);
|
|
128
128
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
129
129
|
if (!canShowSideRecommendations())
|
|
130
130
|
return React.createElement(React.Fragment, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAKnE,UAAU,MAAM;
|
|
1
|
+
{"version":3,"file":"CriticalSolutionsToast.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/CriticalSolutionsToast.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAKnE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAiDtC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
import { RulesDispatchContext, RulesStateContext } from '../../context/RulesContext';
|
|
5
5
|
import { RulesReducerConstants } from '../../reducers/RulesReducer';
|
|
6
|
-
const CriticalSolutionsToast = () => {
|
|
6
|
+
const CriticalSolutionsToast = (props) => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
const [showNotification, setShowNotification] = useState(false);
|
|
9
9
|
const { rulesState } = useContext(RulesStateContext);
|
|
@@ -20,6 +20,7 @@ const CriticalSolutionsToast = () => {
|
|
|
20
20
|
payload: { triggerRuleNotification: false },
|
|
21
21
|
});
|
|
22
22
|
setShowNotification(false);
|
|
23
|
+
props.userClosed();
|
|
23
24
|
};
|
|
24
25
|
const setEAModalVisibility = (isVisible) => {
|
|
25
26
|
rulesDispatch({
|
|
@@ -30,10 +31,11 @@ const CriticalSolutionsToast = () => {
|
|
|
30
31
|
const viewCriticalSolution = () => {
|
|
31
32
|
onClose();
|
|
32
33
|
setEAModalVisibility(true);
|
|
34
|
+
props.userClosed();
|
|
33
35
|
};
|
|
34
36
|
if (!showNotification && !rulesState.triggerRuleNotification)
|
|
35
37
|
return null;
|
|
36
|
-
return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('
|
|
37
|
-
React.createElement(Trans, null, "
|
|
38
|
+
return (React.createElement(Alert, { isLiveRegion: true, variant: "success", title: t('File recommendations are ready to view'), "data-tracking-id": "toast-view-crit-sol", actionLinks: React.createElement(Button, { isInline: true, variant: "link", onClick: viewCriticalSolution },
|
|
39
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), actionClose: React.createElement(AlertActionCloseButton, { variantLabel: "success alert", onClose: onClose }) }));
|
|
38
40
|
};
|
|
39
41
|
export default CriticalSolutionsToast;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAuPrC;kBAvPQ,eAAe;;;AA0PxB,eAAe,eAAe,CAAC"}
|
|
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { search } from '@cee-eng/hydrajs';
|
|
22
|
-
import { Alert
|
|
22
|
+
import { Alert } from '@patternfly/react-core';
|
|
23
23
|
import { usePrevious } from '@rh-support/components';
|
|
24
24
|
import { getSolrParams } from '@rh-support/utils';
|
|
25
25
|
import difference from 'lodash/difference';
|
|
@@ -238,10 +238,8 @@ function InsightsResults(props) {
|
|
|
238
238
|
return (React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults, isRenderedMain: true }));
|
|
239
239
|
}
|
|
240
240
|
return (React.createElement(React.Fragment, null,
|
|
241
|
-
!rulesState.triggerRuleNotification && (React.createElement(Alert, { isInline: true, title: t('
|
|
242
|
-
|
|
243
|
-
} },
|
|
244
|
-
React.createElement(Trans, null, "View recommendations")) })),
|
|
241
|
+
!rulesState.triggerRuleNotification && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-crit-sol", children: React.createElement("p", null,
|
|
242
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")) })),
|
|
245
243
|
React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
|
|
246
244
|
}
|
|
247
245
|
InsightsResults.defaultProps = defaultProps;
|
|
@@ -54,8 +54,8 @@ export default function Review(props) {
|
|
|
54
54
|
React.createElement(ContactPhoneNumber, null))),
|
|
55
55
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
56
56
|
React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
|
|
57
|
-
React.createElement(CaseGroup, null),
|
|
58
57
|
React.createElement(CaseLanguageSelector, null),
|
|
58
|
+
React.createElement(CaseGroup, null),
|
|
59
59
|
canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
|
|
60
60
|
React.createElement(RHAssociatesSelector, null),
|
|
61
61
|
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
|
|
@@ -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;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA8U3C"}
|
|
@@ -192,7 +192,6 @@ export function SessionRestore(props) {
|
|
|
192
192
|
// Automatically restoring a troubleshooting session in case creation can lead to overwriting open-case section details
|
|
193
193
|
// Making sure we prefer already filled information in this case.
|
|
194
194
|
if (isAutoRestoringSession && !isCaseSubmit && isCaseCreate) {
|
|
195
|
-
sessionDetails.type = caseDetails.caseType;
|
|
196
195
|
sessionDetails.accountNumber = caseDetails.accountNumberRef;
|
|
197
196
|
sessionDetails.contactSsoUsername = caseDetails.contactSSOName;
|
|
198
197
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA4BA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAqRjC"}
|
|
@@ -16,6 +16,7 @@ import { RulesStateContext } from '../../context/RulesContext';
|
|
|
16
16
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
17
17
|
import { getIrtForSLAAndSeverity, getOrtForSLAAndSeverity } from '../../reducers/CaseHelpers';
|
|
18
18
|
import RouteUtils from '../../utils/routeUtils';
|
|
19
|
+
import { AsideResults } from '../Recommendations/AsideResults';
|
|
19
20
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
20
21
|
import InsightsResults from '../Recommendations/InsightsResults';
|
|
21
22
|
import { RemoteRiderBanner } from '../RemoteRider/RemoteRiderBanner';
|
|
@@ -135,14 +136,11 @@ export default function SubmitCase() {
|
|
|
135
136
|
React.createElement(Button, { className: "pf-u-ml-md", component: (props) => React.createElement(Link, Object.assign({}, props, { to: `/case/${caseNumber}` })), href: getCaseURL(), variant: "primary", "data-tracking-id": "get-support-view-case", isDisabled: viewDisabled }, "View case"))))),
|
|
136
137
|
!isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNumber, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport })),
|
|
137
138
|
React.createElement("div", null,
|
|
138
|
-
(!isEmpty(topContent.data) ||
|
|
139
|
-
!
|
|
140
|
-
!clusterRecommendations ||
|
|
141
|
-
isIdea) && (React.createElement(Text, { className: "pf-u-mt-2xl pf-u-font-weight-light", component: TextVariants.h2 },
|
|
139
|
+
(!isEmpty(topContent.data) || !rulesState.EARules.rules || !clusterRecommendations) &&
|
|
140
|
+
!isIdea && (React.createElement(Text, { className: "pf-u-mt-2xl pf-u-font-weight-light", component: TextVariants.h2 },
|
|
142
141
|
React.createElement(Trans, null, "Troubleshoot this case"))),
|
|
143
142
|
React.createElement("div", { className: isIdea ? 'pf-u-mt-lg' : '' },
|
|
144
143
|
React.createElement(InsightsResults, { isDisplayOnMain: true })),
|
|
145
144
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsModal: false }),
|
|
146
|
-
|
|
147
|
-
React.createElement(Suggestions, { title: isIdea ? t('Search recommendations') : t('Product recommendations'), showTitleDescription: true, showMax: 6 }))))))));
|
|
145
|
+
React.createElement("div", { className: "pf-u-mt-lg" }, isIdea ? (React.createElement(AsideResults, null)) : (!isEmpty(topContent.data) && (React.createElement(Suggestions, { title: isIdea ? t('Search recommendations') : t('Product recommendations'), showTitleDescription: true, showMax: 6 })))))))));
|
|
148
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetFileSelectorImage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAS5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,iBAAS,uBAAuB,CAAC,EAAE,EAAO,EAAE,SAAc,EAAE,WAAW,EAAE,SAAiB,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WidgetFileSelectorImage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAS5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,iBAAS,uBAAuB,CAAC,EAAE,EAAO,EAAE,SAAc,EAAE,WAAW,EAAE,SAAiB,EAAE,EAAE,MAAM,eA4DnG;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -32,11 +32,17 @@ function WidgetFileSelectorImage({ id = '', className = '', isSessionId, isPriva
|
|
|
32
32
|
' ',
|
|
33
33
|
React.createElement("p", { className: "pf-u-danger-color-200" }, rejectedFiles.map((rejectedFile) => {
|
|
34
34
|
const isImage = /image\/*/.test(rejectedFile.type);
|
|
35
|
-
return !isImage
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
return !isImage ? (React.createElement("div", null,
|
|
36
|
+
"$",
|
|
37
|
+
rejectedFile.name,
|
|
38
|
+
" ",
|
|
39
|
+
React.createElement(Trans, null, "is not an image"))) : rejectedFile.size > MAX_SIZE ? (React.createElement("div", null,
|
|
40
|
+
"$",
|
|
41
|
+
rejectedFile.name,
|
|
42
|
+
" ",
|
|
43
|
+
React.createElement(Trans, null, "exceeded max size limit of"),
|
|
44
|
+
" $",
|
|
45
|
+
humanizeSize(MAX_SIZE))) : ('');
|
|
40
46
|
}))));
|
|
41
47
|
}
|
|
42
48
|
export default WidgetFileSelectorImage;
|
|
@@ -39,7 +39,7 @@ function WizardAside(props) {
|
|
|
39
39
|
canshowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
40
40
|
React.createElement(InsightsResults, null),
|
|
41
41
|
" ",
|
|
42
|
-
React.createElement(AsideResults, null),
|
|
42
|
+
!(isIdea && activeSection === 'submit-case') && React.createElement(AsideResults, null),
|
|
43
43
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
44
44
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget }),
|
|
45
45
|
canUseSessionManagement && !isCreatingCase && React.createElement(SessionRestore, { routeProps: props.routeProps }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE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AAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAuEtB,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,CA+BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eA2CF,CAAC"}
|
|
@@ -102,6 +102,9 @@ export const getSeverityDescription = (severity) => {
|
|
|
102
102
|
export const isClusterIDValid = (caseState, allProducts) => {
|
|
103
103
|
const case_details = caseState.caseDetails;
|
|
104
104
|
const productHasClusterID = isClusterIdEnabledForProduct(case_details.product, allProducts);
|
|
105
|
+
//if product doesn't have clusterId we don't need to validate value
|
|
106
|
+
if (!productHasClusterID)
|
|
107
|
+
return true;
|
|
105
108
|
const majorVersion = (case_details.version && getVersion(case_details.version).major) || '';
|
|
106
109
|
const isOpenShiftV3 = case_details.product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
107
110
|
const hasValidClusterId = () => !isEmpty(case_details.openshiftClusterID) &&
|
|
@@ -122,9 +125,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
|
|
|
122
125
|
const hasValidV3ClusterName = () => isEmpty(case_details.openshiftClusterID) &&
|
|
123
126
|
!isEmpty(caseState.v3ClusterName) &&
|
|
124
127
|
(case_details.noClusterIdReasonExplanation === 'v3-cluster' || isOpenShiftV3);
|
|
125
|
-
return
|
|
126
|
-
? hasValidClusterId() || hasValidReason() || hasValidReasonExplanation() || hasValidV3ClusterName()
|
|
127
|
-
: true;
|
|
128
|
+
return hasValidClusterId() || hasValidReason() || hasValidReasonExplanation() || hasValidV3ClusterName();
|
|
128
129
|
};
|
|
129
130
|
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseStateValid
|
|
130
131
|
export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
@@ -25,6 +25,5 @@ export declare const showSideBarEARuleWidgetSections: AppRouteSections[];
|
|
|
25
25
|
export declare const showSideBarClusterIdRuleWidgetSections: AppRouteSections[];
|
|
26
26
|
export declare const showSideBarFileRecommendationSections: AppRouteSections[];
|
|
27
27
|
export declare const hideSideBarClusterIdRuleToast: AppRouteSections[];
|
|
28
|
-
export declare const showSideBarCriticalSolutionsToast: AppRouteSections[];
|
|
29
28
|
export declare const hiddengetSupportSections: AppRouteSections[];
|
|
30
29
|
//# 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,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC9B;AAED,eAAO,MAAM,0BAA0B,oBAAiC,CAAC;AACzE,eAAO,MAAM,mCAAmC,oBAI/C,CAAC;AACF,eAAO,MAAM,kCAAkC,oBAO9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAM3C,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAIlD,CAAC;AAEF,eAAO,MAAM,qCAAqC,oBAAgE,CAAC;AAEnH,eAAO,MAAM,6BAA6B,oBAA0D,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,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC9B;AAED,eAAO,MAAM,0BAA0B,oBAAiC,CAAC;AACzE,eAAO,MAAM,mCAAmC,oBAI/C,CAAC;AACF,eAAO,MAAM,kCAAkC,oBAO9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAM3C,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAIlD,CAAC;AAEF,eAAO,MAAM,qCAAqC,oBAAgE,CAAC;AAEnH,eAAO,MAAM,6BAA6B,oBAA0D,CAAC;AAErG,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAKtD,CAAC"}
|
|
@@ -37,7 +37,6 @@ export const showSideBarClusterIdRuleWidgetSections = [
|
|
|
37
37
|
];
|
|
38
38
|
export const showSideBarFileRecommendationSections = [AppRouteSections.DESCRIBE_MORE, AppRouteSections.MANAGEMENT];
|
|
39
39
|
export const hideSideBarClusterIdRuleToast = [AppRouteSections.REVIEW, AppRouteSections.SUBMIT_CASE];
|
|
40
|
-
export const showSideBarCriticalSolutionsToast = [AppRouteSections.SUMMARIZE];
|
|
41
40
|
export const hiddengetSupportSections = [
|
|
42
41
|
AppRouteSections.TROUBLESHOOT,
|
|
43
42
|
AppRouteSections.DESCRIBE_MORE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.264.0",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/components": "1.
|
|
77
|
-
"@rh-support/react-context": "1.0
|
|
76
|
+
"@rh-support/components": "1.3.0",
|
|
77
|
+
"@rh-support/react-context": "1.1.0",
|
|
78
78
|
"@rh-support/types": "0.2.1-beta.58",
|
|
79
|
-
"@rh-support/user-permissions": "1.0
|
|
79
|
+
"@rh-support/user-permissions": "1.1.0",
|
|
80
80
|
"@rh-support/utils": "1.0.10-beta.58",
|
|
81
81
|
"@types/react-redux": "^7.1.12",
|
|
82
82
|
"@types/redux": "^3.6.0",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"not ie <= 11",
|
|
146
146
|
"not op_mini all"
|
|
147
147
|
],
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "4b6aad750ee63be3cd580f2bbb26772accd89ae0"
|
|
149
149
|
}
|