@rh-support/troubleshoot 2.6.79 → 2.6.81
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/Cve/CveItem.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveItem.js +3 -1
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +2 -1
- package/lib/esm/components/Recommendations/AsideResults.js +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 +5 -4
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +3 -2
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +10 -7
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +5 -3
- package/lib/esm/utils/visitedResourcesUtils.d.ts +8 -2
- package/lib/esm/utils/visitedResourcesUtils.d.ts.map +1 -1
- package/lib/esm/utils/visitedResourcesUtils.js +20 -9
- package/package.json +8 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,oCAAoC,CAAC;AAUhG,UAAU,KAAK;IACX,GAAG,EAAE,0BAA0B,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,OAAO,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"CveItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveItem.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,oCAAoC,CAAC;AAUhG,UAAU,KAAK;IACX,GAAG,EAAE,0BAA0B,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,OAAO,UAAW,KAAK,sBAwNnC,CAAC"}
|
|
@@ -56,11 +56,13 @@ export const CveItem = (props) => {
|
|
|
56
56
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.DRUPAL, resources, JSON.stringify(payload), workflowSource);
|
|
57
57
|
};
|
|
58
58
|
const onClickErrataLink = (errataDetails, index = 0) => {
|
|
59
|
+
var _a, _b;
|
|
59
60
|
updateSessionDb([
|
|
60
61
|
getSessResFromErrata(errataDetails, SessionResourceVisibility.VISITED, index + 1, isCveModalOpened
|
|
61
62
|
? SessionResourceWorkflowComponent.CVE_MODEl
|
|
62
63
|
: SessionResourceWorkflowComponent.CVE_ASIDE),
|
|
63
64
|
]);
|
|
65
|
+
trackClickedResourcesSequence('CVE recommendations', (_a = errataDetails.advisory) === null || _a === void 0 ? void 0 : _a.url, (_b = errataDetails.advisory) === null || _b === void 0 ? void 0 : _b.name);
|
|
64
66
|
};
|
|
65
67
|
const onPresentOrVisitedCveErrataData = (isVisited = false) => {
|
|
66
68
|
updateSessionDb(getSessResFromCve(cve, isVisited ? SessionResourceVisibility.VISITED : SessionResourceVisibility.PRESENTED, index + 1, isCveModalOpened
|
|
@@ -127,7 +129,7 @@ export const CveItem = (props) => {
|
|
|
127
129
|
};
|
|
128
130
|
const onClickGoToCveButtonPage = () => {
|
|
129
131
|
onPresentOrVisitedCveErrataData(true);
|
|
130
|
-
trackClickedResourcesSequence('CVE recommendations', cve.cveLink);
|
|
132
|
+
trackClickedResourcesSequence('CVE recommendations', cve.cveLink, cve.title);
|
|
131
133
|
};
|
|
132
134
|
return (React.createElement("div", null,
|
|
133
135
|
React.createElement(Flex, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CveModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Cve/CveModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAW1C,eAAO,MAAM,QAAQ,yBAkFpB,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { RouteContext } from '../../context/RouteContext';
|
|
|
12
12
|
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
13
13
|
import { setCaseState } from '../../reducers/CaseReducer';
|
|
14
14
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
15
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
15
16
|
import { CvePanel } from './CvePanel';
|
|
16
17
|
export const CveModal = () => {
|
|
17
18
|
const caseDispatch = useCaseDispatch();
|
|
@@ -40,6 +41,6 @@ export const CveModal = () => {
|
|
|
40
41
|
React.createElement(ModalBody, null,
|
|
41
42
|
React.createElement(CvePanel, null)),
|
|
42
43
|
React.createElement(ModalFooter, null,
|
|
43
|
-
React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }), key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl() },
|
|
44
|
+
React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, { className: "pf-v6-u-ml-sm" }), key: "cve-checker-link", "data-tracking-id": "cve-checker-link", target: "_blank", variant: "secondary", isInline: true, component: "a", href: generateCveCheckerUrl(), onClick: () => trackClickedResourcesSequence('CVE recommendations', generateCveCheckerUrl(), 'Red Hat CVE Checker') },
|
|
44
45
|
React.createElement(Trans, null, "Red Hat CVE Checker")))));
|
|
45
46
|
};
|
|
@@ -121,7 +121,7 @@ export function AsideResults(props) {
|
|
|
121
121
|
return;
|
|
122
122
|
const rank = index + 1 + PAGE_SIZE * ((recommendationState.currentPage || 1) - 1);
|
|
123
123
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1)], payload);
|
|
124
|
-
trackClickedResourcesSequence('Recommendations on sidebar', doc.view_uri);
|
|
124
|
+
trackClickedResourcesSequence('Recommendations on sidebar', doc.view_uri, getRecommendationTitle(doc));
|
|
125
125
|
dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Recommendation Aside', 'Articles recommended by OpenShift AI', isCaseCreate);
|
|
126
126
|
};
|
|
127
127
|
useEffect(() => {
|
|
@@ -22,7 +22,7 @@ export function ClusterRecommendationItems(props) {
|
|
|
22
22
|
const onResourceClick = (e, rule, i) => {
|
|
23
23
|
const url = detailsUrl + '?rank=' + (i + 1);
|
|
24
24
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.CLUSTER_RECOMMENDATION, [getSessResFromRules(url, SessionResourceVisibility.VISITED, i + 1, rule.rule_id)], JSON.stringify({ product, version, openshiftClusterID }));
|
|
25
|
-
trackClickedResourcesSequence('Cluster recommendations', url);
|
|
25
|
+
trackClickedResourcesSequence('Cluster recommendations', url, rule.description);
|
|
26
26
|
};
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
const recsWithUrl = props.clusterRecommendations.map((rec, i) => (Object.assign(Object.assign({}, rec), { url: `${detailsUrl}?rank=${i + 1}` })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAqClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,
|
|
1
|
+
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClH;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;;;;CAAA,qBAqClD;AAED,iBAAS,WAAW,sBAGnB;AAED,iBAAS,iBAAiB,sBA8BzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBA2BnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -31,7 +31,7 @@ export function EARule({ children, rule, ruleRank }) {
|
|
|
31
31
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
32
32
|
const onCtaClick = (link, title) => () => {
|
|
33
33
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.EDMOUND_ABOTT, [getSessResFromEA(link, SessionResourceVisibility.VISITED, ruleRank, rule.rule_id)], JSON.stringify({ product, version, summary }));
|
|
34
|
-
trackClickedResourcesSequence('Automated Support Assistant (ASA) recommendations', link);
|
|
34
|
+
trackClickedResourcesSequence('Automated Support Assistant (ASA) recommendations', link, title || rule.title);
|
|
35
35
|
};
|
|
36
36
|
return (React.createElement(EARuleContext.Provider, { value: {
|
|
37
37
|
rule,
|
|
@@ -50,7 +50,8 @@ function EARuleDescription() {
|
|
|
50
50
|
const onDescriptionClick = (ev) => {
|
|
51
51
|
const target = ev.target;
|
|
52
52
|
if (target.tagName.toLowerCase() === 'a') {
|
|
53
|
-
|
|
53
|
+
const linkText = target.textContent || target.innerText;
|
|
54
|
+
onCtaClick(target.href.split('?')[0], `ASA Description - ${linkText}`)(ev);
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
return (React.createElement("div", { className: "ea-rule", onClick: onDescriptionClick, dangerouslySetInnerHTML: {
|
|
@@ -62,8 +63,8 @@ function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
|
|
|
62
63
|
const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
|
|
63
64
|
if (!rule.cta)
|
|
64
65
|
return null;
|
|
65
|
-
return linkTitle === 'View details' ? (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
|
|
66
|
-
React.createElement(Trans, null, linkTitle))) : (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
|
|
66
|
+
return linkTitle === 'View details' ? (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) },
|
|
67
|
+
React.createElement(Trans, null, linkTitle))) : (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) },
|
|
67
68
|
React.createElement(Trans, null, linkTitle)));
|
|
68
69
|
}
|
|
69
70
|
export { EARuleTitle, EARuleDescription, EARuleArticle };
|
|
@@ -42,7 +42,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
42
42
|
}, [setRuleData, doc.attachmentId, doc.id, selectedLocalFiles, duplicateKeys]);
|
|
43
43
|
const onCtaClick = (link) => (event) => {
|
|
44
44
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [getSessResFromRules(link, SessionResourceVisibility.VISITED, rank, ruleData.rule_id)]);
|
|
45
|
-
trackClickedResourcesSequence('File diagnostics recommendations (Insights)', link);
|
|
45
|
+
trackClickedResourcesSequence('File diagnostics recommendations (Insights)', link, ruleData === null || ruleData === void 0 ? void 0 : ruleData.summary);
|
|
46
46
|
};
|
|
47
47
|
const parseMoreInfo = (moreInfo, reportDetails) => {
|
|
48
48
|
const result = parseDotMarkdownWithTracking(moreInfo, reportDetails, SessionResourceSource.INSIGHTS, 'ts-result-insights', 'se-recommended-insights-rule');
|
|
@@ -157,7 +157,7 @@ export default function Recommendations(props) {
|
|
|
157
157
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [
|
|
158
158
|
getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1)),
|
|
159
159
|
], typeof payload === 'string' ? payload : JSON.stringify(payload));
|
|
160
|
-
trackClickedResourcesSequence('Search recommendations', doc.view_uri);
|
|
160
|
+
trackClickedResourcesSequence('Search recommendations', doc.view_uri, getRecommendationTitle(doc));
|
|
161
161
|
dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Main Recommendation', 'Articles recommended by OpenShiftAI', isCaseCreate);
|
|
162
162
|
};
|
|
163
163
|
const infoPopover = (React.createElement(Popover, { triggerAction: "hover", "aria-label": "Hoverable popover", headerContent: React.createElement("div", null,
|
|
@@ -32,7 +32,7 @@ export default function Suggestions(props) {
|
|
|
32
32
|
const [filteredTC, setFilteredTC] = useState(topContent.data);
|
|
33
33
|
const onResourceClick = (item) => {
|
|
34
34
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.TOP_CONTENT, [getSessResTC(item, SessionResourceVisibility.VISITED)], JSON.stringify({ product, version }));
|
|
35
|
-
trackClickedResourcesSequence('Top Content', item.contentUrl);
|
|
35
|
+
trackClickedResourcesSequence('Top Content', item.contentUrl, item.contentTitle);
|
|
36
36
|
};
|
|
37
37
|
const showAllCategories = () => {
|
|
38
38
|
setMaxTC(topContent.data.length);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAkCvE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,0BAA2B,MAAM,
|
|
1
|
+
{"version":3,"file":"AskRedHat.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/AskRedHat.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAkCvE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,0BAA2B,MAAM,sBAydtD,CAAC"}
|
|
@@ -184,8 +184,9 @@ export const AskRedHat = ({ onChatWithAIClick }) => {
|
|
|
184
184
|
return (React.createElement("div", { className: "ask-redhat" },
|
|
185
185
|
React.createElement("p", { className: "ask-redhat-title" },
|
|
186
186
|
React.createElement(StarIcon, { width: 20, height: 20 }),
|
|
187
|
-
isCaseCreate ? 'Resolve your issue now with AI insights' : 'Troubleshoot with AI insights',
|
|
188
|
-
React.createElement(Label, { variant: "outline" },
|
|
187
|
+
isCaseCreate ? t('Resolve your issue now with AI insights') : t('Troubleshoot with AI insights'),
|
|
188
|
+
React.createElement(Label, { variant: "outline" },
|
|
189
|
+
React.createElement(Trans, null, "PREVIEW"))),
|
|
189
190
|
React.createElement("div", { className: "ask-redhat-content-wrapper ask-redhat-rate-limit-error" },
|
|
190
191
|
React.createElement(EmptyState, { titleText: "", headingLevel: "h4" },
|
|
191
192
|
React.createElement("h4", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAUrD,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,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;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAUD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAAA,OAAO,6CAA6C,CAAC;AAUrD,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,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;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAUD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAgOzC;kBAhOQ,mBAAmB;;;AAmO5B,eAAe,mBAAmB,CAAC"}
|
|
@@ -108,17 +108,18 @@ function TroubleshootSection(props) {
|
|
|
108
108
|
packageVersion: (_d = window === null || window === void 0 ? void 0 : window.supportVersionInfo) === null || _d === void 0 ? void 0 : _d.packageVersion,
|
|
109
109
|
appSourceId: appSourceId_ARH,
|
|
110
110
|
enableDebugLogging: false,
|
|
111
|
-
headerTitle: 'AI insights',
|
|
111
|
+
headerTitle: isCaseCreate ? t('Resolve your issue now with AI insights') : t('Troubleshoot with AI insights'),
|
|
112
112
|
appEnv: Env.getEnvName(),
|
|
113
113
|
showWelcomeMessage: false,
|
|
114
114
|
conversationId: ((_e = aiResponseState.aiResponse) === null || _e === void 0 ? void 0 : _e.conversationId) || undefined,
|
|
115
115
|
enableHeaderMenu: false,
|
|
116
116
|
enableTheme: false,
|
|
117
117
|
openLinkInNewTab: true,
|
|
118
|
-
customPrivacyMessage: (React.createElement(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
customPrivacyMessage: (React.createElement(Trans, { i18nKey: "This feature uses AI technology. Interactions may be used to improve Red Hat's products or services. For more information about Red Hat\u2019s privacy practices, please refer to the <a>Red Hat Privacy Statement.</a>", components: {
|
|
119
|
+
a: (
|
|
120
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
121
|
+
React.createElement("a", { href: "https://www.redhat.com/en/about/privacy-policy", target: "_blank", rel: "noopener noreferrer" })),
|
|
122
|
+
} })),
|
|
122
123
|
tokenAuth: {
|
|
123
124
|
auth: {
|
|
124
125
|
userInfo: (_h = (_g = (_f = window === null || window === void 0 ? void 0 : window.sessionjs) === null || _f === void 0 ? void 0 : _f.getToken) === null || _g === void 0 ? void 0 : _g.call(_f)) !== null && _h !== void 0 ? _h : {},
|
|
@@ -148,8 +149,10 @@ function TroubleshootSection(props) {
|
|
|
148
149
|
return (React.createElement(React.Fragment, null, isAIChatMode ? (React.createElement(React.Fragment, null,
|
|
149
150
|
React.createElement(AskRedHatChat, { initConfig: initConfig }),
|
|
150
151
|
React.createElement("div", { className: "fullscreen-chat-footer" }, isCaseCreate ? (React.createElement("span", null,
|
|
151
|
-
React.createElement(
|
|
152
|
-
|
|
152
|
+
React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
|
|
153
|
+
span: React.createElement("span", { className: "return-to-case-text" }),
|
|
154
|
+
button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
|
|
155
|
+
} }))) : (React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-resources-btn" }, t('Back to resources')))))) : (React.createElement(React.Fragment, null,
|
|
153
156
|
React.createElement("section", null,
|
|
154
157
|
shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
|
|
155
158
|
!isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,OAAO,C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 -16,7 +16,7 @@ import find from 'lodash/find';
|
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
18
18
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
19
|
-
import { useTranslation } from 'react-i18next';
|
|
19
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
21
|
import { RecommendationStateContext } from '../../context/RecommendationContext';
|
|
22
22
|
import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
|
|
@@ -265,8 +265,10 @@ function WizardNavigation(props) {
|
|
|
265
265
|
return (React.createElement(React.Fragment, null,
|
|
266
266
|
React.createElement(WizardFooterWrapper, null,
|
|
267
267
|
props.isAIChatMode && activeSection === AppRouteSections.RESOURCES ? (isCaseCreate ? (React.createElement("span", null,
|
|
268
|
-
React.createElement(
|
|
269
|
-
|
|
268
|
+
React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
|
|
269
|
+
span: React.createElement("span", { className: "return-to-case-text" }),
|
|
270
|
+
button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: props.onReturnToCaseCreation })),
|
|
271
|
+
} }))) : (React.createElement(Button, { onClick: props.onReturnToCaseCreation, variant: "link", className: "return-to-resources-btn" }, t('Back to resources')))) : (React.createElement(React.Fragment, null,
|
|
270
272
|
props.activeStep.order !== 0 && (React.createElement("button", { onClick: () => onBack({}), className: "btn btn-app btn-open-white main-nav-button", "data-tracking-id": `prev-of-${activeSection}`, type: "button", disabled: isDisabledGoBack() }, t('Go back'))),
|
|
271
273
|
React.createElement("button", { disabled: nextButtonDisabledLogic(), onClick: onNext, className: "btn btn-app btn-primary main-nav-button", "data-tracking-id": `next-of-${activeSection}`, type: "button" }, t(props.activeStep.nextButtonLabel)),
|
|
272
274
|
activeSection === AppRouteSections.RESOURCES && isFileRecommendationsTriggered && (React.createElement(Button, { onClick: handleFileRecsSelfSolved, variant: ButtonVariant.secondary, className: "issue-solved-button solved-issue-button", "data-tracking-id": "troubleshoot-self-solved-issue" }, t('I solved my issue'))))),
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
export interface IClickedResources {
|
|
2
2
|
resourceDisplayName: string;
|
|
3
|
-
|
|
3
|
+
clickedResources: {
|
|
4
|
+
url: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}[];
|
|
7
|
+
clickedUrlsCount: {
|
|
8
|
+
[url: string]: number;
|
|
9
|
+
};
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
12
|
* Function to track clicked resources sequence
|
|
7
13
|
*/
|
|
8
|
-
export declare const trackClickedResourcesSequence: (resourceDisplayName: string, url: string) => void;
|
|
14
|
+
export declare const trackClickedResourcesSequence: (resourceDisplayName: string, url: string, title: string) => void;
|
|
9
15
|
/**
|
|
10
16
|
* Function to get clicked resources sequence
|
|
11
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitedResourcesUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/visitedResourcesUtils.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"visitedResourcesUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/visitedResourcesUtils.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnD,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC/C;AAKD;;GAEG;AACH,eAAO,MAAM,6BAA6B,wBAAyB,MAAM,OAAO,MAAM,SAAS,MAAM,SAkBpG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,QAAO,iBAAiB,EAE/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,YAGzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wCAAwC,6BAA8B,iBAAiB,EAAE,KAAG,MA6BxG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,eACxB,MAAM,4BACQ,iBAAiB,EAAE,KAC9C,OAAO,CAAC,IAAI,CAmBd,CAAC"}
|
|
@@ -13,15 +13,22 @@ let lastSourceType = null;
|
|
|
13
13
|
/**
|
|
14
14
|
* Function to track clicked resources sequence
|
|
15
15
|
*/
|
|
16
|
-
export const trackClickedResourcesSequence = (resourceDisplayName, url) => {
|
|
16
|
+
export const trackClickedResourcesSequence = (resourceDisplayName, url, title) => {
|
|
17
17
|
if (lastSourceType === resourceDisplayName && clickedResourcesSequence.length > 0) {
|
|
18
18
|
const lastEntry = clickedResourcesSequence[clickedResourcesSequence.length - 1];
|
|
19
|
-
lastEntry.
|
|
19
|
+
if (!lastEntry.clickedResources.some((item) => item.url === url)) {
|
|
20
|
+
lastEntry.clickedResources.push({ url, title });
|
|
21
|
+
lastEntry.clickedUrlsCount[url] = 1;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
lastEntry.clickedUrlsCount[url] = lastEntry.clickedUrlsCount[url] + 1;
|
|
25
|
+
}
|
|
20
26
|
}
|
|
21
27
|
else {
|
|
22
28
|
const newSource = {
|
|
23
29
|
resourceDisplayName,
|
|
24
|
-
|
|
30
|
+
clickedResources: [{ url, title }],
|
|
31
|
+
clickedUrlsCount: { [url]: 1 },
|
|
25
32
|
};
|
|
26
33
|
clickedResourcesSequence.push(newSource);
|
|
27
34
|
lastSourceType = resourceDisplayName;
|
|
@@ -49,15 +56,19 @@ export const formatClickedResourcesSequenceForComment = (clickedResourcesSequenc
|
|
|
49
56
|
}
|
|
50
57
|
let commentBody = '**Before creating this case, the customer viewed the following content in PCM, in the order listed below:**\n\n';
|
|
51
58
|
clickedResourcesSequence.forEach((source, index) => {
|
|
52
|
-
if (source.
|
|
53
|
-
// Single link: 1. [source] - [
|
|
54
|
-
|
|
59
|
+
if (source.clickedResources.length === 1) {
|
|
60
|
+
// Single link: 1. [source] - [title](url)
|
|
61
|
+
const clickCount = source.clickedUrlsCount[source.clickedResources[0].url];
|
|
62
|
+
const clickCountText = clickCount > 1 ? ` - (Customer visited this content ${clickCount} times)` : '';
|
|
63
|
+
commentBody += ` ${index + 1}. [${source.resourceDisplayName}] - [${source.clickedResources[0].title}](${source.clickedResources[0].url})${clickCountText}\n\n`;
|
|
55
64
|
}
|
|
56
65
|
else {
|
|
57
|
-
// Multiple links: 1. [source] \n -
|
|
66
|
+
// Multiple links: 1. [source] \n -[title1](url1)\n -[title2](url2)
|
|
58
67
|
commentBody += ` ${index + 1}. [${source.resourceDisplayName}] - \n\n`;
|
|
59
|
-
source.
|
|
60
|
-
|
|
68
|
+
source.clickedResources.forEach((urlItem) => {
|
|
69
|
+
const clickCount = source.clickedUrlsCount[urlItem.url];
|
|
70
|
+
const clickCountText = clickCount > 1 ? ` - (Customer visited this content ${clickCount} times)` : '';
|
|
71
|
+
commentBody += ` - [${urlItem.title}](${urlItem.url})${clickCountText}\n`;
|
|
61
72
|
});
|
|
62
73
|
commentBody += '\n';
|
|
63
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.81",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lib/**/*"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@cee-eng/hydrajs": "4.18.
|
|
28
|
+
"@cee-eng/hydrajs": "4.18.95",
|
|
29
29
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
30
30
|
"@patternfly/patternfly": "6.2.1",
|
|
31
31
|
"@patternfly/react-core": "6.2.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react-virtualized": "^9.22.5"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@cee-eng/hydrajs": "4.18.
|
|
52
|
+
"@cee-eng/hydrajs": "4.18.95",
|
|
53
53
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
54
54
|
"@ifd-ui/ask-redhat-core": "^0.0.38",
|
|
55
55
|
"@patternfly/patternfly": "6.2.1",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@progress/kendo-licensing": "1.3.5",
|
|
60
60
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
61
61
|
"@redux-devtools/extension": "^3.3.0",
|
|
62
|
-
"@rh-support/components": "2.5.
|
|
63
|
-
"@rh-support/react-context": "2.5.
|
|
62
|
+
"@rh-support/components": "2.5.58",
|
|
63
|
+
"@rh-support/react-context": "2.5.73",
|
|
64
64
|
"@rh-support/types": "2.0.5",
|
|
65
|
-
"@rh-support/user-permissions": "2.5.
|
|
66
|
-
"@rh-support/utils": "2.5.
|
|
65
|
+
"@rh-support/user-permissions": "2.5.29",
|
|
66
|
+
"@rh-support/utils": "2.5.26",
|
|
67
67
|
"@types/react-redux": "^7.1.33",
|
|
68
68
|
"@types/redux": "^3.6.0",
|
|
69
69
|
"date-fns": "3.6.0",
|
|
@@ -103,9 +103,7 @@
|
|
|
103
103
|
"@types/react": "^18.2.20",
|
|
104
104
|
"@types/react-bootstrap-typeahead": "^5.1.3",
|
|
105
105
|
"@types/react-dom": "^18.2.18",
|
|
106
|
-
"@types/react-redux": "^7.1.33",
|
|
107
106
|
"@types/react-router-dom": "^5.1.2",
|
|
108
|
-
"@types/redux": "^3.6.0",
|
|
109
107
|
"faker": "^5.5.3",
|
|
110
108
|
"jest": "^29.7.0",
|
|
111
109
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -135,5 +133,5 @@
|
|
|
135
133
|
"defaults and supports es6-module",
|
|
136
134
|
"maintained node versions"
|
|
137
135
|
],
|
|
138
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "e4ba47317025664e73192ba17027f2551800b354"
|
|
139
137
|
}
|