@rh-support/troubleshoot 1.0.27 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +6 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +3 -3
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +36 -26
- package/package.json +3 -3
|
@@ -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,
|
|
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
|
|
62
|
-
const
|
|
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
|
-
|
|
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
|
}
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map
CHANGED
|
@@ -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;
|
|
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:
|
|
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
|
});
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map
CHANGED
|
@@ -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;
|
|
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('####
|
|
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
|
-
|
|
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 = (
|
|
140
|
-
React.createElement(
|
|
141
|
-
React.createElement(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
React.createElement(
|
|
147
|
-
|
|
148
|
-
React.createElement(
|
|
149
|
-
|
|
150
|
-
React.createElement(
|
|
151
|
-
|
|
152
|
-
t('Download'),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
React.createElement(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
React.createElement(
|
|
161
|
-
|
|
162
|
-
|
|
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", 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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
76
|
"@rh-support/components": "1.2.13",
|
|
77
|
-
"@rh-support/react-context": "1.0.
|
|
77
|
+
"@rh-support/react-context": "1.0.16",
|
|
78
78
|
"@rh-support/types": "0.2.0",
|
|
79
79
|
"@rh-support/user-permissions": "1.0.10",
|
|
80
80
|
"@rh-support/utils": "1.0.8",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "00c3621a032251faa6c854fe60f297991768784b"
|
|
146
146
|
}
|