@rh-support/troubleshoot 0.2.117 → 0.2.118

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.
Files changed (23) hide show
  1. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +6 -3
  3. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +27 -44
  5. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +2 -5
  7. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  8. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +38 -52
  9. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +2 -2
  10. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  11. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +121 -80
  12. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  13. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +4 -1
  14. package/lib/esm/reducers/CaseConstNTypes.d.ts +1 -0
  15. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  16. package/lib/esm/reducers/CaseConstNTypes.js +2 -0
  17. package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts +5 -2
  18. package/lib/esm/reducers/ClusterRecommendationsReducer.d.ts.map +1 -1
  19. package/lib/esm/reducers/ClusterRecommendationsReducer.js +19 -6
  20. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +4 -2
  21. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  22. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +1 -9
  23. package/package.json +9 -9
@@ -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,eA4VnD"}
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 cats = yield getRmeCategories();
138
- setCategories(cats);
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":"AAuBA,wBAAgB,sBAAsB,gBA4RrC"}
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, { useCallback, useContext, useEffect, useState } from '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 { fetchClusterIdDetails, OpenshiftDropdownV4 } from '../../../../CaseManagement/OpenshiftDropdownV4';
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 setClusterVersion = (openshiftClusterID, clusterDetails) => __awaiter(this, void 0, void 0, function* () {
55
- if (!openshiftClusterID || getIsClusterIdInvalid(openshiftClusterID))
56
- return;
57
- let openshiftClusterVersion;
58
- if (clusterDetails &&
59
- clusterDetails.external_cluster_id === openshiftClusterID &&
60
- clusterDetails.openshift_version) {
61
- openshiftClusterVersion = clusterDetails.openshift_version;
62
- }
63
- else {
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 = useCallback(debounce(onReasonExplanationInputBoxChanged, 1000), []);
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 = { openshiftClusterID: '', noClusterIdReason: reason, noClusterIdReasonExplanation: '' };
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: () => setLocalOpenshiftClusterIDState(''), isV4: majorVersion === '4', isDisabled: isClusterIdUpdating || isFetchingClusterDetails, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
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 || isFetchingClusterDetails })),
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,eAyMtD"}
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
- window === null || window === void 0 ? void 0 : window.Raven.captureException(e);
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":"AAwBA,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,gBAoSjC"}
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 { getConfigField, getUrlParsedParams, getVersion, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
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 { fetchClusterIdDetails, OpenshiftDropdownV4 } from './OpenshiftDropdownV4';
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, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, v3ClusterName, selectedAccountDetails, } = useCaseSelector((state) => ({
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: { pcmConfig, allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
58
+ const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
59
59
  const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
60
60
  const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
61
- const { clusterRecommendationsState: { clusterRecommendations }, } = useContext(ClusterRecommendationsContext);
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
- const setCusterId = (openshiftClusterID, clusterDetails) => __awaiter(this, void 0, void 0, function* () {
86
- setCaseDetails(caseDispatch, {
87
- openshiftClusterID,
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
- // we get cluster id from url and validate it
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 && clusterIdFromUrl && clusterIdFromUrl !== openshiftClusterID) {
119
- setCusterId(clusterIdFromUrl);
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, pcmConfig, allProducts.data]);
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 make sure that if cluster id comes from session or someother source
142
- * we also fetch the details for the cluster id so that we can have fields like cluster version while creating the case
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 = isClusterRecommendationEnabled && !isClusterIdInvalid && !isEmpty(openshiftClusterID);
161
- // To prevent refetching clusterRecommendations checking for clusterRecommendations data length
141
+ const canFetchClusterRecommendation = !isClusterIdInvalid && !isEmpty(openshiftClusterID);
162
142
  canFetchClusterRecommendation &&
163
- !clusterRecommendations.data.length &&
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
- setCusterId(selectedId, selectedCluster);
192
- canFetchClusterRecommendation && fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId);
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, fetchClusterIdDetails };
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,EAAgC,MAAM,sCAAsC,CAAC;AAE1G,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAWjF,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;CACzC;AAQD,QAAA,MAAM,qBAAqB,cAAqB,MAAM,qEASrD,CAAC;AAeF,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAmTzC;kBAnTQ,mBAAmB;;;AAsT5B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,CAAC"}
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;AAcjF,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,eAiXzC;kBAjXQ,mBAAmB;;;AAoX5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -9,34 +9,25 @@ 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 find from 'lodash/find';
13
- import findIndex from 'lodash/findIndex';
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
- import { getDisplayNameForCluster } from '../../utils/caseOpenshiftClusterIdUtils';
18
+ import { getDisplayNameForCluster, getIsClusterIdInvalid, } from '../../utils/caseOpenshiftClusterIdUtils';
19
19
  import CaseOpenShiftPopover from '../CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover';
20
20
  const defaultProps = {
21
21
  className: '',
22
22
  id: '',
23
23
  isDisabled: false,
24
+ openshiftDisplayName: '',
24
25
  };
25
- const fetchClusterIdDetails = (clusterId) => __awaiter(void 0, void 0, void 0, function* () {
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(undefined);
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(25);
60
52
  // gets a cluster id and returns display name
61
- const getDisplayNameById = (clusters, id, noClusterIdReasonExplanation) => {
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
- const cluster = find(clusters, (o) => o.external_cluster_id === id);
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,109 @@ 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, 'dns.base_domain') || [];
111
+ const clustersResponseGrouped = groupBy(clusters, 'console_url') || [];
108
112
  const domainNames = Object.keys(clustersResponseGrouped) || [];
109
- // move undefined to the end of domains array
110
- const undefinedIndex = domainNames.findIndex((i) => i === 'undefined');
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('undefined');
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 !== 'undefined' &&
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.display_name) }));
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
- React.createElement(SelectOption, { key: 'show-hide-archived-clusters', inputId: "check-box" },
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 fetchAccountClusters = (search = '', page = 0) => __awaiter(this, void 0, void 0, function* () {
137
+ const fetchAClusterIdDetails = (clusterId) => __awaiter(this, void 0, void 0, function* () {
138
+ var _a;
142
139
  setIsFetchingClusters(true);
143
140
  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
141
  const clustersResponse = yield cloud.getAccountClustersSubscription({
153
- order: 'display_name asc',
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}%')` : ''}`,
142
+ search: `external_cluster_id='${clusterId}'`,
157
143
  fields: 'external_cluster_id,display_name,status,metrics.openshift_version',
158
- }, controller.signal);
144
+ });
145
+ setIsFetchingClusters(false);
146
+ return (((_a = clustersResponse.items.map((item) => {
147
+ var _a, _b;
148
+ return ({
149
+ display_name: item.display_name,
150
+ external_cluster_id: item.external_cluster_id,
151
+ 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) || '',
152
+ });
153
+ })) === null || _a === void 0 ? void 0 : _a[0]) || {});
154
+ }
155
+ catch (e) {
156
+ return {};
157
+ }
158
+ });
159
+ const fetchAccountClusters = (search = '', page = 0) => __awaiter(this, void 0, void 0, function* () {
160
+ setIsFetchingClusters(true);
161
+ try {
162
+ let clustersResponse;
163
+ if (getFromCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`)) {
164
+ clustersResponse = getFromCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`);
165
+ }
166
+ else {
167
+ if (abortControllerRef.current !== undefined) {
168
+ // Cancel the previous request
169
+ abortControllerRef.current.abort();
170
+ }
171
+ // recreate a new AbortController for each call
172
+ let controller = new AbortController();
173
+ abortControllerRef.current = controller;
174
+ // query language: https://github.com/yaacov/tree-search-language
175
+ clustersResponse = yield cloud.getAccountClustersSubscription({
176
+ order: 'display_name asc',
177
+ page,
178
+ size: PER_PAGE,
179
+ search: `${showArchivedClusters ? '' : "status!='Archived'"} ${search && !showArchivedClusters ? 'AND' : ''} ${search
180
+ ? `(external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
181
+ : ''}`,
182
+ fields: 'external_cluster_id,display_name,status,metrics.openshift_version,console_url',
183
+ }, controller.signal);
184
+ setInCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`, clustersResponse);
185
+ }
186
+ setIsFetchingClusters(false);
159
187
  const items = clustersResponse.items
160
188
  .filter((c) => !isEmpty(c.external_cluster_id))
161
189
  .map((item) => {
162
190
  var _a, _b;
163
191
  return ({
164
- display_name: getDisplayNameForCluster(item),
192
+ display_name: item.display_name,
165
193
  external_cluster_id: item.external_cluster_id,
166
194
  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) || '',
195
+ console_url: (item === null || item === void 0 ? void 0 : item.console_url) && (item === null || item === void 0 ? void 0 : item.console_url) !== null
196
+ ? item.console_url.split('.').slice(4).join('.')
197
+ : '',
167
198
  });
168
199
  });
169
- try {
170
- // old api has dns info
171
- // call old api to get clusters from prev call then add dns info to the new api response
172
- const oldApiResponse = yield cloud.getAccountClusters({
173
- search: clustersResponse.items
174
- .map((c) => `external_id='${c.external_cluster_id}'`)
175
- .join(' OR '),
176
- }, controller.signal);
177
- oldApiResponse === null || oldApiResponse === void 0 ? void 0 : oldApiResponse.items.forEach((response) => {
178
- if (response.dns) {
179
- var index = findIndex(items, { external_cluster_id: response.external_id });
180
- items[index] = Object.assign(Object.assign({}, items[index]), { dns: response.dns });
181
- }
182
- });
183
- }
184
- catch (e) {
185
- // silently fails
186
- }
187
- setIsFetchingClusters(false);
188
200
  return {
189
201
  items,
190
202
  totalResult: items.length,
@@ -198,17 +210,37 @@ function OpenshiftDropdownV4(props) {
198
210
  return { items: [], totalResult: 0, page: 0, total: 0 };
199
211
  }
200
212
  });
201
- // need to get clusters on load
213
+ // when user visits case detail or clusterId comes from url,
214
+ // we have clusterId but need to get display name
215
+ useEffect(() => {
216
+ const getClusterDetails = () => __awaiter(this, void 0, void 0, function* () {
217
+ if (props.openshiftClusterIDState &&
218
+ props.openshiftClusterIDState !== 'dont-have-id' &&
219
+ props.openshiftClusterIDState !== 'v3-cluster' &&
220
+ isEmpty(props.openshiftDisplayName)) {
221
+ const fetchedCluster = yield fetchAClusterIdDetails(props.openshiftClusterIDState);
222
+ props.onClusterIdStateUpdate(Object.assign(Object.assign({}, fetchedCluster), { display_name: getDisplayNameForCluster(fetchedCluster) }));
223
+ }
224
+ });
225
+ getClusterDetails();
226
+ // no dependency here as we want to run this once on load
227
+ // eslint-disable-next-line react-hooks/exhaustive-deps
228
+ }, []);
229
+ // need to get clusters when user opens the dropdown
230
+ // as the api response is cached np extra call is made on open/close
202
231
  // added observing props.isV4 because re-render
203
232
  // is needed when user on overview page changing version
204
233
  useEffect(() => {
234
+ if (!isOpen)
235
+ return;
205
236
  let isUnmounted = false;
206
237
  const fetchClusters = () => __awaiter(this, void 0, void 0, function* () {
238
+ setClustersSelectOptions(getClusterOptions([]));
207
239
  const fetchedClusters = yield fetchAccountClusters(inputVal);
208
240
  if (!isUnmounted) {
209
241
  setClustersRawResponse(fetchedClusters.items);
210
242
  setTotalResultsNo(fetchedClusters.total);
211
- setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
243
+ setClustersSelectOptions(getClusterOptions(fetchedClusters.items) || []);
212
244
  }
213
245
  });
214
246
  fetchClusters();
@@ -216,7 +248,7 @@ function OpenshiftDropdownV4(props) {
216
248
  isUnmounted = true;
217
249
  };
218
250
  // eslint-disable-next-line react-hooks/exhaustive-deps
219
- }, [props.isV4, showArchivedClusters]);
251
+ }, [props.isV4, showArchivedClusters, isOpen, inputVal]);
220
252
  useEffect(() => {
221
253
  if (props.isClusterIdInvalid) {
222
254
  setValidated('error');
@@ -225,20 +257,29 @@ function OpenshiftDropdownV4(props) {
225
257
  setValidated('default');
226
258
  }
227
259
  }, [props.isClusterIdInvalid]);
260
+ // when user type or paste a clusterId we land here
228
261
  const onTypeaheadInputChanged = (input) => __awaiter(this, void 0, void 0, function* () {
229
262
  setInputVal(input);
230
- props.onClusterIdStateUpdate(createState(input, input));
231
- const fetchedClusters = yield fetchAccountClusters(input);
232
- setClustersRawResponse(fetchedClusters.items);
233
- setTotalResultsNo(fetchedClusters.total);
234
- setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
263
+ if (getIsClusterIdInvalid(input)) {
264
+ const fetchedClusters = yield fetchAccountClusters(input);
265
+ setClustersRawResponse(fetchedClusters.items);
266
+ setTotalResultsNo(fetchedClusters.total);
267
+ setClustersSelectOptions(getClusterOptions(fetchedClusters.items));
268
+ props.onClusterIdStateUpdate({ external_cluster_id: input });
269
+ }
270
+ else {
271
+ // user paste a valid cluster id
272
+ const fetchedCluster = yield fetchAClusterIdDetails(input);
273
+ props.onClusterIdStateUpdate(fetchedCluster);
274
+ }
235
275
  });
276
+ const debounceFn = debounce(onTypeaheadInputChanged, 1000);
236
277
  const getSelectedItem = () => {
237
278
  if (!isEmpty(inputVal)) {
238
279
  return createState(props.openshiftClusterIDState, inputVal);
239
280
  }
240
281
  else {
241
- return createState(props.openshiftClusterIDState, getDisplayNameById(clustersRawResponse, props.openshiftClusterIDState, props.noClusterIdReasonExplanation));
282
+ return createState(props.openshiftClusterIDState, getDisplayName(props.openshiftClusterIDState, props.noClusterIdReasonExplanation || '', props.openshiftDisplayName || props.openshiftClusterIDState));
242
283
  }
243
284
  };
244
285
  const titleId = 'case-details-cluster-nickname-selector';
@@ -249,7 +290,7 @@ function OpenshiftDropdownV4(props) {
249
290
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"),
250
291
  React.createElement(CaseOpenShiftPopover, null)),
251
292
  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 alias 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 and alias or manually enter your Cluster ID'), hasInlineFilter: false, onTypeaheadInputChanged: onTypeaheadInputChanged, onFilter: () => undefined, validated: validated, "aria-invalid": props.isClusterIdInvalid, "aria-describedby": "clusterID-validate-helper", required: true }, (isFetchingClusters && { loadingVariant: 'spinner' }), (!isFetchingClusters &&
293
+ 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
294
  clustersRawResponse.length < totalResultsNo && {
254
295
  loadingVariant: {
255
296
  text: 'Display additional results',
@@ -259,4 +300,4 @@ function OpenshiftDropdownV4(props) {
259
300
  React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
260
301
  }
261
302
  OpenshiftDropdownV4.defaultProps = defaultProps;
262
- export { OpenshiftDropdownV4, fetchClusterIdDetails };
303
+ 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;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAqXtD"}
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,eA0XtD"}
@@ -293,7 +293,10 @@ export function GlobalTroubleshootEffects(props) {
293
293
  const previousActiveSessionId = usePrevious(activeSessionId);
294
294
  useEffect(() => {
295
295
  var _a;
296
- if (isEmpty(product) || isEmpty(version) || activeSessionId !== previousActiveSessionId)
296
+ if (isEmpty(product) ||
297
+ isEmpty(version) ||
298
+ activeSessionId !== previousActiveSessionId ||
299
+ isEmpty(previousVersion))
297
300
  return;
298
301
  // we need to reset openshift cluster states only when major version is different
299
302
  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,OAA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,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,EAEzB,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;CAC9C;AAED,eAAO,MAAM,YAAY,EAAE,uCAG1B,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAC/B,uCAAuC,0BAE/C,uCAgBF,CAAC;AAGF,eAAO,MAAM,2BAA2B,aAAc,kCAAkC,SAEvF,CAAC;AACF,eAAO,MAAM,2BAA2B,aAAoB,kCAAkC,aAAa,MAAM,kBAyBhH,CAAC;AACF,eAAO,MAAM,gCAAgC,aAC/B,kCAAkC,2BACnB,OAAO,SAMnC,CAAC"}
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), { clusterRecommendations: action.payload.clusterRecommendations });
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), { isClusterRecommendationsModalOpen: action.payload.isClusterRecommendationsModalOpen });
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
- const clusterInsight = yield pcm.preCase.diag.getClusterRecommendations(clusterId);
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: { clusterRecommendations: getApiResourceObject([], false, true, e.message) },
74
+ payload: {
75
+ clusterRecommendations: getApiResourceObject([], false, true, e.message),
76
+ clusterRecommendationsCache,
77
+ },
65
78
  });
