@rh-support/troubleshoot 2.4.5-beta.12 → 2.4.5-beta.14
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/OpenCase/OpenCase.js +2 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +4 -8
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +8 -6
- package/lib/esm/components/Recommendations/Recommendations.js +4 -4
- package/lib/esm/components/Review/Review.js +2 -2
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +6 -10
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +13 -2
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -2
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +13 -14
- package/lib/esm/components/wizardLayout/WizardNavigation.js +2 -2
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -11,12 +11,12 @@ export default function OpenCase(props) {
|
|
|
11
11
|
const { ABTestVarioation } = useCaseSelector((state) => ({
|
|
12
12
|
ABTestVarioation: state.ABTestVarioation,
|
|
13
13
|
}), isEqual);
|
|
14
|
-
const
|
|
14
|
+
const isATestvariation = ABTestVarioation === 'A';
|
|
15
15
|
return (React.createElement("form", null,
|
|
16
16
|
canChangeAccountInfo && (React.createElement(React.Fragment, null,
|
|
17
17
|
React.createElement(AccountSelector, { "data-tracking-id": "get-support-account-selector" }),
|
|
18
18
|
React.createElement(OwnerSelector, { "data-tracking-id": "get-support-owner-selector" }))),
|
|
19
|
-
|
|
19
|
+
isATestvariation && (React.createElement("div", { className: "form-group" },
|
|
20
20
|
React.createElement(ProductSelector, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendations: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef, isOnGetSupportPage: true }))),
|
|
21
21
|
React.createElement(SupportTypeSelectorPage, null)));
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAsKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -10,12 +10,10 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
10
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
11
|
import { RouteContext } from '../../context/RouteContext';
|
|
12
12
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
13
|
-
import { useFetchCVEData } from '../../hooks/useFetchCVEData';
|
|
14
13
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
15
14
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
16
15
|
import RouteUtils from '../../utils/routeUtils';
|
|
17
16
|
import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
|
|
18
|
-
import { CveModal } from '../Cve/CveModal';
|
|
19
17
|
import Suggestions from '../Suggestions/Suggestions';
|
|
20
18
|
import { ProductVersionDropdownSelector } from './ProductVersionDropdownSelector';
|
|
21
19
|
const defaultProps = {
|
|
@@ -41,7 +39,6 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
41
39
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
42
40
|
ABTestVarioation: state.ABTestVarioation,
|
|
43
41
|
}), isEqual);
|
|
44
|
-
const { cveRecommendation } = useFetchCVEData();
|
|
45
42
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
46
43
|
const { routeState: { activeSection }, } = useContext(RouteContext);
|
|
47
44
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
@@ -88,12 +85,12 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
88
85
|
// Determine whether to render the ProductVersionDropdownSelector
|
|
89
86
|
const renderProductVersionDropdownSelector = (activeSection === AppRouteSections.SUMMARIZE && !props.caseCreateExperience) ||
|
|
90
87
|
activeSection === AppRouteSections.GET_SUPPORT ||
|
|
91
|
-
|
|
92
|
-
(
|
|
88
|
+
isBTestvariation ||
|
|
89
|
+
(isATestvariation && (props.isOnGetSupportPage || props.isOnReviewPage));
|
|
93
90
|
// Determine whether to render the OpenCaseIssue component
|
|
94
|
-
const renderOpenCaseIssue = (
|
|
91
|
+
const renderOpenCaseIssue = (isBTestvariation &&
|
|
95
92
|
(activeSection === AppRouteSections.SUMMARIZE || activeSection === AppRouteSections.REVIEW)) ||
|
|
96
|
-
(
|
|
93
|
+
(isATestvariation &&
|
|
97
94
|
(activeSection === AppRouteSections.SUMMARIZE || activeSection === AppRouteSections.REVIEW)) ||
|
|
98
95
|
(!props.caseCreateExperience && activeSection === AppRouteSections.SUMMARIZE);
|
|
99
96
|
return (React.createElement(React.Fragment, null,
|
|
@@ -102,7 +99,6 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
102
99
|
React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
|
|
103
100
|
renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
|
|
104
101
|
React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage }))),
|
|
105
|
-
(cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && React.createElement(CveModal, null),
|
|
106
102
|
React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
|
|
107
103
|
? 'You are'
|
|
108
104
|
: 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAgGpD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Alert, AlertVariant } from '@patternfly/react-core';
|
|
2
2
|
import { AlertMessage, AlertType, ErrorBoundary } from '@rh-support/components';
|
|
3
3
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
|
+
import { getConfigField, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
|
|
4
5
|
import isEmpty from 'lodash/isEmpty';
|
|
5
6
|
import isEqual from 'lodash/isEqual';
|
|
6
7
|
import React, { useContext, useRef } from 'react';
|
|
@@ -24,13 +25,14 @@ import { ProductSelectorLoader } from './ProductSelectorLoader';
|
|
|
24
25
|
export default function ProductSelector(props) {
|
|
25
26
|
const { cveRecommendation } = useFetchCVEData();
|
|
26
27
|
const { t } = useTranslation();
|
|
27
|
-
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
28
|
+
const { globalMetadataState: { allProducts, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
28
29
|
const { product, version, ABTestVarioation } = useCaseSelector((state) => ({
|
|
29
30
|
product: state.caseDetails.product,
|
|
30
31
|
version: state.caseDetails.version,
|
|
31
32
|
ABTestVarioation: state.ABTestVarioation,
|
|
32
33
|
}), isEqual);
|
|
33
34
|
const { routeState: { isCaseCreate }, } = useContext(RouteContext);
|
|
35
|
+
const isCVEModalEnabled = getConfigField(pcmConfig.data, 'isCVEModalEnabled', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
34
36
|
const isATestvariation = ABTestVarioation === 'A';
|
|
35
37
|
const isBTestvariation = ABTestVarioation === 'B';
|
|
36
38
|
/**
|
|
@@ -40,14 +42,14 @@ export default function ProductSelector(props) {
|
|
|
40
42
|
*/
|
|
41
43
|
const productSelectorRef = useRef(null);
|
|
42
44
|
const rederProductSelect = (React.createElement("form", null,
|
|
43
|
-
(cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && React.createElement(CveModal, null),
|
|
45
|
+
(cveRecommendation === null || cveRecommendation === void 0 ? void 0 : cveRecommendation.length) !== 0 && isCVEModalEnabled === '1' && React.createElement(CveModal, null),
|
|
44
46
|
React.createElement(AllProductsSelector, { routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef, isOnSummaryPage: true, isOnGetSupportPage: props === null || props === void 0 ? void 0 : props.isOnGetSupportPage, caseCreateExperience: props.caseCreateExperience })));
|
|
45
47
|
return (React.createElement(React.Fragment, null,
|
|
46
|
-
|
|
48
|
+
isBTestvariation && allProducts.isFetching && React.createElement(ProductSelectorLoader, null),
|
|
47
49
|
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-v5-u-mt-lg", title: t('There was an error loading products.'), show: allProducts.isError }),
|
|
48
|
-
|
|
50
|
+
isBTestvariation
|
|
49
51
|
? !allProducts.isFetching && !allProducts.isError && rederProductSelect
|
|
50
|
-
:
|
|
52
|
+
: isATestvariation && rederProductSelect,
|
|
51
53
|
product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
52
54
|
' ',
|
|
53
55
|
"If you're having a subscription issue that doesn't relate to",
|
|
@@ -58,7 +60,7 @@ export default function ProductSelector(props) {
|
|
|
58
60
|
React.createElement("a", { href: "/support/contact", "data-tracking-id": "contact-customer-service" }, "customer service"),
|
|
59
61
|
' ',
|
|
60
62
|
"for help.") })),
|
|
61
|
-
|
|
63
|
+
isBTestvariation && React.createElement(EARuleWidget, null),
|
|
62
64
|
!(props === null || props === void 0 ? void 0 : props.isOnGetSupportPage) && (React.createElement("div", { className: "suggestions-result-section" },
|
|
63
65
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading recommendations') } }, !isEmpty(version) && (React.createElement("div", { className: "common-suggestions" },
|
|
64
66
|
React.createElement(Recommendations, { routeProps: props.routeProps, userSeenRecommendations: props.userSeenRecommendations, userClickedNextonRecommendationsValue: props.userClickedNextonRecommendations, resultsRowRef: props.resultsRowRef }))))))));
|
|
@@ -177,9 +177,9 @@ export default function Recommendations(props) {
|
|
|
177
177
|
"% Match")));
|
|
178
178
|
};
|
|
179
179
|
return (React.createElement(React.Fragment, null,
|
|
180
|
-
|
|
180
|
+
isBTestvariation && (React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) && !isEmpty(issue) })),
|
|
181
181
|
React.createElement("div", { className: "recommendation-list pf-v5-u-pt-md", ref: props.resultsRowRef },
|
|
182
|
-
|
|
182
|
+
isATestvariation
|
|
183
183
|
? (recommendationState.visibleDocs.length !== 0 ||
|
|
184
184
|
recommendationState.isLoadingRecommendations) && (React.createElement("div", { className: `${recommendationState.isLoadingRecommendations ? 'gradient' : ''} label-container-icon` },
|
|
185
185
|
React.createElement(Label, { id: "DeepPurpleColorAILabel", className: "pf-v5-u-mb-md" },
|
|
@@ -198,14 +198,14 @@ export default function Recommendations(props) {
|
|
|
198
198
|
: recommendationState.visibleDocs.length !== 0 && (React.createElement(Label, { color: "purple", className: "pf-v5-u-mb-md" },
|
|
199
199
|
React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v5-u-mr-xs" }),
|
|
200
200
|
React.createElement(Trans, null, "Live search results powered by OpenShift AI"))),
|
|
201
|
-
|
|
201
|
+
isATestvariation && recommendationState.isLoadingRecommendations ? ( // as much as it pains me to add these <br /> the pf docs has it this way
|
|
202
202
|
React.createElement(RecommendationsLoader, null)) : (React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
203
203
|
var _a, _b;
|
|
204
204
|
return (React.createElement("li", { className: "result", key: doc.id },
|
|
205
205
|
React.createElement("header", { className: "result-header" },
|
|
206
206
|
React.createElement("a", { href: `${doc.view_uri}?${RouteUtils.getSEResourceQueryParams(activeSessionId, (_b = (_a = sessionResourceTracking[SessionResourceSource.RECOMMENDATIONS]) === null || _a === void 0 ? void 0 : _a.resourceOriginId) !== null && _b !== void 0 ? _b : '', SessionResourceSource.RECOMMENDATIONS)}`, className: "se-recommended ts-result", "data-tracking-id": `se-recommended-main-recommendations-${i}`, rel: "noopener noreferrer", target: "_blank", onClick: onResourceClick(doc, i), dangerouslySetInnerHTML: computeRecommendationTitle(doc) }),
|
|
207
207
|
React.createElement("div", { className: "header-meta" },
|
|
208
|
-
|
|
208
|
+
isATestvariation && doc.rerank_score && computeLabel(doc.rerank_score),
|
|
209
209
|
doc.kcsState === 'verified' && (React.createElement(React.Fragment, null,
|
|
210
210
|
React.createElement("span", { className: "status-verified pf-v5-u-font-weight-bold pf-v5-u-success-color-100" }, "verified"),
|
|
211
211
|
React.createElement("span", { className: "list-separator" }, "\u2013"))),
|
|
@@ -42,11 +42,11 @@ export default function Review(props) {
|
|
|
42
42
|
const onSeverityChange = (payload) => {
|
|
43
43
|
setCaseDetails(caseDispatch, payload);
|
|
44
44
|
};
|
|
45
|
-
const
|
|
45
|
+
const isBTestvariation = ABTestVarioation === 'B';
|
|
46
46
|
// To check if the user is ESS Customer and Product has ESS Support
|
|
47
47
|
const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
|
|
48
48
|
return (React.createElement(React.Fragment, null,
|
|
49
|
-
|
|
49
|
+
isBTestvariation && React.createElement(EARuleWidget, null),
|
|
50
50
|
React.createElement("form", { className: "review-form card card-light push-bottom" },
|
|
51
51
|
React.createElement(AccountSelector, null),
|
|
52
52
|
React.createElement(OwnerSelector, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAuEzC;kBAvEQ,mBAAmB;;;AA0E5B,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Card, CardBody, CardHeader, CardTitle } from '@patternfly/react-core';
|
|
2
|
-
import { ErrorBoundary, LoadingDots
|
|
2
|
+
import { ErrorBoundary, LoadingDots } from '@rh-support/components';
|
|
3
3
|
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
@@ -22,7 +22,7 @@ function TroubleshootSection(props) {
|
|
|
22
22
|
var _a;
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
25
|
-
const { product, version,
|
|
25
|
+
const { product, version, isCreatingCase, caseType } = useCaseSelector((state) => ({
|
|
26
26
|
product: state.caseDetails.product,
|
|
27
27
|
version: state.caseDetails.version,
|
|
28
28
|
summary: state.caseDetails.summary,
|
|
@@ -39,14 +39,10 @@ function TroubleshootSection(props) {
|
|
|
39
39
|
React.createElement("p", { className: "pf-v5-u-pt-md" },
|
|
40
40
|
React.createElement("span", { className: "pf-v5-u-font-family-heading pf-v5-u-pr-xs" }, t('Product')),
|
|
41
41
|
" ",
|
|
42
|
-
product,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
React.createElement("p", null, summary),
|
|
47
|
-
React.createElement("div", { className: "pf-v5-u-font-family-heading" }, t('Problem description')),
|
|
48
|
-
React.createElement("p", { className: "pf-v5-u-mb-xl" },
|
|
49
|
-
React.createElement(MoreOrLess, { maxHeight: 93 }, issue))),
|
|
42
|
+
product),
|
|
43
|
+
React.createElement("p", null,
|
|
44
|
+
React.createElement("span", { className: "pf-v5-u-font-family-heading pf-v5-u-pr-xs" }, t('Version')),
|
|
45
|
+
version)),
|
|
50
46
|
!isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
|
|
51
47
|
React.createElement(LoadingDots, { show: topContent.isFetching }),
|
|
52
48
|
topContent.data.length === 0 && (React.createElement(Card, { id: "card", className: "card-support top-recommendations pf-v5-u-mb-md", isCompact: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA2Q9D"}
|
|
@@ -58,13 +58,13 @@ export function useIsSectionValid(sectionName) {
|
|
|
58
58
|
!isEmpty(accountNumber) &&
|
|
59
59
|
!isEmpty(contactSSOName) &&
|
|
60
60
|
!selectedAccountDetails.data.subscriptionAbuse;
|
|
61
|
-
if (
|
|
61
|
+
if (isATestvariation) {
|
|
62
62
|
isValid = isValid && !isEmpty(product) && !isEmpty(version);
|
|
63
63
|
}
|
|
64
64
|
return isValid;
|
|
65
65
|
};
|
|
66
66
|
const isSummarizeSectionValid = () => {
|
|
67
|
-
if (
|
|
67
|
+
if (isBTestvariation) {
|
|
68
68
|
let isValid = !allProducts.isFetching &&
|
|
69
69
|
!allProducts.isError &&
|
|
70
70
|
!topContent.isFetching &&
|
|
@@ -77,6 +77,17 @@ export function useIsSectionValid(sectionName) {
|
|
|
77
77
|
!isEmpty(issue);
|
|
78
78
|
return isValid;
|
|
79
79
|
}
|
|
80
|
+
if (isATestvariation) {
|
|
81
|
+
let isValid = !allProducts.isFetching &&
|
|
82
|
+
!allProducts.isError &&
|
|
83
|
+
!topContent.isFetching &&
|
|
84
|
+
!recommendationState.isLoadingRecommendations &&
|
|
85
|
+
(summary === null || summary === void 0 ? void 0 : summary.length) <= TITLE_SUMMARY_LENGTH_LIMIT &&
|
|
86
|
+
(issue === null || issue === void 0 ? void 0 : issue.length) <= ISSUE_SUMMARY_LENGTH_LIMIT &&
|
|
87
|
+
!isEmpty(summary) &&
|
|
88
|
+
!isEmpty(issue);
|
|
89
|
+
return isValid;
|
|
90
|
+
}
|
|
80
91
|
if (isCaseCreate) {
|
|
81
92
|
//because on the summarize page for troubleshoot flow we have only product version and owner
|
|
82
93
|
let isValid = !allProducts.isFetching &&
|
|
@@ -23,14 +23,14 @@ function WizardAside(props) {
|
|
|
23
23
|
isCveModalOpened: state.isCveModalOpened,
|
|
24
24
|
ABTestVarioation: state.ABTestVarioation,
|
|
25
25
|
}), isEqual);
|
|
26
|
-
const
|
|
26
|
+
const isBTestvariation = ABTestVarioation === 'B';
|
|
27
27
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
28
28
|
const canUseSessionManagement = ability.can(resourceActions.CREATE, resources.SESSION_TRACKING);
|
|
29
29
|
const canShowFileUploadWidget = () => canAddAttachments &&
|
|
30
30
|
!props.isAttachmentUploadModalOpen &&
|
|
31
31
|
!isUndefined(activeSection) &&
|
|
32
32
|
!hideFileUploadSidebarWidgetSections.includes(activeSection);
|
|
33
|
-
const canShowEARuleWidget =
|
|
33
|
+
const canShowEARuleWidget = isBTestvariation
|
|
34
34
|
? showSideBarEARuleWidgetSections.includes(activeSection)
|
|
35
35
|
: showSideBarEARuleWidgetSections.includes(activeSection) ||
|
|
36
36
|
activeSection === AppRouteSections.SUMMARIZE ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA6LzC"}
|
|
@@ -11,8 +11,9 @@ import { Grid, GridItem } from '@patternfly/react-core';
|
|
|
11
11
|
import { SupportFeedbackForm } from '@rh-support/components';
|
|
12
12
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
13
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { getConfigField, getVersionIfOnlyVersion, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent, PreviousCaseTypes, } from '@rh-support/utils';
|
|
14
|
+
import { ABTestSplitBasedOnAccountNumber, getConfigField, getVersionIfOnlyVersion, PCM_CONFIG_FIELD_TYPE, pendoTrackEvent, PreviousCaseTypes, } from '@rh-support/utils';
|
|
15
15
|
import findIndex from 'lodash/findIndex';
|
|
16
|
+
import isEmpty from 'lodash/isEmpty';
|
|
16
17
|
import isEqual from 'lodash/isEqual';
|
|
17
18
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
18
19
|
import { Trans } from 'react-i18next';
|
|
@@ -50,7 +51,6 @@ export function WizardLayout(props) {
|
|
|
50
51
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
51
52
|
const [confirmationModalType, setConfirmationModalType] = useState(null);
|
|
52
53
|
const viewedConfirmationModalsList = useRef([]);
|
|
53
|
-
const testVariationWeight = getConfigField(pcmConfig.data, 'testVariationWeightZeroToTen', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
54
54
|
const closeROCMProductModal = () => {
|
|
55
55
|
const productName = 'OpenShift Container Platform';
|
|
56
56
|
// if user click on Cancel then change product selection.
|
|
@@ -112,20 +112,19 @@ export function WizardLayout(props) {
|
|
|
112
112
|
}
|
|
113
113
|
setConfirmationModalType(null);
|
|
114
114
|
};
|
|
115
|
+
// A/B test
|
|
115
116
|
useEffect(() => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
// setABTestVarioation(caseDispatch, trafficSplit(weight, sessionItem.session.createdDate!));
|
|
126
|
-
// }
|
|
117
|
+
if (isEmpty(loggedInUsersAccount.data.accountNumber))
|
|
118
|
+
return;
|
|
119
|
+
const appABTestConfig = getConfigField(pcmConfig.data, 'testVariationWeightZeroToTen', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
120
|
+
if (isEmpty(appABTestConfig))
|
|
121
|
+
return;
|
|
122
|
+
const appTestWeight = parseInt(appABTestConfig, 10);
|
|
123
|
+
const ABTestVariation = ABTestSplitBasedOnAccountNumber(appTestWeight, loggedInUsersAccount.data.accountNumber);
|
|
124
|
+
// set state for PCM to show A or B
|
|
125
|
+
setABTestVarioation(caseDispatch, ABTestVariation);
|
|
127
126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
|
-
}, [
|
|
127
|
+
}, [loggedInUsersAccount.data.accountNumber]);
|
|
129
128
|
// Loading app metadata
|
|
130
129
|
useEffect(() => {
|
|
131
130
|
fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
|
|
@@ -179,14 +179,14 @@ function WizardNavigation(props) {
|
|
|
179
179
|
catch (e) { }
|
|
180
180
|
});
|
|
181
181
|
const nextButtonDisabledLogic = () => {
|
|
182
|
-
if (
|
|
182
|
+
if (isBTestvariation) {
|
|
183
183
|
let value = (!props.userSeenRecommendations && props.activeStep.id === AppRouteSections.SUMMARIZE) ||
|
|
184
184
|
(!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
|
|
185
185
|
(!isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
|
|
186
186
|
noValidEntitlement;
|
|
187
187
|
return value;
|
|
188
188
|
}
|
|
189
|
-
else if (
|
|
189
|
+
else if (isATestvariation && !isCaseCreate) {
|
|
190
190
|
let value = (!props.userSeenRecommendations && props.activeStep.id === AppRouteSections.TROUBLESHOOT) ||
|
|
191
191
|
(!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
|
|
192
192
|
(!isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EAEH,uBAAuB,EAEvB,UAAU,EAGb,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,0BAA0B,EAAiB,MAAM,yBAAyB,CAAC;AAEpF,eAAO,MAAM,WAAW,WAAY,UAAU,UAAU,GAAG,KAAG,
|
|
1
|
+
{"version":3,"file":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-1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.4.5-beta.
|
|
3
|
+
"version": "2.4.5-beta.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.4.3-beta.
|
|
64
|
-
"@rh-support/react-context": "2.4.3-beta.
|
|
63
|
+
"@rh-support/components": "2.4.3-beta.3",
|
|
64
|
+
"@rh-support/react-context": "2.4.3-beta.3",
|
|
65
65
|
"@rh-support/types": "2.0.5",
|
|
66
|
-
"@rh-support/user-permissions": "2.4.3-beta.
|
|
67
|
-
"@rh-support/utils": "2.4.3-beta.
|
|
66
|
+
"@rh-support/user-permissions": "2.4.3-beta.3",
|
|
67
|
+
"@rh-support/utils": "2.4.3-beta.3",
|
|
68
68
|
"@types/react-redux": "^7.1.33",
|
|
69
69
|
"@types/redux": "^3.6.0",
|
|
70
70
|
"date-fns": "3.6.0",
|
|
@@ -134,5 +134,5 @@
|
|
|
134
134
|
"defaults and supports es6-module",
|
|
135
135
|
"maintained node versions"
|
|
136
136
|
],
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "3f3896032774c8fb5cd4fd01d4854b4594881c3c"
|
|
138
138
|
}
|