@rh-support/troubleshoot 1.0.28 → 1.0.31

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eA0T7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eA+T7C"}
@@ -58,8 +58,10 @@ export function CaseDetailsAside(props) {
58
58
  const isFirstMountRef = useRef(true);
59
59
  const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, loggedInUserRights }, } = useGlobalStateContext();
60
60
  const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
61
- // To enable RSA Section for non-internal users
62
- const isInternal = loggedInUserRights.data.isInternal();
61
+ // To enable RSA Section for external users
62
+ const isExternal = loggedInUserRights.data.isExternal();
63
+ // To check if user has read only access
64
+ const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
63
65
  const onToggleAside = (ev) => {
64
66
  var _a;
65
67
  toggleAside(!((_a = caseDetailsAsidePanelRef.current) === null || _a === void 0 ? void 0 : _a.expanded));
@@ -196,6 +198,6 @@ export function CaseDetailsAside(props) {
196
198
  React.createElement(CaseSolutions, { caseNumber: caseNumber, ref: topSolutionsRef, isSecureSupportAccount: isSecureSupportAccount })),
197
199
  !caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary, null,
198
200
  React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef }))),
199
- !isInternal && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement') } },
200
- React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms })))))));
201
+ isExternal && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement') } },
202
+ React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms, readOnly: canReadCase })))))));
201
203
  }
@@ -4,6 +4,7 @@ interface IProps {
4
4
  caseSeverity: string;
5
5
  caseStatus: string;
6
6
  acceptedRemoteSessionTerms: boolean;
7
+ readOnly: boolean;
7
8
  }
8
9
  export declare const RemoteSessionAgreement: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAED,eAAO,MAAM,sBAAsB,+EA6FjC,CAAC"}
1
+ {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EA8FjC,CAAC"}
@@ -9,7 +9,7 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
9
9
  const tooltipRef = useRef();
10
10
  const { t } = useTranslation();
11
11
  const canEditCase = useCanEditCase();
12
- const { caseNumber, caseStatus, acceptedRemoteSessionTerms } = props;
12
+ const { caseNumber, caseStatus, acceptedRemoteSessionTerms, readOnly } = props;
13
13
  const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
14
14
  const [openRequestRemoteSessionModal, setOpenRequestRemoteSessionnModal] = useState(false);
15
15
  // To toggle RSA Modal
@@ -32,8 +32,8 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
32
32
  React.createElement("li", null, t('Both you and Red Hat agree to remote access.'))),
33
33
  React.createElement("p", { className: "rrs-light-grey-text" }, t('This action does not initiate a remote session. Please make a case comment if you would like to submit a request.')),
34
34
  acceptedRemoteSessionTerms && (React.createElement(Tooltip, { content: t('Remote session agreement has already been accepted.'), reference: tooltipRef, "aria-live": 'polite' })),
35
- React.createElement(Button, { "aria-label": acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement'), variant: "primary", onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: acceptedRemoteSessionTerms, ref: tooltipRef }, acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement')))));
35
+ React.createElement(Button, { "aria-label": acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement'), variant: acceptedRemoteSessionTerms ? 'primary' : 'secondary', onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: acceptedRemoteSessionTerms, ref: tooltipRef }, acceptedRemoteSessionTerms ? t('Agreement accepted') : t('Accept agreement')))));
36
36
  return (React.createElement(React.Fragment, null,
37
37
  RemoteSessionAgreementSectionBody,
38
- React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights })));
38
+ React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
39
39
  });
@@ -10,6 +10,7 @@ interface IProps {
10
10
  caseStatus: string;
11
11
  show: boolean;
12
12
  loggedInUserRights: IApiResponseDetails<UserAuth>;
13
+ readOnly: boolean;
13
14
  }
14
15
  export declare function RemoteSessionAgreementModal(props: IProps): JSX.Element;
15
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAiBxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eA+OxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAiBxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,eAuPxD"}
@@ -87,7 +87,7 @@ export function RemoteSessionAgreementModal(props) {
87
87
  };
88
88
  // Function to ack remote session terms and post comment
