@truedat/dq 4.52.3 → 4.52.5
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 +4 -0
- package/package.json +4 -4
- package/src/components/ImplementationSummary.js +10 -1
- package/src/components/JoinTypeIcon.js +51 -0
- package/src/components/ruleImplementationForm/DatasetForm.js +14 -3
- package/src/messages/en.js +5 -3
- package/src/messages/es.js +5 -3
- package/src/styles/JoinTypeIcon.less +35 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.52.
|
|
3
|
+
"version": "4.52.5",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@apollo/client": "^3.6.4",
|
|
96
|
-
"@truedat/core": "4.52.
|
|
97
|
-
"@truedat/df": "4.52.
|
|
96
|
+
"@truedat/core": "4.52.5",
|
|
97
|
+
"@truedat/df": "4.52.5",
|
|
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": "6dd96a3f576251beb2a3a9d6259b1bf187635f1b"
|
|
118
118
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import { Header, Icon, Table, Segment
|
|
4
|
+
import { Header, Icon, List, Table, Segment } from "semantic-ui-react";
|
|
5
5
|
import { Link } from "react-router-dom";
|
|
6
6
|
import { FormattedMessage } from "react-intl";
|
|
7
7
|
import { linkTo } from "@truedat/core/routes";
|
|
8
8
|
import ConditionSummary, { empty, path } from "./ConditionSummary";
|
|
9
9
|
import FieldSummary from "./FieldSummary";
|
|
10
10
|
import InformationSummary from "./InformationSummary";
|
|
11
|
+
import { JoinTypeIcon } from "./JoinTypeIcon";
|
|
11
12
|
import "../styles/ImplementationSummary.less";
|
|
12
13
|
|
|
13
14
|
const defaults = [
|
|
@@ -63,6 +64,14 @@ const UnionSummary = ({ alias, row }) => {
|
|
|
63
64
|
return empty(row) || !(row?.clauses && _.size(row?.clauses) > 0) ? null : (
|
|
64
65
|
<List id="union-list">
|
|
65
66
|
<List.Item>
|
|
67
|
+
{_.has("join_type")(row) ? (
|
|
68
|
+
<>
|
|
69
|
+
<List.Header>
|
|
70
|
+
<FormattedMessage id="structureSelector.union.type" />
|
|
71
|
+
</List.Header>
|
|
72
|
+
<JoinTypeIcon type={row.join_type} />
|
|
73
|
+
</>
|
|
74
|
+
) : null}
|
|
66
75
|
<List.Header>
|
|
67
76
|
<FormattedMessage id="structureSelector.union.criteria" />
|
|
68
77
|
</List.Header>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
export const JoinTypeIcon = ({ type }) => {
|
|
5
|
+
switch (type) {
|
|
6
|
+
case "inner":
|
|
7
|
+
return (
|
|
8
|
+
<div className="join_type">
|
|
9
|
+
<div className="circle circle-left">
|
|
10
|
+
<div className="circle circle-center fill"></div>
|
|
11
|
+
</div>
|
|
12
|
+
<div className="circle circle-right"></div>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
case "left":
|
|
16
|
+
return (
|
|
17
|
+
<div className="join_type">
|
|
18
|
+
<div className="circle circle-left fill">
|
|
19
|
+
<div className="circle circle-center fill"></div>
|
|
20
|
+
</div>
|
|
21
|
+
<div className="circle circle-right"></div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
case "right":
|
|
25
|
+
return (
|
|
26
|
+
<div className="join_type">
|
|
27
|
+
<div className="circle circle-left">
|
|
28
|
+
<div className="circle circle-center fill"></div>
|
|
29
|
+
</div>
|
|
30
|
+
<div className="circle circle-right fill"></div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
case "full_outer":
|
|
34
|
+
return (
|
|
35
|
+
<div className="join_type">
|
|
36
|
+
<div className="circle circle-left fill">
|
|
37
|
+
<div className="circle circle-center fill"></div>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="circle circle-right fill"></div>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
default:
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
JoinTypeIcon.propTypes = {
|
|
48
|
+
type: PropTypes.string.isRequired,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default JoinTypeIcon;
|
|
@@ -44,7 +44,12 @@ export const DatasetForm = ({
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const onChangeField = (index, value) => {
|
|
47
|
-
const structureAttrs = _.pick([
|
|
47
|
+
const structureAttrs = _.pick([
|
|
48
|
+
"structure",
|
|
49
|
+
"clauses",
|
|
50
|
+
"alias",
|
|
51
|
+
"join_type",
|
|
52
|
+
])(value);
|
|
48
53
|
setStructure({
|
|
49
54
|
index,
|
|
50
55
|
value: {
|
|
@@ -118,7 +123,8 @@ export const DatasetForm = ({
|
|
|
118
123
|
return (
|
|
119
124
|
<>
|
|
120
125
|
{structures.map((structure, index) =>
|
|
121
|
-
_.path("
|
|
126
|
+
_.path("structureType")(structure) === "reference_dataset" ||
|
|
127
|
+
_.path("structure.type")(structure) === "reference_dataset" ? (
|
|
122
128
|
<ReferenceDatasetSelectorInputField
|
|
123
129
|
key={index}
|
|
124
130
|
onChange={(value) =>
|
|
@@ -168,7 +174,12 @@ export const DatasetForm = ({
|
|
|
168
174
|
{_.isEmpty(availableReferenceDatasets) ? null : (
|
|
169
175
|
<Button
|
|
170
176
|
onClick={(e) => {
|
|
171
|
-
setStructure({
|
|
177
|
+
setStructure({
|
|
178
|
+
value: {
|
|
179
|
+
join_type: "inner",
|
|
180
|
+
structureType: "reference_dataset",
|
|
181
|
+
},
|
|
182
|
+
});
|
|
172
183
|
}}
|
|
173
184
|
>
|
|
174
185
|
{formatMessage({
|
package/src/messages/en.js
CHANGED
|
@@ -143,19 +143,20 @@ export default {
|
|
|
143
143
|
"quality.threshold": "Threshold",
|
|
144
144
|
"quality.thresholds": "Limits",
|
|
145
145
|
"quality.type": "Type",
|
|
146
|
+
"quality.updated_at": "Last changed",
|
|
146
147
|
"quality_result.failed": "Failed",
|
|
147
148
|
"quality_result.no_execution": "Not executed",
|
|
148
149
|
"quality_result.over_goal": "Over goal",
|
|
149
150
|
"quality_result.under_goal": "Under goal",
|
|
150
151
|
"quality_result.under_minimum": "Under threshold",
|
|
151
152
|
"quality_result.under_minumum": "Under threshold",
|
|
152
|
-
remediation: "Remediation plan",
|
|
153
|
+
"remediation": "Remediation plan",
|
|
153
154
|
"remediation.actions.create": "Create Remediation Plan",
|
|
154
155
|
"remediation.actions.delete.confirmation.content":
|
|
155
156
|
"Remediation plan will be deleted. Are you sure?",
|
|
156
157
|
"remediation.actions.delete.confirmation.header": "Delete remediation plan",
|
|
157
158
|
"remediation.actions.edit": "Edit Remediation Plan",
|
|
158
|
-
rule: "Quality Rule",
|
|
159
|
+
"rule": "Quality Rule",
|
|
159
160
|
"rule.date.placeholder": "YYYY-MM-DD",
|
|
160
161
|
"rule.error.goal.required": "Goal required",
|
|
161
162
|
"rule.error.minimum.required": "Minimun threshold required",
|
|
@@ -561,7 +562,7 @@ export default {
|
|
|
561
562
|
"Error in {implementation_key} attribute: {key} message: {message} ",
|
|
562
563
|
"ruleImplementations.upload.success.header":
|
|
563
564
|
"Upload success! Loaded {count_ids} omitted {count_errors}",
|
|
564
|
-
ruleResult: "Rule execution result",
|
|
565
|
+
"ruleResult": "Rule execution result",
|
|
565
566
|
"ruleResult.props.date": "Date",
|
|
566
567
|
"ruleResult.props.details": "Details",
|
|
567
568
|
"ruleResult.props.errors": "Errors",
|
|
@@ -607,6 +608,7 @@ export default {
|
|
|
607
608
|
"structureFields.dropdown.label": "Select Field",
|
|
608
609
|
"structureFields.dropdown.placeholder": "Fields",
|
|
609
610
|
"structureSelector.union.criteria": "Union criteria",
|
|
611
|
+
"structureSelector.union.type": "Union type",
|
|
610
612
|
"summary.link.and": "and",
|
|
611
613
|
"tabs.dq.implementation.links.concepts": "Link to concepts",
|
|
612
614
|
"tabs.dq.implementation.structures": "Structures",
|
package/src/messages/es.js
CHANGED
|
@@ -146,20 +146,21 @@ export default {
|
|
|
146
146
|
"quality.threshold": "Umbral",
|
|
147
147
|
"quality.thresholds": "Umbrales",
|
|
148
148
|
"quality.type": "Tipo",
|
|
149
|
+
"quality.updated_at": "Último cambio",
|
|
149
150
|
"quality_result.failed": "Fallida",
|
|
150
151
|
"quality_result.no_execution": "No ejecutada",
|
|
151
152
|
"quality_result.over_goal": "Cumple el objetivo",
|
|
152
153
|
"quality_result.under_goal": "Por debajo del objetivo",
|
|
153
154
|
"quality_result.under_minimum": "Por debajo del umbral",
|
|
154
155
|
"quality_result.under_minumum": "Por debajo del umbral",
|
|
155
|
-
remediation: "Plan de remediación",
|
|
156
|
+
"remediation": "Plan de remediación",
|
|
156
157
|
"remediation.actions.create": "Crear plan de remediación",
|
|
157
158
|
"remediation.actions.delete.confirmation.content":
|
|
158
159
|
"Se va a eliminar el plan de remediación. ¿Está seguro?",
|
|
159
160
|
"remediation.actions.delete.confirmation.header":
|
|
160
161
|
"Eliminar plan de remediación",
|
|
161
162
|
"remediation.actions.edit": "Editar plan de remediación",
|
|
162
|
-
rule: "Regla de Calidad",
|
|
163
|
+
"rule": "Regla de Calidad",
|
|
163
164
|
"rule.date.placeholder": "YYYY-MM-DD",
|
|
164
165
|
"rule.error.goal.required": "Objetivo requerido",
|
|
165
166
|
"rule.error.minimum.required": "Limite minimo requerido",
|
|
@@ -582,7 +583,7 @@ export default {
|
|
|
582
583
|
"Error en {name} atributo: {key} mensaje: {message} ",
|
|
583
584
|
"ruleImplementations.upload.success.header":
|
|
584
585
|
"¡Fichero subido correctamente! subidos {count_ids} errores {count_errors}",
|
|
585
|
-
ruleResult: "Resultado de ejecución de regla",
|
|
586
|
+
"ruleResult": "Resultado de ejecución de regla",
|
|
586
587
|
"ruleResult.props.date": "Fecha",
|
|
587
588
|
"ruleResult.props.details": "Detalles",
|
|
588
589
|
"ruleResult.props.errors": "Errores",
|
|
@@ -629,6 +630,7 @@ export default {
|
|
|
629
630
|
"structureFields.dropdown.label": "Seleccionar Campo",
|
|
630
631
|
"structureFields.dropdown.placeholder": "Campos",
|
|
631
632
|
"structureSelector.union.criteria": "Criterio de unión",
|
|
633
|
+
"structureSelector.union.type": "Tipo de unión",
|
|
632
634
|
"summary.link.and": "y",
|
|
633
635
|
"tabs.dq.implementation.links.concepts": "Conceptos relacionados",
|
|
634
636
|
"tabs.dq.implementation.structures": "Estructuras",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.join_type{
|
|
2
|
+
display:inline-flex;
|
|
3
|
+
left: 25%;
|
|
4
|
+
}
|
|
5
|
+
.join_type .circle{
|
|
6
|
+
display:flex;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
width:20px;
|
|
9
|
+
height:20px;
|
|
10
|
+
border-radius:50%;
|
|
11
|
+
border: 2px solid black;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
}
|
|
14
|
+
.join_type .circle.fill{
|
|
15
|
+
background:orange;
|
|
16
|
+
}
|
|
17
|
+
.join_type .circle.fill.white {
|
|
18
|
+
background:white;
|
|
19
|
+
}
|
|
20
|
+
.join_type .circle-left{
|
|
21
|
+
display:block;
|
|
22
|
+
overflow:hidden;
|
|
23
|
+
position:relative;
|
|
24
|
+
}
|
|
25
|
+
.join_type .circle-center{
|
|
26
|
+
top: -2px;
|
|
27
|
+
right: calc(-75% + 2px);
|
|
28
|
+
position:absolute;
|
|
29
|
+
}
|
|
30
|
+
.join_type .circle-right{
|
|
31
|
+
overflow:hidden;
|
|
32
|
+
position:relative;
|
|
33
|
+
right: 25%;
|
|
34
|
+
z-index: 0;
|
|
35
|
+
}
|