@rh-support/troubleshoot 1.0.4 → 1.0.6
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/AccountInfo/AccountSelector.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -2
- package/lib/esm/components/CaseEditView/CaseSecureSupportAlert.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +14 -7
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +2 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +4 -2
- package/package.json +6 -6
|
@@ -72,7 +72,7 @@ function AccountSelector(props) {
|
|
|
72
72
|
canUseFindMyAccount && (React.createElement("button", { role: "link", className: "btn btn-link btn-app find-my-account pf-u-ml-auto", onClick: onFindMyAccountClick, disabled: selectedAccountDetails.isFetching, "data-tracking-id": "open-case-find-my-account" },
|
|
73
73
|
React.createElement(Trans, null, "Find my account")))),
|
|
74
74
|
React.createElement("div", { className: "account-selector-wrapper" },
|
|
75
|
-
React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: bookmarkedGroupAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? '
|
|
75
|
+
React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: bookmarkedGroupAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? 'or select a bookmark' : ''} `), onSelect: onInternalAccountSelect, disabled: loggedInUserRights.data.isExternal() || selectedAccountDetails.isFetching, isInValid: isSelectedAccountSubscriptionAbused, restrictedOnSubscriptionAbuse: true })),
|
|
76
76
|
canAccessManagedAccounts && (React.createElement(ManagedAccountsDropdown, { className: "managed-account-selector", onManagedAccountChange: onManagedAccountChange, managedAccounts: managedAccounts, selectedAccountNumber: accountNumber, disabled: selectedAccountDetails.isFetching })),
|
|
77
77
|
isSelectedAccountSubscriptionAbused && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
78
78
|
React.createElement(InfoCircleIcon, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA0BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA0BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAkQ7C"}
|
|
@@ -165,8 +165,8 @@ export function CaseDetailsAside(props) {
|
|
|
165
165
|
: 'enable-view-as-customer', "aria-label": preferredOrDefaultCaseView()
|
|
166
166
|
? 'disable view as customer'
|
|
167
167
|
: 'enable view as customer', id: "customer-view-switch", className: "pf-u-ml-auto", isChecked: preferredOrDefaultCaseView(), onChange: onCaseSwitchChange }))),
|
|
168
|
-
React.createElement("div", null,
|
|
169
|
-
React.createElement(Checkbox, { label: t('Set to default'), isChecked: isDefaultBoxChecked, onChange: onDefaultCheckboxChange, id: "set-default-view-checkbox", name: "default-view-checkbox", isDisabled: !viewAsCustomer, className: 'defaultViewCheckbox' }))),
|
|
168
|
+
canSeeToggleCustomerView && (React.createElement("div", null,
|
|
169
|
+
React.createElement(Checkbox, { label: t('Set to default'), isChecked: isDefaultBoxChecked, onChange: onDefaultCheckboxChange, id: "set-default-view-checkbox", name: "default-view-checkbox", isDisabled: !viewAsCustomer, className: 'defaultViewCheckbox' })))),
|
|
170
170
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading top solutions') } },
|
|
171
171
|
React.createElement(CaseSolutions, { caseNumber: caseNumber, ref: topSolutionsRef, isSecureSupportAccount: isSecureSupportAccount })),
|
|
172
172
|
!caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary, null,
|
|
@@ -17,6 +17,6 @@ export function CaseSecureSupportAlert(props) {
|
|
|
17
17
|
"to access secure support cases."));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
return (React.createElement(AlertMessage, { variant: AlertType.WARNING, show: isSecureSupportTechViewingSecureCase },
|
|
20
|
+
return (React.createElement(AlertMessage, { variant: AlertType.WARNING, show: isSecureSupportTechViewingSecureCase, isInline: true },
|
|
21
21
|
React.createElement(Trans, null, getWarningMsg())));
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,sBAAsB,gBAmRrC"}
|
|
@@ -36,7 +36,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
36
36
|
const caseDispatch = useCaseDispatch();
|
|
37
37
|
const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
38
38
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
39
|
-
const isOpenShiftV3 = majorVersion === '3';
|
|
39
|
+
const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
40
40
|
const isCustomer = loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber);
|
|
41
41
|
const [showClusterId, setShowClusterId] = useState(false);
|
|
42
42
|
const [isClusterIdInvalid, setIsClusterIdInValid] = useState(false);
|
|
@@ -127,6 +127,13 @@ export function CaseOpenshiftClusterId() {
|
|
|
127
127
|
return;
|
|
128
128
|
setLocalOpenshiftClusterIDState(selectedClusterId);
|
|
129
129
|
if (selectedClusterId === 'dont-have-id') {
|
|
130
|
+
const caseDetails = {
|
|
131
|
+
openshiftClusterID: '',
|
|
132
|
+
noClusterIdReasonExplanation: '',
|
|
133
|
+
noClusterIdReason: '',
|
|
134
|
+
openshiftClusterVersion: '',
|
|
135
|
+
};
|
|
136
|
+
yield clusterIdUpdate(caseDetails);
|
|
130
137
|
setDontKnowSelected(true);
|
|
131
138
|
setSelectedReason(selectedClusterId);
|
|
132
139
|
setIsClusterIdInValid(false);
|
|
@@ -219,7 +226,7 @@ export function CaseOpenshiftClusterId() {
|
|
|
219
226
|
}
|
|
220
227
|
else {
|
|
221
228
|
return (React.createElement(React.Fragment, null,
|
|
222
|
-
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3:
|
|
229
|
+
React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
|
|
223
230
|
noClusterIdReasonExplanation !== 'v3-cluster' &&
|
|
224
231
|
(dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
|
|
225
232
|
React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAqB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eA+exC"}
|
|
@@ -13,7 +13,7 @@ import PlusIcon from '@patternfly/react-icons/dist/js/icons/plus-icon';
|
|
|
13
13
|
import { EditorMode, LoadingIndicator, MarkdownEditor, ToastNotification, useFetch, usePrevious, } from '@rh-support/components';
|
|
14
14
|
import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeaturePopoverAnnouncement, useCanEditCase, useUserPreferences, } from '@rh-support/react-context';
|
|
15
15
|
import { ability, CaseDiscussionFields, CaseListFields, resourceActions, resources, } from '@rh-support/user-permissions';
|
|
16
|
-
import {
|
|
16
|
+
import { pendoTrackEvent } from '@rh-support/utils';
|
|
17
17
|
import isEmpty from 'lodash/isEmpty';
|
|
18
18
|
import isEqual from 'lodash/isEqual';
|
|
19
19
|
import uniqBy from 'lodash/uniqBy';
|
|
@@ -74,8 +74,7 @@ export function PostComment(props) {
|
|
|
74
74
|
}, []);
|
|
75
75
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
76
76
|
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
77
|
-
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount
|
|
78
|
-
const allowInlineImagesInMarkdown = getConfigField(pcmConfig.data, 'allowInlineImagesInMarkdown', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
|
|
77
|
+
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
79
78
|
const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
|
|
80
79
|
caseNumber,
|
|
81
80
|
secureSupport: loggedInUsersAccount.data.secureSupport,
|
|
@@ -127,6 +126,7 @@ export function PostComment(props) {
|
|
|
127
126
|
}
|
|
128
127
|
CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername(), { value: prevDraftComments });
|
|
129
128
|
props.onCommentClear && props.onCommentClear();
|
|
129
|
+
setCommentText(`\n ${commentSignature}` || '');
|
|
130
130
|
});
|
|
131
131
|
const resetAttachmentSection = () => {
|
|
132
132
|
resetAttachment(dispatchToAttachmentReducer);
|
|
@@ -210,9 +210,16 @@ export function PostComment(props) {
|
|
|
210
210
|
.reduce((acc, line) => (acc += '> ' + line + '\n'), person);
|
|
211
211
|
return reply;
|
|
212
212
|
};
|
|
213
|
-
const addCommentSignature = (
|
|
213
|
+
const addCommentSignature = (preSigComment) => {
|
|
214
214
|
if (!isEmpty(commentSignature)) {
|
|
215
|
-
let signedComment =
|
|
215
|
+
let signedComment = '';
|
|
216
|
+
// Checks if somment signature already exists and depending on that check, adds the signature
|
|
217
|
+
if (preSigComment.includes(commentSignature)) {
|
|
218
|
+
signedComment = preSigComment;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
signedComment = preSigComment + '\n' + commentSignature;
|
|
222
|
+
}
|
|
216
223
|
setCommentText(signedComment);
|
|
217
224
|
}
|
|
218
225
|
};
|
|
@@ -302,7 +309,7 @@ export function PostComment(props) {
|
|
|
302
309
|
};
|
|
303
310
|
return (React.createElement("div", { className: "pf-u-mb-md hide-in-pdf", ref: componentRef },
|
|
304
311
|
React.createElement(MarkdownEditor, { className: `${!isPublic ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic ? 'Add a comment using markdown' : 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic ? 'Add a comment to this case' : 'Add a comment or attach a file privately', fileSelectorProps: {
|
|
305
|
-
showFileSelectorInToolbar:
|
|
312
|
+
showFileSelectorInToolbar: !loggedInUsersAccount.data.secureSupport,
|
|
306
313
|
filesList: getAllAttachments(),
|
|
307
314
|
onFileSelect: onFileSelect,
|
|
308
315
|
onFileDelete: onFileDelete,
|
|
@@ -324,6 +331,6 @@ export function PostComment(props) {
|
|
|
324
331
|
React.createElement(FileUpload, { className: `file-upload-section ${hasSomeSelectedFilesLocal ? 'card card-white pf-u-mt-lg pf-u-p-lg' : ''}`, idToUploadTo: caseNumber, onUploadClick: onFileUploadClick, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport, isPrivate: !isPublic, autoUploadOnSelect: true, showDescriptionInfoMsg: true }),
|
|
325
332
|
React.createElement("span", Object.assign({}, getRootProps()),
|
|
326
333
|
React.createElement("input", Object.assign({ style: { display: 'none !important' } }, getInputProps()))),
|
|
327
|
-
|
|
334
|
+
!loggedInUsersAccount.data.secureSupport && (React.createElement(NewFeaturePopoverAnnouncement, { "aria-label": "Attach and embed images! You'll find all of your uploaded images here.", featureName: FeatureAnnouncementKeys.MARKDOWN_INLINE_IMAGES, sectionRef: componentRef, bodyContent: React.createElement("div", null,
|
|
328
335
|
React.createElement(Trans, null, "Attach and embed images! You'll find all of your uploaded images here.")), reference: () => document.getElementById('md-editor-toolbar-file-selector') }))));
|
|
329
336
|
}
|
|
@@ -60,7 +60,7 @@ export function OpenShiftClusterId() {
|
|
|
60
60
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
61
61
|
const { clusterRecommendationsState: { clusterRecommendationsCache }, } = useContext(ClusterRecommendationsContext);
|
|
62
62
|
const majorVersion = (version && getVersion(version).major) || '';
|
|
63
|
-
const isOpenShiftV3 = majorVersion === '3';
|
|
63
|
+
const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
64
64
|
const isCustomer = loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber);
|
|
65
65
|
const [showClusterId, setShowClusterId] = useState(false);
|
|
66
66
|
const [isClusterIdInvalid, setIsClusterIdInValid] = useState(false);
|
|
@@ -206,7 +206,7 @@ export function OpenShiftClusterId() {
|
|
|
206
206
|
return null;
|
|
207
207
|
return (React.createElement(React.Fragment, null,
|
|
208
208
|
!isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: showValidationErrorAlert &&
|
|
209
|
-
((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3:
|
|
209
|
+
((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform' })),
|
|
210
210
|
noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !isOpenShiftV3 && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
|
|
211
211
|
(v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && showValidationErrorAlert, v3Selected: v3Selected }))));
|
|
212
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAkB3D,OAAO,EAUH,UAAU,EAcb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mBAAmB,SAAS,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,UACvB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,kBACb,MAAM,KACvB,MAuBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAmC5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAuBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { canManageCase, getAppVersion, getUserAgentForCaseMode, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
1
|
+
import { canManageCase, getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
2
2
|
import filter from 'lodash/filter';
|
|
3
3
|
import forEach from 'lodash/forEach';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -102,6 +102,8 @@ export const getSeverityDescription = (severity) => {
|
|
|
102
102
|
export const isClusterIDValid = (caseState, allProducts) => {
|
|
103
103
|
const case_details = caseState.caseDetails;
|
|
104
104
|
const productHasClusterID = isClusterIdEnabledForProduct(case_details.product, allProducts);
|
|
105
|
+
const majorVersion = (case_details.version && getVersion(case_details.version).major) || '';
|
|
106
|
+
const isOpenShiftV3 = case_details.product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
105
107
|
const hasValidClusterId = () => !isEmpty(case_details.openshiftClusterID) &&
|
|
106
108
|
isEmpty(case_details.noClusterIdReason) &&
|
|
107
109
|
isEmpty(case_details.noClusterIdReasonExplanation) &&
|
|
@@ -119,7 +121,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
|
|
|
119
121
|
case_details.noClusterIdReasonExplanation !== 'v3-cluster';
|
|
120
122
|
const hasValidV3ClusterName = () => isEmpty(case_details.openshiftClusterID) &&
|
|
121
123
|
!isEmpty(caseState.v3ClusterName) &&
|
|
122
|
-
case_details.noClusterIdReasonExplanation === 'v3-cluster';
|
|
124
|
+
(case_details.noClusterIdReasonExplanation === 'v3-cluster' || isOpenShiftV3);
|
|
123
125
|
return productHasClusterID
|
|
124
126
|
? hasValidClusterId() || hasValidReason() || hasValidReasonExplanation() || hasValidV3ClusterName()
|
|
125
127
|
: true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -73,11 +73,11 @@
|
|
|
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/components": "1.2.
|
|
77
|
-
"@rh-support/react-context": "1.0.
|
|
76
|
+
"@rh-support/components": "1.2.4",
|
|
77
|
+
"@rh-support/react-context": "1.0.5",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
|
-
"@rh-support/user-permissions": "1.0.
|
|
80
|
-
"@rh-support/utils": "1.0.
|
|
79
|
+
"@rh-support/user-permissions": "1.0.4",
|
|
80
|
+
"@rh-support/utils": "1.0.3",
|
|
81
81
|
"@types/react-redux": "^7.1.12",
|
|
82
82
|
"@types/redux": "^3.6.0",
|
|
83
83
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "530845145c618b8f1a7ef6a36fd1b903c9ea8525"
|
|
146
146
|
}
|