89
89
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
90
- const requestComment = t('#### A Remote Session request has been submitted. We will review the request and confirm via case comment.\n\n This action does not initiate a remote session. Please make a case comment if you would like to submit a request.');
90
+ const requestComment = t('#### Remote Access Rider agreement has been accepted.\n\n This action does not initiate a remote session. Please make a case comment if you would like to submit a request.');
91
91
  try {
92
92
  yield updateCaseDetails(caseDispatch, props.caseNumber, { remoteSessionTermsAcked: true });
93
93
  setRemoteRiderFlag(caseDispatch, true);
@@ -104,12 +104,20 @@ export function RemoteSessionAgreementModal(props) {
104
104
  }
105
105
  catch (e) {
106
106
  ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
107
+ setAgreeLoading(false);
107
108
  props.onClose();
108
109
  }
109
110
  props.onClose();
110
111
  }
111
112
  catch (e) {
112
- ToastNotification.addDangerMessage(t('Could not accept the remote access rider agreement'), t('Please try again.'));
113
+ if (props.readOnly) {
114
+ ToastNotification.addDangerMessage(t('You are not authorized to update this case.'));
115
+ }
116
+ else {
117
+ ToastNotification.addDangerMessage(t('Could not accept the remote access rider agreement'), t('Please try again.'));
118
+ }
119
+ setAgreeLoading(false);
120
+ setIsTermsChecked(false);
113
121
  props.onClose();
114
122
  }
115
123
  });
@@ -136,28 +144,30 @@ export function RemoteSessionAgreementModal(props) {
136
144
  React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: onSubmit, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: !isTermsChecked || isAgreeLoading }, t('I agree')),
137
145
  ];
138
146
  // Body of RSA Modal
