@truedat/dq 4.44.1 → 4.44.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.
- package/CHANGELOG.md +6 -0
- package/package.json +5 -5
- package/src/components/RuleImplementationProperties.js +0 -1
- package/src/components/RuleImplementationResultTabs.js +20 -25
- package/src/components/RuleImplementationResultsLink.js +1 -6
- package/src/components/RuleResultSegmentRow.js +0 -3
- package/src/components/RuleResultSegments.js +2 -6
- package/src/sagas/__tests__/deleteRuleResult.spec.js +3 -5
- package/src/sagas/deleteRuleResult.js +2 -7
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.44.
|
|
3
|
+
"version": "4.44.2",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/plugin-transform-modules-commonjs": "^7.15.0",
|
|
32
32
|
"@babel/preset-env": "^7.15.0",
|
|
33
33
|
"@babel/preset-react": "^7.14.5",
|
|
34
|
-
"@truedat/test": "4.44.
|
|
34
|
+
"@truedat/test": "4.44.2",
|
|
35
35
|
"babel-jest": "^27.0.6",
|
|
36
36
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
37
37
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@apollo/client": "^3.4.10",
|
|
85
|
-
"@truedat/core": "4.44.
|
|
86
|
-
"@truedat/df": "4.44.
|
|
85
|
+
"@truedat/core": "4.44.2",
|
|
86
|
+
"@truedat/df": "4.44.2",
|
|
87
87
|
"axios": "^0.19.2",
|
|
88
88
|
"graphql": "^15.5.3",
|
|
89
89
|
"path-to-regexp": "^1.7.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"react-dom": ">= 16.8.6 < 17",
|
|
104
104
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "ca0c5fffcba96736f7a2054f3c37789da8c30a9e"
|
|
107
107
|
}
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
} from "@truedat/core/routes";
|
|
15
15
|
|
|
16
16
|
export const RuleImplementationResultTabs = ({
|
|
17
|
-
rule,
|
|
18
17
|
ruleImplementation,
|
|
19
18
|
ruleResult,
|
|
20
19
|
match,
|
|
@@ -54,28 +53,25 @@ export const RuleImplementationResultTabs = ({
|
|
|
54
53
|
) : null;
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
return _.isEmpty(ruleImplementation)
|
|
58
|
-
|
|
59
|
-
<Menu
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</Menu>
|
|
73
|
-
</>
|
|
56
|
+
return _.isEmpty(ruleImplementation) ? null : (
|
|
57
|
+
<Menu attached="top" pointing secondary tabular>
|
|
58
|
+
<Menu.Item
|
|
59
|
+
active={match.path === IMPLEMENTATION_RESULT_DETAILS}
|
|
60
|
+
as={Link}
|
|
61
|
+
to={linkTo.IMPLEMENTATION_RESULT_DETAILS({
|
|
62
|
+
implementation_id: ruleImplementation.id,
|
|
63
|
+
rule_result_id: ruleResult.id,
|
|
64
|
+
})}
|
|
65
|
+
>
|
|
66
|
+
<FormattedMessage id="tabs.dq.ruleImplementationResult.info" />
|
|
67
|
+
</Menu.Item>
|
|
68
|
+
{renderSegmentResult()}
|
|
69
|
+
{renderRemediationPlan()}
|
|
70
|
+
</Menu>
|
|
74
71
|
);
|
|
75
72
|
};
|
|
76
73
|
|
|
77
74
|
RuleImplementationResultTabs.propTypes = {
|
|
78
|
-
rule: PropTypes.object,
|
|
79
75
|
ruleResult: PropTypes.object,
|
|
80
76
|
ruleImplementation: PropTypes.object,
|
|
81
77
|
match: PropTypes.object,
|
|
@@ -83,12 +79,11 @@ RuleImplementationResultTabs.propTypes = {
|
|
|
83
79
|
templates: PropTypes.array,
|
|
84
80
|
};
|
|
85
81
|
|
|
86
|
-
const mapStateToProps = (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
ruleResult: ownProps.ruleResult,
|
|
82
|
+
const mapStateToProps = ({
|
|
83
|
+
ruleImplementation,
|
|
84
|
+
remediationActions,
|
|
85
|
+
templates,
|
|
86
|
+
}) => ({
|
|
92
87
|
ruleImplementation,
|
|
93
88
|
authCreateRemediation: _.has("create")(remediationActions),
|
|
94
89
|
templates,
|
|
@@ -3,11 +3,7 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import { Link } from "react-router-dom";
|
|
4
4
|
import { linkTo } from "@truedat/core/routes";
|
|
5
5
|
|
|
6
|
-
export const RuleImplementationResultsLink = ({
|
|
7
|
-
id,
|
|
8
|
-
implementation_key,
|
|
9
|
-
rule_id,
|
|
10
|
-
}) => (
|
|
6
|
+
export const RuleImplementationResultsLink = ({ id, implementation_key }) => (
|
|
11
7
|
<Link
|
|
12
8
|
to={linkTo.IMPLEMENTATION_RESULTS({
|
|
13
9
|
implementation_id: id,
|
|
@@ -20,7 +16,6 @@ export const RuleImplementationResultsLink = ({
|
|
|
20
16
|
RuleImplementationResultsLink.propTypes = {
|
|
21
17
|
id: PropTypes.number,
|
|
22
18
|
implementation_key: PropTypes.string,
|
|
23
|
-
rule_id: PropTypes.number,
|
|
24
19
|
};
|
|
25
20
|
|
|
26
21
|
export default RuleImplementationResultsLink;
|
|
@@ -17,7 +17,6 @@ export const RuleResultSegmentRow = ({
|
|
|
17
17
|
customColumns,
|
|
18
18
|
isAdmin,
|
|
19
19
|
ruleImplementation,
|
|
20
|
-
rule,
|
|
21
20
|
}) => {
|
|
22
21
|
const { formatMessage, formatNumber: _formatNumber } = useIntl();
|
|
23
22
|
const formatNumber = (num) => (_.isNil(num) ? num : _formatNumber(num));
|
|
@@ -57,7 +56,6 @@ export const RuleResultSegmentRow = ({
|
|
|
57
56
|
onConfirm={() =>
|
|
58
57
|
deleteRuleResult({
|
|
59
58
|
id: segmentResult.id,
|
|
60
|
-
rule_id: rule.id,
|
|
61
59
|
rule_implementation_id: ruleImplementation.id,
|
|
62
60
|
})
|
|
63
61
|
}
|
|
@@ -73,7 +71,6 @@ RuleResultSegmentRow.propTypes = {
|
|
|
73
71
|
deleteRuleResult: PropTypes.func,
|
|
74
72
|
isAdmin: PropTypes.bool,
|
|
75
73
|
optionalColumns: PropTypes.array,
|
|
76
|
-
rule: PropTypes.object,
|
|
77
74
|
ruleImplementation: PropTypes.object,
|
|
78
75
|
segmentResult: PropTypes.object,
|
|
79
76
|
};
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { connect } from "react-redux";
|
|
6
|
-
import { Table, Message
|
|
6
|
+
import { Table, Message } from "semantic-ui-react";
|
|
7
7
|
import { columnDecorator } from "@truedat/core/services";
|
|
8
8
|
import { getSegmentResultsColumns } from "../selectors";
|
|
9
9
|
import RuleResultSegmentRow from "./RuleResultSegmentRow";
|
|
@@ -21,7 +21,6 @@ export const getCustomColumnsWithData = (segmentResults, columns) =>
|
|
|
21
21
|
)(columns);
|
|
22
22
|
|
|
23
23
|
export const RuleResultSegments = ({
|
|
24
|
-
rule,
|
|
25
24
|
isAdmin,
|
|
26
25
|
ruleImplementation,
|
|
27
26
|
customColumns,
|
|
@@ -31,7 +30,7 @@ export const RuleResultSegments = ({
|
|
|
31
30
|
|
|
32
31
|
const optionalColumns = getOptionalColumnsWithData(segmentResults);
|
|
33
32
|
|
|
34
|
-
if (_.isEmpty(
|
|
33
|
+
if (_.isEmpty(segmentResults)) return null;
|
|
35
34
|
|
|
36
35
|
return (
|
|
37
36
|
<>
|
|
@@ -84,7 +83,6 @@ export const RuleResultSegments = ({
|
|
|
84
83
|
customColumns={customColumns}
|
|
85
84
|
isAdmin={isAdmin}
|
|
86
85
|
ruleImplementation={ruleImplementation}
|
|
87
|
-
rule={rule}
|
|
88
86
|
/>
|
|
89
87
|
))}
|
|
90
88
|
</Table.Body>
|
|
@@ -96,14 +94,12 @@ export const RuleResultSegments = ({
|
|
|
96
94
|
|
|
97
95
|
RuleResultSegments.propTypes = {
|
|
98
96
|
ruleImplementation: PropTypes.object,
|
|
99
|
-
rule: PropTypes.object,
|
|
100
97
|
segmentResults: PropTypes.object,
|
|
101
98
|
customColumns: PropTypes.array,
|
|
102
99
|
isAdmin: PropTypes.bool,
|
|
103
100
|
};
|
|
104
101
|
|
|
105
102
|
const mapStateToProps = (state) => ({
|
|
106
|
-
rule: state.rule,
|
|
107
103
|
ruleImplementation: state.ruleImplementation,
|
|
108
104
|
segmentResults: state.segmentResults,
|
|
109
105
|
customColumns: getCustomColumnsWithData(
|
|
@@ -3,7 +3,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
3
3
|
import { apiJsonDelete, JSON_OPTS } from "@truedat/core/services/api";
|
|
4
4
|
import {
|
|
5
5
|
deleteRuleResultSaga,
|
|
6
|
-
deleteRuleResultRequestSaga
|
|
6
|
+
deleteRuleResultRequestSaga,
|
|
7
7
|
} from "../deleteRuleResult";
|
|
8
8
|
import { deleteRuleResult } from "../../routines";
|
|
9
9
|
import { API_RULE_RESULT } from "../../api";
|
|
@@ -29,7 +29,7 @@ describe("sagas: deleteRuleResultRequestSaga", () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
describe("sagas: deleteRuleResultSaga", () => {
|
|
32
|
-
const payload = { id: 1,
|
|
32
|
+
const payload = { id: 1, rule_implementation_id: 3 };
|
|
33
33
|
const { id } = payload;
|
|
34
34
|
const url = compile(API_RULE_RESULT)({ id });
|
|
35
35
|
|
|
@@ -41,9 +41,7 @@ describe("sagas: deleteRuleResultSaga", () => {
|
|
|
41
41
|
.next()
|
|
42
42
|
.call(apiJsonDelete, url, JSON_OPTS)
|
|
43
43
|
.next({ data: payload })
|
|
44
|
-
.put(
|
|
45
|
-
deleteRuleResult.success({ rule_id: 2, rule_implementation_id: 3 })
|
|
46
|
-
)
|
|
44
|
+
.put(deleteRuleResult.success({ rule_implementation_id: 3 }))
|
|
47
45
|
.next()
|
|
48
46
|
.put(deleteRuleResult.fulfill())
|
|
49
47
|
.next()
|
|
@@ -8,16 +8,11 @@ const toApiPath = compile(API_RULE_RESULT);
|
|
|
8
8
|
|
|
9
9
|
export function* deleteRuleResultSaga({ payload }) {
|
|
10
10
|
try {
|
|
11
|
-
const { id,
|
|
11
|
+
const { id, rule_implementation_id } = payload;
|
|
12
12
|
const url = toApiPath({ id });
|
|
13
13
|
yield put(deleteRuleResult.request());
|
|
14
14
|
yield call(apiJsonDelete, url, JSON_OPTS);
|
|
15
|
-
yield put(
|
|
16
|
-
deleteRuleResult.success({
|
|
17
|
-
rule_id: rule_id,
|
|
18
|
-
rule_implementation_id: rule_implementation_id
|
|
19
|
-
})
|
|
20
|
-
);
|
|
15
|
+
yield put(deleteRuleResult.success({ rule_implementation_id }));
|
|
21
16
|
} catch (error) {
|
|
22
17
|
if (error.response) {
|
|
23
18
|
const { status, data } = error.response;
|