@rh-support/troubleshoot 2.6.80 → 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.
@@ -56,13 +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;
59
+ var _a, _b;
60
60
  updateSessionDb([
61
61
  getSessResFromErrata(errataDetails, SessionResourceVisibility.VISITED, index + 1, isCveModalOpened
62
62
  ? SessionResourceWorkflowComponent.CVE_MODEl
63
63
  : SessionResourceWorkflowComponent.CVE_ASIDE),
64
64
  ]);
65
- trackClickedResourcesSequence('CVE recommendations', (_a = errataDetails.advisory) === null || _a === void 0 ? void 0 : _a.url);
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);
66
66
  };
67
67
  const onPresentOrVisitedCveErrataData = (isVisited = false) => {
68
68
  updateSessionDb(getSessResFromCve(cve, isVisited ? SessionResourceVisibility.VISITED : SessionResourceVisibility.PRESENTED, index + 1, isCveModalOpened
@@ -129,7 +129,7 @@ export const CveItem = (props) => {
129
129
  };
130
130
  const onClickGoToCveButtonPage = () => {
131
131
  onPresentOrVisitedCveErrataData(true);
132
- trackClickedResourcesSequence('CVE recommendations', cve.cveLink);
132
+ trackClickedResourcesSequence('CVE recommendations', cve.cveLink, cve.title);
133
133
  };
134
134
  return (React.createElement("div", null,
135
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;AAW1C,eAAO,MAAM,QAAQ,yBA4EpB,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"}
@@ -41,6 +41,6 @@ export const CveModal = () => {
41
41
  React.createElement(ModalBody, null,
42
42
  React.createElement(CvePanel, null)),
43
43
  React.createElement(ModalFooter, null,
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()) },
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') },
45
45
  React.createElement(Trans, null, "Red Hat CVE Checker")))));
46
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,sBA0BzB;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"}
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
- onCtaClick(target.href.split('?')[0])(ev);
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, linkTitle), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
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, linkTitle), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
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":"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,qBA+NzC;kBA/NQ,mBAAmB;;;AAkO5B,eAAe,mBAAmB,CAAC"}
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"}
@@ -149,8 +149,9 @@ function TroubleshootSection(props) {
149
149
  return (React.createElement(React.Fragment, null, isAIChatMode ? (React.createElement(React.Fragment, null,
150
150
  React.createElement(AskRedHatChat, { initConfig: initConfig }),
151
151
  React.createElement("div", { className: "fullscreen-chat-footer" }, isCaseCreate ? (React.createElement("span", null,
152
- React.createElement(Trans, { i18nKey: "Return to <button>case creation</button>", components: {
153
- button: (React.createElement(Button, { isInline: true, variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
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) })),
154
155
  } }))) : (React.createElement(Button, { onClick: () => props.setIsAIChatMode(false), variant: "link", className: "return-to-resources-btn" }, t('Back to resources')))))) : (React.createElement(React.Fragment, null,
155
156
  React.createElement("section", null,
156
157
  shouldShowARHUI() && React.createElement(AskRedHat, { onChatWithAIClick: handleChatWithAIClick }),
@@ -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,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAuXtC;kBAvXQ,gBAAgB;;;AAyXzB,eAAe,gBAAgB,CAAC"}
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,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAwXtC;kBAxXQ,gBAAgB;;;AA0XzB,eAAe,gBAAgB,CAAC"}
@@ -265,8 +265,9 @@ 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(Trans, { i18nKey: "Return to <button>case creation</button>", components: {
269
- button: (React.createElement(Button, { isInline: true, variant: "link", component: "a", onClick: props.onReturnToCaseCreation })),
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 })),
270
271
  } }))) : (React.createElement(Button, { onClick: props.onReturnToCaseCreation, variant: "link", className: "return-to-resources-btn" }, t('Back to resources')))) : (React.createElement(React.Fragment, null,
271
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'))),
272
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)),
@@ -103,7 +103,8 @@
103
103
  }
104
104
 
105
105
  .ask-redhat-chat-button {
106
- max-height: 5rem;
106
+ width: 129px;
107
+ height: 30px;
107
108
  justify-content: center;
108
109
  align-items: center !important;
109
110
  gap: 8px;
@@ -1,11 +1,17 @@
1
1
  export interface IClickedResources {
2
2
  resourceDisplayName: string;
3
- urls: string[];
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,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAKD;;GAEG;AACH,eAAO,MAAM,6BAA6B,wBAAyB,MAAM,OAAO,MAAM,SAcrF,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,MAyBxG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,eACxB,MAAM,4BACQ,iBAAiB,EAAE,KAC9C,OAAO,CAAC,IAAI,CAmBd,CAAC"}
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,17 +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
- if (!lastEntry.urls.includes(url)) {
20
- lastEntry.urls.push(url);
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;
21
25
  }
22
26
  }
23
27
  else {
24
28
  const newSource = {
25
29
  resourceDisplayName,
26
- urls: [url],
30
+ clickedResources: [{ url, title }],
31
+ clickedUrlsCount: { [url]: 1 },
27
32
  };
28
33
  clickedResourcesSequence.push(newSource);
29
34
  lastSourceType = resourceDisplayName;
@@ -51,15 +56,19 @@ export const formatClickedResourcesSequenceForComment = (clickedResourcesSequenc
51
56
  }
52
57
  let commentBody = '**Before creating this case, the customer viewed the following content in PCM, in the order listed below:**\n\n';
53
58
  clickedResourcesSequence.forEach((source, index) => {
54
- if (source.urls.length === 1) {
55
- // Single link: 1. [source] - [url](url)
56
- commentBody += `&nbsp;&nbsp;&nbsp;${index + 1}. [${source.resourceDisplayName}] - [${source.urls[0]}](${source.urls[0]})\n\n`;
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 += `&nbsp;&nbsp;&nbsp;${index + 1}. [${source.resourceDisplayName}] - [${source.clickedResources[0].title}](${source.clickedResources[0].url})${clickCountText}\n\n`;
57
64
  }
58
65
  else {
59
- // Multiple links: 1. [source] \n -link1 \n -link2
66
+ // Multiple links: 1. [source] \n -[title1](url1)\n -[title2](url2)
60
67
  commentBody += `&nbsp;&nbsp;&nbsp;${index + 1}. [${source.resourceDisplayName}] - \n\n`;
61
- source.urls.forEach((url) => {
62
- commentBody += `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [${url}](${url})\n`;
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 += `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- [${urlItem.title}](${urlItem.url})${clickCountText}\n`;
63
72
  });
64
73
  commentBody += '\n';
65
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.80",
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.93",
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.93",
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.57",
63
- "@rh-support/react-context": "2.5.72",
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.28",
66
- "@rh-support/utils": "2.5.25",
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": "6984b8dfbc824e7a62b63f6b39a470d7163cf2c3"
136
+ "gitHead": "e4ba47317025664e73192ba17027f2551800b354"
139
137
  }