@truedat/dd 4.33.4 → 4.33.9
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 +12 -0
- package/package.json +6 -6
- package/src/components/GraphLoader.js +2 -3
- package/src/components/LineageEvents.js +1 -1
- package/src/components/LineageEventsTable.js +6 -3
- package/src/components/LineageForm.js +1 -1
- package/src/components/LineageGraph.js +6 -3
- package/src/components/LineageRoutes.js +1 -1
- package/src/components/StructuresBulkUpdate.js +23 -9
- package/src/components/StructuresRoutes.js +7 -0
- package/src/components/__tests__/LineageEventsTable.spec.js +0 -1
- package/src/components/__tests__/StructuresBulkUpdate.spec.js +2 -0
- package/src/components/__tests__/__snapshots__/LineageEventsTable.spec.js.snap +3 -1
- package/src/messages/en.js +5 -2
- package/src/messages/es.js +7 -3
- package/src/reducers/__tests__/lineageEventsLoading.spec.js +6 -4
- package/src/reducers/graph.js +1 -1
- package/src/sagas/__tests__/createGraph.spec.js +2 -5
- package/src/sagas/createGraph.js +4 -2
- package/src/selectors/getLineageEventColumns.js +21 -25
- package/src/components/StructuresUpdateButton.js +0 -45
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.33.
|
|
3
|
+
"version": "4.33.9",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.14.1",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.33.
|
|
37
|
+
"@truedat/test": "4.33.9",
|
|
38
38
|
"babel-jest": "^27.0.6",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.33.
|
|
88
|
-
"@truedat/core": "4.33.
|
|
89
|
-
"@truedat/df": "4.33.
|
|
87
|
+
"@truedat/auth": "4.33.9",
|
|
88
|
+
"@truedat/core": "4.33.9",
|
|
89
|
+
"@truedat/df": "4.33.9",
|
|
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": "f2635d86f1fc4efccf638aba8ebab749f39a9b1e"
|
|
111
111
|
}
|
|
@@ -9,7 +9,7 @@ import { fetchGraph, clearGraph, cancelPoll } from "../routines";
|
|
|
9
9
|
export const GraphLoader = ({ clearGraph, fetchGraph, graph, cancelPoll }) => {
|
|
10
10
|
const match = useRouteMatch(GRAPH);
|
|
11
11
|
const id = _.path("params.id")(match);
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
const history = useHistory();
|
|
14
14
|
|
|
15
15
|
useEffect(() => {
|
|
@@ -26,7 +26,7 @@ export const GraphLoader = ({ clearGraph, fetchGraph, graph, cancelPoll }) => {
|
|
|
26
26
|
fetchGraph({ id });
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
}, [/*graph,
|
|
29
|
+
}, [/*graph, */ /*fetchGraph,*/ id]);
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
return () => {
|
|
@@ -52,4 +52,3 @@ const mapStateToProps = ({ graph }) => ({ graph });
|
|
|
52
52
|
export default connect(mapStateToProps, { clearGraph, fetchGraph, cancelPoll })(
|
|
53
53
|
GraphLoader
|
|
54
54
|
);
|
|
55
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Header, Icon, Segment, Dimmer, Loader } from "semantic-ui-react";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import LineageEventsTable from "./LineageEventsTable"
|
|
4
|
+
import LineageEventsTable from "./LineageEventsTable";
|
|
5
5
|
|
|
6
6
|
export const LineageEvents = () => (
|
|
7
7
|
<Segment>
|
|
@@ -3,7 +3,7 @@ import React, { useEffect } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import { Header, Icon, Table } from "semantic-ui-react";
|
|
6
|
-
import { useHistory
|
|
6
|
+
import { useHistory } from "react-router-dom";
|
|
7
7
|
import { connect } from "react-redux";
|
|
8
8
|
import { useIntl } from "react-intl";
|
|
9
9
|
import { columnDecorator } from "@truedat/core/services";
|
|
@@ -11,8 +11,11 @@ import { linkTo } from "@truedat/core/routes";
|
|
|
11
11
|
import { lineageEventColumns as columns } from "../selectors/getLineageEventColumns";
|
|
12
12
|
import { fetchLineageEvents } from "../routines";
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export const LineageEventsTable = ({
|
|
15
|
+
fetchLineageEvents,
|
|
16
|
+
lineageEvents,
|
|
17
|
+
lineageEventsLoading,
|
|
18
|
+
}) => {
|
|
16
19
|
const { formatMessage } = useIntl();
|
|
17
20
|
const history = useHistory();
|
|
18
21
|
|
|
@@ -58,7 +58,7 @@ export const LineageForm = ({
|
|
|
58
58
|
_.isNil(levels)
|
|
59
59
|
? createGraph({ ids: selectedResources, type })
|
|
60
60
|
: createGraph({ ids: selectedResources, type, levels });
|
|
61
|
-
}
|
|
61
|
+
};
|
|
62
62
|
const disabled = _.isEmpty(selectedResources);
|
|
63
63
|
useEffect(() => {
|
|
64
64
|
setOpen(!graphLoading && _.isEmpty(graph));
|
|
@@ -96,9 +96,10 @@ export const LineageGraph = ({
|
|
|
96
96
|
<p>
|
|
97
97
|
{formatMessage({
|
|
98
98
|
id:
|
|
99
|
-
loadingInfo?.data?.status === "already_started"
|
|
99
|
+
_.toLower(loadingInfo?.data?.status) === "already_started"
|
|
100
100
|
? "lineage.graph.loading.background.existing"
|
|
101
|
-
: loadingInfo?.data?.status ===
|
|
101
|
+
: _.toLower(loadingInfo?.data?.status) ===
|
|
102
|
+
"just_started" &&
|
|
102
103
|
"lineage.graph.loading.background.launched",
|
|
103
104
|
})}
|
|
104
105
|
</p>
|
|
@@ -182,4 +183,6 @@ const mapStateToProps = (
|
|
|
182
183
|
};
|
|
183
184
|
};
|
|
184
185
|
|
|
185
|
-
export default connect(mapStateToProps, { clearNode, cancelPoll })(
|
|
186
|
+
export default connect(mapStateToProps, { clearNode, cancelPoll })(
|
|
187
|
+
LineageGraph
|
|
188
|
+
);
|
|
@@ -3,7 +3,7 @@ import { Route } from "react-router-dom";
|
|
|
3
3
|
import { Unauthorized } from "@truedat/core/components";
|
|
4
4
|
import { useAuthorized } from "@truedat/core/hooks";
|
|
5
5
|
import { GRAPH, GRAPHS, LINEAGE_EVENTS, SAMPLE } from "@truedat/core/routes";
|
|
6
|
-
import LineageEvents from "./LineageEvents"
|
|
6
|
+
import LineageEvents from "./LineageEvents";
|
|
7
7
|
import LineageGraph from "./LineageGraph";
|
|
8
8
|
import LineageSample from "./LineageSample";
|
|
9
9
|
import LineageForm from "./LineageForm";
|
|
@@ -15,7 +15,6 @@ import { FormattedMessage } from "react-intl";
|
|
|
15
15
|
import { ConfirmModal, HistoryBackButton } from "@truedat/core/components";
|
|
16
16
|
import { selectTemplate } from "@truedat/df/routines";
|
|
17
17
|
import { applyTemplateWithoutDefaults } from "@truedat/df/utils";
|
|
18
|
-
import { composeProviders } from "redux-saga-test-plan/providers";
|
|
19
18
|
import { compose } from "redux";
|
|
20
19
|
import { withRouter } from "react-router-dom";
|
|
21
20
|
import { bulkUpdateStructures } from "../routines";
|
|
@@ -82,7 +81,7 @@ export class StructuresBulkUpdate extends React.Component {
|
|
|
82
81
|
template: PropTypes.object,
|
|
83
82
|
templateId: PropTypes.number,
|
|
84
83
|
templatesLoaded: PropTypes.bool,
|
|
85
|
-
|
|
84
|
+
canAutoPublish: PropTypes.bool,
|
|
86
85
|
};
|
|
87
86
|
|
|
88
87
|
state = initialState;
|
|
@@ -123,15 +122,24 @@ export class StructuresBulkUpdate extends React.Component {
|
|
|
123
122
|
};
|
|
124
123
|
|
|
125
124
|
render() {
|
|
126
|
-
const {
|
|
127
|
-
|
|
125
|
+
const {
|
|
126
|
+
loading,
|
|
127
|
+
template,
|
|
128
|
+
templateId,
|
|
129
|
+
structureCount,
|
|
130
|
+
templatesLoaded,
|
|
131
|
+
canAutoPublish,
|
|
132
|
+
structureActiveFilters,
|
|
133
|
+
} = this.props;
|
|
128
134
|
const { content } = this.state;
|
|
129
135
|
const disableAction = !template || _.isEmpty(template);
|
|
130
136
|
|
|
131
137
|
return templatesLoaded ? (
|
|
132
138
|
<Container as={Segment} text>
|
|
133
139
|
<TemplateLoader />
|
|
134
|
-
{!_.isEmpty(template) &&
|
|
140
|
+
{!_.isEmpty(template) &&
|
|
141
|
+
structureCount != 0 &&
|
|
142
|
+
_.has("type.raw")(structureActiveFilters) ? (
|
|
135
143
|
<>
|
|
136
144
|
<Header as="h2">
|
|
137
145
|
<Icon name="book" />
|
|
@@ -161,10 +169,7 @@ export class StructuresBulkUpdate extends React.Component {
|
|
|
161
169
|
/>
|
|
162
170
|
)}
|
|
163
171
|
<ConfirmModal
|
|
164
|
-
actions={actions(
|
|
165
|
-
this.handleSubmit,
|
|
166
|
-
this.props.location?.state.canAutoPublish
|
|
167
|
-
)}
|
|
172
|
+
actions={actions(this.handleSubmit, canAutoPublish)}
|
|
168
173
|
trigger={
|
|
169
174
|
<Button
|
|
170
175
|
primary
|
|
@@ -231,6 +236,8 @@ const mapStateToProps = ({
|
|
|
231
236
|
structures,
|
|
232
237
|
structureTypes,
|
|
233
238
|
structureTypesLoading,
|
|
239
|
+
userDomains,
|
|
240
|
+
structureActiveFilters,
|
|
234
241
|
}) => {
|
|
235
242
|
const structure = _.head(structures);
|
|
236
243
|
const templateId = findTemplate(structureTypes, templates, structure);
|
|
@@ -242,6 +249,13 @@ const mapStateToProps = ({
|
|
|
242
249
|
structureCount,
|
|
243
250
|
structureTypesLoaded: !structureTypesLoading,
|
|
244
251
|
templatesLoaded: !templatesLoading && !_.isEmpty(templates),
|
|
252
|
+
userDomains,
|
|
253
|
+
canAutoPublish: _.any(
|
|
254
|
+
({ domains, permission }) =>
|
|
255
|
+
!_.isEmpty(domains) &&
|
|
256
|
+
["publish_structure_note_from_draft"].includes(permission)
|
|
257
|
+
)(userDomains),
|
|
258
|
+
structureActiveFilters,
|
|
245
259
|
};
|
|
246
260
|
};
|
|
247
261
|
|
|
@@ -88,6 +88,13 @@ const AuthorizedRoutes = () => {
|
|
|
88
88
|
path={STRUCTURES_BULK_UPDATE}
|
|
89
89
|
render={() => (
|
|
90
90
|
<>
|
|
91
|
+
<UserDomainsLoader
|
|
92
|
+
permissions={[
|
|
93
|
+
"publish_structure_note_from_draft",
|
|
94
|
+
"edit_structure_note",
|
|
95
|
+
"create_structure_note",
|
|
96
|
+
]}
|
|
97
|
+
/>
|
|
91
98
|
<StructureCrumbs
|
|
92
99
|
name={formatMessage({ id: "structures.bulkUpdate.crumbs.top" })}
|
|
93
100
|
/>
|
|
@@ -17,6 +17,7 @@ describe("<StructuresBulkUpdate />", () => {
|
|
|
17
17
|
templatesLoaded: true,
|
|
18
18
|
structureTypes: [{ name: "doc", template_id: 1 }],
|
|
19
19
|
structureTypesLoaded: true,
|
|
20
|
+
structureActiveFilters: { "type.raw": "booo" },
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
it("matches the latest snapshot", () => {
|
|
@@ -136,6 +137,7 @@ describe("<StructuresBulkUpdate />", () => {
|
|
|
136
137
|
selectedDomain: { id: 1 },
|
|
137
138
|
templatesLoaded: true,
|
|
138
139
|
bulkUpdateStructures: jest.fn(),
|
|
140
|
+
structureActiveFilters: { "type.raw": "booo" },
|
|
139
141
|
};
|
|
140
142
|
const wrapper = shallow(<StructuresBulkUpdate {...props} />);
|
|
141
143
|
wrapper.setState({
|
package/src/messages/en.js
CHANGED
|
@@ -117,13 +117,16 @@ export default {
|
|
|
117
117
|
"lineage.form.levels.select.label": "Depth",
|
|
118
118
|
"lineage.graph.loading": "Analyzing...",
|
|
119
119
|
"lineage.graph.loading.background.launched": "Background task launched",
|
|
120
|
-
"lineage.graph.loading.background.existing":
|
|
120
|
+
"lineage.graph.loading.background.existing":
|
|
121
|
+
"The task for this graph was already launched",
|
|
121
122
|
"lineage.graph.loading.polling": "Poll retry #{retry}",
|
|
122
123
|
"lineage.graph.status.already_calculated": "Already calculated",
|
|
123
124
|
"lineage.graph.status.already_started": "Already started",
|
|
124
|
-
"lineage.graph.status.just_started": "Just started",
|
|
125
125
|
"lineage.graph.status.completed": "Completed",
|
|
126
126
|
"lineage.graph.status.failed": "Failed",
|
|
127
|
+
"lineage.graph.status.just_started": "Just started",
|
|
128
|
+
"lineage.graph.status.started": "Started",
|
|
129
|
+
"lineage.graph.status.timed_out": "Timed out",
|
|
127
130
|
"lineage.group.placeholder": "Select Top Level Structure",
|
|
128
131
|
"lineage.resources.placeholder": "Select Child Structures",
|
|
129
132
|
"lineage.subgroup.placeholder": "Select Child Structure",
|
package/src/messages/es.js
CHANGED
|
@@ -118,14 +118,18 @@ export default {
|
|
|
118
118
|
"lineage.form.levels.select.input": "Seleccionar...",
|
|
119
119
|
"lineage.form.levels.select.label": "Profundidad",
|
|
120
120
|
"lineage.graph.loading": "Analizando...",
|
|
121
|
-
"lineage.graph.loading.background.launched":
|
|
122
|
-
|
|
121
|
+
"lineage.graph.loading.background.launched":
|
|
122
|
+
"Tarea en segundo plano lanzada para grafo",
|
|
123
|
+
"lineage.graph.loading.background.existing":
|
|
124
|
+
"La tarea en segundo plano para este grafo ya fue lanzada",
|
|
123
125
|
"lineage.graph.loading.polling": "Sondeo #{retry}",
|
|
124
126
|
"lineage.graph.status.already_calculated": "Previamente calculado",
|
|
125
127
|
"lineage.graph.status.already_started": "Previamente iniciado",
|
|
126
|
-
"lineage.graph.status.just_started": "Iniciado",
|
|
127
128
|
"lineage.graph.status.completed": "Finalizado",
|
|
128
129
|
"lineage.graph.status.failed": "Fallido",
|
|
130
|
+
"lineage.graph.status.just_started": "Acaba de iniciarse",
|
|
131
|
+
"lineage.graph.status.started": "Iniciado",
|
|
132
|
+
"lineage.graph.status.timed_out": "Tiempo de espera máximo sobrepasado",
|
|
129
133
|
"lineage.group.placeholder": "Seleccionar Estructura Padre",
|
|
130
134
|
"lineage.resources.placeholder": "Seleccionar Estructuras Hijos",
|
|
131
135
|
"lineage.subgroup.placeholder": "Seleccionar Estructura Hijo",
|
|
@@ -9,13 +9,15 @@ describe("reducers: lineageEventsLoading", () => {
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
it("returns to initial state on fetchLineageEvents.FULFILL action", () => {
|
|
12
|
-
expect(
|
|
13
|
-
|
|
14
|
-
);
|
|
12
|
+
expect(
|
|
13
|
+
lineageEventsLoading(fooState, { type: fetchLineageEvents.FULFILL })
|
|
14
|
+
).toBe(false);
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
it("returns true on fetchLineageEvents.REQUEST action", () => {
|
|
18
|
-
expect(
|
|
18
|
+
expect(
|
|
19
|
+
lineageEventsLoading(fooState, { type: fetchLineageEvents.REQUEST })
|
|
20
|
+
).toBe(true);
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
it("should ignore unhandled actions", () => {
|
package/src/reducers/graph.js
CHANGED
|
@@ -51,7 +51,7 @@ describe("sagas: createGraphRequestSaga", () => {
|
|
|
51
51
|
.next()
|
|
52
52
|
.all([
|
|
53
53
|
takeLatest(createGraph.TRIGGER, createGraphSaga),
|
|
54
|
-
takeLatest(excludeNode.TRIGGER, createGraphSaga)
|
|
54
|
+
takeLatest(excludeNode.TRIGGER, createGraphSaga),
|
|
55
55
|
])
|
|
56
56
|
.finish()
|
|
57
57
|
.isDone();
|
|
@@ -103,7 +103,6 @@ describe("sagas: createGraphSaga", () => {
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
it("should fork a polling task when uuids are requested and a 202 (accepted) graph hash response is returned. Then, wait for task cancellation.", () => {
|
|
106
|
-
|
|
107
106
|
expect(() => {
|
|
108
107
|
testSaga(createGraphSaga)
|
|
109
108
|
.next()
|
|
@@ -221,9 +220,7 @@ describe("generator: polling", () => {
|
|
|
221
220
|
.next()
|
|
222
221
|
.cancelled()
|
|
223
222
|
.next(true)
|
|
224
|
-
.put(createGraph.failure(POLLING_CANCELLED))
|
|
225
|
-
.next()
|
|
226
|
-
.isDone();
|
|
223
|
+
.put(createGraph.failure(POLLING_CANCELLED));
|
|
227
224
|
}).not.toThrow();
|
|
228
225
|
});
|
|
229
226
|
});
|
package/src/sagas/createGraph.js
CHANGED
|
@@ -112,12 +112,14 @@ export function* polling(graphAccepted) {
|
|
|
112
112
|
isCancelled && (yield put(createGraph.failure(POLLING_CANCELLED)));
|
|
113
113
|
} while (!isCancelled && graphResp?.status == 202);
|
|
114
114
|
|
|
115
|
-
graphResp?.status == 200 &&
|
|
115
|
+
graphResp?.status == 200 && !isCancelled
|
|
116
|
+
? yield put(createGraph.success(graphResp))
|
|
117
|
+
: yield put(createGraph.failure({}));
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
export function* createGraphRequestSaga() {
|
|
119
121
|
yield all([
|
|
120
122
|
takeLatest(createGraph.TRIGGER, createGraphSaga),
|
|
121
|
-
takeLatest(excludeNode.TRIGGER, createGraphSaga)
|
|
123
|
+
takeLatest(excludeNode.TRIGGER, createGraphSaga),
|
|
122
124
|
]);
|
|
123
125
|
}
|
|
@@ -1,52 +1,48 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FormattedMessage
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import Moment from "react-moment";
|
|
5
5
|
|
|
6
6
|
const dateDecorator = (date) =>
|
|
7
7
|
date && <Moment locale="es" date={date} format="YYYY-MM-DD HH:mm" />;
|
|
8
8
|
|
|
9
|
-
const statusDecorator = (status) =>
|
|
10
|
-
<FormattedMessage id={`lineage.graph.status.${_.
|
|
9
|
+
const statusDecorator = (status) => (
|
|
10
|
+
<FormattedMessage id={`lineage.graph.status.${_.toLower(status)}`} />
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const graphDataDecorator = (graphData) => <span>{graphData}</span>;
|
|
11
14
|
|
|
12
15
|
const customLineageEventColumns = null;
|
|
13
16
|
const defaultLineageEventColumns = [
|
|
14
17
|
{
|
|
15
18
|
name: "graph_data",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
fieldSelector: (event) => {
|
|
20
|
+
const graphData = _.get("graph_data")(event);
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse(graphData).join("\n");
|
|
23
|
+
} catch (e) {
|
|
24
|
+
return graphData;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
fieldDecorator: graphDataDecorator,
|
|
28
|
+
width: 2,
|
|
29
|
+
},
|
|
25
30
|
{
|
|
26
31
|
name: "status",
|
|
27
|
-
sort: { name: "status.sort" },
|
|
28
32
|
fieldDecorator: statusDecorator,
|
|
29
|
-
width: 2
|
|
33
|
+
width: 2,
|
|
30
34
|
},
|
|
31
|
-
// {
|
|
32
|
-
// name: "task_reference",
|
|
33
|
-
// sort: { name: "task_reference.sort" },
|
|
34
|
-
// fieldSelector: _.path("type"),
|
|
35
|
-
// width: 2
|
|
36
|
-
// },
|
|
37
35
|
{
|
|
38
36
|
name: "message",
|
|
39
|
-
width: 2
|
|
37
|
+
width: 2,
|
|
40
38
|
},
|
|
41
39
|
{
|
|
42
40
|
name: "inserted_at",
|
|
43
|
-
sort: { name: "inserted_at" },
|
|
44
41
|
fieldDecorator: dateDecorator,
|
|
45
42
|
textAlign: "center",
|
|
46
|
-
width: 2
|
|
47
|
-
}
|
|
43
|
+
width: 2,
|
|
44
|
+
},
|
|
48
45
|
];
|
|
49
46
|
|
|
50
|
-
|
|
51
47
|
export const lineageEventColumns =
|
|
52
48
|
customLineageEventColumns || defaultLineageEventColumns;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import { connect } from "react-redux";
|
|
4
|
-
import { Button, Popup } from "semantic-ui-react";
|
|
5
|
-
import { Link } from "react-router-dom";
|
|
6
|
-
import { FormattedMessage } from "react-intl";
|
|
7
|
-
import { useAuthorized } from "@truedat/core/hooks";
|
|
8
|
-
import { STRUCTURES_BULK_UPDATE } from "@truedat/core/routes";
|
|
9
|
-
import { bulkUpdateDisabledSelector } from "../selectors";
|
|
10
|
-
|
|
11
|
-
export const StructuresUpdateButton = ({ disabled, canAutoPublish }) => {
|
|
12
|
-
const authorized = useAuthorized();
|
|
13
|
-
|
|
14
|
-
return authorized ? (
|
|
15
|
-
<Popup
|
|
16
|
-
content={<FormattedMessage id="structures.actions.bulk_update.popup" />}
|
|
17
|
-
position="top right"
|
|
18
|
-
trigger={
|
|
19
|
-
<span className="button-update">
|
|
20
|
-
<Link
|
|
21
|
-
className={`ui secondary button ${disabled ? "disabled" : ""}`}
|
|
22
|
-
role="button"
|
|
23
|
-
to={{
|
|
24
|
-
pathname: STRUCTURES_BULK_UPDATE,
|
|
25
|
-
state: { canAutoPublish },
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<FormattedMessage id="actions.update" />
|
|
29
|
-
</Link>
|
|
30
|
-
</span>
|
|
31
|
-
}
|
|
32
|
-
/>
|
|
33
|
-
) : null;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
StructuresUpdateButton.propTypes = {
|
|
37
|
-
disabled: PropTypes.bool,
|
|
38
|
-
canAutoPublish: PropTypes.bool,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const mapStateToProps = (state) => ({
|
|
42
|
-
disabled: bulkUpdateDisabledSelector(state),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export default connect(mapStateToProps)(StructuresUpdateButton);
|