@truedat/dq 4.54.3 → 4.54.4
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/ImplementationResultBar.js +13 -0
- package/src/components/RuleImplementationsDownload.js +2 -0
- package/src/components/RuleResultDecorator.js +22 -7
- package/src/components/RuleResultDetails.js +14 -5
- package/src/components/RuleResultRow.js +14 -5
- package/src/components/RuleSummary.js +27 -4
- package/src/components/Subscription.js +11 -0
- package/src/components/__tests__/RuleResultDecorator.spec.js +17 -0
- package/src/components/__tests__/RuleResultDetails.spec.js +40 -0
- package/src/components/__tests__/RuleResultRow.spec.js +25 -0
- package/src/components/__tests__/RuleSummary.spec.js +13 -3
- package/src/components/__tests__/__snapshots__/RuleResultDecorator.spec.js.snap +10 -0
- package/src/components/__tests__/__snapshots__/RuleResultDetails.spec.js.snap +93 -0
- package/src/components/__tests__/__snapshots__/RuleSummary.spec.js.snap +27 -17
- package/src/components/__tests__/__snapshots__/Subscription.spec.js.snap +20 -0
- package/src/functions/selectors.js +2 -1
- package/src/messages/en.js +4 -0
- package/src/messages/es.js +4 -0
- package/src/styles/ruleSummary.less +3 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.54.
|
|
3
|
+
"version": "4.54.4",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.4",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.54.
|
|
37
|
+
"@truedat/test": "4.54.4",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@apollo/client": "^3.7.0",
|
|
96
|
-
"@truedat/core": "4.54.
|
|
97
|
-
"@truedat/df": "4.54.
|
|
96
|
+
"@truedat/core": "4.54.4",
|
|
97
|
+
"@truedat/df": "4.54.4",
|
|
98
98
|
"graphql": "^15.5.3",
|
|
99
99
|
"path-to-regexp": "^1.7.0",
|
|
100
100
|
"prop-types": "^15.8.1",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"react-dom": ">= 16.8.6 < 17",
|
|
115
115
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "065f4870d4b2195564585d7d70fec26b475f337a"
|
|
118
118
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import { DateTime } from "@truedat/core/components/DateTime";
|
|
4
5
|
import { Popup } from "semantic-ui-react";
|
|
5
6
|
import { Link } from "react-router-dom";
|
|
6
7
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
@@ -17,6 +18,14 @@ export default function ImplementationResultBar({ implementation }) {
|
|
|
17
18
|
color: "failed",
|
|
18
19
|
resultText: intl.formatMessage({ id: "quality.error" }),
|
|
19
20
|
}
|
|
21
|
+
: ruleResult?.records === 0
|
|
22
|
+
? {
|
|
23
|
+
color: "empyDataset",
|
|
24
|
+
resultText: intl.formatMessage(
|
|
25
|
+
{ id: `quality.result.empty_dataset.date` },
|
|
26
|
+
{ date: <DateTime value={ruleResult.date} /> }
|
|
27
|
+
),
|
|
28
|
+
}
|
|
20
29
|
: calculateResultDecoration({
|
|
21
30
|
ruleResult,
|
|
22
31
|
ruleImplementation: implementation,
|
|
@@ -41,6 +50,10 @@ export default function ImplementationResultBar({ implementation }) {
|
|
|
41
50
|
className: "not-executed-color",
|
|
42
51
|
tooltip: "no_execution",
|
|
43
52
|
},
|
|
53
|
+
empyDataset: {
|
|
54
|
+
className: "empty-dataset-color",
|
|
55
|
+
tooltip: "empty_dataset",
|
|
56
|
+
},
|
|
44
57
|
failed: {
|
|
45
58
|
className: "failed-color",
|
|
46
59
|
tooltip: "failed",
|
|
@@ -26,7 +26,9 @@ const staticContentLabels = [
|
|
|
26
26
|
"quality_result.under_minimum",
|
|
27
27
|
"quality_result.under_goal",
|
|
28
28
|
"quality_result.over_goal",
|
|
29
|
+
"quality_result.failed",
|
|
29
30
|
"quality_result.no_execution",
|
|
31
|
+
"quality_result.empty_dataset",
|
|
30
32
|
"executable.true",
|
|
31
33
|
"executable.false",
|
|
32
34
|
];
|
|
@@ -26,6 +26,15 @@ export const calculateResultDecoration = ({
|
|
|
26
26
|
color: "red",
|
|
27
27
|
resultText,
|
|
28
28
|
};
|
|
29
|
+
} else if (ruleResult?.records === 0) {
|
|
30
|
+
const resultText = formatMessage({ id: "quality_result.empty_dataset" });
|
|
31
|
+
return {
|
|
32
|
+
iconName: "warning circle",
|
|
33
|
+
resultText: resultText,
|
|
34
|
+
color: "grey",
|
|
35
|
+
resultText,
|
|
36
|
+
inverted: true,
|
|
37
|
+
};
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
const { resultType, result_type } = ruleImplementation;
|
|
@@ -62,16 +71,22 @@ export const RuleResultDecorator = ({
|
|
|
62
71
|
if (nilResult(ruleResult) && isNil(date)) {
|
|
63
72
|
return null;
|
|
64
73
|
}
|
|
65
|
-
const { iconName, color, resultText, iconTitle } =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
const { iconName, color, resultText, iconTitle, inverted } =
|
|
75
|
+
calculateResultDecoration({
|
|
76
|
+
ruleResult,
|
|
77
|
+
ruleImplementation,
|
|
78
|
+
date,
|
|
79
|
+
intl,
|
|
80
|
+
});
|
|
71
81
|
|
|
72
82
|
return (
|
|
73
83
|
<>
|
|
74
|
-
<Icon
|
|
84
|
+
<Icon
|
|
85
|
+
inverted={inverted}
|
|
86
|
+
name={iconName}
|
|
87
|
+
title={iconTitle}
|
|
88
|
+
color={color}
|
|
89
|
+
/>
|
|
75
90
|
{resultText}
|
|
76
91
|
</>
|
|
77
92
|
);
|
|
@@ -18,11 +18,20 @@ const GeneralInformation = ({ ruleImplementation, ruleResult }) => {
|
|
|
18
18
|
{formatMessage({ id: "ruleResult.props.quality" })}
|
|
19
19
|
</Table.Cell>
|
|
20
20
|
<Table.Cell>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
{ruleResult.records === 0 ? (
|
|
22
|
+
<>
|
|
23
|
+
<Icon inverted color="grey" name="warning circle" />
|
|
24
|
+
{formatMessage({ id: "quality_result.empty_dataset" })}
|
|
25
|
+
</>
|
|
26
|
+
) : (
|
|
27
|
+
<>
|
|
28
|
+
<Icon
|
|
29
|
+
name="circle"
|
|
30
|
+
color={selectColor({ ...ruleImplementation, ...ruleResult })}
|
|
31
|
+
/>
|
|
32
|
+
{`${parseFloat(ruleResult.result)} %`}
|
|
33
|
+
</>
|
|
34
|
+
)}
|
|
26
35
|
</Table.Cell>
|
|
27
36
|
</Table.Row>
|
|
28
37
|
|
|
@@ -70,11 +70,20 @@ export const RuleResultRow = ({
|
|
|
70
70
|
</Link>
|
|
71
71
|
</Table.Cell>
|
|
72
72
|
<Table.Cell>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
{ruleResult.records === 0 ? (
|
|
74
|
+
<>
|
|
75
|
+
<Icon inverted color="grey" name="warning circle" />
|
|
76
|
+
{formatMessage({ id: "quality_result.empty_dataset" })}
|
|
77
|
+
</>
|
|
78
|
+
) : (
|
|
79
|
+
<>
|
|
80
|
+
<Icon
|
|
81
|
+
name="circle"
|
|
82
|
+
color={selectColor({ ...ruleImplementation, ...ruleResult })}
|
|
83
|
+
/>
|
|
84
|
+
{`${parseFloat(ruleResult.result)} %`}
|
|
85
|
+
</>
|
|
86
|
+
)}
|
|
78
87
|
</Table.Cell>
|
|
79
88
|
{_.includes("records")(optionalColumns) ? (
|
|
80
89
|
<Table.Cell>{formatNumber(ruleResult.records)}</Table.Cell>
|
|
@@ -26,15 +26,23 @@ const mapSummary = (implementations) => {
|
|
|
26
26
|
goal,
|
|
27
27
|
minimum,
|
|
28
28
|
result_type,
|
|
29
|
-
execution_result_info: { errors, result },
|
|
29
|
+
execution_result_info: { errors, result, records },
|
|
30
30
|
} = implementation;
|
|
31
|
-
const color = selectColor({
|
|
31
|
+
const color = selectColor({
|
|
32
|
+
errors,
|
|
33
|
+
result,
|
|
34
|
+
minimum,
|
|
35
|
+
goal,
|
|
36
|
+
result_type,
|
|
37
|
+
records,
|
|
38
|
+
});
|
|
32
39
|
return _.set(color, summary[color] + 1)(summary);
|
|
33
40
|
},
|
|
34
41
|
{
|
|
35
42
|
green: 0,
|
|
36
43
|
yellow: 0,
|
|
37
44
|
red: 0,
|
|
45
|
+
grey: 0,
|
|
38
46
|
}
|
|
39
47
|
)(executedImplementations);
|
|
40
48
|
return {
|
|
@@ -43,6 +51,7 @@ const mapSummary = (implementations) => {
|
|
|
43
51
|
overGoal: quality.green,
|
|
44
52
|
underGoal: quality.yellow,
|
|
45
53
|
underMinimum: quality.red,
|
|
54
|
+
emptyDataset: quality.grey,
|
|
46
55
|
};
|
|
47
56
|
};
|
|
48
57
|
|
|
@@ -117,6 +126,12 @@ const SummaryBars = (props) => {
|
|
|
117
126
|
className: "failed-color",
|
|
118
127
|
tooltip: "failed",
|
|
119
128
|
})}
|
|
129
|
+
{SummaryBar({
|
|
130
|
+
...props,
|
|
131
|
+
key: "emptyDataset",
|
|
132
|
+
className: "empty-dataset-color",
|
|
133
|
+
tooltip: "empty_dataset",
|
|
134
|
+
})}
|
|
120
135
|
</div>
|
|
121
136
|
);
|
|
122
137
|
};
|
|
@@ -125,8 +140,16 @@ export const RuleSummary = ({ implementations }) => {
|
|
|
125
140
|
const [showPercentages, setShowPercentages] = useState(true);
|
|
126
141
|
|
|
127
142
|
const summary = mapSummary(implementations);
|
|
128
|
-
const {
|
|
129
|
-
|
|
143
|
+
const {
|
|
144
|
+
overGoal,
|
|
145
|
+
underGoal,
|
|
146
|
+
underMinimum,
|
|
147
|
+
notExecuted,
|
|
148
|
+
failed,
|
|
149
|
+
emptyDataset,
|
|
150
|
+
} = summary;
|
|
151
|
+
const total =
|
|
152
|
+
notExecuted + failed + overGoal + underGoal + underMinimum + emptyDataset;
|
|
130
153
|
|
|
131
154
|
const percentages = _.mapValues((value) => (value / total) * 100)(summary);
|
|
132
155
|
|
|
@@ -63,6 +63,17 @@ export const SubscriptionContent = ({ subscription, setSubscription }) => {
|
|
|
63
63
|
checked={_.includes("fail")(statuses)}
|
|
64
64
|
onChange={handleEventTypeChange}
|
|
65
65
|
/>
|
|
66
|
+
<Form.Checkbox
|
|
67
|
+
name="empty_dataset"
|
|
68
|
+
label={
|
|
69
|
+
<label>
|
|
70
|
+
<Icon inverted color="grey" name="warning circle" />
|
|
71
|
+
<FormattedMessage id="subscriptions.status.empty_dataset" />
|
|
72
|
+
</label>
|
|
73
|
+
}
|
|
74
|
+
checked={_.includes("empty_dataset")(statuses)}
|
|
75
|
+
onChange={handleEventTypeChange}
|
|
76
|
+
/>
|
|
66
77
|
<Form.Checkbox
|
|
67
78
|
name="error"
|
|
68
79
|
label={
|
|
@@ -43,6 +43,23 @@ describe("<RuleResultDecorator />", () => {
|
|
|
43
43
|
expect(queryByTitle("no_data")).toBeInTheDocument();
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
+
it("decorates a empty dataset result", () => {
|
|
47
|
+
const ruleImplementation = { resultType: "percentage" };
|
|
48
|
+
const props = {
|
|
49
|
+
ruleResult: {
|
|
50
|
+
result: 0,
|
|
51
|
+
records: 0,
|
|
52
|
+
errors: 0,
|
|
53
|
+
result_text: "Empty dataset",
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
const { container } = render(
|
|
57
|
+
<RuleResultDecorator ruleImplementation={ruleImplementation} {...props} />
|
|
58
|
+
);
|
|
59
|
+
expect(container).toMatchSnapshot();
|
|
60
|
+
expect(container).toHaveTextContent("Empty dataset");
|
|
61
|
+
});
|
|
62
|
+
|
|
46
63
|
it("handles missing execution result", () => {
|
|
47
64
|
const { container } = render(<RuleResultDecorator />);
|
|
48
65
|
expect(container).toBeEmptyDOMElement();
|
|
@@ -71,6 +71,46 @@ describe("<RuleResultDetails>", () => {
|
|
|
71
71
|
expect(getByText("Base64_value")).toBeInTheDocument();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
it("with empty datset", () => {
|
|
75
|
+
const props = _.update("ruleResult", () => ({
|
|
76
|
+
result: "0",
|
|
77
|
+
records: 0,
|
|
78
|
+
date: "2022-06-24",
|
|
79
|
+
errors: 0,
|
|
80
|
+
hasSegments: false,
|
|
81
|
+
}))(commonProps);
|
|
82
|
+
|
|
83
|
+
const { container } = render(
|
|
84
|
+
<Suspense fallback={null}>
|
|
85
|
+
<RuleResultDetails {...props} />
|
|
86
|
+
</Suspense>,
|
|
87
|
+
renderOpts
|
|
88
|
+
);
|
|
89
|
+
expect(container).toMatchSnapshot();
|
|
90
|
+
expect(container).toHaveTextContent("Empty dataset");
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("with empty ruleResult", () => {
|
|
94
|
+
const props = {
|
|
95
|
+
ruleImplementation: {
|
|
96
|
+
id: 1,
|
|
97
|
+
implementation_key: "key",
|
|
98
|
+
minimum: 10,
|
|
99
|
+
goal: 20,
|
|
100
|
+
resultType: "percentage",
|
|
101
|
+
},
|
|
102
|
+
ruleResult: {},
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const { container } = render(
|
|
106
|
+
<Suspense fallback={null}>
|
|
107
|
+
<RuleResultDetails {...props} />
|
|
108
|
+
</Suspense>,
|
|
109
|
+
renderOpts
|
|
110
|
+
);
|
|
111
|
+
expect(container).toMatchSnapshot();
|
|
112
|
+
});
|
|
113
|
+
|
|
74
114
|
it("without details", () => {
|
|
75
115
|
const { container } = render(
|
|
76
116
|
<Suspense fallback={null}>
|
|
@@ -120,6 +120,31 @@ describe("<RuleResultRow />", () => {
|
|
|
120
120
|
).toBeInTheDocument();
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
+
it("grey icon when result is empty dataset", () => {
|
|
124
|
+
const props = {
|
|
125
|
+
rule: { id: 10 },
|
|
126
|
+
ruleImplementation: {
|
|
127
|
+
id: 23,
|
|
128
|
+
minimum: 81,
|
|
129
|
+
goal: 90,
|
|
130
|
+
resultType: "percentage",
|
|
131
|
+
},
|
|
132
|
+
ruleResult: { id: 54, result: 0, records: 0 },
|
|
133
|
+
date: "2019-08-12T02:00:00Z",
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const { container } = render(
|
|
137
|
+
<table>
|
|
138
|
+
<tbody>
|
|
139
|
+
<RuleResultRow {...props} />
|
|
140
|
+
</tbody>
|
|
141
|
+
</table>
|
|
142
|
+
);
|
|
143
|
+
expect(
|
|
144
|
+
container.querySelector("td > i.grey.circle.icon")
|
|
145
|
+
).toBeInTheDocument();
|
|
146
|
+
});
|
|
147
|
+
|
|
123
148
|
it("renders delete cell in RuleResultRow when user is admin", () => {
|
|
124
149
|
const props = {
|
|
125
150
|
rule: { id: 10 },
|
|
@@ -39,6 +39,16 @@ describe("<RuleSummary />", () => {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
const emptyDataset = {
|
|
43
|
+
...implementationLimits,
|
|
44
|
+
execution_result_info: {
|
|
45
|
+
date: "2021-07-19T00:01:20Z",
|
|
46
|
+
records: 0,
|
|
47
|
+
result: "0",
|
|
48
|
+
result_text: "quality_result.empty_dataset",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
42
52
|
it("render 100% overGoal implementations", () => {
|
|
43
53
|
const props = {
|
|
44
54
|
implementations: [overGoalExecution],
|
|
@@ -61,13 +71,13 @@ describe("<RuleSummary />", () => {
|
|
|
61
71
|
expect(container).toHaveTextContent("33%");
|
|
62
72
|
});
|
|
63
73
|
|
|
64
|
-
it("render
|
|
74
|
+
it("render 25% not executed, failed implementations and empty_dataset", () => {
|
|
65
75
|
const props = {
|
|
66
|
-
implementations: [notExecuted, failedExecution],
|
|
76
|
+
implementations: [notExecuted, failedExecution, emptyDataset],
|
|
67
77
|
};
|
|
68
78
|
const { container } = render(<RuleSummary {...props} />);
|
|
69
79
|
expect(container).toMatchSnapshot();
|
|
70
|
-
expect(container).toHaveTextContent("
|
|
80
|
+
expect(container).toHaveTextContent("25%");
|
|
71
81
|
});
|
|
72
82
|
|
|
73
83
|
it("render without implementations", () => {
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`<RuleResultDecorator /> decorates a empty dataset result 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<i
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
class="grey warning circle inverted icon"
|
|
8
|
+
/>
|
|
9
|
+
Empty dataset
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
|
|
3
13
|
exports[`<RuleResultDecorator /> decorates a percentage result 1`] = `
|
|
4
14
|
<div>
|
|
5
15
|
<i
|
|
@@ -123,6 +123,99 @@ exports[`<RuleResultDetails> matches the latest snapshot 1`] = `
|
|
|
123
123
|
</div>
|
|
124
124
|
`;
|
|
125
125
|
|
|
126
|
+
exports[`<RuleResultDetails> with empty datset 1`] = `
|
|
127
|
+
<div>
|
|
128
|
+
<table
|
|
129
|
+
class="ui table implementation-results medium"
|
|
130
|
+
>
|
|
131
|
+
<thead
|
|
132
|
+
class=""
|
|
133
|
+
>
|
|
134
|
+
<tr
|
|
135
|
+
class=""
|
|
136
|
+
>
|
|
137
|
+
<th
|
|
138
|
+
class=""
|
|
139
|
+
colspan="2"
|
|
140
|
+
>
|
|
141
|
+
Information
|
|
142
|
+
</th>
|
|
143
|
+
</tr>
|
|
144
|
+
</thead>
|
|
145
|
+
<tbody
|
|
146
|
+
class=""
|
|
147
|
+
>
|
|
148
|
+
<tr
|
|
149
|
+
class=""
|
|
150
|
+
>
|
|
151
|
+
<td
|
|
152
|
+
class=""
|
|
153
|
+
>
|
|
154
|
+
Quality
|
|
155
|
+
</td>
|
|
156
|
+
<td
|
|
157
|
+
class=""
|
|
158
|
+
>
|
|
159
|
+
<i
|
|
160
|
+
aria-hidden="true"
|
|
161
|
+
class="grey warning circle inverted icon"
|
|
162
|
+
/>
|
|
163
|
+
Empty dataset
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr
|
|
167
|
+
class=""
|
|
168
|
+
>
|
|
169
|
+
<td
|
|
170
|
+
class=""
|
|
171
|
+
>
|
|
172
|
+
Date
|
|
173
|
+
</td>
|
|
174
|
+
<td
|
|
175
|
+
class=""
|
|
176
|
+
>
|
|
177
|
+
<time
|
|
178
|
+
datetime="1656028800000"
|
|
179
|
+
>
|
|
180
|
+
2022-06-24 00:00
|
|
181
|
+
</time>
|
|
182
|
+
</td>
|
|
183
|
+
</tr>
|
|
184
|
+
<tr
|
|
185
|
+
class=""
|
|
186
|
+
>
|
|
187
|
+
<td
|
|
188
|
+
class=""
|
|
189
|
+
>
|
|
190
|
+
Records
|
|
191
|
+
</td>
|
|
192
|
+
<td
|
|
193
|
+
class=""
|
|
194
|
+
>
|
|
195
|
+
0
|
|
196
|
+
</td>
|
|
197
|
+
</tr>
|
|
198
|
+
<tr
|
|
199
|
+
class=""
|
|
200
|
+
>
|
|
201
|
+
<td
|
|
202
|
+
class=""
|
|
203
|
+
>
|
|
204
|
+
Errors
|
|
205
|
+
</td>
|
|
206
|
+
<td
|
|
207
|
+
class=""
|
|
208
|
+
>
|
|
209
|
+
0
|
|
210
|
+
</td>
|
|
211
|
+
</tr>
|
|
212
|
+
</tbody>
|
|
213
|
+
</table>
|
|
214
|
+
</div>
|
|
215
|
+
`;
|
|
216
|
+
|
|
217
|
+
exports[`<RuleResultDetails> with empty ruleResult 1`] = `<div />`;
|
|
218
|
+
|
|
126
219
|
exports[`<RuleResultDetails> without details 1`] = `
|
|
127
220
|
<div>
|
|
128
221
|
<table
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`<RuleSummary /> render
|
|
3
|
+
exports[`<RuleSummary /> render 25% not executed, failed implementations and empty_dataset 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
@@ -10,33 +10,33 @@ exports[`<RuleSummary /> render 33% overGoal, underGoal, underMinimum implementa
|
|
|
10
10
|
class="rule-summary"
|
|
11
11
|
>
|
|
12
12
|
<span
|
|
13
|
-
class="
|
|
14
|
-
style="width:
|
|
13
|
+
class="not-executed-color"
|
|
14
|
+
style="width: 25%;"
|
|
15
15
|
>
|
|
16
16
|
<span
|
|
17
17
|
class="value"
|
|
18
18
|
>
|
|
19
|
-
|
|
19
|
+
25%
|
|
20
20
|
</span>
|
|
21
21
|
</span>
|
|
22
22
|
<span
|
|
23
|
-
class="
|
|
24
|
-
style="width:
|
|
23
|
+
class="failed-color"
|
|
24
|
+
style="width: 25%;"
|
|
25
25
|
>
|
|
26
26
|
<span
|
|
27
27
|
class="value"
|
|
28
28
|
>
|
|
29
|
-
|
|
29
|
+
25%
|
|
30
30
|
</span>
|
|
31
31
|
</span>
|
|
32
32
|
<span
|
|
33
|
-
class="
|
|
34
|
-
style="width:
|
|
33
|
+
class="empty-dataset-color"
|
|
34
|
+
style="width: 50%;"
|
|
35
35
|
>
|
|
36
36
|
<span
|
|
37
37
|
class="value"
|
|
38
38
|
>
|
|
39
|
-
|
|
39
|
+
50%
|
|
40
40
|
</span>
|
|
41
41
|
</span>
|
|
42
42
|
</div>
|
|
@@ -45,7 +45,7 @@ exports[`<RuleSummary /> render 33% overGoal, underGoal, underMinimum implementa
|
|
|
45
45
|
</div>
|
|
46
46
|
`;
|
|
47
47
|
|
|
48
|
-
exports[`<RuleSummary /> render
|
|
48
|
+
exports[`<RuleSummary /> render 33% overGoal, underGoal, underMinimum implementations 1`] = `
|
|
49
49
|
<div>
|
|
50
50
|
<div>
|
|
51
51
|
<div
|
|
@@ -55,23 +55,33 @@ exports[`<RuleSummary /> render 50% not executed, failed implementations 1`] = `
|
|
|
55
55
|
class="rule-summary"
|
|
56
56
|
>
|
|
57
57
|
<span
|
|
58
|
-
class="
|
|
59
|
-
style="width:
|
|
58
|
+
class="over-goal-color"
|
|
59
|
+
style="width: 33.33333333333333%;"
|
|
60
60
|
>
|
|
61
61
|
<span
|
|
62
62
|
class="value"
|
|
63
63
|
>
|
|
64
|
-
|
|
64
|
+
33%
|
|
65
65
|
</span>
|
|
66
66
|
</span>
|
|
67
67
|
<span
|
|
68
|
-
class="
|
|
69
|
-
style="width:
|
|
68
|
+
class="under-goal-color"
|
|
69
|
+
style="width: 33.33333333333333%;"
|
|
70
70
|
>
|
|
71
71
|
<span
|
|
72
72
|
class="value"
|
|
73
73
|
>
|
|
74
|
-
|
|
74
|
+
33%
|
|
75
|
+
</span>
|
|
76
|
+
</span>
|
|
77
|
+
<span
|
|
78
|
+
class="under-minimum-color"
|
|
79
|
+
style="width: 33.33333333333333%;"
|
|
80
|
+
>
|
|
81
|
+
<span
|
|
82
|
+
class="value"
|
|
83
|
+
>
|
|
84
|
+
33%
|
|
75
85
|
</span>
|
|
76
86
|
</span>
|
|
77
87
|
</div>
|
|
@@ -156,6 +156,26 @@ exports[`<SubscriptionContent /> matches the latest snapshot 1`] = `
|
|
|
156
156
|
name="fail"
|
|
157
157
|
onChange={[Function]}
|
|
158
158
|
/>
|
|
159
|
+
<FormCheckbox
|
|
160
|
+
as={[Function]}
|
|
161
|
+
checked={false}
|
|
162
|
+
control={[Function]}
|
|
163
|
+
label={
|
|
164
|
+
<label>
|
|
165
|
+
<Icon
|
|
166
|
+
as="i"
|
|
167
|
+
color="grey"
|
|
168
|
+
inverted={true}
|
|
169
|
+
name="warning circle"
|
|
170
|
+
/>
|
|
171
|
+
<Memo(MemoizedFormattedMessage)
|
|
172
|
+
id="subscriptions.status.empty_dataset"
|
|
173
|
+
/>
|
|
174
|
+
</label>
|
|
175
|
+
}
|
|
176
|
+
name="empty_dataset"
|
|
177
|
+
onChange={[Function]}
|
|
178
|
+
/>
|
|
159
179
|
<FormCheckbox
|
|
160
180
|
as={[Function]}
|
|
161
181
|
checked={false}
|
|
@@ -7,9 +7,10 @@ export const selectColor = ({
|
|
|
7
7
|
goal,
|
|
8
8
|
result_type,
|
|
9
9
|
resultType,
|
|
10
|
+
records,
|
|
10
11
|
}) => {
|
|
11
12
|
const type = _.defaultTo(result_type)(resultType);
|
|
12
|
-
if (_.isNil(errors) && _.isNil(result)) return "grey";
|
|
13
|
+
if ((_.isNil(errors) && _.isNil(result)) || records == 0) return "grey";
|
|
13
14
|
else if (type == "percentage") {
|
|
14
15
|
if (result < minimum) {
|
|
15
16
|
return "red";
|
package/src/messages/en.js
CHANGED
|
@@ -129,6 +129,7 @@ export default {
|
|
|
129
129
|
"quality.range.errors_number": "error count",
|
|
130
130
|
"quality.range.percentage": "%",
|
|
131
131
|
"quality.result": "Result",
|
|
132
|
+
"quality.result.empty_dataset.date": "0 records at {date}",
|
|
132
133
|
"quality.result.deviation.date": "{result}% at {date}",
|
|
133
134
|
"quality.result.deviation.description": "{result}%",
|
|
134
135
|
"quality.result.errors_number.date": "{result} errors at {date}",
|
|
@@ -152,6 +153,7 @@ export default {
|
|
|
152
153
|
"quality.thresholds": "Limits",
|
|
153
154
|
"quality.type": "Type",
|
|
154
155
|
"quality.updated_at": "Last changed",
|
|
156
|
+
"quality_result.empty_dataset": "Empty dataset",
|
|
155
157
|
"quality_result.failed": "Failed",
|
|
156
158
|
"quality_result.no_execution": "Not executed",
|
|
157
159
|
"quality_result.over_goal": "Over goal",
|
|
@@ -539,9 +541,11 @@ export default {
|
|
|
539
541
|
"ruleImplementations.props.last_execution_at": "Last Execution",
|
|
540
542
|
"ruleImplementations.props.minimum": "Threshold",
|
|
541
543
|
"ruleImplementations.props.minimum.placeholder": "Threshold value",
|
|
544
|
+
"ruleImplementations.props.quality_result.empty_dataset": "Empty data",
|
|
542
545
|
"ruleImplementations.props.quality_result.no_execution": "Not executed",
|
|
543
546
|
"ruleImplementations.props.quality_result.over_goal": "Over goal",
|
|
544
547
|
"ruleImplementations.props.quality_result.under_goal": "Under goal",
|
|
548
|
+
"ruleImplementations.props.quality_result.failed": "Failed",
|
|
545
549
|
"ruleImplementations.props.quality_result.under_minimum": "Under threshold",
|
|
546
550
|
"ruleImplementations.props.result": "Quality",
|
|
547
551
|
"ruleImplementations.props.result_type": "Result Type",
|
package/src/messages/es.js
CHANGED
|
@@ -133,6 +133,7 @@ export default {
|
|
|
133
133
|
"quality.range.errors_number": "errores",
|
|
134
134
|
"quality.range.percentage": "%",
|
|
135
135
|
"quality.result": "Resultado",
|
|
136
|
+
"quality.result.empty_dataset.date": "Sin datos a {date}",
|
|
136
137
|
"quality.result.deviation.date": "{result}% de precisión a {date}",
|
|
137
138
|
"quality.result.deviation.description": "{result}%",
|
|
138
139
|
"quality.result.errors_number.date": "{result} errores a {date}",
|
|
@@ -157,6 +158,7 @@ export default {
|
|
|
157
158
|
"quality.type": "Tipo",
|
|
158
159
|
"quality.updated_at": "Último cambio",
|
|
159
160
|
"quality_result.failed": "Fallida",
|
|
161
|
+
"quality_result.empty_dataset": "Sin datos",
|
|
160
162
|
"quality_result.no_execution": "No ejecutada",
|
|
161
163
|
"quality_result.over_goal": "Cumple el objetivo",
|
|
162
164
|
"quality_result.under_goal": "Por debajo del objetivo",
|
|
@@ -555,10 +557,12 @@ export default {
|
|
|
555
557
|
"ruleImplementations.props.last_execution_at": "Última ejecución",
|
|
556
558
|
"ruleImplementations.props.minimum": "Valor umbral",
|
|
557
559
|
"ruleImplementations.props.minimum.placeholder": "Umbral",
|
|
560
|
+
"ruleImplementations.props.quality_result.empty_dataset": "Sin datos",
|
|
558
561
|
"ruleImplementations.props.quality_result.no_execution": "No ejecutada",
|
|
559
562
|
"ruleImplementations.props.quality_result.over_goal": "Cumple el objetivo",
|
|
560
563
|
"ruleImplementations.props.quality_result.under_goal":
|
|
561
564
|
"Por debajo del objetivo",
|
|
565
|
+
"ruleImplementations.props.quality_result.failed": "Fallida",
|
|
562
566
|
"ruleImplementations.props.quality_result.under_minimum":
|
|
563
567
|
"Por debajo del umbral",
|
|
564
568
|
"ruleImplementations.props.result": "Calidad",
|