@rh-support/troubleshoot 2.6.77 → 2.6.79
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 +2 -0
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +2 -0
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +2 -0
- package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.js +2 -0
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +2 -0
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +2 -0
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +8 -0
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +2 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.js +1 -1
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/AIResponseReducer.js +3 -0
- package/lib/esm/utils/visitedResourcesUtils.d.ts +25 -0
- package/lib/esm/utils/visitedResourcesUtils.d.ts.map +1 -0
- package/lib/esm/utils/visitedResourcesUtils.js +88 -0
- package/package.json +8 -8
|
@@ -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;
|
|
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,sBAuNnC,CAAC"}
|
|
@@ -15,6 +15,7 @@ import { useCaseSelector } from '../../context/CaseContext';
|
|
|
15
15
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
16
16
|
import { createOrUpdateSessionResources, getSessResFromCve, getSessResFromErrata, } from '../../reducers/SessionRestoreReducer';
|
|
17
17
|
import RouteUtils from '../../utils/routeUtils';
|
|
18
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
18
19
|
const { SessionResourceVisibility, SessionResourceWorkflowComponent, SessionResourceSource } = pcm.preCase.session;
|
|
19
20
|
const sanitize = (html) => ({ __html: DOMPurify.sanitize(html) });
|
|
20
21
|
function formatDate(dateString) {
|
|
@@ -126,6 +127,7 @@ export const CveItem = (props) => {
|
|
|
126
127
|
};
|
|
127
128
|
const onClickGoToCveButtonPage = () => {
|
|
128
129
|
onPresentOrVisitedCveErrataData(true);
|
|
130
|
+
trackClickedResourcesSequence('CVE recommendations', cve.cveLink);
|
|
129
131
|
};
|
|
130
132
|
return (React.createElement("div", null,
|
|
131
133
|
React.createElement(Flex, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAWtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA6MzC"}
|
|
@@ -25,6 +25,7 @@ import { RecommendationsConstants } from '../../reducers/RecommendationsReducer'
|
|
|
25
25
|
import { showSidebarRecommendationsSections } from '../../reducers/RouteConstNTypes';
|
|
26
26
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
27
27
|
import RouteUtils from '../../utils/routeUtils';
|
|
28
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
28
29
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
29
30
|
export function AsideResults(props) {
|
|
30
31
|
/*
|
|
@@ -120,6 +121,7 @@ export function AsideResults(props) {
|
|
|
120
121
|
return;
|
|
121
122
|
const rank = index + 1 + PAGE_SIZE * ((recommendationState.currentPage || 1) - 1);
|
|
122
123
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS_ASIDE, [getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1)], payload);
|
|
124
|
+
trackClickedResourcesSequence('Recommendations on sidebar', doc.view_uri);
|
|
123
125
|
dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Recommendation Aside', 'Articles recommended by OpenShift AI', isCaseCreate);
|
|
124
126
|
};
|
|
125
127
|
useEffect(() => {
|
|
@@ -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;
|
|
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;AAYrD,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBAkFvD"}
|
|
@@ -7,6 +7,7 @@ import { Trans } from 'react-i18next';
|
|
|
7
7
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
8
8
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
9
9
|
import { createOrUpdateSessionResources, getRulesToSave, getSessResFromRules, } from '../../reducers/SessionRestoreReducer';
|
|
10
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
10
11
|
import { riskLabels } from '../shared/Constants';
|
|
11
12
|
export function ClusterRecommendationItems(props) {
|
|
12
13
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
@@ -21,6 +22,7 @@ export function ClusterRecommendationItems(props) {
|
|
|
21
22
|
const onResourceClick = (e, rule, i) => {
|
|
22
23
|
const url = detailsUrl + '?rank=' + (i + 1);
|
|
23
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);
|
|
24
26
|
};
|
|
25
27
|
useEffect(() => {
|
|
26
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;
|
|
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"}
|
|
@@ -8,6 +8,7 @@ import { useCaseSelector } from '../../../context/CaseContext';
|
|
|
8
8
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
9
9
|
import { useParseRuleMarkdown } from '../../../hooks/useParseRuleMarkdown';
|
|
10
10
|
import { createOrUpdateSessionResources, getSessResFromEA } from '../../../reducers/SessionRestoreReducer';
|
|
11
|
+
import { trackClickedResourcesSequence } from '../../../utils/visitedResourcesUtils';
|
|
11
12
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
12
13
|
export const EARuleContext = React.createContext({
|
|
13
14
|
rule: {},
|
|
@@ -30,6 +31,7 @@ export function EARule({ children, rule, ruleRank }) {
|
|
|
30
31
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
31
32
|
const onCtaClick = (link, title) => () => {
|
|
32
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);
|
|
33
35
|
};
|
|
34
36
|
return (React.createElement(EARuleContext.Provider, { value: {
|
|
35
37
|
rule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAavE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBAiLhF"}
|
|
@@ -11,6 +11,7 @@ import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../..
|
|
|
11
11
|
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
12
12
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRules, } from '../../reducers/SessionRestoreReducer';
|
|
13
13
|
import { getRuleReasonHtml } from '../../utils/insightRuleInfoUtils';
|
|
14
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
14
15
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
15
16
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
16
17
|
export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
@@ -41,6 +42,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
|
41
42
|
}, [setRuleData, doc.attachmentId, doc.id, selectedLocalFiles, duplicateKeys]);
|
|
42
43
|
const onCtaClick = (link) => (event) => {
|
|
43
44
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [getSessResFromRules(link, SessionResourceVisibility.VISITED, rank, ruleData.rule_id)]);
|
|
45
|
+
trackClickedResourcesSequence('File diagnostics recommendations (Insights)', link);
|
|
44
46
|
};
|
|
45
47
|
const parseMoreInfo = (moreInfo, reportDetails) => {
|
|
46
48
|
const result = parseDotMarkdownWithTracking(moreInfo, reportDetails, SessionResourceSource.INSIGHTS, 'ts-result-insights', 'se-recommended-insights-rule');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevD,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAapF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzE,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBA+YpD"}
|
|
@@ -21,6 +21,7 @@ import { fetchWatsonXRecommendations, RecommendationsConstants, setCurrentPage,
|
|
|
21
21
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
22
22
|
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRecs, } from '../../reducers/SessionRestoreReducer';
|
|
23
23
|
import RouteUtils from '../../utils/routeUtils';
|
|
24
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
24
25
|
import { RecommendationsLoader } from './RecommendationsLoader';
|
|
25
26
|
import { WatsonxAiIcon } from './WatsonxAiIcon';
|
|
26
27
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
@@ -156,6 +157,7 @@ export default function Recommendations(props) {
|
|
|
156
157
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.RECOMMENDATIONS, [
|
|
157
158
|
getSessResFromRec(doc, SessionResourceVisibility.VISITED, index + 1 + (pageSize || DEFAULTPAGESIZE) * ((recommendationState.currentPage || 1) - 1)),
|
|
158
159
|
], typeof payload === 'string' ? payload : JSON.stringify(payload));
|
|
160
|
+
trackClickedResourcesSequence('Search recommendations', doc.view_uri);
|
|
159
161
|
dtmTrackEventContentListingItemClicked(window.location.href, doc.id, rank, doc.allTitle, doc.view_uri, getRecommendationTitle(doc), 'Main Recommendation', 'Articles recommended by OpenShiftAI', isCaseCreate);
|
|
160
162
|
};
|
|
161
163
|
const infoPopover = (React.createElement(Popover, { triggerAction: "hover", "aria-label": "Hoverable popover", headerContent: React.createElement("div", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAuY/C"}
|
|
@@ -17,6 +17,7 @@ import { TCStateContext } from '../../context/TopContentContext';
|
|
|
17
17
|
import { getIrtForSLAAndSeverity } from '../../reducers/CaseHelpers';
|
|
18
18
|
import { setCaseState } from '../../reducers/CaseReducer';
|
|
19
19
|
import RouteUtils from '../../utils/routeUtils';
|
|
20
|
+
import { getClickedResourcesSequence, postVisitedResourcesComment } from '../../utils/visitedResourcesUtils';
|
|
20
21
|
import { AsideResults } from '../Recommendations/AsideResults';
|
|
21
22
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
22
23
|
import InsightsResults from '../Recommendations/InsightsResults';
|
|
@@ -139,6 +140,13 @@ export default function SubmitCase(props) {
|
|
|
139
140
|
}
|
|
140
141
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
141
142
|
}, []);
|
|
143
|
+
// Post visited resources comment when case is successfully created
|
|
144
|
+
useEffect(() => {
|
|
145
|
+
if (caseNoOfCreatedCase && !isCreatingCase && !caseCreationError) {
|
|
146
|
+
postVisitedResourcesComment(caseNoOfCreatedCase, getClickedResourcesSequence());
|
|
147
|
+
}
|
|
148
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
|
+
}, [caseNoOfCreatedCase, isCreatingCase, caseCreationError]);
|
|
142
150
|
return (React.createElement("article", { className: "gird-main" },
|
|
143
151
|
React.createElement(AlertMessage, { className: "pf-v6-u-mt-lg", title: t('Failed to add user.'), variant: AlertType.DANGER, show: addNotifiedUserError }),
|
|
144
152
|
React.createElement(AlertMessage, { className: "pf-v6-u-mt-lg", variant: AlertType.DANGER, show: caseCreationError || (!isCreatingCase && !caseCreationError && isEmpty(caseNoOfCreatedCase)), title: t("Sorry, we're experiencing an error"), isInline: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Suggestions/Suggestions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,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,qBAiIhD"}
|
|
@@ -11,6 +11,7 @@ import { useCaseSelector } from '../../context/CaseContext';
|
|
|
11
11
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
12
12
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
13
13
|
import { createOrUpdateSessionResources, getSessResTC } from '../../reducers/SessionRestoreReducer';
|
|
14
|
+
import { trackClickedResourcesSequence } from '../../utils/visitedResourcesUtils';
|
|
14
15
|
import TopContent from './TopContent';
|
|
15
16
|
const { SessionResourceVisibility, SessionResourceSource } = pcm.preCase.session;
|
|
16
17
|
export default function Suggestions(props) {
|
|
@@ -31,6 +32,7 @@ export default function Suggestions(props) {
|
|
|
31
32
|
const [filteredTC, setFilteredTC] = useState(topContent.data);
|
|
32
33
|
const onResourceClick = (item) => {
|
|
33
34
|
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.TOP_CONTENT, [getSessResTC(item, SessionResourceVisibility.VISITED)], JSON.stringify({ product, version }));
|
|
35
|
+
trackClickedResourcesSequence('Top Content', item.contentUrl);
|
|
34
36
|
};
|
|
35
37
|
const showAllCategories = () => {
|
|
36
38
|
setMaxTC(topContent.data.length);
|
|
@@ -218,7 +218,7 @@ function WizardNavigation(props) {
|
|
|
218
218
|
});
|
|
219
219
|
const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
|
|
220
220
|
const nextButtonDisabledLogic = () => {
|
|
221
|
-
const isLoadingARH = props.isLoadingARH && props.activeStep.id === AppRouteSections.RESOURCES
|
|
221
|
+
const isLoadingARH = props.isLoadingARH && props.activeStep.id === AppRouteSections.RESOURCES;
|
|
222
222
|
if (isBTestvariation) {
|
|
223
223
|
let value = isLoadingARH ||
|
|
224
224
|
((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,
|
|
1
|
+
{"version":3,"file":"AIResponseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/AIResponseReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAEH,qBAAqB,EACrB,gBAAgB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,iBAAiB,UACnB,gBAAgB,UACf,qBAAqB,KAC9B,gBAqEF,CAAC;AAGF,eAAO,MAAM,eAAe,QAAO,qBAGJ,CAAC;AAEhC,eAAO,MAAM,gBAAgB,QAAO,qBAGL,CAAC;AAEhC,eAAO,MAAM,sBAAsB,UAAW,MAAM,uBAAuB,MAAM,KAAG,qBAIrD,CAAC;AAEhC,eAAO,MAAM,kBAAkB,kBAAmB,qBAAqB,KAAG,qBAI3C,CAAC;AAEhC,eAAO,MAAM,cAAc,UAAW,MAAM,kBAAiB,OAAO,KAAW,qBAIhD,CAAC;AAEhC,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,KAAG,qBAIjC,CAAC;AAEhC,eAAO,MAAM,2BAA2B,QAAO,qBAGhB,CAAC;AAEhC,eAAO,MAAM,gBAAgB,eAAgB,MAAM,KAAG,qBAIvB,CAAC"}
|
|
@@ -23,6 +23,9 @@ export const aiResponseReducer = (state = initialAIResponseState, action) => {
|
|
|
23
23
|
case AIResponseConstants.clearSubmittedFeedbackTypes: {
|
|
24
24
|
return Object.assign(Object.assign({}, state), { submittedFeedbackTypes: [] });
|
|
25
25
|
}
|
|
26
|
+
case AIResponseConstants.updateQuotaLimit: {
|
|
27
|
+
return Object.assign(Object.assign({}, state), { quotaLimit: action.payload.quotaLimit });
|
|
28
|
+
}
|
|
26
29
|
default: {
|
|
27
30
|
return state;
|
|
28
31
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface IClickedResources {
|
|
2
|
+
resourceDisplayName: string;
|
|
3
|
+
urls: string[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Function to track clicked resources sequence
|
|
7
|
+
*/
|
|
8
|
+
export declare const trackClickedResourcesSequence: (resourceDisplayName: string, url: string) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Function to get clicked resources sequence
|
|
11
|
+
*/
|
|
12
|
+
export declare const getClickedResourcesSequence: () => IClickedResources[];
|
|
13
|
+
/**
|
|
14
|
+
* Function to clear clicked resources sequence after posting comment
|
|
15
|
+
*/
|
|
16
|
+
export declare const clearClickedResourcesSequence: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Function to format clicked resources sequence for comment
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatClickedResourcesSequenceForComment: (clickedResourcesSequence: IClickedResources[]) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Function to post visited resources as a private comment using clicked resources sequence
|
|
23
|
+
*/
|
|
24
|
+
export declare const postVisitedResourcesComment: (caseNumber: string, clickedResourcesSequence: IClickedResources[]) => Promise<void>;
|
|
25
|
+
//# sourceMappingURL=visitedResourcesUtils.d.ts.map
|
|
@@ -0,0 +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,SAYrF,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"}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
+
let clickedResourcesSequence = [];
|
|
12
|
+
let lastSourceType = null;
|
|
13
|
+
/**
|
|
14
|
+
* Function to track clicked resources sequence
|
|
15
|
+
*/
|
|
16
|
+
export const trackClickedResourcesSequence = (resourceDisplayName, url) => {
|
|
17
|
+
if (lastSourceType === resourceDisplayName && clickedResourcesSequence.length > 0) {
|
|
18
|
+
const lastEntry = clickedResourcesSequence[clickedResourcesSequence.length - 1];
|
|
19
|
+
lastEntry.urls.push(url);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const newSource = {
|
|
23
|
+
resourceDisplayName,
|
|
24
|
+
urls: [url],
|
|
25
|
+
};
|
|
26
|
+
clickedResourcesSequence.push(newSource);
|
|
27
|
+
lastSourceType = resourceDisplayName;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Function to get clicked resources sequence
|
|
32
|
+
*/
|
|
33
|
+
export const getClickedResourcesSequence = () => {
|
|
34
|
+
return clickedResourcesSequence;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Function to clear clicked resources sequence after posting comment
|
|
38
|
+
*/
|
|
39
|
+
export const clearClickedResourcesSequence = () => {
|
|
40
|
+
clickedResourcesSequence = [];
|
|
41
|
+
lastSourceType = null;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Function to format clicked resources sequence for comment
|
|
45
|
+
*/
|
|
46
|
+
export const formatClickedResourcesSequenceForComment = (clickedResourcesSequence) => {
|
|
47
|
+
if (clickedResourcesSequence.length === 0) {
|
|
48
|
+
return '';
|
|
49
|
+
}
|
|
50
|
+
let commentBody = '**Before creating this case, the customer viewed the following content in PCM, in the order listed below:**\n\n';
|
|
51
|
+
clickedResourcesSequence.forEach((source, index) => {
|
|
52
|
+
if (source.urls.length === 1) {
|
|
53
|
+
// Single link: 1. [source] - [url](url)
|
|
54
|
+
commentBody += ` ${index + 1}. [${source.resourceDisplayName}] - [${source.urls[0]}](${source.urls[0]})\n\n`;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
// Multiple links: 1. [source] \n -link1 \n -link2
|
|
58
|
+
commentBody += ` ${index + 1}. [${source.resourceDisplayName}] - \n\n`;
|
|
59
|
+
source.urls.forEach((url) => {
|
|
60
|
+
commentBody += ` - [${url}](${url})\n`;
|
|
61
|
+
});
|
|
62
|
+
commentBody += '\n';
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return commentBody;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Function to post visited resources as a private comment using clicked resources sequence
|
|
69
|
+
*/
|
|
70
|
+
export const postVisitedResourcesComment = (caseNumber, clickedResourcesSequence) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
try {
|
|
72
|
+
if (clickedResourcesSequence.length > 0) {
|
|
73
|
+
const commentBody = formatClickedResourcesSequenceForComment(clickedResourcesSequence);
|
|
74
|
+
yield publicApi.kase.postPrivateComment({
|
|
75
|
+
caseNumber,
|
|
76
|
+
commentBody,
|
|
77
|
+
contentType: 'markdown',
|
|
78
|
+
isDraft: false,
|
|
79
|
+
doNotChangeStatus: false,
|
|
80
|
+
});
|
|
81
|
+
clearClickedResourcesSequence();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
console.error('Failed to post visited resources private comment:', error);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.79",
|
|
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.93",
|
|
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.93",
|
|
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.57",
|
|
63
|
+
"@rh-support/react-context": "2.5.72",
|
|
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.28",
|
|
66
|
+
"@rh-support/utils": "2.5.25",
|
|
67
67
|
"@types/react-redux": "^7.1.33",
|
|
68
68
|
"@types/redux": "^3.6.0",
|
|
69
69
|
"date-fns": "3.6.0",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"defaults and supports es6-module",
|
|
136
136
|
"maintained node versions"
|
|
137
137
|
],
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "d45149a33bafb8c16d60bb4d0d9d4e9acb3d372d"
|
|
139
139
|
}
|