@rh-support/troubleshoot 0.2.93-alpha-0 → 0.2.95
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/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +13 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +2 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.js +3 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +14 -3
- package/lib/esm/components/shared/fileUpload/FileLister.js +4 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +12 -3
- package/lib/esm/css/app.css +2 -2
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAyCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAyCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAgfjD"}
|
|
@@ -72,6 +72,7 @@ export default function CaseOverview(props) {
|
|
|
72
72
|
const { isCaseUpdating, contactIsPartner, hotfixRequested, hotfixDelivered, selectedAccountDetails, caseDetails: { firstCaseInactivityWarningSentAt, secondCaseInactivityWarningSentAt }, } = caseState;
|
|
73
73
|
const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
|
|
74
74
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
75
|
+
const updatingUser = loggedInUsersAccount.data.name;
|
|
75
76
|
const canSeeManagedByPartnerFlag = contactIsPartner &&
|
|
76
77
|
ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_MANAGED_BY_PARTNER_FLAG);
|
|
77
78
|
const canSeeInternalFlags = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_FLAGS);
|
|
@@ -136,10 +137,17 @@ export default function CaseOverview(props) {
|
|
|
136
137
|
ToastNotification.addDangerMessage(t('Severity failed to update'));
|
|
137
138
|
}
|
|
138
139
|
});
|
|
139
|
-
const updateStatusState = (statusVal, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const updateStatusState = (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
140
141
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
142
|
+
let updateStatusObj = {
|
|
143
|
+
status: statusVal,
|
|
144
|
+
reopenedAt: reopenedAt,
|
|
145
|
+
reopenedBySSOName: reopenedBySSOName,
|
|
146
|
+
reopenedReason: reopenedReason,
|
|
147
|
+
reopenedReasonOther: reopenedReasonOther,
|
|
148
|
+
};
|
|
141
149
|
try {
|
|
142
|
-
yield updateCaseDetails(caseDispatch, props.caseNumber,
|
|
150
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, updateStatusObj);
|
|
143
151
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
144
152
|
onStatusUpdate && (yield onStatusUpdate());
|
|
145
153
|
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
@@ -284,12 +292,12 @@ export default function CaseOverview(props) {
|
|
|
284
292
|
}), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
|
|
285
293
|
setShowCaseCloseModal(false);
|
|
286
294
|
}, caseNumber: caseNumber })),
|
|
287
|
-
showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (newStatus,
|
|
288
|
-
yield updateStatusState(newStatus, () => __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (commentBody, newStatus, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther) => __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
yield updateStatusState(newStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, () => __awaiter(this, void 0, void 0, function* () {
|
|
289
297
|
postCommentAfterStatusUpdate(commentBody);
|
|
290
298
|
}));
|
|
291
299
|
setShowReopenCaseModal(false);
|
|
292
300
|
}), onClose: () => {
|
|
293
301
|
setShowReopenCaseModal(false);
|
|
294
|
-
}, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, allStatuses: caseOverviewState.allCaseStatuses.data, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment }))));
|
|
302
|
+
}, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, allStatuses: caseOverviewState.allCaseStatuses.data, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, whoIsUpdating: updatingUser }))));
|
|
295
303
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
2
2
|
interface IProps {
|
|
3
|
-
onConfirm: (
|
|
3
|
+
onConfirm: (commentBody: any, newStatus: any, reopenedAt?: any, reopenedBySSOName?: any, reopenedReason?: any, reopenedReasonOther?: any) => void;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
caseNumber: string;
|
|
6
6
|
isInternal: boolean;
|
|
7
7
|
allStatuses: string[];
|
|
8
8
|
isUpdating: boolean;
|
|
9
9
|
reopenStatus: CaseStatusEnum;
|
|
10
|
+
whoIsUpdating: string;
|
|
10
11
|
}
|
|
11
12
|
export declare function ReopenCaseModal(props: IProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eA6L5C"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Button, ButtonVariant, Form, FormGroup, Modal, ModalVariant, Select, SelectOption, TextArea, } from '@patternfly/react-core';
|
|
11
11
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
12
|
+
import { formatDateTime } from '@rh-support/utils';
|
|
12
13
|
import { isEmpty } from 'lodash';
|
|
13
14
|
import React, { useState } from 'react';
|
|
14
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -45,12 +46,16 @@ export function ReopenCaseModal(props) {
|
|
|
45
46
|
const getCommentBody = () => {
|
|
46
47
|
return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
|
|
47
48
|
? `${props.isInternal ? '' : '. '}${reopenDescription}`
|
|
48
|
-
: ''}
|
|
49
|
+
: ''}
|
|
50
|
+
\n **Reopened date:** \n${formatDateTime(Date())}
|
|
51
|
+
\n**Reopened by:** \n${props.whoIsUpdating}
|
|
52
|
+
\n**Reopened reason other description:**\n${reopenDescription}`;
|
|
49
53
|
};
|
|
50
54
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
51
55
|
if (!checkForRequiredFields())
|
|
52
56
|
return;
|
|
53
|
-
|
|
57
|
+
let submissionDate = new Date();
|
|
58
|
+
props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
|
|
54
59
|
});
|
|
55
60
|
const onReasonChange = (event, resolution) => {
|
|
56
61
|
setSelectedReason(resolution);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA4HrC;kBA5HQ,eAAe;;;AA+HxB,eAAe,eAAe,CAAC"}
|
|
@@ -43,11 +43,11 @@ function CaseAlternateId(props) {
|
|
|
43
43
|
}
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
45
|
}, [alternateId]);
|
|
46
|
-
const
|
|
46
|
+
const onAlternateIdChange = (e) => {
|
|
47
47
|
if (canEditCase.alert())
|
|
48
48
|
return;
|
|
49
49
|
setAlternateIdState(e.target.value);
|
|
50
|
-
!caseNumber && setCaseDetails(caseDispatch, { alternateId: e.target.value });
|
|
50
|
+
!caseNumber && setCaseDetails(caseDispatch, { alternateId: e.target.value.trim() });
|
|
51
51
|
};
|
|
52
52
|
const updateAlternateId = () => __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
try {
|
|
@@ -87,7 +87,7 @@ function CaseAlternateId(props) {
|
|
|
87
87
|
alternateIdState === alternateId ||
|
|
88
88
|
isUpdating ||
|
|
89
89
|
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
|
|
90
|
-
React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange:
|
|
90
|
+
React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, disabled: isUpdating, "data-tracking-id": "case-details-alternate-id" })),
|
|
91
91
|
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT && (React.createElement("div", { className: "pull-top" },
|
|
92
92
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
93
93
|
React.createElement(Trans, null, maxLengthErrorMessage))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAIrE,OAAO,KAA+D,MAAM,OAAO,CAAC;AAMpF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAOD,QAAA,MAAM,8BAA8B,wEAqIlC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { Dropdown } from '@rh-support/components';
|
|
2
2
|
import { toOption, toOptions } from '@rh-support/utils';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
import
|
|
4
|
+
import isEqual from 'lodash/isEqual';
|
|
5
|
+
import React, { forwardRef, useContext, useEffect, useMemo, useState } from 'react';
|
|
5
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
6
8
|
import { RouteContext } from '../../context/RouteContext';
|
|
7
9
|
const defaultProps = {
|
|
8
10
|
disabled: false,
|
|
9
11
|
htmlForId: '',
|
|
10
12
|
};
|
|
11
13
|
const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
12
|
-
var _a;
|
|
13
14
|
const { t } = useTranslation();
|
|
14
15
|
const [isProductInValid, setIsProductInValid] = useState(true);
|
|
15
16
|
const [isVersionInValid, setIsVersionInValid] = useState(false);
|
|
16
17
|
const [isProductBlured, setIsProductBlured] = useState(false);
|
|
17
18
|
const [isVersionBlured, setIsVersionBlured] = useState(false);
|
|
18
19
|
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
20
|
+
const versionsDetails = useCaseSelector((state) => state.versionsDetails, isEqual);
|
|
21
|
+
const productVenisons = useMemo(() => versionsDetails.data.map(({ name }) => name),
|
|
22
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
+
[props.selectedProduct.name, versionsDetails.data]);
|
|
24
|
+
// Here we are conditionally checking if selected product is having version and if not fallback to fetched version list ].
|
|
25
|
+
const selectedProductVersion = isEmpty(props.selectedProduct.versions)
|
|
26
|
+
? productVenisons
|
|
27
|
+
: props.selectedProduct.versions;
|
|
28
|
+
// On the basis of which version source we are using we need to use loading status of it.
|
|
29
|
+
const isLoadingList = isEmpty(props.selectedProduct.versions) ? versionsDetails.isFetching : props.isLoading;
|
|
19
30
|
const onProductChange = (option) => {
|
|
20
31
|
props.onProductChange(option.value);
|
|
21
32
|
validateProduct(option);
|
|
@@ -72,7 +83,7 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
|
72
83
|
React.createElement(Trans, null, "Version"),
|
|
73
84
|
' ',
|
|
74
85
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
75
|
-
React.createElement(Dropdown, { selectedItem: toOption(props.version), list:
|
|
86
|
+
React.createElement(Dropdown, { selectedItem: toOption(props.version), list: toOptions(selectedProductVersion !== null && selectedProductVersion !== void 0 ? selectedProductVersion : []), id: "version-selector-dropdown", placeholder: t('Select a version'), isLoadingList: isLoadingList, title: `Versions for ${props.selectedProduct.product}`, disabled: props.disabled || isEmpty(selectedProductVersion), isInValid: !props.disabled &&
|
|
76
87
|
isVersionInValid &&
|
|
77
88
|
showValidationErrorAlert &&
|
|
78
89
|
props.selectedProduct.product &&
|
|
@@ -2,7 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Button, ButtonVariant, Label, Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
3
3
|
import { CircularProgressbar } from '@rh-support/components';
|
|
4
4
|
import { humanizeSize } from '@rh-support/utils';
|
|
5
|
-
import { capitalize } from 'lodash';
|
|
5
|
+
import { capitalize, isEmpty } from 'lodash';
|
|
6
6
|
import map from 'lodash/map';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -26,10 +26,11 @@ const analysisStepMap = {
|
|
|
26
26
|
export default function FileLister(props) {
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const onDescriptionChange = (localFile, indexToEdit) => (event) => {
|
|
29
|
+
var _a;
|
|
29
30
|
const editedLocalFile = Object.assign({}, localFile);
|
|
30
|
-
editedLocalFile.description = event.target.value;
|
|
31
|
+
editedLocalFile.description = isEmpty((_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : event.target.value;
|
|
31
32
|
props.onFileEdit &&
|
|
32
|
-
props.onFileEdit(editedLocalFile, indexToEdit, { description: editedLocalFile.description });
|
|
33
|
+
props.onFileEdit(editedLocalFile, indexToEdit, { description: editedLocalFile.description.trim() });
|
|
33
34
|
};
|
|
34
35
|
const onRetry = (index) => () => {
|
|
35
36
|
props.onRetry && props.onRetry(index);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eA2XtD"}
|
|
@@ -50,6 +50,11 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
50
50
|
language: state.caseDetails.caseLanguage,
|
|
51
51
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
52
52
|
}), isEqual);
|
|
53
|
+
const versionsDetails = useCaseSelector((state) => {
|
|
54
|
+
if (isEmpty(state.versionsDetails.data))
|
|
55
|
+
return [];
|
|
56
|
+
return state.versionsDetails.data.map(({ name }) => name);
|
|
57
|
+
}, isEqual);
|
|
53
58
|
const caseDispatch = useCaseDispatch();
|
|
54
59
|
const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
55
60
|
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
@@ -84,9 +89,13 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
84
89
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
85
90
|
}
|
|
86
91
|
else {
|
|
92
|
+
// Check if product information it self is having version list or fallback to version list from different source.
|
|
93
|
+
const productVersions = isEmpty(allProducts.data.productsResult[index].versions)
|
|
94
|
+
? versionsDetails
|
|
95
|
+
: allProducts.data.productsResult[index].versions;
|
|
87
96
|
// product in url is valid
|
|
88
|
-
const isVersionFromURLValid = !isEmpty(versionFromUrl) && includes(
|
|
89
|
-
const isMultiVersionProduct = !isOnlyVersion(
|
|
97
|
+
const isVersionFromURLValid = !isEmpty(versionFromUrl) && includes(productVersions, versionFromUrl);
|
|
98
|
+
const isMultiVersionProduct = !isOnlyVersion(productVersions);
|
|
90
99
|
if (isVersionFromURLValid || isMultiVersionProduct) {
|
|
91
100
|
// version is also valid
|
|
92
101
|
const versionToSet = isVersionFromURLValid ? versionFromUrl : undefined;
|
|
@@ -96,7 +105,7 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
96
105
|
}
|
|
97
106
|
else if (!isMultiVersionProduct) {
|
|
98
107
|
// no version or invalid version and there is only 1 version we set default version in url that will trigger the flow with valid version this time
|
|
99
|
-
const defaultVersion = getVersionIfOnlyVersion(
|
|
108
|
+
const defaultVersion = getVersionIfOnlyVersion(productVersions);
|
|
100
109
|
const newParams = { product: productFromUrl, version: defaultVersion };
|
|
101
110
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
102
111
|
}
|
package/lib/esm/css/app.css
CHANGED
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
|
|
337
337
|
.wizard-aside-content header button .fa {
|
|
338
338
|
font-size: 20px;
|
|
339
|
-
}
|
|
339
|
+
}
|
|
340
340
|
|
|
341
341
|
@font-face {
|
|
342
342
|
font-family: 'Red Hat Text';
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
font-weight: 900;
|
|
417
417
|
font-style: 'normal';
|
|
418
418
|
text-rendering: optimizeLegibility;
|
|
419
|
-
}
|
|
419
|
+
}*/
|
|
420
420
|
|
|
421
421
|
/* Open Case section */
|
|
422
422
|
.open-case-product-wrapper {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.95",
|
|
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.8.34",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.185.1",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -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.8.34",
|
|
67
67
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
68
68
|
"@patternfly/patternfly": "4.185.1",
|
|
69
69
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.202.16",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/api": "0.3.
|
|
77
|
-
"@rh-support/components": "1.1.
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
76
|
+
"@rh-support/api": "0.3.14",
|
|
77
|
+
"@rh-support/components": "1.1.58",
|
|
78
|
+
"@rh-support/react-context": "0.2.58",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.
|
|
81
|
-
"@rh-support/utils": "0.2.
|
|
80
|
+
"@rh-support/user-permissions": "0.2.46",
|
|
81
|
+
"@rh-support/utils": "0.2.35",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "c64dcee1e1d2cdc0251d656b1ae85d146bfe0d66"
|
|
147
147
|
}
|