@rh-support/troubleshoot 2.2.40-beta.0 → 2.2.40-beta.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAuPpD"}
1
+ {"version":3,"file":"Recommendations.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/Recommendations.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAelE,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eA6PpD"}
@@ -148,7 +148,7 @@ export default function Recommendations(props) {
148
148
  React.createElement("span", { className: "meta" }, doc.documentKind),
149
149
  React.createElement("span", { className: "list-separator" }, "\u2013"),
150
150
  React.createElement("time", { className: "moment_date meta", title: doc.lastModifiedDate.toString() }, formatDate(doc.lastModifiedDate)))),
151
- isFetchingRecommendationsFromWatsonX && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps })),
151
+ isFetchingRecommendationsFromWatsonX && (React.createElement(ShowRank, { index: i, originalRank: doc.original_rank, routeProps: props.routeProps, perPage: recPageSize, pageNo: recommendationState.currentPage })),
152
152
  React.createElement("p", { className: "result-body", dangerouslySetInnerHTML: computeRecommendationAbstract(doc, 300) })));
153
153
  })),
154
154
  recommendationState.numFound !== 0 && recommendationState.numFound > DEFAULTPAGESIZE && (React.createElement("div", { className: "pagination-footer" },
@@ -4,6 +4,8 @@ interface IProps {
4
4
  index: number;
5
5
  originalRank: number;
6
6
  routeProps: RouteComponentProps<IRouteUrlParams>;
7
+ perPage?: number;
8
+ pageNo?: number;
7
9
  }
8
10
  export declare function ShowRank(props: IProps): JSX.Element;
9
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ShowRank.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ShowRank.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAerC"}
1
+ {"version":3,"file":"ShowRank.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ShowRank.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAuBrC"}
@@ -6,12 +6,20 @@ export function ShowRank(props) {
6
6
  const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
7
7
  const rerankingFromUrl = urlQueryParams.reranking;
8
8
  const isShowRerankingForInternalUsers = rerankingFromUrl === 'true' || rerankingFromUrl === 'false';
9
+ const getCurrentRank = () => {
10
+ if (props.perPage && props.pageNo) {
11
+ return props.perPage * (props.pageNo - 1) + props.index + 1;
12
+ }
13
+ else {
14
+ return props.index + 1;
15
+ }
16
+ };
9
17
  if (!loggedInUserRights.data.isInternal() || !isShowRerankingForInternalUsers)
10
18
  return React.createElement(React.Fragment, null);
11
19
  return (React.createElement("div", { className: "result-body" },
12
20
  React.createElement("strong", null, "New rank:"),
13
21
  " ",
14
- props.index,
22
+ getCurrentRank(),
15
23
  " ",
16
24
  React.createElement("strong", null, "Old rank:"),
17
25
  " ",
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eAuLzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eAwLzC"}
@@ -70,6 +70,7 @@ export function WizardLayout(props) {
70
70
  testVariationWeight,
71
71
  isShowRerankingForInternalUsers,
72
72
  rerankingFromUrl,
73
+ props.routeProps,
73
74
  ]);
74
75
  const closeROCMProductModal = () => {
75
76
  const productName = 'OpenShift Container Platform';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.40-beta.0",
3
+ "version": "2.2.40-beta.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -66,11 +66,11 @@
66
66
  "@patternfly/react-core": "4.264.0",
67
67
  "@progress/kendo-drawing": "^1.6.0",
68
68
  "@progress/kendo-react-pdf": "^3.12.0",
69
- "@rh-support/components": "2.1.23-beta.0",
70
- "@rh-support/react-context": "2.1.25-beta.0",
69
+ "@rh-support/components": "2.1.23-beta.1",
70
+ "@rh-support/react-context": "2.1.25-beta.1",
71
71
  "@rh-support/types": "2.0.2",
72
- "@rh-support/user-permissions": "2.1.17-beta.0",
73
- "@rh-support/utils": "2.1.11-beta.0",
72
+ "@rh-support/user-permissions": "2.1.17-beta.1",
73
+ "@rh-support/utils": "2.1.11-beta.1",
74
74
  "@types/react-redux": "^7.1.12",
75
75
  "@types/redux": "^3.6.0",
76
76
  "dompurify": "^2.4.1",
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "3d67f1bfd743fabfd0a606cf56ea4bf48d91daa2"
136
+ "gitHead": "0fa0968e831c199572669184c466e9fecd781d12"
137
137
  }