@rh-support/manage 0.2.71 → 0.2.74
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.
|
@@ -6,7 +6,7 @@ export declare const getContentUrls: (contentsArray: any) => any;
|
|
|
6
6
|
* Iterate all categories and its content to with content usage data to map and flag category and its content needs attention
|
|
7
7
|
*
|
|
8
8
|
* 1. Find the outlier from the category usage data.
|
|
9
|
-
* 2. Compare and filter category usage with outlier lower boundary.
|
|
9
|
+
* 2. Compare and filter category usage with outlier lower boundary and thirty date range.
|
|
10
10
|
* 3. Use filtered data with actually category data to add need attention flag
|
|
11
11
|
* @param categories
|
|
12
12
|
* @param categoryUsage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EAEpC,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContentHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EAEpC,MAAM,2DAA2D,CAAC;AAMnE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qBAAqB,CAAC;AAEjF,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAEF,eAAO,MAAM,cAAc,6BAe1B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,eACb,oBAAoB,EAAE,iBACnB,iCAAiC,mBAC/B,MAAM,2BAqC1B,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAqB,MAAM,KAAG,OAExD,CAAC"}
|
|
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { getAccessHostname } from '@rh-support/api';
|
|
13
|
-
import { outlier } from '@rh-support/utils';
|
|
13
|
+
import { addDaysToDate, isFutureDate, outlier } from '@rh-support/utils';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
export const getTopContentUrl = (contentUrl) => {
|
|
16
16
|
// There is some data urls (e.g. /solutions/articles/etc.) that aren't valid urls
|
|
@@ -43,7 +43,7 @@ export const getContentUrls = (contentsArray) => {
|
|
|
43
43
|
* Iterate all categories and its content to with content usage data to map and flag category and its content needs attention
|
|
44
44
|
*
|
|
45
45
|
* 1. Find the outlier from the category usage data.
|
|
46
|
-
* 2. Compare and filter category usage with outlier lower boundary.
|
|
46
|
+
* 2. Compare and filter category usage with outlier lower boundary and thirty date range.
|
|
47
47
|
* 3. Use filtered data with actually category data to add need attention flag
|
|
48
48
|
* @param categories
|
|
49
49
|
* @param categoryUsage
|
|
@@ -60,7 +60,11 @@ export const flagContentUsage = (categories, categoryUsage, selectedVersion) =>
|
|
|
60
60
|
let isAttentionNeededOnCategory = false;
|
|
61
61
|
const contentWithFlag = content === null || content === void 0 ? void 0 : content.map((_a) => {
|
|
62
62
|
var { topContentId } = _a, rest = __rest(_a, ["topContentId"]);
|
|
63
|
-
const
|
|
63
|
+
const isContentLowerPerforming = filteredResourceUsages.some(({ resourceEntityId }) => +resourceEntityId === topContentId);
|
|
64
|
+
const updatedDatePlusThirtyDays = addDaysToDate({ days: 30, date: rest.updatedOn });
|
|
65
|
+
const isDateWithinThirtyDate = isFutureDate(updatedDatePlusThirtyDays.toString());
|
|
66
|
+
// Here we need to check that is content performing low plus edited date is outside 30 days.
|
|
67
|
+
const isAttentionNeeded = isContentLowerPerforming && !isDateWithinThirtyDate;
|
|
64
68
|
!isAttentionNeededOnCategory && (isAttentionNeededOnCategory = isAttentionNeeded);
|
|
65
69
|
return Object.assign(Object.assign({}, rest), { topContentId,
|
|
66
70
|
isAttentionNeeded });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.74",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"not op_mini all"
|
|
52
52
|
],
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@cee-eng/hydrajs": "4.
|
|
54
|
+
"@cee-eng/hydrajs": "4.9.1",
|
|
55
55
|
"@patternfly/patternfly": "4.185.1",
|
|
56
56
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
57
57
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
@@ -89,20 +89,20 @@
|
|
|
89
89
|
"typescript": "4.3.5"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@cee-eng/hydrajs": "4.
|
|
92
|
+
"@cee-eng/hydrajs": "4.9.1",
|
|
93
93
|
"@patternfly/patternfly": "4.185.1",
|
|
94
94
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
95
95
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
96
96
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
97
97
|
"@patternfly/react-core": "4.202.16",
|
|
98
98
|
"@patternfly/react-table": "4.71.16",
|
|
99
|
-
"@rh-support/api": "0.3.
|
|
100
|
-
"@rh-support/components": "1.1.
|
|
99
|
+
"@rh-support/api": "0.3.15",
|
|
100
|
+
"@rh-support/components": "1.1.59",
|
|
101
101
|
"@rh-support/configs": "0.2.5",
|
|
102
|
-
"@rh-support/react-context": "0.2.
|
|
102
|
+
"@rh-support/react-context": "0.2.61",
|
|
103
103
|
"@rh-support/types": "0.2.0",
|
|
104
|
-
"@rh-support/user-permissions": "0.2.
|
|
105
|
-
"@rh-support/utils": "0.2.
|
|
104
|
+
"@rh-support/user-permissions": "0.2.47",
|
|
105
|
+
"@rh-support/utils": "0.2.36",
|
|
106
106
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
107
107
|
"i18next": ">=17.0.1",
|
|
108
108
|
"lodash": ">=4.17.15",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"react-i18next": ">=10.11.0",
|
|
114
114
|
"react-router-dom": ">=5.1.2"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "82a2161f34c47eeb658bec78e6af2eff79a61b2f"
|
|
117
117
|
}
|