@rh-support/troubleshoot 2.2.87 → 2.2.88
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/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +2 -1
- package/lib/esm/components/Recommendations/RecommendationInfoBox.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationInfoBox.js +10 -10
- package/lib/esm/components/Recommendations/Recommendations.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +3 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +4 -26
- package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +1 -1
- package/package.json +2 -2
|
@@ -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;AAI5F,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD,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;AAI5F,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBA4EvD"}
|
|
@@ -17,6 +17,7 @@ export function ClusterRecommendationItems(props) {
|
|
|
17
17
|
product: state.caseDetails.product,
|
|
18
18
|
openshiftClusterID: state.caseDetails.openshiftClusterID,
|
|
19
19
|
}), isEqual);
|
|
20
|
+
const detailsUrl = `https://console.redhat.com/openshift/insights/advisor/clusters/${openshiftClusterID}`;
|
|
20
21
|
const onResourceClick = (e, rule) => {
|
|
21
22
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.CLUSTER_RECOMMENDATION, [getSessResFromRules('', SessionResourceVisibility.VISITED, 1, rule.rule_id)], JSON.stringify({ product, version, openshiftClusterID }));
|
|
22
23
|
};
|
|
@@ -32,7 +33,7 @@ export function ClusterRecommendationItems(props) {
|
|
|
32
33
|
React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, className: riskLabels[rule.total_risk].className },
|
|
33
34
|
React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
|
|
34
35
|
React.createElement("p", null, rule.details || ''),
|
|
35
|
-
React.createElement("a", { onClick: (e) => onResourceClick(e, rule), className: "pf-v5-u-font-weight-bold", "data-tracking-id": "cluster-recommendations", href:
|
|
36
|
+
React.createElement("a", { onClick: (e) => onResourceClick(e, rule), className: "pf-v5-u-font-weight-bold", "data-tracking-id": "cluster-recommendations", href: detailsUrl, target: "_blank", rel: "noopener noreferrer" },
|
|
36
37
|
React.createElement(Trans, null,
|
|
37
38
|
"View details and remediation steps ",
|
|
38
39
|
React.createElement(ArrowRightIcon, { "aria-hidden": "true" })))))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationInfoBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationInfoBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"RecommendationInfoBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationInfoBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,eAAO,MAAM,qBAAqB,yBA8CjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accordion, AccordionContent, AccordionItem, AccordionToggle } from '@patternfly/react-core';
|
|
1
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionToggle, List, ListItem } from '@patternfly/react-core';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
export const RecommendationInfoBox = () => {
|
|
@@ -7,21 +7,21 @@ export const RecommendationInfoBox = () => {
|
|
|
7
7
|
React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "card card-white pf-v5-u-mt-md" },
|
|
8
8
|
React.createElement(AccordionItem, null,
|
|
9
9
|
React.createElement(AccordionToggle, { id: "recommendation-tips", isExpanded: isExpanded, onClick: () => setIsExpanded(!isExpanded) },
|
|
10
|
-
React.createElement(Trans, null, "Tips for problem description
|
|
10
|
+
React.createElement(Trans, null, "Tips for problem description field")),
|
|
11
11
|
React.createElement(AccordionContent, { isHidden: !isExpanded },
|
|
12
12
|
React.createElement("span", { className: "pf-v5-u-color-100" },
|
|
13
13
|
React.createElement(Trans, null, "Include the following information in the description to expedite your case:")),
|
|
14
|
-
React.createElement("
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement(Trans, null, "
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement(Trans, null, "
|
|
19
|
-
React.createElement(
|
|
20
|
-
React.createElement(Trans, null, "
|
|
14
|
+
React.createElement(List, { className: "pf-v5-u-ml-lg", style: { listStyleType: 'disc' } },
|
|
15
|
+
React.createElement(ListItem, null,
|
|
16
|
+
React.createElement(Trans, null, "Problem")),
|
|
17
|
+
React.createElement(ListItem, null,
|
|
18
|
+
React.createElement(Trans, null, "Steps you've taken")),
|
|
19
|
+
React.createElement(ListItem, null,
|
|
20
|
+
React.createElement(Trans, null, "Error Messages"))),
|
|
21
21
|
React.createElement("span", { className: "pf-v5-u-color-100" },
|
|
22
22
|
React.createElement(Trans, null, "Examples:")),
|
|
23
23
|
React.createElement("p", null,
|
|
24
|
-
React.createElement(Trans, null, "\"we see error/message\", \"function
|
|
24
|
+
React.createElement(Trans, null, "\"we see error/message\", \"function that is failing\"")),
|
|
25
25
|
React.createElement("p", null,
|
|
26
26
|
React.createElement(Trans, null, "I'm unable to start the SSHD service receiving the error message \"Bad yes/no argument for ShowPatchLevel parameter\"")))))));
|
|
27
27
|
};
|
|
@@ -138,7 +138,7 @@ export default function Recommendations(props) {
|
|
|
138
138
|
React.createElement(LoadingDots, { className: "recommendation-loading-dots", show: recommendationState.isLoadingRecommendations && !isEmpty(summary) }),
|
|
139
139
|
React.createElement("div", { className: "recommendation-list pf-v5-u-pt-md", ref: resultRowRef },
|
|
140
140
|
recommendationState.visibleDocs.length !== 0 && (React.createElement(Label, { color: "purple", className: "pf-v5-u-mb-md" },
|
|
141
|
-
React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v5-u-
|
|
141
|
+
React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v5-u-mr-xs" }),
|
|
142
142
|
"Live search results powered by Openshift AI")),
|
|
143
143
|
React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
144
144
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,UAAU,MAAM;IACZ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,qBAwGhD"}
|
|
@@ -45,7 +45,9 @@ export default function Suggestions(props) {
|
|
|
45
45
|
return (React.createElement("div", { className: "top-content-suggestion-accordion" },
|
|
46
46
|
showTitleDescription && (React.createElement("div", { className: "card card-support" },
|
|
47
47
|
!isTCSearchEnabled && (React.createElement(Trans, null,
|
|
48
|
-
React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" }, props.title
|
|
48
|
+
React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" }, props.title
|
|
49
|
+
? props.title
|
|
50
|
+
: t('i18nKeyPopularSolutions', 'Red Hat recommended results')))),
|
|
49
51
|
isTCSearchEnabled && (React.createElement("div", { className: "card-body" },
|
|
50
52
|
React.createElement(TopContentSearch, { topContentData: topContent.data, topContentResultsWrapperRef: accordionRef, onSearch: onSearchChange, dataTrackingId: "top-content-filter-troubleshoot", enableEventTracking: true }))))),
|
|
51
53
|
React.createElement("pfe-accordion", { ref: accordionRef }, map(filteredTC.slice(0, maxTC), (sug, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA+DzC;kBA/DQ,mBAAmB;;;AAkE5B,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { Card, CardBody, CardHeader, CardTitle } from '@patternfly/react-core';
|
|
2
2
|
import { ErrorBoundary, LoadingDots } from '@rh-support/components';
|
|
3
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
|
-
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
5
|
-
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
6
3
|
import isEmpty from 'lodash/isEmpty';
|
|
7
4
|
import isEqual from 'lodash/isEqual';
|
|
8
5
|
import React, { useContext } from 'react';
|
|
9
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
10
7
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
11
8
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
12
|
-
// import { isClusterIdEnabledForProduct } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
13
|
-
import { FileDiag } from '../CaseInformation/FileDiag';
|
|
14
9
|
import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
|
|
15
10
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
16
|
-
import InsightsResults from '../Recommendations/InsightsResults';
|
|
17
11
|
import Suggestions from '../Suggestions/Suggestions';
|
|
18
12
|
const defaultProps = {
|
|
19
13
|
initialIsEditing: false,
|
|
@@ -26,18 +20,14 @@ function TroubleshootSection(props) {
|
|
|
26
20
|
var _a;
|
|
27
21
|
const { t } = useTranslation();
|
|
28
22
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
29
|
-
const {
|
|
30
|
-
const { product, version, summary, isCreatingCase, caseType } = useCaseSelector((state) => ({
|
|
23
|
+
const { product, version, summary, isCreatingCase } = useCaseSelector((state) => ({
|
|
31
24
|
product: state.caseDetails.product,
|
|
32
25
|
version: state.caseDetails.version,
|
|
33
26
|
summary: state.caseDetails.summary,
|
|
34
27
|
isCreatingCase: state.isCreatingCase,
|
|
35
|
-
caseType: state.caseDetails.caseType,
|
|
36
28
|
}), isEqual);
|
|
37
29
|
const canShowTopProducts = isEmpty(product);
|
|
38
30
|
const canShowTopContent = !canShowTopProducts && ((_a = topContent === null || topContent === void 0 ? void 0 : topContent.data) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
39
|
-
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
40
|
-
const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
41
31
|
return (React.createElement(React.Fragment, null,
|
|
42
32
|
React.createElement("section", null,
|
|
43
33
|
React.createElement("header", null,
|
|
@@ -53,25 +43,13 @@ function TroubleshootSection(props) {
|
|
|
53
43
|
!isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
|
|
54
44
|
React.createElement(LoadingDots, { show: topContent.isFetching }),
|
|
55
45
|
topContent.data.length === 0 && (React.createElement(Card, { id: "card", className: "card-support top-recommendations pf-v5-u-mb-md", isCompact: true },
|
|
56
|
-
React.createElement(CardHeader, { "aria-label": t('
|
|
46
|
+
React.createElement(CardHeader, { "aria-label": t('Red Hat recommended results'), className: "popular-solutions" },
|
|
57
47
|
React.createElement(CardTitle, { id: "card-title", className: "card-title" },
|
|
58
|
-
React.createElement(Trans, { i18nKey: 'i18nKeyPopularSolutions' }, "
|
|
48
|
+
React.createElement(Trans, { i18nKey: 'i18nKeyPopularSolutions' }, "Red Hat recommended results"))),
|
|
59
49
|
React.createElement(CardBody, { "aria-label": t('No recommendations for this product'), className: "file-recs-no-recommendation pf-v5-u-mt-md" },
|
|
60
50
|
React.createElement(Trans, null, "No recommendations for this product")))),
|
|
61
51
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } }, canShowTopContent && !isEmpty(version) && React.createElement(Suggestions, null)),
|
|
62
|
-
!isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-v5-u-mt-lg" }))
|
|
63
|
-
React.createElement("section", { className: "pf-v5-u-mt-lg" },
|
|
64
|
-
isNotAnIdea && (React.createElement(InsightsResults, { isDisplayOnMain: true, "data-tracking-id": "troubleshoot-section-file-recs" })),
|
|
65
|
-
React.createElement("div", { className: "pf-v5-u-mt-lg" }, canAddAttachments ? (React.createElement(FileDiag, null)) : (React.createElement(React.Fragment, null,
|
|
66
|
-
React.createElement(Card, { id: "card", className: "card-support card-white file-diag", isCompact: true },
|
|
67
|
-
React.createElement(CardHeader, { "aria-label": !isNotAnIdea || loggedInUsersAccount.data.secureSupport
|
|
68
|
-
? t('File uploader')
|
|
69
|
-
: t('Upload file to analyze'), className: "card-heading" },
|
|
70
|
-
React.createElement(CardTitle, { id: "card-title", className: "card-title" }, !isNotAnIdea || loggedInUsersAccount.data.secureSupport ? (React.createElement(Trans, null, "File uploader")) : (React.createElement(Trans, null, "Upload file to analyze")))),
|
|
71
|
-
React.createElement(CardBody, { "aria-label": t('No recommendations for this product'), className: "no-access-file-diag" },
|
|
72
|
-
React.createElement("div", { className: "display-dashed pf-v5-u-font-weight-bold pf-v5-u-text-align-center pf-v5-u-mt-md" },
|
|
73
|
-
React.createElement(Trans, null, "You do not have access to upload files"),
|
|
74
|
-
".")))))))));
|
|
52
|
+
!isCreatingCase && React.createElement(ClusterRecommendations, { className: "pf-v5-u-mt-lg" }))));
|
|
75
53
|
}
|
|
76
54
|
TroubleshootSection.defaultProps = defaultProps;
|
|
77
55
|
export default TroubleshootSection;
|
|
@@ -33,6 +33,7 @@ function WizardAside(props) {
|
|
|
33
33
|
const canShowRecommendationTips = showRecommendationTipsSections.includes(activeSection);
|
|
34
34
|
return (React.createElement("aside", null,
|
|
35
35
|
React.createElement("section", { className: "grid-aside-content" },
|
|
36
|
+
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v5-u-mt-md" }),
|
|
36
37
|
canshowEARuleWidget && React.createElement(EARuleWidget, null),
|
|
37
38
|
React.createElement(InsightsResults, null),
|
|
38
39
|
" ",
|
|
@@ -40,7 +41,6 @@ function WizardAside(props) {
|
|
|
40
41
|
canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
|
|
41
42
|
React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget }),
|
|
42
43
|
canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
|
|
43
|
-
canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v5-u-mt-md" }),
|
|
44
44
|
canShowRecommendationTips && React.createElement(RecommendationInfoBox, null))));
|
|
45
45
|
}
|
|
46
46
|
WizardAside.defaultProps = defaultProps;
|
|
@@ -394,7 +394,7 @@ export const getRulesToSave = (visiterUrl, visitedRec, allPresentedRec) => {
|
|
|
394
394
|
visStatus = SessionResourceVisibility.PRESENTED;
|
|
395
395
|
url = null;
|
|
396
396
|
}
|
|
397
|
-
return getSessResFromRules(url, visStatus,
|
|
397
|
+
return getSessResFromRules(url, visStatus, i + 1, rec.rule_id);
|
|
398
398
|
});
|
|
399
399
|
};
|
|
400
400
|
export const getInsightRulesToSave = (visiterUrl, visitedRec, allPresentedRec) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.88",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"defaults and supports es6-module",
|
|
133
133
|
"maintained node versions"
|
|
134
134
|
],
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "5999a7f4678d4efe1322db8f509352c2ee5cdb1d"
|
|
136
136
|
}
|