@rh-support/troubleshoot 0.2.117 → 0.2.120
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/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +6 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +27 -44
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +2 -5
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +38 -52
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +2 -2
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +111 -76
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +19 -8
- package/lib/esm/reducers/CaseConstNTypes.d.ts +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +2 -0
- package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts +5 -2
- package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/ClusterRecommendationsReducer.js +19 -6
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +4 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +1 -9
- package/package.json +9 -9
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAwCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAwCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA+VnD"}
|
|
@@ -131,11 +131,14 @@ export function RequestEscalationModal(props) {
|
|
|
131
131
|
React.createElement(Popover, { showClose: false, position: 'top', hasAutoWidth: true, bodyContent: () => (React.createElement("a", { href: "/support/escalation", target: "_blank" },
|
|
132
132
|
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
133
133
|
React.createElement(InfoCircleIcon, { className: "pf-u-ml-sm" }))));
|
|
134
|
+
// load rme categories as soon as user opens the modal
|
|
134
135
|
useEffect(() => {
|
|
136
|
+
if (!props.show || categories.length !== 0)
|
|
137
|
+
return;
|
|
135
138
|
const fetchCategories = () => __awaiter(this, void 0, void 0, function* () {
|
|
136
139
|
try {
|
|
137
|
-
const
|
|
138
|
-
setCategories(
|
|
140
|
+
const categories = yield getRmeCategories();
|
|
141
|
+
setCategories((categories === null || categories === void 0 ? void 0 : categories.items) || []);
|
|
139
142
|
}
|
|
140
143
|
catch (e) {
|
|
141
144
|
console.log(e);
|
|
@@ -143,7 +146,7 @@ export function RequestEscalationModal(props) {
|
|
|
143
146
|
});
|
|
144
147
|
fetchCategories();
|
|
145
148
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
146
|
-
}, []);
|
|
149
|
+
}, [props.show]);
|
|
147
150
|
return (React.createElement(Modal, { isOpen: props.show, onClose: onCancel, actions: modalActions, header: header },
|
|
148
151
|
React.createElement("p", { className: "pf-u-mb-md" },
|
|
149
152
|
React.createElement(Trans, { i18nKey: "i18RequestEscalationDescription" }, "Submit an escalation if an issue has become more severe or you feel the case needs a higher priority. A support manager will review yor escalation request.")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,sBAAsB,gBA4QrC"}
|
|
@@ -13,14 +13,14 @@ import { getVersion } from '@rh-support/utils';
|
|
|
13
13
|
import debounce from 'lodash/debounce';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import isEqual from 'lodash/isEqual';
|
|
16
|
-
import React, {
|
|
16
|
+
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import { useCaseDispatch, useCaseSelector } from '../../../../../context/CaseContext';
|
|
19
19
|
import { setCaseDetails, updateCaseDetails } from '../../../../../reducers/CaseReducer';
|
|
20
|
-
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../../../../../utils/caseOpenshiftClusterIdUtils';
|
|
20
|
+
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct, } from '../../../../../utils/caseOpenshiftClusterIdUtils';
|
|
21
21
|
import { NoClusterIDReasonSelector } from '../../../../CaseManagement/NoClusterIDReasonSelector';
|
|
22
22
|
import { discoverV4ClusterIdLink, discoverV4ClusterIdLinkError, isInvalidErrorMessage, v3Tov4TransitionLink, } from '../../../../CaseManagement/OpenShiftClusterId';
|
|
23
|
-
import {
|
|
23
|
+
import { OpenshiftDropdownV4 } from '../../../../CaseManagement/OpenshiftDropdownV4';
|
|
24
24
|
export function CaseOpenshiftClusterId() {
|
|
25
25
|
const { openshiftClusterID, product, version, caseNumber, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, selectedAccountDetails, description, } = useCaseSelector((state) => ({
|
|
26
26
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
@@ -42,30 +42,25 @@ export function CaseOpenshiftClusterId() {
|
|
|
42
42
|
const [isClusterIdInvalid, setIsClusterIdInValid] = useState(false);
|
|
43
43
|
const [dontKnowSelected, setDontKnowSelected] = useState(false);
|
|
44
44
|
const [selectedReason, setSelectedReason] = useState('');
|
|
45
|
-
const [isFetchingClusterDetails, setIsFetchingClusterDetails] = useState(false);
|
|
46
45
|
const [localOpenshiftClusterIDState, setLocalOpenshiftClusterIDState] = useState(openshiftClusterID);
|
|
47
46
|
const [isClusterIdUpdating, setIsClusterIdUpdating] = useState(false);
|
|
48
47
|
const [isReasonUpdating, setIsReasonUpdating] = useState(false);
|
|
48
|
+
const displayName = useRef('');
|
|
49
49
|
const { t } = useTranslation();
|
|
50
50
|
const clusterStateReset = () => {
|
|
51
51
|
setSelectedReason('');
|
|
52
52
|
setDontKnowSelected(false);
|
|
53
53
|
};
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const clusterDetails = yield fetchClusterIdDetails(openshiftClusterID);
|
|
65
|
-
openshiftClusterVersion = clusterDetails === null || clusterDetails === void 0 ? void 0 : clusterDetails.openshift_version;
|
|
66
|
-
}
|
|
67
|
-
setCaseDetails(caseDispatch, { openshiftClusterVersion });
|
|
68
|
-
});
|
|
54
|
+
const resetClusterData = () => {
|
|
55
|
+
setLocalOpenshiftClusterIDState('');
|
|
56
|
+
clusterStateReset();
|
|
57
|
+
setCaseDetails(caseDispatch, {
|
|
58
|
+
openshiftClusterID: '',
|
|
59
|
+
openshiftClusterVersion: '',
|
|
60
|
+
noClusterIdReasonExplanation: '',
|
|
61
|
+
noClusterIdReason: '',
|
|
62
|
+
});
|
|
63
|
+
};
|
|
69
64
|
useEffect(() => {
|
|
70
65
|
var _a;
|
|
71
66
|
const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -103,9 +98,6 @@ export function CaseOpenshiftClusterId() {
|
|
|
103
98
|
useEffect(() => {
|
|
104
99
|
const isClusterIdInvalid = getIsClusterIdInvalid(openshiftClusterID);
|
|
105
100
|
setIsClusterIdInValid(isClusterIdInvalid);
|
|
106
|
-
if (openshiftClusterID && !isClusterIdInvalid && isEmpty(openshiftClusterVersion)) {
|
|
107
|
-
setClusterVersion(openshiftClusterID);
|
|
108
|
-
}
|
|
109
101
|
if (!isEmpty(noClusterIdReason)) {
|
|
110
102
|
setDontKnowSelected(true);
|
|
111
103
|
setSelectedReason('dont-have-id');
|
|
@@ -138,13 +130,6 @@ export function CaseOpenshiftClusterId() {
|
|
|
138
130
|
setDontKnowSelected(true);
|
|
139
131
|
setSelectedReason(selectedClusterId);
|
|
140
132
|
setIsClusterIdInValid(false);
|
|
141
|
-
const caseDetails = {
|
|
142
|
-
openshiftClusterID: '',
|
|
143
|
-
noClusterIdReasonExplanation: '',
|
|
144
|
-
noClusterIdReason: '',
|
|
145
|
-
openshiftClusterVersion: '',
|
|
146
|
-
};
|
|
147
|
-
yield clusterIdUpdate(caseDetails);
|
|
148
133
|
}
|
|
149
134
|
else if (selectedClusterId === 'v3-cluster') {
|
|
150
135
|
setSelectedReason('dont-have-id');
|
|
@@ -160,25 +145,18 @@ export function CaseOpenshiftClusterId() {
|
|
|
160
145
|
else {
|
|
161
146
|
const isClusterIdInvalid = getIsClusterIdInvalid(selectedClusterId);
|
|
162
147
|
setIsClusterIdInValid(isClusterIdInvalid);
|
|
148
|
+
setDontKnowSelected(false);
|
|
149
|
+
setSelectedReason('');
|
|
150
|
+
displayName.current = selectedCluster.display_name;
|
|
163
151
|
if (isClusterIdInvalid || selectedClusterId === openshiftClusterID)
|
|
164
152
|
return;
|
|
165
153
|
const caseDetails = {
|
|
166
154
|
openshiftClusterID: selectedClusterId,
|
|
167
155
|
noClusterIdReasonExplanation: '',
|
|
168
156
|
noClusterIdReason: '',
|
|
157
|
+
openshiftClusterVersion: selectedCluster.openshift_version,
|
|
169
158
|
};
|
|
170
|
-
if (selectedCluster === null || selectedCluster === void 0 ? void 0 : selectedCluster.openshift_version) {
|
|
171
|
-
caseDetails.openshiftClusterVersion = selectedCluster.openshift_version;
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
setIsFetchingClusterDetails(true);
|
|
175
|
-
const clusterDetails = yield fetchClusterIdDetails(selectedClusterId);
|
|
176
|
-
caseDetails.openshiftClusterVersion = (clusterDetails === null || clusterDetails === void 0 ? void 0 : clusterDetails.openshift_version) || '';
|
|
177
|
-
setIsFetchingClusterDetails(false);
|
|
178
|
-
}
|
|
179
159
|
yield clusterIdUpdate(caseDetails);
|
|
180
|
-
setDontKnowSelected(false);
|
|
181
|
-
setSelectedReason('');
|
|
182
160
|
}
|
|
183
161
|
});
|
|
184
162
|
const isDedicatedV3 = () => noClusterIdReason === 'Other' && noClusterIdReasonExplanation === 'v3-cluster';
|
|
@@ -212,13 +190,18 @@ export function CaseOpenshiftClusterId() {
|
|
|
212
190
|
}
|
|
213
191
|
});
|
|
214
192
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
215
|
-
const debounceFn =
|
|
193
|
+
const debounceFn = debounce(onReasonExplanationInputBoxChanged, 1000);
|
|
216
194
|
const onReasonChange = (reason) => __awaiter(this, void 0, void 0, function* () {
|
|
217
195
|
if (!reason || reason === noClusterIdReason)
|
|
218
196
|
return;
|
|
219
197
|
try {
|
|
220
198
|
setIsReasonUpdating(true);
|
|
221
|
-
const caseDetails = {
|
|
199
|
+
const caseDetails = {
|
|
200
|
+
openshiftClusterID: '',
|
|
201
|
+
openshiftClusterVersion: '',
|
|
202
|
+
noClusterIdReason: reason,
|
|
203
|
+
noClusterIdReasonExplanation: '',
|
|
204
|
+
};
|
|
222
205
|
setCaseDetails(caseDispatch, { noClusterIdReason: reason });
|
|
223
206
|
yield clusterIdUpdate(caseDetails);
|
|
224
207
|
}
|
|
@@ -236,9 +219,9 @@ export function CaseOpenshiftClusterId() {
|
|
|
236
219
|
}
|
|
237
220
|
else {
|
|
238
221
|
return (React.createElement(React.Fragment, null,
|
|
239
|
-
React.createElement(OpenshiftDropdownV4, { openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear:
|
|
222
|
+
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV4: majorVersion === '4', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
|
|
240
223
|
noClusterIdReasonExplanation !== 'v3-cluster' &&
|
|
241
|
-
(dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating
|
|
224
|
+
(dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
|
|
242
225
|
React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
|
|
243
226
|
}
|
|
244
227
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAsMtD"}
|
|
@@ -11,7 +11,7 @@ import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { Button, ButtonVariant, Flex, FlexItem } from '@patternfly/react-core';
|
|
12
12
|
import { LoadingIndicator, PFTable, Table, ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { formatDate } from '@rh-support/utils';
|
|
14
|
+
import { formatDate, sendToSentry } from '@rh-support/utils';
|
|
15
15
|
import find from 'lodash/find';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import React, { useEffect, useRef, useState } from 'react';
|
|
@@ -71,10 +71,7 @@ export default function RMEEscalationList(props) {
|
|
|
71
71
|
}
|
|
72
72
|
catch (e) {
|
|
73
73
|
ToastNotification.addDangerMessage(e);
|
|
74
|
-
|
|
75
|
-
window === null || window === void 0 ? void 0 : window.Raven.captureMessage('RME form submit error', {
|
|
76
|
-
level: 'error',
|
|
77
|
-
});
|
|
74
|
+
sendToSentry(e, {}, 'RME form submit error');
|
|
78
75
|
}
|
|
79
76
|
finally {
|
|
80
77
|
escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !== escalationNum);
|
|
@@ -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":"AA2BA,eAAO,MAAM,oBAAoB,mBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,mBAKxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAIjC,CAAC;AAEF,wBAAgB,kBAAkB,gBAkRjC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
11
11
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
|
-
import {
|
|
12
|
+
import { getUrlParsedParams, getVersion } from '@rh-support/utils';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
15
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -21,9 +21,9 @@ import { RouteContext } from '../../context/RouteContext';
|
|
|
21
21
|
import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
22
22
|
import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
23
23
|
import { fetchClusterRecommendations } from '../../reducers/ClusterRecommendationsReducer';
|
|
24
|
-
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
24
|
+
import { getIsClusterIdInvalid, isClusterIdEnabledForProduct, } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
25
25
|
import { NoClusterIDReasonSelector } from './NoClusterIDReasonSelector';
|
|
26
|
-
import {
|
|
26
|
+
import { OpenshiftDropdownV4 } from './OpenshiftDropdownV4';
|
|
27
27
|
import { OpenShiftV3Inputbox } from './OpenShiftV3Inputbox';
|
|
28
28
|
export const v3Tov4TransitionLink = () => (React.createElement("a", { className: "show-target", href: "https://access.redhat.com/documentation/en-us/openshift_container_platform/4.8/html-single/migrating_from_openshift_container_platform_3_to_4/index", target: "_blank", rel: "noopener noreferrer" },
|
|
29
29
|
React.createElement(Trans, null, "How to transition from v3 to v4?")));
|
|
@@ -40,7 +40,7 @@ export const isInvalidErrorMessage = () => (React.createElement(React.Fragment,
|
|
|
40
40
|
discoverV4ClusterIdLink()));
|
|
41
41
|
export function OpenShiftClusterId() {
|
|
42
42
|
const queryParams = getUrlParsedParams(useLocation().search);
|
|
43
|
-
const { openshiftClusterID, product, version, issue, environment, periodicityOfIssue, timeFramesAndUrgency,
|
|
43
|
+
const { openshiftClusterID, product, version, issue, environment, periodicityOfIssue, timeFramesAndUrgency, noClusterIdReason, noClusterIdReasonExplanation, v3ClusterName, openshiftDisplayName, selectedAccountDetails, } = useCaseSelector((state) => ({
|
|
44
44
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
45
45
|
product: state.caseDetails.product,
|
|
46
46
|
version: state.caseDetails.version,
|
|
@@ -48,17 +48,17 @@ export function OpenShiftClusterId() {
|
|
|
48
48
|
environment: state.caseDetails.environment,
|
|
49
49
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
50
50
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
51
|
-
openshiftClusterVersion: state.caseDetails.openshiftClusterVersion,
|
|
52
51
|
noClusterIdReason: state.caseDetails.noClusterIdReason,
|
|
53
52
|
noClusterIdReasonExplanation: state.caseDetails.noClusterIdReasonExplanation,
|
|
54
53
|
v3ClusterName: state.v3ClusterName,
|
|
54
|
+
openshiftDisplayName: state.openshiftDisplayName,
|
|
55
55
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
56
56
|
}), isEqual);
|
|
57
57
|
const caseDispatch = useCaseDispatch();
|
|
58
|
-
const { globalMetadataState: {
|
|
58
|
+
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
59
59
|
const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
|
|
60
60
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
61
|
-
const { clusterRecommendationsState: {
|
|
61
|
+
const { clusterRecommendationsState: { clusterRecommendationsCache }, } = useContext(ClusterRecommendationsContext);
|
|
62
62
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
63
63
|
const isOpenShiftV3 = majorVersion === '3';
|
|
64
64
|
const isCustomer = loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber);
|
|
@@ -67,11 +67,11 @@ export function OpenShiftClusterId() {
|
|
|
67
67
|
const [v3Selected, setV3Selected] = useState(false);
|
|
68
68
|
const [dontKnowSelected, setDontKnowSelected] = useState(false);
|
|
69
69
|
const [selectedReason, setSelectedReason] = useState('');
|
|
70
|
-
const isClusterRecommendationEnabled = getConfigField(pcmConfig.data, 'isClusterRecommendationEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
71
70
|
const resetClusterData = () => {
|
|
72
71
|
clusterStateReset();
|
|
73
72
|
setCaseDetails(caseDispatch, {
|
|
74
73
|
openshiftClusterID: '',
|
|
74
|
+
openshiftClusterVersion: '',
|
|
75
75
|
noClusterIdReasonExplanation: '',
|
|
76
76
|
noClusterIdReason: '',
|
|
77
77
|
});
|
|
@@ -82,41 +82,26 @@ export function OpenShiftClusterId() {
|
|
|
82
82
|
setDontKnowSelected(false);
|
|
83
83
|
setV3Selected(false);
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
openshiftClusterVersion: '',
|
|
89
|
-
noClusterIdReason: '',
|
|
90
|
-
noClusterIdReasonExplanation: '',
|
|
91
|
-
});
|
|
92
|
-
setCaseState(caseDispatch, { v3ClusterName: '' });
|
|
93
|
-
setClusterVersion(openshiftClusterID, clusterDetails);
|
|
94
|
-
});
|
|
95
|
-
const setClusterVersion = (openshiftClusterID, clusterDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
if (!openshiftClusterID || getIsClusterIdInvalid(openshiftClusterID))
|
|
97
|
-
return;
|
|
98
|
-
let openshiftClusterVersion;
|
|
99
|
-
if (clusterDetails &&
|
|
100
|
-
clusterDetails.external_cluster_id === openshiftClusterID &&
|
|
101
|
-
clusterDetails.openshift_version) {
|
|
102
|
-
openshiftClusterVersion = clusterDetails.openshift_version;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
const clusterDetails = yield fetchClusterIdDetails(openshiftClusterID);
|
|
106
|
-
openshiftClusterVersion = clusterDetails === null || clusterDetails === void 0 ? void 0 : clusterDetails.openshift_version;
|
|
107
|
-
}
|
|
108
|
-
setCaseDetails(caseDispatch, { openshiftClusterVersion });
|
|
109
|
-
});
|
|
85
|
+
/**
|
|
86
|
+
* Hook to show cluster fields and check if cluster id comes from url
|
|
87
|
+
*/
|
|
110
88
|
useEffect(() => {
|
|
111
89
|
var _a;
|
|
112
90
|
const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
|
|
113
91
|
var _b;
|
|
114
92
|
const hasCluster = yield isClusterIdEnabledForProduct(product, (_b = allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult);
|
|
115
93
|
setShowClusterId(hasCluster);
|
|
116
|
-
//
|
|
94
|
+
// if clusterId is already populated it means it comes from session and
|
|
95
|
+
// we ignore url clusterId otherwise we get cluster id from url and validate it
|
|
117
96
|
const clusterIdFromUrl = queryParams === null || queryParams === void 0 ? void 0 : queryParams.clusterId;
|
|
118
|
-
if (hasCluster &&
|
|
119
|
-
|
|
97
|
+
if (hasCluster &&
|
|
98
|
+
clusterIdFromUrl &&
|
|
99
|
+
isEmpty(openshiftClusterID) &&
|
|
100
|
+
isEmpty(noClusterIdReason) &&
|
|
101
|
+
isEmpty(noClusterIdReasonExplanation)) {
|
|
102
|
+
setCaseDetails(caseDispatch, {
|
|
103
|
+
openshiftClusterID: clusterIdFromUrl,
|
|
104
|
+
});
|
|
120
105
|
const isClusterIdInvalid = getIsClusterIdInvalid(clusterIdFromUrl);
|
|
121
106
|
if (isClusterIdInvalid) {
|
|
122
107
|
// if we get invalid id from url we need to add red line to dropdown
|
|
@@ -131,22 +116,18 @@ export function OpenShiftClusterId() {
|
|
|
131
116
|
isClusterVisible();
|
|
132
117
|
}
|
|
133
118
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
-
}, [product, version,
|
|
119
|
+
}, [product, version, allProducts.data]);
|
|
135
120
|
// On preview page user may change product and version we need to reset internal state
|
|
136
121
|
// context api state will be reset on parent component each time user changes product and version
|
|
137
122
|
useEffect(() => {
|
|
138
123
|
clusterStateReset();
|
|
139
124
|
}, [product, version]);
|
|
140
125
|
/**
|
|
141
|
-
* Hook to
|
|
142
|
-
|
|
143
|
-
*/
|
|
126
|
+
* Hook to set clusterId fields when comes from session or backward/forward
|
|
127
|
+
**/
|
|
144
128
|
useEffect(() => {
|
|
145
129
|
const isClusterIdInvalid = getIsClusterIdInvalid(openshiftClusterID);
|
|
146
130
|
setIsClusterIdInValid(isClusterIdInvalid);
|
|
147
|
-
if (openshiftClusterID && !isClusterIdInvalid && isEmpty(openshiftClusterVersion)) {
|
|
148
|
-
setClusterVersion(openshiftClusterID);
|
|
149
|
-
}
|
|
150
131
|
// when user click on back and continue button, need to show v3 text box or reasons dropdown
|
|
151
132
|
if (!isEmpty(v3ClusterName) ||
|
|
152
133
|
(noClusterIdReason === 'Other' && noClusterIdReasonExplanation === 'v3-cluster')) {
|
|
@@ -157,11 +138,9 @@ export function OpenShiftClusterId() {
|
|
|
157
138
|
setDontKnowSelected(true);
|
|
158
139
|
setSelectedReason('dont-have-id');
|
|
159
140
|
}
|
|
160
|
-
const canFetchClusterRecommendation =
|
|
161
|
-
// To prevent refetching clusterRecommendations checking for clusterRecommendations data length
|
|
141
|
+
const canFetchClusterRecommendation = !isClusterIdInvalid && !isEmpty(openshiftClusterID);
|
|
162
142
|
canFetchClusterRecommendation &&
|
|
163
|
-
|
|
164
|
-
fetchClusterRecommendations(clusterRecommendationsDispatch, openshiftClusterID);
|
|
143
|
+
fetchClusterRecommendations(clusterRecommendationsDispatch, openshiftClusterID, clusterRecommendationsCache);
|
|
165
144
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
166
145
|
}, [noClusterIdReason]);
|
|
167
146
|
const onClusterIdStateUpdate = (selectedCluster) => {
|
|
@@ -178,7 +157,7 @@ export function OpenShiftClusterId() {
|
|
|
178
157
|
setV3Selected(true);
|
|
179
158
|
setSelectedReason(selectedId);
|
|
180
159
|
setCaseDetails(caseDispatch, {
|
|
181
|
-
openshiftClusterID,
|
|
160
|
+
openshiftClusterID: '',
|
|
182
161
|
openshiftClusterVersion: '',
|
|
183
162
|
noClusterIdReason: 'Other',
|
|
184
163
|
noClusterIdReasonExplanation: 'v3-cluster',
|
|
@@ -186,10 +165,17 @@ export function OpenShiftClusterId() {
|
|
|
186
165
|
return;
|
|
187
166
|
}
|
|
188
167
|
const isClusterInvalid = getIsClusterIdInvalid(selectedId);
|
|
189
|
-
const canFetchClusterRecommendation = !isClusterInvalid && isClusterRecommendationEnabled;
|
|
190
168
|
setIsClusterIdInValid(isClusterInvalid);
|
|
191
|
-
|
|
192
|
-
|
|
169
|
+
setCaseDetails(caseDispatch, {
|
|
170
|
+
openshiftClusterID: selectedId,
|
|
171
|
+
openshiftClusterVersion: selectedCluster.openshift_version,
|
|
172
|
+
noClusterIdReason: '',
|
|
173
|
+
noClusterIdReasonExplanation: '',
|
|
174
|
+
});
|
|
175
|
+
setCaseState(caseDispatch, { v3ClusterName: '', openshiftDisplayName: selectedCluster.display_name });
|
|
176
|
+
!isClusterInvalid &&
|
|
177
|
+
!isEmpty(selectedId) &&
|
|
178
|
+
fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId, clusterRecommendationsCache);
|
|
193
179
|
};
|
|
194
180
|
const clusterIdDropdownFormInstructions = () => {
|
|
195
181
|
const errorMessage = isClusterIdInvalid
|
|
@@ -219,7 +205,7 @@ export function OpenShiftClusterId() {
|
|
|
219
205
|
if (!showClusterId)
|
|
220
206
|
return null;
|
|
221
207
|
return (React.createElement(React.Fragment, null,
|
|
222
|
-
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: showValidationErrorAlert &&
|
|
208
|
+
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: showValidationErrorAlert &&
|
|
223
209
|
((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV4: majorVersion === '4' })),
|
|
224
210
|
noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !isOpenShiftV3 && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
|
|
225
211
|
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && showValidationErrorAlert, v3Selected: v3Selected }))));
|
|
@@ -9,11 +9,11 @@ interface IProps extends IDClassNameProps {
|
|
|
9
9
|
isV4: boolean;
|
|
10
10
|
isDisabled?: boolean;
|
|
11
11
|
noClusterIdReasonExplanation?: string;
|
|
12
|
+
openshiftDisplayName?: string;
|
|
12
13
|
}
|
|
13
|
-
declare const fetchClusterIdDetails: (clusterId: string) => Promise<import("@cee-eng/hydrajs/@types/models/cloud").ICluster>;
|
|
14
14
|
declare function OpenshiftDropdownV4(props: IProps): JSX.Element;
|
|
15
15
|
declare namespace OpenshiftDropdownV4 {
|
|
16
16
|
var defaultProps: {};
|
|
17
17
|
}
|
|
18
|
-
export { OpenshiftDropdownV4
|
|
18
|
+
export { OpenshiftDropdownV4 };
|
|
19
19
|
//# sourceMappingURL=OpenshiftDropdownV4.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAUjF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA6WzC;kBA7WQ,mBAAmB;;;AAgX5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -9,11 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { cloud } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Checkbox, Divider, Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { useLRUCache } from '@rh-support/components';
|
|
13
|
+
import debounce from 'lodash/debounce';
|
|
14
14
|
import groupBy from 'lodash/groupBy';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
16
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
16
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
18
|
import { getDisplayNameForCluster } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
19
19
|
import CaseOpenShiftPopover from '../CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover';
|
|
@@ -21,22 +21,13 @@ const defaultProps = {
|
|
|
21
21
|
className: '',
|
|
22
22
|
id: '',
|
|
23
23
|
isDisabled: false,
|
|
24
|
+
openshiftDisplayName: '',
|
|
24
25
|
};
|
|
25
|
-
const
|
|
26
|
-
try {
|
|
27
|
-
const clustersResponse = yield cloud.getAccountClusters({
|
|
28
|
-
order: 'display_name asc',
|
|
29
|
-
search: `external_id ILIKE '%${clusterId}%'`,
|
|
30
|
-
});
|
|
31
|
-
const clusterDetails = (clustersResponse.items || []).find((item) => item.external_id === clusterId);
|
|
32
|
-
return clusterDetails;
|
|
33
|
-
}
|
|
34
|
-
catch (e) { }
|
|
35
|
-
});
|
|
36
|
-
const createState = (external_cluster_id, display_name) => {
|
|
26
|
+
const createState = (external_cluster_id, display_name, openshift_version) => {
|
|
37
27
|
return {
|
|
38
28
|
display_name,
|
|
39
29
|
external_cluster_id,
|
|
30
|
+
openshift_version: openshift_version || '',
|
|
40
31
|
toString: () => display_name || '',
|
|
41
32
|
compareTo: function (value) {
|
|
42
33
|
const displayName = this.toString().toLowerCase();
|
|
@@ -49,7 +40,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
49
40
|
const { t } = useTranslation();
|
|
50
41
|
const PER_PAGE = 200;
|
|
51
42
|
const [clustersRawResponse, setClustersRawResponse] = useState([]);
|
|
52
|
-
const abortControllerRef = useRef(
|
|
43
|
+
const abortControllerRef = useRef();
|
|
53
44
|
const [clustersSelectOptions, setClustersSelectOptions] = useState([]);
|
|
54
45
|
const [isOpen, setIsOpen] = useState(false);
|
|
55
46
|
const [validated, setValidated] = useState('default');
|
|
@@ -57,8 +48,9 @@ function OpenshiftDropdownV4(props) {
|
|
|
57
48
|
const [showArchivedClusters, setShowArchivedClusters] = useState(false);
|
|
58
49
|
const [isFetchingClusters, setIsFetchingClusters] = useState(false);
|
|
59
50
|
const [totalResultsNo, setTotalResultsNo] = useState(0);
|
|
51
|
+
const { getFromCache, setInCache } = useLRUCache(50);
|
|
60
52
|
// gets a cluster id and returns display name
|
|
61
|
-
const
|
|
53
|
+
const getDisplayName = (id, noClusterIdReasonExplanation, display_name) => {
|
|
62
54
|
if (isEmpty(id))
|
|
63
55
|
return '';
|
|
64
56
|
if (id === 'dont-have-id') {
|
|
@@ -68,8 +60,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
68
60
|
}
|
|
69
61
|
if (id === 'v3-cluster')
|
|
70
62
|
return t('The case is for a v3 cluster');
|
|
71
|
-
|
|
72
|
-
return isEmpty(cluster) ? id : getDisplayNameForCluster(cluster);
|
|
63
|
+
return display_name || id;
|
|
73
64
|
};
|
|
74
65
|
const onDropdownClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
75
66
|
setIsOpen(false);
|
|
@@ -103,88 +94,110 @@ function OpenshiftDropdownV4(props) {
|
|
|
103
94
|
setIsOpen(false);
|
|
104
95
|
}
|
|
105
96
|
});
|
|
97
|
+
const dropdownHeaderOptions = useMemo(() => [
|
|
98
|
+
React.createElement(SelectOption, { key: 'show-hide-archived-clusters', inputId: "check-box" },
|
|
99
|
+
React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters, className: "archived-clusters-checkbox" })),
|
|
100
|
+
React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
|
|
101
|
+
React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")) }),
|
|
102
|
+
...(!props.isV4
|
|
103
|
+
? [
|
|
104
|
+
React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')) }),
|
|
105
|
+
]
|
|
106
|
+
: []),
|
|
107
|
+
],
|
|
108
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
109
|
+
[showArchivedClusters]);
|
|
106
110
|
const getClusterOptions = (clusters) => {
|
|
107
|
-
const clustersResponseGrouped = groupBy(clusters, '
|
|
111
|
+
const clustersResponseGrouped = groupBy(clusters, 'console_url') || [];
|
|
108
112
|
const domainNames = Object.keys(clustersResponseGrouped) || [];
|
|
109
|
-
// move
|
|
110
|
-
const undefinedIndex = domainNames.findIndex((i) => i === '
|
|
113
|
+
// move clusters with empty console_urls to the end of domains array
|
|
114
|
+
const undefinedIndex = domainNames.findIndex((i) => i === '');
|
|
111
115
|
if (undefinedIndex !== -1 && undefinedIndex !== domainNames.length - 1) {
|
|
112
116
|
domainNames.splice(undefinedIndex, 1);
|
|
113
|
-
domainNames.push('
|
|
117
|
+
domainNames.push('');
|
|
114
118
|
}
|
|
115
119
|
// SelectGroup had a bug when keyboard was used to navigate
|
|
116
120
|
// to show group names used disabled SelectOption, need to be replaced after bug fix
|
|
117
121
|
const clusterOptions = [];
|
|
118
122
|
domainNames.forEach((domain, index) => {
|
|
119
|
-
domain !== '
|
|
123
|
+
domain !== '' &&
|
|
120
124
|
clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-u-font-weight-bold pf-u-color-400", value: createState(domain, domain), key: domain + index }));
|
|
121
125
|
clustersResponseGrouped[domain] &&
|
|
122
126
|
clustersResponseGrouped[domain].forEach((cluster, i) => {
|
|
123
|
-
clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, cluster.
|
|
127
|
+
clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }));
|
|
124
128
|
});
|
|
125
129
|
clusterOptions.push(React.createElement(Divider, { component: "div", key: index + domain }));
|
|
126
130
|
});
|
|
127
131
|
return [
|
|
128
|
-
|
|
129
|
-
React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters, className: "archived-clusters-checkbox" })),
|
|
130
|
-
React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
|
|
131
|
-
React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")) }),
|
|
132
|
-
...(!props.isV4
|
|
133
|
-
? [
|
|
134
|
-
React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')) }),
|
|
135
|
-
]
|
|
136
|
-
: []),
|
|
132
|
+
...dropdownHeaderOptions,
|
|
137
133
|
...(clusterOptions.length !== 0 ? [React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider' })] : []),
|
|
138
134
|
...clusterOptions,
|
|
139
135
|
];
|
|
140
136
|
};
|
|
141
|
-
const
|
|
137
|
+
const fetchAClusterIdDetails = (clusterId) => __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a;
|
|
139
|
+
if (isEmpty(clusterId))
|
|
140
|
+
return {};
|
|
142
141
|
setIsFetchingClusters(true);
|
|
143
142
|
try {
|
|
144
|
-
if (abortControllerRef.current !== undefined) {
|
|
145
|
-
// Cancel the previous request
|
|
146
|
-
abortControllerRef.current.abort();
|
|
147
|
-
}
|
|
148
|
-
// recreate a new AbortController for each call
|
|
149
|
-
let controller = new AbortController();
|
|
150
|
-
abortControllerRef.current = controller;
|
|
151
|
-
// query language: https://github.com/yaacov/tree-search-language
|
|
152
143
|
const clustersResponse = yield cloud.getAccountClustersSubscription({
|
|
153
|
-
|
|
154
|
-
page,
|
|
155
|
-
size: PER_PAGE,
|
|
156
|
-
search: `${showArchivedClusters ? '' : "status!='Archived'"} ${search && !showArchivedClusters ? 'AND' : ''} ${search ? `(external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%')` : ''}`,
|
|
144
|
+
search: `external_cluster_id='${clusterId.trim()}'`,
|
|
157
145
|
fields: 'external_cluster_id,display_name,status,metrics.openshift_version',
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.map((item) => {
|
|
146
|
+
});
|
|
147
|
+
setIsFetchingClusters(false);
|
|
148
|
+
return (((_a = clustersResponse.items.map((item) => {
|
|
162
149
|
var _a, _b;
|
|
163
150
|
return ({
|
|
164
|
-
display_name:
|
|
151
|
+
display_name: item.display_name,
|
|
165
152
|
external_cluster_id: item.external_cluster_id,
|
|
166
153
|
openshift_version: ((_b = (_a = item === null || item === void 0 ? void 0 : item.metrics) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.openshift_version) || '',
|
|
167
154
|
});
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
});
|
|
155
|
+
})) === null || _a === void 0 ? void 0 : _a[0]) || {});
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
const fetchAccountClusters = (search = '', page = 0) => __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
search = search.trim();
|
|
163
|
+
setIsFetchingClusters(true);
|
|
164
|
+
try {
|
|
165
|
+
let clustersResponse;
|
|
166
|
+
if (getFromCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`)) {
|
|
167
|
+
clustersResponse = getFromCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`);
|
|
183
168
|
}
|
|
184
|
-
|
|
185
|
-
|
|
169
|
+
else {
|
|
170
|
+
if (abortControllerRef.current !== undefined) {
|
|
171
|
+
// Cancel the previous request
|
|
172
|
+
abortControllerRef.current.abort();
|
|
173
|
+
}
|
|
174
|
+
// recreate a new AbortController for each call
|
|
175
|
+
let controller = new AbortController();
|
|
176
|
+
abortControllerRef.current = controller;
|
|
177
|
+
// query language: https://github.com/yaacov/tree-search-language
|
|
178
|
+
clustersResponse = yield cloud.getAccountClustersSubscription({
|
|
179
|
+
order: 'display_name asc',
|
|
180
|
+
page,
|
|
181
|
+
size: PER_PAGE,
|
|
182
|
+
search: `external_cluster_id!='' AND ${showArchivedClusters ? '' : "status!='Archived'"} ${search && !showArchivedClusters ? 'AND' : ''} ${search
|
|
183
|
+
? `(external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
|
|
184
|
+
: ''}`,
|
|
185
|
+
fields: 'external_cluster_id,display_name,status,metrics.openshift_version,console_url',
|
|
186
|
+
}, controller.signal);
|
|
187
|
+
setInCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`, clustersResponse);
|
|
186
188
|
}
|
|
187
189
|
setIsFetchingClusters(false);
|
|
190
|
+
const items = clustersResponse.items.map((item) => {
|
|
191
|
+
var _a, _b;
|
|
192
|
+
return ({
|
|
193
|
+
display_name: item.display_name,
|
|
194
|
+
external_cluster_id: item.external_cluster_id,
|
|
195
|
+
openshift_version: ((_b = (_a = item === null || item === void 0 ? void 0 : item.metrics) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.openshift_version) || '',
|
|
196
|
+
console_url: (item === null || item === void 0 ? void 0 : item.console_url) && (item === null || item === void 0 ? void 0 : item.console_url) !== null
|
|
197
|
+
? item.console_url.split('.').slice(4).join('.')
|
|
198
|
+
: '',
|
|
199
|
+
});
|
|
200
|
+
});
|
|
188
201
|
return {
|
|
189
202
|
items,
|
|
190
203
|
totalResult: items.length,
|
|
@@ -198,17 +211,37 @@ function OpenshiftDropdownV4(props) {
|
|
|
198
211
|
return { items: [], totalResult: 0, page: 0, total: 0 };
|
|
199
212
|
}
|
|
200
213
|
});
|
|
201
|
-
//
|
|
214
|
+
// when user visits case detail or clusterId comes from url,
|
|
215
|
+
// we have clusterId but need to get display name
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
const getClusterDetails = () => __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
if (!isEmpty(props.openshiftClusterIDState) &&
|
|
219
|
+
props.openshiftClusterIDState !== 'dont-have-id' &&
|
|
220
|
+
props.openshiftClusterIDState !== 'v3-cluster' &&
|
|
221
|
+
isEmpty(props.openshiftDisplayName)) {
|
|
222
|
+
const fetchedCluster = yield fetchAClusterIdDetails(props.openshiftClusterIDState);
|
|
223
|
+
props.onClusterIdStateUpdate(Object.assign(Object.assign({}, fetchedCluster), { display_name: getDisplayNameForCluster(fetchedCluster) }));
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
getClusterDetails();
|
|
227
|
+
// no dependency here as we want to run this once on load
|
|
228
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
229
|
+
}, []);
|
|
230
|
+
// need to get clusters when user opens the dropdown
|
|
231
|
+
// as the api response is cached np extra call is made on open/close
|
|
202
232
|
// added observing props.isV4 because re-render
|
|
203
233
|
// is needed when user on overview page changing version
|
|
204
234
|
useEffect(() => {
|
|
235
|
+
if (!isOpen)
|
|
236
|
+
return;
|
|
205
237
|
let isUnmounted = false;
|
|
206
238
|
const fetchClusters = () => __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
setClustersSelectOptions(getClusterOptions([]));
|
|
207
240
|
const fetchedClusters = yield fetchAccountClusters(inputVal);
|
|
208
241
|
if (!isUnmounted) {
|
|
209
242
|
setClustersRawResponse(fetchedClusters.items);
|
|
210
243
|
setTotalResultsNo(fetchedClusters.total);
|
|
211
|
-
setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
|
|
244
|
+
setClustersSelectOptions(getClusterOptions(fetchedClusters.items) || []);
|
|
212
245
|
}
|
|
213
246
|
});
|
|
214
247
|
fetchClusters();
|
|
@@ -216,7 +249,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
216
249
|
isUnmounted = true;
|
|
217
250
|
};
|
|
218
251
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
219
|
-
}, [props.isV4, showArchivedClusters]);
|
|
252
|
+
}, [props.isV4, showArchivedClusters, isOpen, inputVal]);
|
|
220
253
|
useEffect(() => {
|
|
221
254
|
if (props.isClusterIdInvalid) {
|
|
222
255
|
setValidated('error');
|
|
@@ -225,20 +258,22 @@ function OpenshiftDropdownV4(props) {
|
|
|
225
258
|
setValidated('default');
|
|
226
259
|
}
|
|
227
260
|
}, [props.isClusterIdInvalid]);
|
|
261
|
+
// when user type or paste a clusterId we land here
|
|
228
262
|
const onTypeaheadInputChanged = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
229
263
|
setInputVal(input);
|
|
230
|
-
props.onClusterIdStateUpdate(createState(input, input));
|
|
231
264
|
const fetchedClusters = yield fetchAccountClusters(input);
|
|
232
265
|
setClustersRawResponse(fetchedClusters.items);
|
|
233
266
|
setTotalResultsNo(fetchedClusters.total);
|
|
234
267
|
setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
|
|
268
|
+
props.onClusterIdStateUpdate({ external_cluster_id: input });
|
|
235
269
|
});
|
|
270
|
+
const debounceFn = debounce(onTypeaheadInputChanged, 500);
|
|
236
271
|
const getSelectedItem = () => {
|
|
237
272
|
if (!isEmpty(inputVal)) {
|
|
238
273
|
return createState(props.openshiftClusterIDState, inputVal);
|
|
239
274
|
}
|
|
240
275
|
else {
|
|
241
|
-
return createState(props.openshiftClusterIDState,
|
|
276
|
+
return createState(props.openshiftClusterIDState, getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState));
|
|
242
277
|
}
|
|
243
278
|
};
|
|
244
279
|
const titleId = 'case-details-cluster-nickname-selector';
|
|
@@ -249,7 +284,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
249
284
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"),
|
|
250
285
|
React.createElement(CaseOpenShiftPopover, null)),
|
|
251
286
|
React.createElement("span", { id: titleId, hidden: true }, "Select a state"),
|
|
252
|
-
React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, isDisabled: props.isDisabled, typeAheadAriaLabel: t('Search by Cluster ID and
|
|
287
|
+
React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, isDisabled: props.isDisabled, typeAheadAriaLabel: t('Search by Cluster ID, alias, and domain or manually enter your Cluster ID'), onToggle: onToggle, onSelect: onSelect, onClear: onDropdownClear, selections: getSelectedItem(), isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Search by Cluster ID, alias, and domain or manually enter your Cluster ID'), hasInlineFilter: false, onTypeaheadInputChanged: debounceFn, onFilter: () => undefined, validated: validated, "aria-invalid": props.isClusterIdInvalid, "aria-describedby": "clusterID-validate-helper", required: true }, (isFetchingClusters && { loadingVariant: 'spinner' }), (!isFetchingClusters &&
|
|
253
288
|
clustersRawResponse.length < totalResultsNo && {
|
|
254
289
|
loadingVariant: {
|
|
255
290
|
text: 'Display additional results',
|
|
@@ -259,4 +294,4 @@ function OpenshiftDropdownV4(props) {
|
|
|
259
294
|
React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
|
|
260
295
|
}
|
|
261
296
|
OpenshiftDropdownV4.defaultProps = defaultProps;
|
|
262
|
-
export { OpenshiftDropdownV4
|
|
297
|
+
export { OpenshiftDropdownV4 };
|
|
@@ -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;
|
|
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;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eA6YtD"}
|
|
@@ -30,6 +30,7 @@ import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
|
30
30
|
import { fetchTopContent } from '../../reducers/TopContentReducer';
|
|
31
31
|
import { isClusterIdEnabledForProduct } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
32
32
|
import RouteUtils from '../../utils/routeUtils';
|
|
33
|
+
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
33
34
|
export function GlobalTroubleshootEffects(props) {
|
|
34
35
|
const [initDefaultSection, setInitDefaultSection] = useState(false);
|
|
35
36
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
@@ -64,6 +65,7 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
64
65
|
// top content state
|
|
65
66
|
const { topContentState: { topContentPayload }, } = useContext(TCStateContext);
|
|
66
67
|
const tcDispatch = useContext(TCDispatchContext);
|
|
68
|
+
const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
|
|
67
69
|
const { resetCaseCreateState } = useResetCaseCreate();
|
|
68
70
|
const prevSectionsToHide = usePrevious(sectionsToHide);
|
|
69
71
|
const hasSummaryInUrl = !isEmpty(urlQueryParams.summary);
|
|
@@ -238,8 +240,7 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
238
240
|
return;
|
|
239
241
|
}
|
|
240
242
|
const getEARules = () => __awaiter(this, void 0, void 0, function* () {
|
|
241
|
-
const rulesBody = {
|
|
242
|
-
caseType: {
|
|
243
|
+
const rulesBody = Object.assign({ caseType: {
|
|
243
244
|
product,
|
|
244
245
|
version,
|
|
245
246
|
summary,
|
|
@@ -247,11 +248,15 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
247
248
|
type: caseType,
|
|
248
249
|
language,
|
|
249
250
|
accountNumber,
|
|
250
|
-
|
|
251
|
-
accountType: { isSecure: selectedAccountDetails.data.securedEnvironment || false },
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
session_id: activeSessionId,
|
|
252
|
+
}, accountType: { isSecure: selectedAccountDetails.data.securedEnvironment || false }, userType: { canAddAttachments }, fields: ['title', 'cta', 'description', 'rule_type', 'rule_sub_type', 'rule_id'] }, ((selectedLocalFiles === null || selectedLocalFiles === void 0 ? void 0 : selectedLocalFiles.length) && {
|
|
253
|
+
attachment: selectedLocalFiles.map((file) => ({
|
|
254
|
+
uuid: file.attachmentId,
|
|
255
|
+
fileName: file.name,
|
|
256
|
+
size: file.size,
|
|
257
|
+
fileType: file.type,
|
|
258
|
+
})),
|
|
259
|
+
}));
|
|
255
260
|
yield fetchEdmundAbbottRules(rulesDispatch, rulesBody);
|
|
256
261
|
});
|
|
257
262
|
getEARules();
|
|
@@ -269,6 +274,9 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
269
274
|
loggedInUserRights.data,
|
|
270
275
|
rulesDispatch,
|
|
271
276
|
selectedAccountDetails.data.securedEnvironment,
|
|
277
|
+
selectedLocalFiles,
|
|
278
|
+
selectedLocalFiles === null || selectedLocalFiles === void 0 ? void 0 : selectedLocalFiles.length,
|
|
279
|
+
activeSessionId,
|
|
272
280
|
], 2000);
|
|
273
281
|
/**
|
|
274
282
|
* If a component refetches the global account details , we want to make sure that the same changes are reflected in the
|
|
@@ -293,7 +301,10 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
293
301
|
const previousActiveSessionId = usePrevious(activeSessionId);
|
|
294
302
|
useEffect(() => {
|
|
295
303
|
var _a;
|
|
296
|
-
if (isEmpty(product) ||
|
|
304
|
+
if (isEmpty(product) ||
|
|
305
|
+
isEmpty(version) ||
|
|
306
|
+
activeSessionId !== previousActiveSessionId ||
|
|
307
|
+
isEmpty(previousVersion))
|
|
297
308
|
return;
|
|
298
309
|
// we need to reset openshift cluster states only when major version is different
|
|
299
310
|
const oldMajorVersion = previousVersion && getVersion(previousVersion).major;
|
|
@@ -188,6 +188,7 @@ export interface ICaseState {
|
|
|
188
188
|
versionsDetails: IApiResponseDetails<IVersionsDetails[]>;
|
|
189
189
|
v3ClusterName?: string;
|
|
190
190
|
caseCreation500ErrorStatus: boolean;
|
|
191
|
+
openshiftDisplayName?: string;
|
|
191
192
|
}
|
|
192
193
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
193
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAA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,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oCAAoC,EAAE,OAAO,CAAC;IAC9C,sCAAsC,EAAE,OAAO,CAAC;IAChD,eAAe,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,oBAAY,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
|
|
@@ -137,6 +137,7 @@ export const initialCaseState = {
|
|
|
137
137
|
notes: '',
|
|
138
138
|
noClusterIdReason: '',
|
|
139
139
|
noClusterIdReasonExplanation: '',
|
|
140
|
+
openshiftClusterVersion: '',
|
|
140
141
|
},
|
|
141
142
|
customerEscalation: false,
|
|
142
143
|
isClosed: false,
|
|
@@ -174,6 +175,7 @@ export const initialCaseState = {
|
|
|
174
175
|
versionsDetails: getApiResourceObject([]),
|
|
175
176
|
v3ClusterName: '',
|
|
176
177
|
caseCreation500ErrorStatus: false,
|
|
178
|
+
openshiftDisplayName: '',
|
|
177
179
|
};
|
|
178
180
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
179
181
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IClusterRecommendation } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
1
|
+
import { IClusterRecommendation, IClusterRecommendationsResult } from '@cee-eng/hydrajs/@types/api/pcm/preCaseDiagnostics';
|
|
2
2
|
import { IAction, IApiResponseDetails } from '@rh-support/types/shared';
|
|
3
3
|
export declare enum RulesReducerConstants {
|
|
4
4
|
requestClusterRecommendations = "requestClusterRecommendations",
|
|
@@ -11,11 +11,14 @@ export declare const initialClusterRecommendations: IApiResponseDetails<ICluster
|
|
|
11
11
|
export interface IInitialClusterRecommendationsStateType {
|
|
12
12
|
clusterRecommendations: IApiResponseDetails<IClusterRecommendation[]>;
|
|
13
13
|
isClusterRecommendationsModalOpen: boolean;
|
|
14
|
+
clusterRecommendationsCache: {
|
|
15
|
+
[key: string]: IClusterRecommendationsResult;
|
|
16
|
+
};
|
|
14
17
|
}
|
|
15
18
|
export declare const initialState: IInitialClusterRecommendationsStateType;
|
|
16
19
|
export declare const clusterRecommendationsReducer: (state: IInitialClusterRecommendationsStateType, action: IActionType) => IInitialClusterRecommendationsStateType;
|
|
17
20
|
export declare const resetClusterRecommendations: (dispatch: ClusterRecommendationsDispatchType) => void;
|
|
18
|
-
export declare const fetchClusterRecommendations: (dispatch: ClusterRecommendationsDispatchType, clusterId: string) => Promise<void>;
|
|
21
|
+
export declare const fetchClusterRecommendations: (dispatch: ClusterRecommendationsDispatchType, clusterId: string, clusterRecommendationsCache: any) => Promise<void>;
|
|
19
22
|
export declare const toggleClusterRecommendationModal: (dispatch: ClusterRecommendationsDispatchType, newModalVisibilityValue: boolean) => void;
|
|
20
23
|
export {};
|
|
21
24
|
//# sourceMappingURL=ClusterRecommendationsReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/ClusterRecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/ClusterRecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAChC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,oBAAY,qBAAqB;IAC7B,6BAA6B,kCAAkC;IAC/D,2BAA2B,gCAAgC;IAC3D,gCAAgC,qCAAqC;CACxE;AAED,aAAK,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,uCAAuC,CAAC,CAAC;AAC3F,oBAAY,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,CAAC,sBAAsB,EAAE,CAA4B,CAAC;AAErH,MAAM,WAAW,uCAAuC;IACpD,sBAAsB,EAAE,mBAAmB,CAAC,sBAAsB,EAAE,CAAC,CAAC;IACtE,iCAAiC,EAAE,OAAO,CAAC;IAC3C,2BAA2B,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,6BAA6B,CAAA;KAAE,CAAC;CACjF;AAED,eAAO,MAAM,YAAY,EAAE,uCAI1B,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAC/B,uCAAuC,0BAE/C,uCAmBF,CAAC;AAGF,eAAO,MAAM,2BAA2B,aAAc,kCAAkC,SAEvF,CAAC;AACF,eAAO,MAAM,2BAA2B,aAC1B,kCAAkC,aACjC,MAAM,oDAqCpB,CAAC;AACF,eAAO,MAAM,gCAAgC,aAC/B,kCAAkC,2BACnB,OAAO,SAMnC,CAAC"}
|
|
@@ -19,18 +19,19 @@ export const initialClusterRecommendations = getApiResourceObject([]);
|
|
|
19
19
|
export const initialState = {
|
|
20
20
|
clusterRecommendations: initialClusterRecommendations,
|
|
21
21
|
isClusterRecommendationsModalOpen: false,
|
|
22
|
+
clusterRecommendationsCache: {},
|
|
22
23
|
};
|
|
23
24
|
export const clusterRecommendationsReducer = (state, action) => {
|
|
24
25
|
switch (action.type) {
|
|
25
26
|
case RulesReducerConstants.requestClusterRecommendations: {
|
|
26
|
-
return Object.assign(Object.assign({}, state),
|
|
27
|
+
return Object.assign(Object.assign({}, state), action.payload);
|
|
27
28
|
}
|
|
28
29
|
// used for reseting the rules when reseting on a new troubleshoot issue.
|
|
29
30
|
case RulesReducerConstants.resetClusterRecommendations: {
|
|
30
31
|
return Object.assign(Object.assign({}, state), { clusterRecommendations: initialClusterRecommendations });
|
|
31
32
|
}
|
|
32
33
|
case RulesReducerConstants.toggleClusterRecommendationModal: {
|
|
33
|
-
return Object.assign(Object.assign({}, state),
|
|
34
|
+
return Object.assign(Object.assign({}, state), action.payload);
|
|
34
35
|
}
|
|
35
36
|
default: {
|
|
36
37
|
return state;
|
|
@@ -41,27 +42,39 @@ export const clusterRecommendationsReducer = (state, action) => {
|
|
|
41
42
|
export const resetClusterRecommendations = (dispatch) => {
|
|
42
43
|
dispatch({ type: RulesReducerConstants.resetClusterRecommendations });
|
|
43
44
|
};
|
|
44
|
-
export const fetchClusterRecommendations = (dispatch, clusterId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
export const fetchClusterRecommendations = (dispatch, clusterId, clusterRecommendationsCache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
46
|
var _a;
|
|
46
47
|
dispatch({
|
|
47
48
|
type: RulesReducerConstants.requestClusterRecommendations,
|
|
48
49
|
payload: {
|
|
49
50
|
clusterRecommendations: getApiResourceObject([], true),
|
|
51
|
+
clusterRecommendationsCache,
|
|
50
52
|
},
|
|
51
53
|
});
|
|
52
54
|
try {
|
|
53
|
-
|
|
55
|
+
let clusterInsight;
|
|
56
|
+
if (clusterRecommendationsCache[clusterId]) {
|
|
57
|
+
clusterInsight = clusterRecommendationsCache[clusterId];
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
clusterInsight = yield pcm.preCase.diag.getClusterRecommendations(clusterId);
|
|
61
|
+
clusterRecommendationsCache[clusterId] = clusterInsight;
|
|
62
|
+
}
|
|
54
63
|
const rules = ((_a = clusterInsight === null || clusterInsight === void 0 ? void 0 : clusterInsight.report) === null || _a === void 0 ? void 0 : _a.data) || [];
|
|
55
64
|
dispatch({
|
|
56
65
|
type: RulesReducerConstants.requestClusterRecommendations,
|
|
57
|
-
payload: { clusterRecommendations: getApiResourceObject(rules) },
|
|
66
|
+
payload: { clusterRecommendations: getApiResourceObject(rules), clusterRecommendationsCache },
|
|
58
67
|
});
|
|
59
68
|
}
|
|
60
69
|
catch (e) {
|
|
61
70
|
console.log(e.message);
|
|
71
|
+
clusterRecommendationsCache[clusterId] = {};
|
|
62
72
|
dispatch({
|
|
63
73
|
type: RulesReducerConstants.requestClusterRecommendations,
|
|
64
|
-
payload: {
|
|
74
|
+
payload: {
|
|
75
|
+
clusterRecommendations: getApiResourceObject([], false, true, e.message),
|
|
76
|
+
clusterRecommendationsCache,
|
|
77
|
+
},
|
|
65
78
|
});
|
|
66
79
|
}
|
|
67
80
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IClusterSubscription } from '@cee-eng/hydrajs/@types/models/cloud';
|
|
2
2
|
import { ISEProduct } from '@cee-eng/hydrajs/@types/models/product';
|
|
3
|
-
export
|
|
3
|
+
export interface IClusterSubscriptionExtended extends IClusterSubscription {
|
|
4
|
+
openshift_version: string;
|
|
5
|
+
}
|
|
4
6
|
export declare const getDisplayNameForCluster: (cluster: Partial<IClusterSubscriptionExtended>) => string;
|
|
5
7
|
export declare const invalidGuidHelperText = "Please enter a valid Cluster ID (For example: d3aa88e2-c754-41e0-8ba6-4198a34aa0a2)";
|
|
6
8
|
export declare const isClusterIdEnabledForProduct: (selectedProduct: string, allProducts: Partial<ISEProduct>[]) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseOpenshiftClusterIdUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseOpenshiftClusterIdUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"caseOpenshiftClusterIdUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseOpenshiftClusterIdUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAIpE,MAAM,WAAW,4BAA6B,SAAQ,oBAAoB;IACtE,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB,YAAa,QAAQ,4BAA4B,CAAC,WAKtF,CAAC;AAEF,eAAO,MAAM,qBAAqB,wFACuD,CAAC;AAE1F,eAAO,MAAM,4BAA4B,oBAAqB,MAAM,eAAe,QAAQ,UAAU,CAAC,EAAE,YAIvG,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,4BAenD,CAAC;AAEF,eAAO,MAAM,qBAAqB,sCACkC,CAAC"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { getConfigField, isValidGuid } from '@rh-support/utils';
|
|
2
|
-
import find from 'lodash/find';
|
|
3
2
|
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
// gets a cluster id and returns display name
|
|
5
|
-
export const getDisplayNameById = (clusters, id) => {
|
|
6
|
-
if (isEmpty(id))
|
|
7
|
-
return '';
|
|
8
|
-
const cluster = find(clusters, (o) => o.external_cluster_id === id);
|
|
9
|
-
return isEmpty(cluster) ? `${id}` : cluster.display_name;
|
|
10
|
-
};
|
|
11
3
|
export const getDisplayNameForCluster = (cluster) => {
|
|
12
4
|
if (isEmpty(cluster))
|
|
13
5
|
return '';
|
|
14
|
-
const clusterId =
|
|
6
|
+
const clusterId = cluster === null || cluster === void 0 ? void 0 : cluster.external_cluster_id;
|
|
15
7
|
if (isEmpty(cluster.display_name) || cluster.display_name === clusterId)
|
|
16
8
|
return clusterId;
|
|
17
9
|
return `${clusterId} <${cluster.display_name}>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.120",
|
|
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.12.
|
|
29
|
+
"@cee-eng/hydrajs": "4.12.6",
|
|
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.12.
|
|
66
|
+
"@cee-eng/hydrajs": "4.12.6",
|
|
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.24",
|
|
77
|
+
"@rh-support/components": "1.1.72",
|
|
78
|
+
"@rh-support/react-context": "0.2.77",
|
|
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.61",
|
|
81
|
+
"@rh-support/utils": "0.2.46",
|
|
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": "403aee29c2ee4be4cadb20fb74753c495803d387"
|
|
147
147
|
}
|