@truedat/dq 7.7.1 → 7.8.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
"@testing-library/jest-dom": "^6.6.3",
|
|
54
54
|
"@testing-library/react": "^16.3.0",
|
|
55
55
|
"@testing-library/user-event": "^14.6.1",
|
|
56
|
-
"@truedat/test": "7.7.
|
|
56
|
+
"@truedat/test": "7.7.2",
|
|
57
57
|
"identity-obj-proxy": "^3.0.0",
|
|
58
58
|
"jest": "^29.7.0",
|
|
59
59
|
"redux-saga-test-plan": "^4.0.6"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@apollo/client": "^3.13.8",
|
|
63
|
-
"axios": "^1.
|
|
63
|
+
"axios": "^1.11.0",
|
|
64
64
|
"file-saver": "^2.0.5",
|
|
65
65
|
"graphql": "^16.11.0",
|
|
66
66
|
"is-hotkey": "^0.2.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
87
87
|
"swr": "^2.3.3"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "557b607816bfc9c0cd61aebfd94d9b5f9e3c150f"
|
|
90
90
|
}
|
|
@@ -29,6 +29,20 @@ describe("<RuleImplementationEvents />", () => {
|
|
|
29
29
|
{ field: "bar", action: "changed", value: { id: 123, name: "foo" } },
|
|
30
30
|
],
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
id: 4,
|
|
34
|
+
service: "service",
|
|
35
|
+
event: "implementation_updated",
|
|
36
|
+
resource_id: 100,
|
|
37
|
+
ts: "2019-09-12T02:00:00Z",
|
|
38
|
+
payload: [
|
|
39
|
+
{
|
|
40
|
+
field: "old_domain",
|
|
41
|
+
action: "domain_updated_with_names",
|
|
42
|
+
value: "new_domain",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
32
46
|
];
|
|
33
47
|
|
|
34
48
|
const props = { events };
|
|
@@ -98,6 +98,36 @@ exports[`<RuleImplementationEvents /> matches the latest snapshot 1`] = `
|
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
|
+
<div
|
|
102
|
+
class="event"
|
|
103
|
+
>
|
|
104
|
+
<div
|
|
105
|
+
class="content"
|
|
106
|
+
>
|
|
107
|
+
<div
|
|
108
|
+
class="summary"
|
|
109
|
+
>
|
|
110
|
+
<a
|
|
111
|
+
class="user"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
<div
|
|
115
|
+
class="date"
|
|
116
|
+
>
|
|
117
|
+
<time
|
|
118
|
+
datetime="1568253600000"
|
|
119
|
+
>
|
|
120
|
+
2019-09-12 02:00
|
|
121
|
+
</time>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
class="text extra"
|
|
126
|
+
>
|
|
127
|
+
ruleImplementations.events.action_domain_updated_with_names
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
101
131
|
</div>
|
|
102
132
|
</div>
|
|
103
133
|
</div>
|
|
@@ -26,6 +26,33 @@ const transformRulePayloadFormat = (payload, field) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
const getImplementationUpdatedEvent = (e) => {
|
|
30
|
+
const { payload } = e;
|
|
31
|
+
if (!payload) return { ...e, payload: [] };
|
|
32
|
+
|
|
33
|
+
let field_config = [];
|
|
34
|
+
|
|
35
|
+
const { new_domain } = payload;
|
|
36
|
+
const { old_domain } = payload;
|
|
37
|
+
|
|
38
|
+
if (new_domain) {
|
|
39
|
+
const { name: domain_new_name } = new_domain;
|
|
40
|
+
const { name: domain_old_name } = old_domain;
|
|
41
|
+
// eslint-disable-next-line fp/no-mutation
|
|
42
|
+
field_config = _.concat({
|
|
43
|
+
action: "domain_updated_with_names",
|
|
44
|
+
field: domain_old_name,
|
|
45
|
+
value: domain_new_name,
|
|
46
|
+
})(field_config);
|
|
47
|
+
} else {
|
|
48
|
+
field_config = _.concat({
|
|
49
|
+
action: "updated",
|
|
50
|
+
field: _.path("payload.implementation_key")(e),
|
|
51
|
+
})(field_config);
|
|
52
|
+
}
|
|
53
|
+
return { ...e, payload: field_config };
|
|
54
|
+
};
|
|
55
|
+
|
|
29
56
|
const getParsedEvents = createSelector([getEvents], (events) => {
|
|
30
57
|
return _.map((d) => {
|
|
31
58
|
switch (d.event) {
|
|
@@ -96,6 +123,10 @@ const getParsedEvents = createSelector([getEvents], (events) => {
|
|
|
96
123
|
},
|
|
97
124
|
],
|
|
98
125
|
};
|
|
126
|
+
|
|
127
|
+
case "implementation_updated":
|
|
128
|
+
return getImplementationUpdatedEvent(d);
|
|
129
|
+
|
|
99
130
|
case "rule_created":
|
|
100
131
|
return {
|
|
101
132
|
...d,
|
|
@@ -106,7 +137,6 @@ const getParsedEvents = createSelector([getEvents], (events) => {
|
|
|
106
137
|
},
|
|
107
138
|
],
|
|
108
139
|
};
|
|
109
|
-
|
|
110
140
|
case "rule_updated":
|
|
111
141
|
const content = _.flow(
|
|
112
142
|
_.getOr({}, "payload.content.changed"),
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
height: 18px;
|
|
8
8
|
border-radius: 9px;
|
|
9
9
|
margin: 0px auto;
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
>span>span {
|
|
11
12
|
color: white;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -40,30 +41,37 @@
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
44
|
+
.rule-summary {
|
|
45
|
+
@import "td-web-ui/site/globals/site.variables";
|
|
46
|
+
|
|
47
|
+
.over-goal-color {
|
|
48
|
+
background-color: @overGoalRuleColor;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.under-goal-color {
|
|
52
|
+
background-color: @underGoalRuleColor;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.under-minimum-color {
|
|
56
|
+
background-color: @underMinimumRuleColor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.not-executed-color {
|
|
60
|
+
background-color: @notExecutedRuleColor;
|
|
61
|
+
;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.failed-color {
|
|
65
|
+
background-color: @failedRuleColor;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.empty-dataset-color {
|
|
69
|
+
background-color: @emptyDataColor;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
64
72
|
|
|
65
73
|
.pointer {
|
|
66
74
|
span {
|
|
67
75
|
cursor: pointer;
|
|
68
76
|
}
|
|
69
|
-
}
|
|
77
|
+
}
|