139
- const RemoteSessionAgreementModalBody = (React.createElement(React.Fragment, null,
140
- React.createElement("p", { className: "pf-u-mt-xs" },
141
- React.createElement(Trans, null,
142
- "Your acceptance of this Remote Access Rider is required ",
143
- React.createElement("strong", null, "for each case"),
144
- " when you request Red Hat\u2019s support team to directly access your network or systems.")),
145
- React.createElement("p", { className: "pf-u-mt-md" },
146
- React.createElement(Trans, null, "Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access.")),
147
- React.createElement("p", { className: "pf-u-mt-md" },
148
- React.createElement(Trans, null, "Please read and accept the Remote Access Rider terms below to allow Red Hat to access your network or systems.")),
149
- React.createElement("div", null,
150
- React.createElement(Select, { className: "pf-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle, width: 350 }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option))))),
151
- React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
152
- t('Download'),
153
- " ",
154
- React.createElement(DownloadIcon, { className: "pf-u-ml-xs" }))),
155
- React.createElement("div", null,
156
- React.createElement(Checkbox, { className: "pf-u-mt-md", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
157
- React.createElement(Trans, null, "I have read and agree to the"),
158
- ' ',
159
- React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline align-link-items", rel: "noopener noreferrer", target: "_blank", href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": "case-details-request-remote-session-terms" },
160
- React.createElement(Trans, null, "terms "),
161
- React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
162
- return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": t('Remote Session Agreement'), title: t('Remote Session Agreement'), isOpen: props.show, onClose: onCancel, actions: modalActions }, RemoteSessionAgreementModalBody));
147
+ const RemoteSessionAgreementModalBody = () => {
148
+ return (React.createElement(React.Fragment, null,
149
+ React.createElement("p", { className: "pf-u-mt-xs" },
150
+ React.createElement(Trans, null,
151
+ "Your acceptance of this Remote Access Rider is required ",
152
+ React.createElement("strong", null, "for each case"),
153
+ " when you request Red Hat\u2019s support team to directly access your network or systems.")),
154
+ React.createElement("p", { className: "pf-u-mt-md" },
155
+ React.createElement(Trans, null, "Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access.")),
156
+ React.createElement("p", { className: "pf-u-mt-md" },
157
+ React.createElement(Trans, null, "Please read and accept the Remote Access Rider terms below to allow Red Hat to access your network or systems.")),
158
+ React.createElement("div", null,
159
+ React.createElement(Select, { className: "pf-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle, width: 350 }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option))))),
160
+ React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
161
+ t('Download'),
162
+ " ",
163
+ React.createElement(DownloadIcon, { className: "pf-u-ml-xs" }))),
164
+ React.createElement("div", null,
165
+ React.createElement(Checkbox, { className: "pf-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
166
+ React.createElement(Trans, null, "I have read and agree to the"),
167
+ ' ',
168
+ React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline align-link-items", rel: "noopener noreferrer", target: "_blank", href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": "case-details-request-remote-session-terms" },
169
+ React.createElement(Trans, null, "terms "),
170
+ React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
171
+ };
172
+ return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": t('Remote Session Agreement'), title: t('Remote Session Agreement'), isOpen: props.show, onClose: onCancel, actions: modalActions }, RemoteSessionAgreementModalBody()));
163
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAiHpC;kBAjHQ,cAAc;;;AAoHvB,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAoBA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,eAmIpC;kBAnIQ,cAAc;;;AAsIvB,eAAe,cAAc,CAAC"}
@@ -7,9 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { parseCommentMarkdown } from '@cee-eng/ui-toolkit';
10
11
  import { AlertMessage, AlertType, LoadingIndicator, TextAreaResizable, ToastNotification, } from '@rh-support/components';
11
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
14
+ import DOMPurify from 'dompurify';
13
15
  import isEmpty from 'lodash/isEmpty';
14
16
  import React, { useContext, useEffect, useState } from 'react';
15
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -67,11 +69,18 @@ function CaseActionPlan(props) {
67
69
  };
68
70
  const isInternalWithoutSFDCUser = loggedInUserRights.data.isInternalWithoutSFDCUser();
69
71
  const isActionPlanEmpty = isEmpty(actionPlanState === null || actionPlanState === void 0 ? void 0 : actionPlanState.trim());
72
+ // To parse comment from markdown to html for action plan comments
73
+ // DOMPurify - a XSS sanitizer for HTML, MathML and SVG.
74
+ const commentMarkdown = (markdown) => {
75
+ var cleanMarkdown = DOMPurify.sanitize(markdown);
76
+ const htmlString = parseCommentMarkdown(cleanMarkdown, { showButtonForAttachmentLink: true }, { openLinksInNewTab: true, gfm: true, breaks: true });
77
+ return { __html: htmlString };
78
+ };
70
79
  return (React.createElement(React.Fragment, null,
71
80
  React.createElement(AlertMessage, { show: isInternalWithoutSFDCUser, variant: AlertType.WARNING, isInline: true, className: "pf-u-mb-lg", title: t('You need a Salesforce (SFDC) user to edit the action plan.') }),
72
81
  React.createElement("label", { htmlFor: "rha-action-plan", className: "sr-only" },
73
82
  React.createElement(Trans, null, "Action plan")),
74
- !canUpdateActionPlan && React.createElement("p", null, actionPlan ? `${actionPlan}` : t('No action plan to display.')),
83
+ !canUpdateActionPlan && (React.createElement("pre", { "aria-label": t('Case Action Plan'), dangerouslySetInnerHTML: actionPlan ? commentMarkdown(actionPlan) : t('No action plan to display.') })),
75
84
  canUpdateActionPlan && (React.createElement("form", null,
76
85
  React.createElement("div", { className: "hide-in-pdf" },
77
86
  React.createElement(TextAreaResizable, { className: "form-control", id: "rha-action-plan", disabled: isUpdating || isInternalWithoutSFDCUser, maxLength: 32768, name: "actionPlan", value: actionPlanState, onChange: onChange, rowsMin: 3 })),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA6HrC;kBA7HQ,eAAe;;;AAgIxB,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAqIrC;kBArIQ,eAAe;;;AAwIxB,eAAe,eAAe,CAAC"}
@@ -80,6 +80,12 @@ function CaseAlternateId(props) {
80
80
  });
81
81
  // To check if alternate ID is empty
82
82
  const isAlternateIDEmpty = isEmpty(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.trim());
83
+ // To populate the unsaved alternateId field with the previously saved value on onBlur event.
84
+ const onBlur = () => {
85
+ if (alternateId !== alternateIdState) {
86
+ setAlternateIdState(alternateId);
87
+ }
88
+ };
83
89
  return (React.createElement(React.Fragment, null,
84
90
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-alternate-id' }, labelContent: React.createElement(React.Fragment, null,
85
91
  React.createElement(Trans, null, "Alternate case ID"),
@@ -90,7 +96,7 @@ function CaseAlternateId(props) {
90
96
  alternateIdState === alternateId ||
91
97
  isUpdating ||
92
98
  (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
93
- React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, disabled: isUpdating, "data-tracking-id": "case-details-alternate-id" })),
99
+ React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, disabled: isUpdating, "data-tracking-id": "case-details-alternate-id", onBlur: onBlur })),
94
100
  (alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT && (React.createElement("div", { className: "pull-top" },
95
101
  React.createElement("p", { className: "form-instructions form-invalid" },
96
102
  React.createElement(Trans, null, maxLengthErrorMessage))))));
@@ -1 +1 @@
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,eA4WzC;kBA5WQ,mBAAmB;;;AA+W5B,OAAO,EAAE,mBAAmB,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;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,eA8WzC;kBA9WQ,mBAAmB;;;AAiX5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -174,7 +174,7 @@ function OpenshiftDropdownV4(props) {
174
174
  // recreate a new AbortController for each call
175
175
  let controller = new AbortController();
176
176
  abortControllerRef.current = controller;
177
- const archived = !showArchivedClusters ? " AND status!='Archived'" : '';
177
+ const clusterStatus = ` AND status not in ('Deprovisioned'${!showArchivedClusters ? ",'Archived'" : ''})`;
178
178
  const searchPhrase = search
179
179
  ? ` AND (external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
180
180
  : '';
@@ -183,7 +183,7 @@ function OpenshiftDropdownV4(props) {
183
183
  order: 'display_name asc',
184
184
  page,
185
185
  size: PER_PAGE,
186
- search: `external_cluster_id!='' ${archived} ${searchPhrase}`,
186
+ search: `external_cluster_id!='' ${clusterStatus} ${searchPhrase}`,
187
187
  fields: 'external_cluster_id,display_name,status,metrics.openshift_version,console_url',
188
188
  }, controller.signal);
189
189
  setInCache(`showArchived=${showArchivedClusters}input=${search}p=${page}`, clustersResponse);
@@ -595,6 +595,23 @@
595
595
  .grid-aside-content {
596
596
  padding: 1rem 1.5rem !important;
597
597
  height: 100%; // Warning: removing this will make the sidebar's content sticky
598
+ min-width: 300px;
599
+
600
+ @media (min-width: 992px) {
601
+ min-width: 400px;
602
+ }
603
+
604
+ @media (min-width: 1200px) {
605
+ min-width: 500px;
606
+ }
607
+
608
+ @media (min-width: 1450px) {
609
+ min-width: 550px;
610
+ }
611
+
612
+ @media (min-width: 2000px) {
613
+ min-width: 600px;
614
+ }
598
615
 
599
616
  & > * {
600
617
  margin: 1rem 0 2rem;
@@ -965,3 +982,10 @@ p.pref-case-popover-text {
965
982
  .rrs-light-grey-text {
966
983
  color: var(--pf-global--palette--black-600);
967
984
  }
985
+
986
+ .rsa-checkbox {
987
+ align-items: center;
988
+ input[type='checkbox'] {
989
+ margin: 0 5px 0 0;
990
+ }
991
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "1.0.28",
3
+ "version": "1.0.31",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -73,15 +73,15 @@
73
73
  "@patternfly/react-core": "4.264.0",
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/components": "1.2.13",
77
- "@rh-support/react-context": "1.0.16",
76
+ "@rh-support/components": "1.2.14",
77
+ "@rh-support/react-context": "1.0.17",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "1.0.10",
80
- "@rh-support/utils": "1.0.8",
79
+ "@rh-support/user-permissions": "1.0.11",
80
+ "@rh-support/utils": "1.0.9",
81
81
  "@types/react-redux": "^7.1.12",
82
82
  "@types/redux": "^3.6.0",
83
83
  "@webcomponents/webcomponentsjs": "^2.2.10",
84
- "dompurify": "^2.2.6",
84
+ "dompurify": "^2.4.1",
85
85
  "downshift": "^6.0.5",
86
86
  "i18next": "^19.0.1",
87
87
  "js-markdown-extra": "^1.2.4",
@@ -142,5 +142,5 @@
142
142
  "not ie <= 11",
143
143
  "not op_mini all"
144
144
  ],
145
- "gitHead": "6434850b211648078962731f6ef9bc9f5bd51320"
145
+ "gitHead": "627d7c3613245cf973dff8bee155a6f6fbe56686"
146
146
  }