@rh-support/troubleshoot 0.2.50 → 0.2.54
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/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +8 -24
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.js +2 -1
- package/lib/esm/components/shared/Constants.d.ts +8 -4
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +8 -4
- package/lib/esm/components/shared/CustomIcons/CriticalIcon.d.ts +3 -0
- package/lib/esm/components/shared/CustomIcons/CriticalIcon.d.ts.map +1 -0
- package/lib/esm/components/shared/CustomIcons/CriticalIcon.js +5 -0
- package/lib/esm/scss/_main.scss +12 -0
- package/lib/esm/scss/_pf4-overrides.scss +6 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAiIlD"}
|
|
@@ -12,9 +12,8 @@ import { ToastNotification } from '@rh-support/components';
|
|
|
12
12
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
13
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
|
-
import React, { useContext, useEffect, useReducer,
|
|
15
|
+
import React, { useContext, useEffect, useReducer, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
-
import { CaseStatusEnum } from '../../../../../constants/caseDetailsConstants';
|
|
18
17
|
import { useCaseDispatch, useCaseSelector } from '../../../../../context/CaseContext';
|
|
19
18
|
import { caseOverviewReducer, fetchAllStatuses, initialCaseViewState, setStatusUpdating, } from '../../../../../reducers/CaseOverviewReducer';
|
|
20
19
|
import { updateCaseDetails } from '../../../../../reducers/CaseReducer';
|
|
@@ -51,15 +50,15 @@ export function VerifyCaseStatusModal(props) {
|
|
|
51
50
|
useEffect(() => {
|
|
52
51
|
fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
|
|
53
52
|
}, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
|
|
54
|
-
console.log(caseOverviewState.allCaseStatuses.data);
|
|
55
53
|
const { isCaseUpdating } = caseState;
|
|
56
|
-
const reopenStatusRef = useRef(null);
|
|
57
54
|
const canEditCase = useCanEditCase();
|
|
58
55
|
const caseDispatch = useCaseDispatch();
|
|
59
56
|
const [statusChange, setStatusChange] = useState();
|
|
57
|
+
const [isVerifyCaseStatusLoading, setIsVerifyCaseStatusLoading] = useState(false);
|
|
60
58
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
props.onConfirm();
|
|
62
59
|
yield updateStatusState(statusChange);
|
|
60
|
+
setIsVerifyCaseStatusLoading(true);
|
|
61
|
+
props.onConfirm();
|
|
63
62
|
});
|
|
64
63
|
const updateStatusState = (statusVal, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
65
64
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
@@ -77,26 +76,11 @@ export function VerifyCaseStatusModal(props) {
|
|
|
77
76
|
const onStatusChange = (event, newStatus) => __awaiter(this, void 0, void 0, function* () {
|
|
78
77
|
if (canEditCase.alert())
|
|
79
78
|
return;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
else if (newStatus === CaseStatusEnum.CLOSED) {
|
|
84
|
-
onCaseClose();
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
setStatusChange(newStatus);
|
|
88
|
-
onDropdownToggle(false);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const onCaseClose = () => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
props.onClose();
|
|
93
|
-
});
|
|
94
|
-
const onCaseReopen = (selectedStatus = null) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
reopenStatusRef.current = selectedStatus;
|
|
96
|
-
props.onClose();
|
|
79
|
+
setStatusChange(newStatus);
|
|
80
|
+
onDropdownToggle(false);
|
|
97
81
|
});
|
|
98
82
|
return (React.createElement(Modal, { id: "case-close-modal", title: t(`Please verify this case's status`), description: t(`Consider whether or not you're ready to nudge the customer`), "aria-describedby": "case-close-modal", isOpen: true, onClose: props.onClose, showClose: true, actions: [
|
|
99
|
-
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading:
|
|
83
|
+
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: isVerifyCaseStatusLoading, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-submit" },
|
|
100
84
|
React.createElement(Trans, null, "Continue")),
|
|
101
85
|
React.createElement(Button, { key: "close-modal", variant: ButtonVariant.link, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-cancel" },
|
|
102
86
|
React.createElement(Trans, null, "Cancel")),
|
|
@@ -104,7 +88,7 @@ export function VerifyCaseStatusModal(props) {
|
|
|
104
88
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
105
89
|
React.createElement(Trans, null, "Status"),
|
|
106
90
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
107
|
-
React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections:
|
|
91
|
+
React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections: statusChange, onSelect: onStatusChange, isOpen: showDropdown, isDisabled: !canManageCase ||
|
|
108
92
|
caseOverviewState.allCaseStatuses.isFetching ||
|
|
109
93
|
(caseOverviewState.caseStatusUpdating && isCaseUpdating), menuAppendTo: document.body, validated: !status ? 'error' : 'default', placeholderText: t(status), onToggle: onDropdownToggle }, caseOverviewState.allCaseStatuses.data.map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
|
|
110
94
|
React.createElement(Trans, null, option)))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAW5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAW5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAoFvD"}
|
|
@@ -28,7 +28,7 @@ export function ClusterRecommendationItems(props) {
|
|
|
28
28
|
React.createElement("h3", null, rule.description)),
|
|
29
29
|
React.createElement("pfe-accordion-panel", null,
|
|
30
30
|
React.createElement("p", null,
|
|
31
|
-
React.createElement(Label, {
|
|
31
|
+
React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, className: riskLabels[rule.total_risk].className },
|
|
32
32
|
React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
|
|
33
33
|
React.createElement("p", null, rule.details || ''),
|
|
34
34
|
rule.reason && (React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClG;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;CAAA,eAyBxC;AAED,iBAAS,WAAW,gBAGnB;AAED,iBAAS,iBAAiB,gBAsBzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,eAgBnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
3
|
import React, { useContext } from 'react';
|
|
3
4
|
import { Trans } from 'react-i18next';
|
|
@@ -49,7 +50,7 @@ function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
|
|
|
49
50
|
const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
|
|
50
51
|
if (!rule.cta)
|
|
51
52
|
return null;
|
|
52
|
-
return (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
|
|
53
|
+
return (React.createElement("a", { className: `se-recommended pf-c-button pf-m-link ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
|
|
53
54
|
React.createElement(Trans, null, linkTitle)));
|
|
54
55
|
}
|
|
55
56
|
export { EARuleTitle, EARuleDescription, EARuleArticle };
|
|
@@ -52,20 +52,24 @@ export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolba
|
|
|
52
52
|
export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
|
|
53
53
|
export declare const riskLabels: {
|
|
54
54
|
1: {
|
|
55
|
+
icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
|
|
55
56
|
label: string;
|
|
56
|
-
|
|
57
|
+
className: string;
|
|
57
58
|
};
|
|
58
59
|
2: {
|
|
60
|
+
icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
|
|
59
61
|
label: string;
|
|
60
|
-
|
|
62
|
+
className: string;
|
|
61
63
|
};
|
|
62
64
|
3: {
|
|
65
|
+
icon: import("react").ComponentClass<import("@patternfly/react-icons/dist/js/createIcon").SVGIconProps, any>;
|
|
63
66
|
label: string;
|
|
64
|
-
|
|
67
|
+
className: string;
|
|
65
68
|
};
|
|
66
69
|
4: {
|
|
70
|
+
icon: () => JSX.Element;
|
|
67
71
|
label: string;
|
|
68
|
-
|
|
72
|
+
className: string;
|
|
69
73
|
};
|
|
70
74
|
};
|
|
71
75
|
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import AngleDoubleDownIcon from '@patternfly/react-icons/dist/js/icons/angle-double-down-icon';
|
|
2
|
+
import AngleDoubleUpIcon from '@patternfly/react-icons/dist/js/icons/angle-double-up-icon';
|
|
3
|
+
import EqualsIcon from '@patternfly/react-icons/dist/js/icons/equals-icon';
|
|
4
|
+
import CriticalIcon from './CustomIcons/CriticalIcon';
|
|
1
5
|
export default {
|
|
2
6
|
languagesMap: {
|
|
3
7
|
en: 'English',
|
|
@@ -51,8 +55,8 @@ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-mo
|
|
|
51
55
|
export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
|
|
52
56
|
export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
|
|
53
57
|
export const riskLabels = {
|
|
54
|
-
1: { label: 'Low',
|
|
55
|
-
2: { label: 'Moderate',
|
|
56
|
-
3: { label: 'Important',
|
|
57
|
-
4: { label: 'Critical',
|
|
58
|
+
1: { icon: AngleDoubleDownIcon, label: 'Low', className: 'risk-label-low' },
|
|
59
|
+
2: { icon: EqualsIcon, label: 'Moderate', className: 'risk-label-moderate' },
|
|
60
|
+
3: { icon: AngleDoubleUpIcon, label: 'Important', className: 'risk-label-important' },
|
|
61
|
+
4: { icon: CriticalIcon, label: 'Critical', className: 'risk-label-critical' },
|
|
58
62
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CriticalIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/CustomIcons/CriticalIcon.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY,mBAcjB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const CriticalIcon = () => (React.createElement("svg", { fill: "currentColor", height: "1em", width: "1em", viewBox: "0 0 320 512", "aria-hidden": "true", role: "img", style: { verticalAlign: '-0.125em' } },
|
|
3
|
+
React.createElement("svg", { viewBox: "0 0 10 10" },
|
|
4
|
+
React.createElement("polygon", { points: "10 10, 10 3, 5 0, 0 3, 0 10, 5 8" }))));
|
|
5
|
+
export default CriticalIcon;
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -921,3 +921,15 @@ div.pf-c-alert.ea-rule-alert > div.pf-c-alert__description > p {
|
|
|
921
921
|
#case-details-aside-content[pfe-expanded] {
|
|
922
922
|
overflow: visible;
|
|
923
923
|
}
|
|
924
|
+
.risk-label-low {
|
|
925
|
+
background-color: var(--pf-global--palette--blue-300);
|
|
926
|
+
}
|
|
927
|
+
.risk-label-moderate {
|
|
928
|
+
background-color: var(--pf-global--palette--gold-400);
|
|
929
|
+
}
|
|
930
|
+
.risk-label-important {
|
|
931
|
+
background-color: var(--pf-global--palette--orange-300);
|
|
932
|
+
}
|
|
933
|
+
.risk-label-critical {
|
|
934
|
+
background-color: var(--pf-global--palette--red-200);
|
|
935
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
76
|
"@rh-support/api": "0.3.10",
|
|
77
|
-
"@rh-support/components": "1.1.
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
77
|
+
"@rh-support/components": "1.1.27",
|
|
78
|
+
"@rh-support/react-context": "0.2.30",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.
|
|
81
|
-
"@rh-support/utils": "0.2.
|
|
80
|
+
"@rh-support/user-permissions": "0.2.21",
|
|
81
|
+
"@rh-support/utils": "0.2.19",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "32065538ece0d82c4e6e33dd63d6a0bf915e4a76"
|
|
147
147
|
}
|