66
79
  }
67
80
  });
@@ -1,6 +1,8 @@
1
- import { IClusterSubscriptionExtended } from '@cee-eng/hydrajs/@types/models/cloud';
1
+ import { IClusterSubscription } from '@cee-eng/hydrajs/@types/models/cloud';
2
2
  import { ISEProduct } from '@cee-eng/hydrajs/@types/models/product';
3
- export declare const getDisplayNameById: (clusters: Partial<IClusterSubscriptionExtended>[], id: string) => string;
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,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAMpE,eAAO,MAAM,kBAAkB,aAAc,QAAQ,4BAA4B,CAAC,EAAE,MAAM,MAAM,WAI/F,CAAC;AAEF,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
+ {"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 = (cluster === null || cluster === void 0 ? void 0 : cluster.external_cluster_id) || cluster.external_id;
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.117",
3
+ "version": "0.2.118",
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.1",
29
+ "@cee-eng/hydrajs": "4.12.5",
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.1",
66
+ "@cee-eng/hydrajs": "4.12.5",
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.22",
77
- "@rh-support/components": "1.1.70",
78
- "@rh-support/react-context": "0.2.75",
76
+ "@rh-support/api": "0.3.23",
77
+ "@rh-support/components": "1.1.71",
78
+ "@rh-support/react-context": "0.2.76",
79
79
  "@rh-support/types": "0.2.0",
80
- "@rh-support/user-permissions": "0.2.59",
81
- "@rh-support/utils": "0.2.44",
80
+ "@rh-support/user-permissions": "0.2.60",
81
+ "@rh-support/utils": "0.2.45",
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": "079114145196d9af66c46a5047a0e0ecac32277b"
146
+ "gitHead": "ac2b3cfea14d51c3c89d3c4c86e343ea742e269f"
147
147
  }