@truedat/dd 4.36.2 → 4.36.6
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 +13 -0
- package/package.json +5 -5
- package/src/messages/en.js +17 -4
- package/src/messages/es.js +13 -1
- package/src/reducers/__tests__/graph.spec.js +1 -1
- package/src/reducers/__tests__/structureImpactGraph.spec.js +5 -5
- package/src/reducers/__tests__/structureLineageGraph.spec.js +5 -5
- package/src/reducers/ddMessage.js +48 -51
- package/src/sagas/__tests__/bulkUpdateStructures.spec.js +1 -1
- package/src/sagas/__tests__/uploadStructures.spec.js +2 -2
- package/src/sagas/bulkUpdateStructures.js +1 -1
- package/src/sagas/uploadStructures.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.36.5] 2022-01-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- [TD-4100] Long Alert error message CSV download link
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [4.36.3] 2022-01-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- [TD-4100] Allow partial loads for notes in case that there are errors on the file
|
|
15
|
+
|
|
3
16
|
## [4.36.0] 2022-01-13
|
|
4
17
|
|
|
5
18
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.36.
|
|
3
|
+
"version": "4.36.6",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.36.
|
|
88
|
-
"@truedat/core": "4.36.
|
|
89
|
-
"@truedat/df": "4.36.
|
|
87
|
+
"@truedat/auth": "4.36.6",
|
|
88
|
+
"@truedat/core": "4.36.6",
|
|
89
|
+
"@truedat/df": "4.36.6",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
91
91
|
"path-to-regexp": "^1.7.0",
|
|
92
92
|
"prop-types": "^15.7.2",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "24162cf652f85f30de8669736abc28391fd5f6a8"
|
|
111
111
|
}
|
package/src/messages/en.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"alert.createStructureTag.failed.header": "Error creating structure tag",
|
|
3
|
+
"alert.export.csv": "Export to CSV",
|
|
3
4
|
"alert.linkStructureTag.failed.header": "Error linking tag to structure",
|
|
4
5
|
"alert.saveStructureUserFilters.failed.header": "Error saving filter",
|
|
6
|
+
"alert.show.more": "Show more",
|
|
5
7
|
"alert.updateStructureTag.failed.header": "Error editing structure tag",
|
|
6
8
|
"alert.updateSystem.failed.header": "Error updating system",
|
|
7
9
|
"createStructureTag.error.name.has already been taken":
|
|
@@ -363,10 +365,21 @@ export default {
|
|
|
363
365
|
"structures.bulkUpdate.success.content":
|
|
364
366
|
"Updated {count} structures successfully",
|
|
365
367
|
"structures.bulkUpdate.success.header": "Succeded Bulk Update",
|
|
368
|
+
"structures.bulkUpdateStructures.failed.note.df_content.default":
|
|
369
|
+
"External id: {externalId} The field <{field}> is invalid",
|
|
370
|
+
"structures.bulkUpdateStructures.failed.note.df_content.inclusion":
|
|
371
|
+
"External id: {externalId} The field <{field}> does not have a permitted value",
|
|
372
|
+
"structures.bulkUpdateStructures.failed.note.df_content.required":
|
|
373
|
+
"External id: {externalId} The field <{field}> is required",
|
|
366
374
|
"structures.bulkUpdateStructures.no.structures.body":
|
|
367
375
|
"No structures selected",
|
|
368
376
|
"structures.bulkUpdateStructures.no.structures.header": "Empty Search",
|
|
369
|
-
"structures.bulkUpdateStructures.success.header":
|
|
377
|
+
"structures.bulkUpdateStructures.success.header":
|
|
378
|
+
"Bulk update success! Loaded {count_ids} errors {count_errors}",
|
|
379
|
+
"structures.bulkUpdateStructures.success.errors":
|
|
380
|
+
"Error in external id {externalId}, message: {message}",
|
|
381
|
+
"structures.bulkUploadStructures.success.errors":
|
|
382
|
+
"Error in line {row}, in external id {externalId}, message: {message}",
|
|
370
383
|
"structures.bulkUpdateStructures.success.unchanged":
|
|
371
384
|
"{unchanged} structures remained unchanged.",
|
|
372
385
|
"structures.bulkUpdateStructures.success.updated":
|
|
@@ -422,11 +435,11 @@ export default {
|
|
|
422
435
|
"structures.uploadStructures.failed.invalid_file_format":
|
|
423
436
|
"Invalid file format",
|
|
424
437
|
"structures.uploadStructures.failed.note.df_content.default":
|
|
425
|
-
"The field <{field}> in row {row} is invalid",
|
|
438
|
+
"External id: {externalId} The field <{field}> in row {row} is invalid",
|
|
426
439
|
"structures.uploadStructures.failed.note.df_content.inclusion":
|
|
427
|
-
"The field <{field}> in row {row} does not have a permitted value",
|
|
440
|
+
"External id: {externalId} The field <{field}> in row {row} does not have a permitted value",
|
|
428
441
|
"structures.uploadStructures.failed.note.df_content.required":
|
|
429
|
-
"The field <{field}> in row {row} is required",
|
|
442
|
+
"External id: {externalId} The field <{field}> in row {row} is required",
|
|
430
443
|
"structures.uploadStructures.failed.note.insufficient_permissions":
|
|
431
444
|
"Insufficient permissions to edit the structure in row {row}",
|
|
432
445
|
"structures.uploadStructures.failed.note.only_draft_are_editable":
|
package/src/messages/es.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"alert.createStructureTag.failed.header": "Error al crear Etiqueta",
|
|
3
|
+
"alert.export.csv": "Exportar a CSV",
|
|
3
4
|
"alert.linkStructureTag.failed.header":
|
|
4
5
|
"Error asociando etiqueta a estructura",
|
|
5
6
|
"alert.saveStructureUserFilters.failed.header": "Error guardando filtro",
|
|
7
|
+
"alert.show.more": "Mostrar más",
|
|
6
8
|
"alert.updateStructureTag.failed.header": "Error al editar Etiqueta",
|
|
7
9
|
"alert.updateSystem.failed.header": "Error actualizando sistema",
|
|
8
10
|
"createStructureTag.error.name.has already been taken":
|
|
@@ -368,9 +370,19 @@ export default {
|
|
|
368
370
|
"structures.bulkUpdate.success.header": "Actualización terminada con éxito",
|
|
369
371
|
"structures.bulkUpdateStructures.no.structures.body":
|
|
370
372
|
"Ninguna estructura seleccionada",
|
|
373
|
+
"structures.bulkUpdateStructures.failed.note.df_content.default":
|
|
374
|
+
"External id: {externalId} El campo <{field}> es inválido",
|
|
375
|
+
"structures.bulkUpdateStructures.failed.note.df_content.inclusion":
|
|
376
|
+
"External id: {externalId} El campo <{field}> no tiene un valor permitido",
|
|
377
|
+
"structures.bulkUpdateStructures.failed.note.df_content.required":
|
|
378
|
+
"External id: {externalId} El campo <{field}> es necesario",
|
|
371
379
|
"structures.bulkUpdateStructures.no.structures.header": "Búsqueda vacía",
|
|
372
380
|
"structures.bulkUpdateStructures.success.header":
|
|
373
|
-
"Actualización
|
|
381
|
+
"¡Actualización realizada correctamente! subidos {count_ids} errores {count_errors}",
|
|
382
|
+
"structures.bulkUpdateStructures.success.errors":
|
|
383
|
+
"Error en external id {externalId}, mensaje: {message}",
|
|
384
|
+
"structures.bulkUploadStructures.success.errors":
|
|
385
|
+
"Error en linea {row}, en external id {externalId} mensaje: {message}",
|
|
374
386
|
"structures.bulkUpdateStructures.success.unchanged":
|
|
375
387
|
"{unchanged} se han mantenido sin cambios.",
|
|
376
388
|
"structures.bulkUpdateStructures.success.updated":
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
clearStructure,
|
|
4
4
|
fetchStructure,
|
|
5
5
|
fetchStructureGraph,
|
|
6
|
-
createGraph
|
|
6
|
+
createGraph,
|
|
7
7
|
} from "../../routines";
|
|
8
8
|
|
|
9
9
|
const fooState = { foo: "bar" };
|
|
@@ -31,7 +31,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
31
31
|
expect(
|
|
32
32
|
structureImpactGraph(fooState, {
|
|
33
33
|
type: fetchStructureGraph.SUCCESS,
|
|
34
|
-
payload
|
|
34
|
+
payload,
|
|
35
35
|
})
|
|
36
36
|
).toBe(data);
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
42
42
|
expect(
|
|
43
43
|
structureImpactGraph(fooState, {
|
|
44
44
|
type: createGraph.SUCCESS,
|
|
45
|
-
payload
|
|
45
|
+
payload,
|
|
46
46
|
})
|
|
47
47
|
).toBe(data);
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
53
53
|
expect(
|
|
54
54
|
structureImpactGraph(fooState, {
|
|
55
55
|
type: createGraph.SUCCESS,
|
|
56
|
-
payload
|
|
56
|
+
payload,
|
|
57
57
|
})
|
|
58
58
|
).toBe(fooState);
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
64
64
|
expect(
|
|
65
65
|
structureImpactGraph(fooState, {
|
|
66
66
|
type: fetchStructureGraph.SUCCESS,
|
|
67
|
-
payload
|
|
67
|
+
payload,
|
|
68
68
|
})
|
|
69
69
|
).toBe(fooState);
|
|
70
70
|
});
|
|
@@ -31,7 +31,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
31
31
|
expect(
|
|
32
32
|
structureLineageGraph(fooState, {
|
|
33
33
|
type: fetchStructureGraph.SUCCESS,
|
|
34
|
-
payload
|
|
34
|
+
payload,
|
|
35
35
|
})
|
|
36
36
|
).toBe(data);
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
42
42
|
expect(
|
|
43
43
|
structureLineageGraph(fooState, {
|
|
44
44
|
type: createGraph.SUCCESS,
|
|
45
|
-
payload
|
|
45
|
+
payload,
|
|
46
46
|
})
|
|
47
47
|
).toBe(data);
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
53
53
|
expect(
|
|
54
54
|
structureLineageGraph(fooState, {
|
|
55
55
|
type: fetchStructureGraph.SUCCESS,
|
|
56
|
-
payload
|
|
56
|
+
payload,
|
|
57
57
|
})
|
|
58
58
|
).toBe(fooState);
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
64
64
|
expect(
|
|
65
65
|
structureLineageGraph(fooState, {
|
|
66
66
|
type: createGraph.SUCCESS,
|
|
67
|
-
payload
|
|
67
|
+
payload,
|
|
68
68
|
})
|
|
69
69
|
).toBe(fooState);
|
|
70
70
|
});
|
|
@@ -75,7 +75,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
75
75
|
expect(
|
|
76
76
|
structureLineageGraph(fooState, {
|
|
77
77
|
type: fetchStructureGraph.SUCCESS,
|
|
78
|
-
payload
|
|
78
|
+
payload,
|
|
79
79
|
})
|
|
80
80
|
).toBe(fooState);
|
|
81
81
|
});
|
|
@@ -12,27 +12,43 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
12
12
|
switch (type) {
|
|
13
13
|
case dismissAlert.TRIGGER:
|
|
14
14
|
return initialState;
|
|
15
|
+
case uploadStructures.SUCCESS:
|
|
15
16
|
case bulkUpdateStructures.SUCCESS: {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
const messagesImp = _.has("errors")(payload.data)
|
|
18
|
+
? _.flow(
|
|
19
|
+
_.propOr([], "errors"),
|
|
20
|
+
_.map((error) => ({
|
|
21
|
+
id:
|
|
22
|
+
type == bulkUpdateStructures.SUCCESS
|
|
23
|
+
? `structures.bulkUpdateStructures.failed.note.${error.message}`
|
|
24
|
+
: `structures.uploadStructures.failed.note.${error.message}`,
|
|
25
|
+
fields: {
|
|
26
|
+
row: error.row,
|
|
27
|
+
id: error.id,
|
|
28
|
+
field: error.field,
|
|
29
|
+
externalId: error.external_id,
|
|
30
|
+
message: error.message,
|
|
31
|
+
},
|
|
32
|
+
defaultMessage:
|
|
33
|
+
type == bulkUpdateStructures.SUCCESS
|
|
34
|
+
? "structures.bulkUpdateStructures.success.errors"
|
|
35
|
+
: "structures.bulkUploadStructures.success.errors",
|
|
36
|
+
}))
|
|
37
|
+
)(payload.data)
|
|
38
|
+
: "";
|
|
29
39
|
return {
|
|
30
40
|
error: false,
|
|
31
41
|
header: "structures.bulkUpdateStructures.success.header",
|
|
32
42
|
icon: "check",
|
|
33
|
-
color: "green",
|
|
43
|
+
color: payload.data.errors.length >= 1 ? "orange" : "green",
|
|
34
44
|
text: "",
|
|
35
|
-
messages:
|
|
45
|
+
messages: messagesImp,
|
|
46
|
+
fields: {
|
|
47
|
+
count_ids: payload.data.ids.length,
|
|
48
|
+
count_errors: payload.data.errors.length,
|
|
49
|
+
},
|
|
50
|
+
downloadable: true,
|
|
51
|
+
initialMaxListItems: 5,
|
|
36
52
|
};
|
|
37
53
|
}
|
|
38
54
|
case updateStructureType.SUCCESS:
|
|
@@ -42,25 +58,6 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
42
58
|
icon: "check",
|
|
43
59
|
color: "green",
|
|
44
60
|
};
|
|
45
|
-
case uploadStructures.SUCCESS: {
|
|
46
|
-
const { data } = payload;
|
|
47
|
-
const count = _.flow(_.prop("message"), _.size)(data);
|
|
48
|
-
const content =
|
|
49
|
-
count === 0
|
|
50
|
-
? "structures.uploadStructures.success.content.any"
|
|
51
|
-
: count === 1
|
|
52
|
-
? "structures.uploadStructures.success.content.single"
|
|
53
|
-
: "structures.uploadStructures.success.content";
|
|
54
|
-
return {
|
|
55
|
-
error: false,
|
|
56
|
-
header: "structures.uploadStructures.success.header",
|
|
57
|
-
content,
|
|
58
|
-
icon: "check",
|
|
59
|
-
color: "green",
|
|
60
|
-
text: "",
|
|
61
|
-
fields: { count },
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
61
|
case uploadStructures.FAILURE:
|
|
65
62
|
if (payload.status != 500) {
|
|
66
63
|
const { data } = payload;
|
|
@@ -69,24 +66,24 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
69
66
|
const field = _.path("errors.field")(data);
|
|
70
67
|
const messages = _.has("errors")(data)
|
|
71
68
|
? _.flow(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
defaultMessage: "structures.uploadStructures.failed.default",
|
|
80
|
-
}))(v)
|
|
81
|
-
),
|
|
82
|
-
_.flatten
|
|
83
|
-
)(data)
|
|
84
|
-
: _.flow(_.path("error.message"), (m) => [
|
|
85
|
-
{
|
|
86
|
-
id: `structures.uploadStructures.failed.${m}`,
|
|
69
|
+
_.propOr([], "errors"),
|
|
70
|
+
_.toPairs,
|
|
71
|
+
_.filter(([k, _v]) => k !== "row" && k !== "field"),
|
|
72
|
+
_.map(([k, v]) =>
|
|
73
|
+
_.map((e) => ({
|
|
74
|
+
id: `structures.uploadStructures.failed.${k}.${e}`,
|
|
75
|
+
fields: { row, field },
|
|
87
76
|
defaultMessage: "structures.uploadStructures.failed.default",
|
|
88
|
-
}
|
|
89
|
-
|
|
77
|
+
}))(v)
|
|
78
|
+
),
|
|
79
|
+
_.flatten
|
|
80
|
+
)(data)
|
|
81
|
+
: _.flow(_.path("error.message"), (m) => [
|
|
82
|
+
{
|
|
83
|
+
id: `structures.uploadStructures.failed.${m}`,
|
|
84
|
+
defaultMessage: "structures.uploadStructures.failed.default",
|
|
85
|
+
},
|
|
86
|
+
])(data);
|
|
90
87
|
return {
|
|
91
88
|
error: true,
|
|
92
89
|
header: "structures.uploadStructures.failed.header",
|
|
@@ -55,7 +55,7 @@ describe("sagas: bulkUpdateStructuresSaga", () => {
|
|
|
55
55
|
.next()
|
|
56
56
|
.call(apiJsonPost, API_DATA_STRUCTURES_BULK_UPDATE, body, JSON_OPTS)
|
|
57
57
|
.next({ data })
|
|
58
|
-
.put(bulkUpdateStructures.success({
|
|
58
|
+
.put(bulkUpdateStructures.success({ data }))
|
|
59
59
|
.next()
|
|
60
60
|
.put(bulkUpdateStructures.fulfill())
|
|
61
61
|
.next()
|
|
@@ -2,7 +2,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
2
2
|
import { apiJsonPost, UPLOAD_JSON_OPTS } from "@truedat/core/services/api";
|
|
3
3
|
import {
|
|
4
4
|
uploadStructuresRequestSaga,
|
|
5
|
-
uploadStructuresSaga
|
|
5
|
+
uploadStructuresSaga,
|
|
6
6
|
} from "../uploadStructures";
|
|
7
7
|
import { uploadStructures } from "../../routines";
|
|
8
8
|
import { API_STRUCTURES_UPLOAD } from "../../api";
|
|
@@ -39,7 +39,7 @@ describe("sagas: uploadStructuresSaga", () => {
|
|
|
39
39
|
.next()
|
|
40
40
|
.call(apiJsonPost, API_STRUCTURES_UPLOAD, body, UPLOAD_JSON_OPTS)
|
|
41
41
|
.next({ data })
|
|
42
|
-
.put(uploadStructures.success(data))
|
|
42
|
+
.put(uploadStructures.success({ data }))
|
|
43
43
|
.next()
|
|
44
44
|
.put(uploadStructures.fulfill())
|
|
45
45
|
.next()
|
|
@@ -22,7 +22,7 @@ export function* bulkUpdateStructuresSaga({ payload }) {
|
|
|
22
22
|
body,
|
|
23
23
|
JSON_OPTS
|
|
24
24
|
);
|
|
25
|
-
yield put(bulkUpdateStructures.success({
|
|
25
|
+
yield put(bulkUpdateStructures.success({ data }));
|
|
26
26
|
} catch (error) {
|
|
27
27
|
if (error.response) {
|
|
28
28
|
const { status, data } = error.response;
|
|
@@ -14,7 +14,7 @@ export function* uploadStructuresSaga({ payload }) {
|
|
|
14
14
|
UPLOAD_JSON_OPTS
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
yield put(uploadStructures.success(data));
|
|
17
|
+
yield put(uploadStructures.success({ data }));
|
|
18
18
|
} catch (error) {
|
|
19
19
|
if (error.response) {
|
|
20
20
|
const { status, data } = error.response;
|