@rh-support/troubleshoot 2.2.45 → 2.2.47
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/CaseDetailsTabs.js +16 -12
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +4 -4
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.d.ts +3 -0
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.js +121 -0
- package/lib/esm/components/CaseManagement/OpenShiftV3Inputbox.js +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestoreCard.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestoreCard.js +5 -12
- package/lib/esm/constants/caseDetailsConstants.d.ts +2 -1
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +1 -0
- package/lib/esm/scss/_pf-overrides.scss +56 -4
- package/package.json +5 -4
|
@@ -11,7 +11,7 @@ import { useCaseSelector } from '../../context/CaseContext';
|
|
|
11
11
|
import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
|
|
12
12
|
import { PDFContext } from './PDFContainer';
|
|
13
13
|
import CaseDetailsManagement from './Tabs/CaseDetails/CaseDetailsManagement';
|
|
14
|
-
const
|
|
14
|
+
const RelatedTickets = React.lazy(() => import(/* webpackChunkName: 'CaseBugzilla' */ './Tabs/RelatedTickets/RelatedTickets'));
|
|
15
15
|
const CaseActionPlan = React.lazy(() => import(/* webpackChunkName: 'CaseActionPlan' */ './Tabs/CaseActionPlan/CaseActionPlan'));
|
|
16
16
|
const CasePrivateNotes = React.lazy(() => import(/* webpackChunkName: 'CasePrivateNotes' */ './Tabs/CasePrivateNotes/CasePrivateNotes'));
|
|
17
17
|
const CaseDiscussion = React.lazy(() => import(/* webpackChunkName: 'CaseDiscussion' */ './Tabs/CaseDiscussion/CaseDiscussion'));
|
|
@@ -30,16 +30,21 @@ export function CaseDetailsTabs(props) {
|
|
|
30
30
|
const [activeTabKey, setActiveTabKey] = useState(0);
|
|
31
31
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
32
32
|
const canSeePrivateNotes = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_PRIVATE_NOTES_EDIT);
|
|
33
|
-
const canSeeBugZillas = ability.can(
|
|
33
|
+
// const canSeeBugZillas = ability.can(
|
|
34
|
+
// resourceActions.PATCH,
|
|
35
|
+
// resources.CASE_DETAILS,
|
|
36
|
+
// CaseDetailsFields.CASE_DETAILS_BUGZILLAS
|
|
37
|
+
// );
|
|
34
38
|
const { isExportingPDF, pdfOption } = useContext(PDFContext);
|
|
35
39
|
const canSeeRMEs = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_RMES);
|
|
36
40
|
const [selectedTab, setSelectedTab] = useState(CaseDetailsTabsEnum.DISCUSSION);
|
|
37
41
|
const discussionTabRef = useRef(null);
|
|
38
|
-
const bugZillaTabRef = useRef(null);
|
|
42
|
+
// const bugZillaTabRef: React.MutableRefObject<HTMLDivElement> = useRef(null);
|
|
39
43
|
const managementTabRef = useRef(null);
|
|
40
44
|
const privateNotesTabRef = useRef(null);
|
|
41
45
|
const actionPlanTabRef = useRef(null);
|
|
42
46
|
const escalationTabRef = useRef(null);
|
|
47
|
+
const relatedTicketsRef = useRef(null);
|
|
43
48
|
const tabsToRender = [];
|
|
44
49
|
const handleTabClick = (event, tabIndex) => {
|
|
45
50
|
setActiveTabKey(tabIndex);
|
|
@@ -61,15 +66,14 @@ export function CaseDetailsTabs(props) {
|
|
|
61
66
|
ref: managementTabRef,
|
|
62
67
|
component: (React.createElement(CaseDetailsManagement, { caseNumber: caseNumber, routeProps: props.routeProps, tabRef: managementTabRef })),
|
|
63
68
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
69
|
+
tabsToRender.push({
|
|
70
|
+
'data-tracking-id': 'case-details-related-ticket-tab',
|
|
71
|
+
key: 'relatedTickets',
|
|
72
|
+
ref: relatedTicketsRef,
|
|
73
|
+
routePath: 'related-tickets',
|
|
74
|
+
title: CaseDetailsTabsEnum.RELATED_TICKETS,
|
|
75
|
+
component: React.createElement(RelatedTickets, null),
|
|
76
|
+
});
|
|
73
77
|
tabsToRender.push({
|
|
74
78
|
'data-tracking-id': 'case-details-actionplan-tab',
|
|
75
79
|
key: 'action plan',
|
|
@@ -87,10 +87,10 @@ export function ReopenCaseModal(props) {
|
|
|
87
87
|
React.createElement(Trans, null, option)))))) : (React.createElement(Select, { "aria-label": t('Select an option that best fits'), id: "case-resolution", selections: selectedReason, onSelect: onReasonChange, isOpen: showDropdown, isDisabled: props.isUpdating, menuAppendTo: document.body, validated: showValidationError && !selectedReason ? 'error' : 'default', placeholderText: t('Select an option that best fits'), onToggle: (_event, toggle) => onDropdownToggle(toggle) }, reasonsList.map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
|
|
88
88
|
React.createElement(Trans, null, option)))))))),
|
|
89
89
|
showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", isRequired: true, fieldId: "reopen-case-description" },
|
|
90
|
-
React.createElement(FormHelperText, null,
|
|
91
|
-
React.createElement(HelperText, null,
|
|
92
|
-
React.createElement(HelperTextItem, { hasIcon: true }, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))),
|
|
93
90
|
React.createElement(TextArea, { placeholder: t(props.isInternal
|
|
94
91
|
? 'Describe the reason for reopening with the selected status'
|
|
95
|
-
: 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription ? 'error' : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" })
|
|
92
|
+
: 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription ? 'error' : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" }),
|
|
93
|
+
React.createElement(FormHelperText, null,
|
|
94
|
+
React.createElement(HelperText, null,
|
|
95
|
+
React.createElement(HelperTextItem, null, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))))))));
|
|
96
96
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedTickets.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTickets/RelatedTickets.tsx"],"names":[],"mappings":"AAqCA,QAAA,MAAM,cAAc,mBA8KnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { kase } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Badge, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Pagination, SearchInput, ToggleGroup, ToggleGroupItem, } from '@patternfly/react-core';
|
|
12
|
+
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
|
|
13
|
+
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
14
|
+
import { useFetch } from '@rh-support/components';
|
|
15
|
+
import isEqual from 'lodash/isEqual';
|
|
16
|
+
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import { useTranslation } from 'react-i18next';
|
|
18
|
+
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
19
|
+
const columnNames = {
|
|
20
|
+
id: 'Task ID',
|
|
21
|
+
type: 'Type',
|
|
22
|
+
status: 'Status',
|
|
23
|
+
title: 'Summary',
|
|
24
|
+
};
|
|
25
|
+
const RelatedTickets = () => {
|
|
26
|
+
const [activeToggleKey, setActiveToggleKey] = useState('all');
|
|
27
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
28
|
+
const [itemsPerPage, setItemsPerPage] = useState(10);
|
|
29
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
30
|
+
const { caseNumber, bugzillaFetch } = useCaseSelector((state) => ({
|
|
31
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
32
|
+
bugzillaFetch: state.caseDetails.bugzillas,
|
|
33
|
+
}), isEqual);
|
|
34
|
+
const { request: getCaseJiras } = useFetch(kase.fetchLinkedJiras, {
|
|
35
|
+
propgateErrors: true,
|
|
36
|
+
});
|
|
37
|
+
const [bugzillaData, setBugzillaData] = useState([]);
|
|
38
|
+
const [jiraData, setJiraData] = useState([]);
|
|
39
|
+
const { t } = useTranslation();
|
|
40
|
+
// reset pagination when searching for edge case
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
setCurrentPage(1);
|
|
43
|
+
}, [searchQuery, activeToggleKey]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const fetchData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
|
+
try {
|
|
47
|
+
const bugzillaTransformed = bugzillaFetch.map((bugzilla) => ({
|
|
48
|
+
id: bugzilla.caseNumber,
|
|
49
|
+
type: 'Bugzilla',
|
|
50
|
+
link: bugzilla.bugzillaLink || '',
|
|
51
|
+
status: bugzilla.status || 'N/A',
|
|
52
|
+
title: bugzilla.summary || 'N/A',
|
|
53
|
+
date: new Date(bugzilla.linkedAt),
|
|
54
|
+
}));
|
|
55
|
+
setBugzillaData(bugzillaTransformed);
|
|
56
|
+
const jiraResults = yield getCaseJiras(caseNumber);
|
|
57
|
+
const jiraTransformed = jiraResults.map((jira) => ({
|
|
58
|
+
id: jira.resourceKey,
|
|
59
|
+
type: 'Jira',
|
|
60
|
+
link: jira.resourceURL || '',
|
|
61
|
+
status: jira.status || 'N/A',
|
|
62
|
+
title: jira.title || 'N/A',
|
|
63
|
+
date: new Date(jira.createdDate),
|
|
64
|
+
}));
|
|
65
|
+
setJiraData(jiraTransformed);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.log(error);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
fetchData();
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
|
+
}, [bugzillaFetch, caseNumber]);
|
|
74
|
+
const combinedData = [...bugzillaData, ...jiraData].sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
75
|
+
const filteredData = combinedData.filter((item) => {
|
|
76
|
+
const lowercasedQuery = searchQuery.toLowerCase();
|
|
77
|
+
if (searchQuery &&
|
|
78
|
+
!item.title.toLowerCase().includes(lowercasedQuery) &&
|
|
79
|
+
!item.id.toString().toLowerCase().includes(lowercasedQuery)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (activeToggleKey === 'all')
|
|
83
|
+
return true;
|
|
84
|
+
if (activeToggleKey === 'bugzilla')
|
|
85
|
+
return item.type === 'Bugzilla';
|
|
86
|
+
if (activeToggleKey === 'jira')
|
|
87
|
+
return item.type === 'Jira';
|
|
88
|
+
return true;
|
|
89
|
+
});
|
|
90
|
+
const startIdx = (currentPage - 1) * itemsPerPage;
|
|
91
|
+
const endIdx = startIdx + itemsPerPage;
|
|
92
|
+
const displayData = filteredData.slice(startIdx, endIdx);
|
|
93
|
+
return (React.createElement("section", { className: "card card-white" },
|
|
94
|
+
(activeToggleKey === 'all' && (bugzillaData.length > 0 || jiraData.length > 0)) ||
|
|
95
|
+
(activeToggleKey === 'bugzilla' && bugzillaData.length > 0) ||
|
|
96
|
+
(activeToggleKey === 'jira' && jiraData.length > 0) ? (React.createElement("div", { className: "related-ticket-search-input-container", id: "related-ticket-search-container" },
|
|
97
|
+
React.createElement(SearchInput, { className: "related-ticket-search-input", placeholder: t('Search by Task ID or Summary'), value: searchQuery, onChange: (event) => setSearchQuery(event.currentTarget.value), onClear: () => setSearchQuery('') }))) : null,
|
|
98
|
+
React.createElement(ToggleGroup, { "aria-label": "Toggle Group" },
|
|
99
|
+
React.createElement(ToggleGroupItem, { text: t('All'), isSelected: activeToggleKey === 'all', onChange: () => setActiveToggleKey('all'), "data-tracking-id": 'related-ticket-all' }),
|
|
100
|
+
React.createElement(ToggleGroupItem, { text: t('Bugzilla'), isSelected: activeToggleKey === 'bugzilla', onChange: () => setActiveToggleKey('bugzilla'), "data-tracking-id": 'related-ticket-bugzilla' }),
|
|
101
|
+
React.createElement(ToggleGroupItem, { text: t('Jira'), isSelected: activeToggleKey === 'jira', onChange: () => setActiveToggleKey('jira'), "data-tracking-id": 'related-ticket-jira' })),
|
|
102
|
+
filteredData.length > 0 ? (React.createElement(React.Fragment, null,
|
|
103
|
+
React.createElement(Table, { "aria-label": "Issue Table" },
|
|
104
|
+
React.createElement(Thead, null,
|
|
105
|
+
React.createElement(Tr, null,
|
|
106
|
+
React.createElement(Th, null, columnNames.id),
|
|
107
|
+
React.createElement(Th, null, columnNames.type),
|
|
108
|
+
React.createElement(Th, null, columnNames.status),
|
|
109
|
+
React.createElement(Th, null, columnNames.title))),
|
|
110
|
+
React.createElement(Tbody, null, displayData.map((item) => (React.createElement(Tr, { key: item.id },
|
|
111
|
+
React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer" }, item.id)) : (item.id)),
|
|
112
|
+
React.createElement(Td, { dataLabel: columnNames.type }, item.type),
|
|
113
|
+
React.createElement(Td, { dataLabel: columnNames.status },
|
|
114
|
+
React.createElement(Badge, { isRead: true }, item.status)),
|
|
115
|
+
React.createElement(Td, { dataLabel: columnNames.title }, item.title)))))),
|
|
116
|
+
React.createElement("div", { className: "push-top" },
|
|
117
|
+
React.createElement(Pagination, { itemCount: filteredData.length, perPage: itemsPerPage, page: currentPage, onSetPage: (_, page) => setCurrentPage(page), onPerPageSelect: (_, perPage) => setItemsPerPage(perPage) })))) : (React.createElement("div", null,
|
|
118
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
119
|
+
React.createElement(EmptyStateHeader, { titleText: t("There aren't any related tasks."), headingLevel: "h4", icon: React.createElement(EmptyStateIcon, { icon: CubesIcon }) }))))));
|
|
120
|
+
};
|
|
121
|
+
export default RelatedTickets;
|
|
@@ -12,7 +12,7 @@ function OpenShiftV3Inputbox(props) {
|
|
|
12
12
|
React.createElement(Trans, null, "OpenShift Cluster Name"),
|
|
13
13
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"),
|
|
14
14
|
React.createElement(CaseOpenShiftV3Popover, null)),
|
|
15
|
-
React.createElement(TextInput, { id: "case-details-v3-cluster-name", value: props.v3ClusterName, type: "text", onChange: (e, value) => props.onReasonInputBoxChanged(value), "aria-label": t('Enter your Cluster Name'), placeholder: t('Enter your Cluster Name'), required: true, className:
|
|
15
|
+
React.createElement(TextInput, { id: "case-details-v3-cluster-name", value: props.v3ClusterName, type: "text", onChange: (e, value) => props.onReasonInputBoxChanged(value), "aria-label": t('Enter your Cluster Name'), placeholder: t('Enter your Cluster Name'), required: true, className: `${props.isInValid ? 'form-invalid' : ''}`, "data-tracking-id": "openshift-v3-cluster-name" }),
|
|
16
16
|
React.createElement("p", { id: "validated-helper", className: `form-instructions ${props.isInValid ? 'form-invalid' : ''}` },
|
|
17
17
|
"If you do not have your Cluster Name available, briefly explain why.",
|
|
18
18
|
' ',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAwB5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA0PrC;kBA1PQ,eAAe;;;AA6PxB,eAAe,eAAe,CAAC"}
|
|
@@ -240,7 +240,7 @@ function InsightsResults(props) {
|
|
|
240
240
|
}
|
|
241
241
|
return (React.createElement(React.Fragment, null,
|
|
242
242
|
!rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
|
|
243
|
-
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")) })),
|
|
243
|
+
React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "file-recommendations-file-upload-alert" })),
|
|
244
244
|
React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
|
|
245
245
|
}
|
|
246
246
|
InsightsResults.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestoreCard.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestoreCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionRestoreCard.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestoreCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AASnF,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,eA4B/C"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
1
|
+
import { Alert, AlertActionCloseButton } from '@patternfly/react-core';
|
|
3
2
|
import isEmpty from 'lodash/isEmpty';
|
|
4
3
|
import map from 'lodash/map';
|
|
5
4
|
import React, { useState } from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
7
6
|
import { SessionItem } from './SessionItem';
|
|
8
7
|
export function SessionRestoreCard(props) {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
9
|
const [dismissed, setDismissed] = useState(false);
|
|
10
10
|
const onCardDismiss = () => {
|
|
11
11
|
setDismissed(true);
|
|
@@ -13,15 +13,8 @@ export function SessionRestoreCard(props) {
|
|
|
13
13
|
};
|
|
14
14
|
if (dismissed || isEmpty(props.previousSessions))
|
|
15
15
|
return React.createElement(React.Fragment, null);
|
|
16
|
-
return (React.createElement("
|
|
17
|
-
React.createElement("div", { className: "pf-v5-c-alert__icon" },
|
|
18
|
-
React.createElement(BellIcon, { "aria-hidden": "true" })),
|
|
19
|
-
React.createElement("h3", { className: "pf-v5-c-alert__title" },
|
|
20
|
-
React.createElement(Trans, null, "Restore a previous session")),
|
|
16
|
+
return (React.createElement(Alert, { variant: "custom", isInline: true, title: t('Restore a previous session'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onCardDismiss }), component: "h3", className: "restore-session-alert" },
|
|
21
17
|
React.createElement("div", { className: "pf-v5-c-alert__description" },
|
|
22
18
|
React.createElement("ul", { className: "restore-session-list" }, map(props.previousSessions, (sessionItem) => (React.createElement("li", { key: sessionItem.session.id },
|
|
23
|
-
React.createElement(SessionItem, { onRestore: props.onRestore, sessionItem: sessionItem }))))))
|
|
24
|
-
React.createElement("div", { className: "pf-v5-c-alert__action" },
|
|
25
|
-
React.createElement("button", { className: "pf-v5-c-button pf-m-plain", type: "button", "aria-label": "Close", onClick: onCardDismiss, "data-tracking-id": "session-restore-card-dismiss" },
|
|
26
|
-
React.createElement(TimesIcon, { "aria-hidden": "true" })))));
|
|
19
|
+
React.createElement(SessionItem, { onRestore: props.onRestore, sessionItem: sessionItem }))))))));
|
|
27
20
|
}
|
|
@@ -5,7 +5,8 @@ export declare enum CaseDetailsTabsEnum {
|
|
|
5
5
|
BUGZILLA = "Bugzilla",
|
|
6
6
|
ACTION_PLAN = "Action plan",
|
|
7
7
|
PRIVATE_NOTES = "Private Notes",
|
|
8
|
-
ESCALATION = "Escalations"
|
|
8
|
+
ESCALATION = "Escalations",
|
|
9
|
+
RELATED_TICKETS = "Related Tickets"
|
|
9
10
|
}
|
|
10
11
|
export declare enum CaseStatusEnum {
|
|
11
12
|
CLOSED = "Closed",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;
|
|
1
|
+
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;IAC1B,eAAe,oBAAoB;CACtC;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAE7D,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
|
|
@@ -7,6 +7,7 @@ export var CaseDetailsTabsEnum;
|
|
|
7
7
|
CaseDetailsTabsEnum["ACTION_PLAN"] = "Action plan";
|
|
8
8
|
CaseDetailsTabsEnum["PRIVATE_NOTES"] = "Private Notes";
|
|
9
9
|
CaseDetailsTabsEnum["ESCALATION"] = "Escalations";
|
|
10
|
+
CaseDetailsTabsEnum["RELATED_TICKETS"] = "Related Tickets";
|
|
10
11
|
})(CaseDetailsTabsEnum || (CaseDetailsTabsEnum = {}));
|
|
11
12
|
export var CaseStatusEnum;
|
|
12
13
|
(function (CaseStatusEnum) {
|
|
@@ -424,13 +424,13 @@ div#request-mgmt-escalation-modal.request-escalation-modal {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
// To override font weight on reopen case modal - PCM-11644
|
|
427
|
-
|
|
427
|
+
#case-reopen-modal {
|
|
428
428
|
form.pf-v5-c-form.case-reopen-modal-form {
|
|
429
429
|
div.pf-v5-c-form__group {
|
|
430
430
|
div.pf-v5-c-form__group-label {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
font-weight:
|
|
431
|
+
.pf-v5-c-form__label {
|
|
432
|
+
.pf-v5-c-form__label-text {
|
|
433
|
+
font-weight: 500 !important;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
}
|
|
@@ -550,6 +550,7 @@ span.pf-v5-c-input-group__text {
|
|
|
550
550
|
.pf-v5-c-accordion__expandable-content {
|
|
551
551
|
margin: 0;
|
|
552
552
|
}
|
|
553
|
+
|
|
553
554
|
.top-content-suggestion-accordion {
|
|
554
555
|
dl dt {
|
|
555
556
|
margin: 0px;
|
|
@@ -561,3 +562,54 @@ span.pf-v5-c-input-group__text {
|
|
|
561
562
|
|
|
562
563
|
border: 1px solid #d2d2d2;
|
|
563
564
|
}
|
|
565
|
+
|
|
566
|
+
.pf-v5-c-alert__title {
|
|
567
|
+
margin-bottom: 0px;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.restore-session-alert {
|
|
571
|
+
.pf-v5-c-alert__icon {
|
|
572
|
+
font-size: 18px;
|
|
573
|
+
}
|
|
574
|
+
.pf-v5-c-alert__description {
|
|
575
|
+
margin-top: 0px;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
#cep-details-modal {
|
|
580
|
+
.pf-v5-c-form__label-text {
|
|
581
|
+
font-weight: 500;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.file-recommendations-file-upload-alert {
|
|
586
|
+
.pf-v5-c-alert__icon {
|
|
587
|
+
margin-top: 15px;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.close-case-modal-form {
|
|
592
|
+
.pf-v5-c-form__label {
|
|
593
|
+
.pf-v5-c-form__label-text {
|
|
594
|
+
font-weight: 500 !important;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
ul.pf-v5-c-menu__list,
|
|
600
|
+
.pf-v5-c-modal-box__title {
|
|
601
|
+
margin-bottom: 0px;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
div.related-ticket-search-input-container#related-ticket-search-container {
|
|
605
|
+
float: right;
|
|
606
|
+
margin-bottom: 1rem;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.related-ticket-search-input {
|
|
610
|
+
width: 25rem;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
button.pf-v5-c-toggle-group__button {
|
|
614
|
+
z-index: 1;
|
|
615
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.47",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -63,10 +63,11 @@
|
|
|
63
63
|
"@patternfly/pfe-icon": "^1.12.3",
|
|
64
64
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
65
65
|
"@patternfly/react-core": "5.1.1",
|
|
66
|
+
"@patternfly/react-table": "^5.1.1",
|
|
66
67
|
"@progress/kendo-drawing": "^1.6.0",
|
|
67
68
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
68
|
-
"@rh-support/components": "2.1.
|
|
69
|
-
"@rh-support/react-context": "2.1.
|
|
69
|
+
"@rh-support/components": "2.1.27",
|
|
70
|
+
"@rh-support/react-context": "2.1.30",
|
|
70
71
|
"@rh-support/types": "2.0.2",
|
|
71
72
|
"@rh-support/user-permissions": "2.1.19",
|
|
72
73
|
"@rh-support/utils": "2.1.12",
|
|
@@ -131,5 +132,5 @@
|
|
|
131
132
|
"defaults and supports es6-module",
|
|
132
133
|
"maintained node versions"
|
|
133
134
|
],
|
|
134
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "b0978cf9cff4fa1b1355983b294a010e92b45938"
|
|
135
136
|
}
|