@truedat/ie 7.5.7 → 7.5.10
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 +42 -67
- package/src/ingests/components/EventRow.js +1 -2
- package/src/ingests/components/Events.js +3 -4
- package/src/ingests/components/FieldGroupTable.js +1 -2
- package/src/ingests/components/Ingest.js +1 -2
- package/src/ingests/components/IngestActions.js +1 -2
- package/src/ingests/components/IngestArchive.js +2 -3
- package/src/ingests/components/IngestArchiveLoader.js +16 -38
- package/src/ingests/components/IngestArchiveRow.js +5 -6
- package/src/ingests/components/IngestCompleteness.js +0 -1
- package/src/ingests/components/IngestCrumbs.js +2 -4
- package/src/ingests/components/IngestDetails.js +3 -3
- package/src/ingests/components/IngestDuplicate.js +5 -8
- package/src/ingests/components/IngestEdit.js +5 -8
- package/src/ingests/components/IngestExecutions.js +7 -7
- package/src/ingests/components/IngestExecutionsLoader.js +2 -2
- package/src/ingests/components/IngestFilters.js +5 -6
- package/src/ingests/components/IngestForm.js +4 -5
- package/src/ingests/components/IngestHeader.js +0 -1
- package/src/ingests/components/IngestLoader.js +16 -58
- package/src/ingests/components/IngestRoutes.js +272 -231
- package/src/ingests/components/IngestRow.js +4 -5
- package/src/ingests/components/IngestSelectedFilters.js +10 -10
- package/src/ingests/components/IngestSummary.js +0 -2
- package/src/ingests/components/IngestTabs.js +13 -13
- package/src/ingests/components/Ingests.js +0 -1
- package/src/ingests/components/IngestsActions.js +1 -2
- package/src/ingests/components/IngestsLabelResults.js +1 -2
- package/src/ingests/components/IngestsLoader.js +1 -1
- package/src/ingests/components/IngestsSearch.js +0 -1
- package/src/ingests/components/IngestsSelector.js +0 -1
- package/src/ingests/components/IngestsTable.js +85 -94
- package/src/ingests/components/IngestsTabs.js +2 -3
- package/src/ingests/components/__tests__/Events.spec.js +10 -10
- package/src/ingests/components/__tests__/Ingest.spec.js +16 -5
- package/src/ingests/components/__tests__/IngestActions.spec.js +7 -7
- package/src/ingests/components/__tests__/IngestArchive.spec.js +7 -7
- package/src/ingests/components/__tests__/IngestArchiveLoader.spec.js +70 -69
- package/src/ingests/components/__tests__/IngestArchiveRow.spec.js +10 -12
- package/src/ingests/components/__tests__/IngestCompleteness.spec.js +0 -1
- package/src/ingests/components/__tests__/IngestDetails.spec.js +10 -10
- package/src/ingests/components/__tests__/IngestExecutions.spec.js +7 -7
- package/src/ingests/components/__tests__/IngestExecutionsLoader.spec.js +38 -47
- package/src/ingests/components/__tests__/IngestFilters.spec.js +0 -1
- package/src/ingests/components/__tests__/IngestForm.spec.js +18 -40
- package/src/ingests/components/__tests__/IngestHeader.spec.js +9 -9
- package/src/ingests/components/__tests__/IngestLabelResults.spec.js +0 -1
- package/src/ingests/components/__tests__/IngestLoader.spec.js +70 -41
- package/src/ingests/components/__tests__/IngestRoutes.spec.js +176 -0
- package/src/ingests/components/__tests__/IngestSelectedFilters.spec.js +33 -5
- package/src/ingests/components/__tests__/Ingests.spec.js +32 -6
- package/src/ingests/components/__tests__/IngestsActions.spec.js +5 -5
- package/src/ingests/components/__tests__/IngestsLoader.spec.js +65 -36
- package/src/ingests/components/__tests__/IngestsTable.spec.js +16 -7
- package/src/ingests/components/__tests__/__snapshots__/Events.spec.js.snap +83 -43
- package/src/ingests/components/__tests__/__snapshots__/Ingest.spec.js.snap +27 -14
- package/src/ingests/components/__tests__/__snapshots__/IngestActions.spec.js.snap +19 -20
- package/src/ingests/components/__tests__/__snapshots__/IngestArchive.spec.js.snap +79 -65
- package/src/ingests/components/__tests__/__snapshots__/IngestArchiveLoader.spec.js.snap +1 -1
- package/src/ingests/components/__tests__/__snapshots__/IngestArchiveRow.spec.js.snap +30 -30
- package/src/ingests/components/__tests__/__snapshots__/IngestDetails.spec.js.snap +30 -13
- package/src/ingests/components/__tests__/__snapshots__/IngestExecutions.spec.js.snap +121 -101
- package/src/ingests/components/__tests__/__snapshots__/IngestExecutionsLoader.spec.js.snap +1 -1
- package/src/ingests/components/__tests__/__snapshots__/IngestFilters.spec.js.snap +1 -1
- package/src/ingests/components/__tests__/__snapshots__/IngestForm.spec.js.snap +28 -27
- package/src/ingests/components/__tests__/__snapshots__/IngestHeader.spec.js.snap +21 -19
- package/src/ingests/components/__tests__/__snapshots__/IngestLabelResults.spec.js.snap +1 -1
- package/src/ingests/components/__tests__/__snapshots__/IngestLoader.spec.js.snap +1 -15
- package/src/ingests/components/__tests__/__snapshots__/IngestRoutes.spec.js.snap +243 -0
- package/src/ingests/components/__tests__/__snapshots__/IngestSelectedFilters.spec.js.snap +22 -16
- package/src/ingests/components/__tests__/__snapshots__/Ingests.spec.js.snap +50 -33
- package/src/ingests/components/__tests__/__snapshots__/IngestsActions.spec.js.snap +17 -50
- package/src/ingests/components/__tests__/__snapshots__/IngestsLoader.spec.js.snap +1 -21
- package/src/ingests/components/__tests__/__snapshots__/IngestsTable.spec.js.snap +15 -24
- package/src/ingests/components/index.js +1 -1
- package/src/ingests/constants/mappings.js +6 -6
- package/src/ingests/relations/components/IngestLinkActions.js +0 -1
- package/src/ingests/relations/components/IngestLinksActions.js +1 -2
- package/src/ingests/relations/components/IngestRelationsRoutes.js +67 -69
- package/src/ingests/relations/components/IngestToDataStructureRelations.js +2 -2
- package/src/ingests/relations/components/IngestToIngestForm.js +4 -4
- package/src/ingests/relations/components/IngestToIngestRelations.js +4 -4
- package/src/ingests/relations/components/IngestToStructureForm.js +6 -6
- package/src/ingests/relations/components/__tests__/IngestRelationsRoutes.spec.js +80 -4
- package/src/ingests/relations/components/__tests__/IngestToIngestForm.spec.js +24 -25
- package/src/ingests/relations/components/__tests__/IngestToStructureForm.spec.js +42 -23
- package/src/ingests/relations/components/__tests__/__snapshots__/IngestRelationsRoutes.spec.js.snap +49 -23
- package/src/ingests/relations/components/__tests__/__snapshots__/IngestToIngestForm.spec.js.snap +85 -27
- package/src/ingests/relations/components/__tests__/__snapshots__/IngestToStructureForm.spec.js.snap +30 -35
- package/src/ingests/relations/selectors/__tests__/getIngestLinks.spec.js +20 -20
- package/src/ingests/relations/selectors/__tests__/getRelations.spec.js +17 -17
- package/src/ingests/relations/selectors/getIngestLinks.js +1 -2
- package/src/ingests/relations/selectors/getRelations.js +6 -6
- package/src/ingests/sagas/fetchIngest.js +1 -1
- package/src/ingests/sagas/fetchIngestArchive.js +1 -1
- package/src/ingests/sagas/fetchIngestExecutions.js +1 -1
- package/src/ingests/selectors/getIngestColumns.js +12 -13
- package/src/ingests/selectors/getIngestTemplate.js +1 -1
- package/src/ingests/selectors/getParsedEvents.js +15 -15
- package/src/ingests/selectors/getTemplateFields.js +3 -3
- package/src/ingests/selectors/getTemplateGroups.js +1 -1
- package/src/ingests/utils/filterOptions.js +3 -2
- package/src/ingests/components/__tests__/IngestDuplicate.spec.js +0 -67
- package/src/ingests/components/__tests__/IngestEdit.spec.js +0 -79
- package/src/ingests/components/__tests__/__snapshots__/IngestDuplicate.spec.js.snap +0 -85
- package/src/ingests/components/__tests__/__snapshots__/IngestEdit.spec.js.snap +0 -80
|
@@ -1,66 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { compose } from "redux";
|
|
5
|
-
import { connect } from "react-redux";
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useParams } from "react-router";
|
|
3
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
6
4
|
import { Loading } from "@truedat/core/components";
|
|
7
|
-
import { Dimmer, Loader } from "semantic-ui-react";
|
|
8
5
|
import { fetchIngest, clearIngest } from "../routines";
|
|
9
6
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
match: PropTypes.object,
|
|
15
|
-
ingestLoading: PropTypes.bool,
|
|
16
|
-
};
|
|
7
|
+
export default function IngestLoader() {
|
|
8
|
+
const dispatch = useDispatch();
|
|
9
|
+
const ingestLoading = useSelector((state) => state.ingestLoading);
|
|
10
|
+
const { id } = useParams();
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
const { fetchIngest, match } = this.props;
|
|
20
|
-
const { id } = match.params;
|
|
12
|
+
useEffect(() => {
|
|
21
13
|
if (id) {
|
|
22
|
-
fetchIngest({ id });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
componentWillUnmount() {
|
|
27
|
-
const { clearIngest } = this.props;
|
|
28
|
-
clearIngest();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
componentDidUpdate(prevProps) {
|
|
32
|
-
const { clearIngest, fetchIngest, match } = this.props;
|
|
33
|
-
const { id } = match.params;
|
|
34
|
-
if (prevProps.match.params.id !== id) {
|
|
35
|
-
if (id) {
|
|
36
|
-
fetchIngest({ id });
|
|
37
|
-
} else {
|
|
38
|
-
clearIngest();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
render() {
|
|
44
|
-
const { ingestLoading } = this.props;
|
|
45
|
-
|
|
46
|
-
if (ingestLoading) {
|
|
47
|
-
return (
|
|
48
|
-
<>
|
|
49
|
-
<Dimmer active={ingestLoading} inverted>
|
|
50
|
-
<Loader size="massive" inverted />
|
|
51
|
-
</Dimmer>
|
|
52
|
-
<Loading />;
|
|
53
|
-
</>
|
|
54
|
-
);
|
|
14
|
+
dispatch(fetchIngest({ id }));
|
|
55
15
|
} else {
|
|
56
|
-
|
|
16
|
+
dispatch(clearIngest());
|
|
57
17
|
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
18
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
19
|
+
return () => {
|
|
20
|
+
dispatch(clearIngest());
|
|
21
|
+
};
|
|
22
|
+
}, [id, dispatch]);
|
|
23
|
+
return ingestLoading ? <Loading /> : null;
|
|
24
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import {
|
|
4
|
+
import { Routes, Route } from "react-router";
|
|
5
5
|
import { Segment, Grid } from "semantic-ui-react";
|
|
6
6
|
import { connect } from "react-redux";
|
|
7
7
|
import { Comments, CommentsLoader } from "@truedat/core/components";
|
|
8
|
-
import {
|
|
9
|
-
import { useAuthorized } from "@truedat/core/hooks";
|
|
8
|
+
import { ProtectedRoute, Loader } from "@truedat/core/router";
|
|
10
9
|
import {
|
|
11
10
|
INGEST,
|
|
12
11
|
INGEST_ARCHIVE,
|
|
@@ -39,242 +38,284 @@ import IngestSummary from "./IngestSummary";
|
|
|
39
38
|
import Ingests from "./Ingests";
|
|
40
39
|
import IngestsLoader from "./IngestsLoader";
|
|
41
40
|
|
|
42
|
-
const EventsLoader = React.lazy(
|
|
43
|
-
import("@truedat/audit/components/EventsLoader")
|
|
41
|
+
const EventsLoader = React.lazy(
|
|
42
|
+
() => import("@truedat/audit/components/EventsLoader")
|
|
44
43
|
);
|
|
45
|
-
const RelationTagsLoader = React.lazy(
|
|
46
|
-
import("@truedat/lm/components/RelationTagsLoader")
|
|
44
|
+
const RelationTagsLoader = React.lazy(
|
|
45
|
+
() => import("@truedat/lm/components/RelationTagsLoader")
|
|
47
46
|
);
|
|
48
|
-
const TemplatesLoader = React.lazy(
|
|
49
|
-
import("@truedat/
|
|
47
|
+
const TemplatesLoader = React.lazy(
|
|
48
|
+
() => import("@truedat/core/components/TemplatesLoader")
|
|
50
49
|
);
|
|
51
50
|
|
|
52
51
|
const IngestRoutes = ({ ingestLoaded, ingest_id, templatesLoaded }) => {
|
|
53
|
-
const authorized = useAuthorized("ingests");
|
|
54
52
|
return (
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
<Routes>
|
|
54
|
+
<Route
|
|
55
|
+
path={INGESTS}
|
|
56
|
+
element={
|
|
57
|
+
<ProtectedRoute authorization="ingests">
|
|
58
|
+
<Loader
|
|
59
|
+
loaders={
|
|
60
|
+
<>
|
|
61
|
+
<IngestsLoader defaultFilters={{ status: ["published"] }} />
|
|
62
|
+
<IngestFiltersLoader />
|
|
63
|
+
</>
|
|
64
|
+
}
|
|
66
65
|
/>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
</ProtectedRoute>
|
|
67
|
+
}
|
|
68
|
+
>
|
|
69
|
+
<Route index element={<Ingests />} />
|
|
70
|
+
|
|
71
|
+
<Route
|
|
72
|
+
path={INGESTS_PENDING}
|
|
73
|
+
element={
|
|
74
|
+
<Loader
|
|
75
|
+
loaders={
|
|
76
|
+
<>
|
|
77
|
+
<IngestsLoader
|
|
78
|
+
defaultFilters={{
|
|
79
|
+
status: ["draft", "pending_approval", "rejected"],
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
<IngestFiltersLoader />
|
|
83
|
+
</>
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
}
|
|
87
|
+
>
|
|
88
|
+
<Route index element={<Ingests />} />
|
|
89
|
+
</Route>
|
|
90
|
+
|
|
91
|
+
<Route
|
|
92
|
+
path={INGESTS_NEW}
|
|
93
|
+
element={
|
|
94
|
+
<Loader loaders={<IngestsLoader />}>
|
|
95
|
+
<IngestCrumbs ingestAction="ingests.actions.create" />
|
|
96
|
+
<IngestForm />
|
|
97
|
+
</Loader>
|
|
98
|
+
}
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
<Route
|
|
102
|
+
path={INGEST}
|
|
103
|
+
element={
|
|
104
|
+
<Loader
|
|
105
|
+
loaders={
|
|
106
|
+
<>
|
|
107
|
+
<IngestLoader />
|
|
108
|
+
<RelationTagsLoader />
|
|
109
|
+
{ingestLoaded && (
|
|
110
|
+
<CommentsLoader
|
|
111
|
+
resource_id={ingest_id}
|
|
112
|
+
resource_type="ingest"
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</>
|
|
116
|
+
}
|
|
117
|
+
>
|
|
118
|
+
<IngestCrumbs />
|
|
119
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
120
|
+
<Grid.Column width={12}>
|
|
121
|
+
<Segment>
|
|
122
|
+
{ingestLoaded && <Ingest />}
|
|
123
|
+
{ingestLoaded && <IngestDetails />}
|
|
124
|
+
</Segment>
|
|
125
|
+
<Segment>{ingestLoaded && <Comments />}</Segment>
|
|
126
|
+
</Grid.Column>
|
|
127
|
+
<Grid.Column width={4}>
|
|
128
|
+
{ingestLoaded && (
|
|
129
|
+
<>
|
|
130
|
+
<IngestSummary />
|
|
131
|
+
<IngestCompleteness />
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
134
|
+
</Grid.Column>
|
|
135
|
+
</Grid>
|
|
136
|
+
</Loader>
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
|
|
140
|
+
<Route
|
|
141
|
+
path={INGEST_EXECUTIONS}
|
|
142
|
+
element={
|
|
143
|
+
<Loader
|
|
144
|
+
loaders={
|
|
145
|
+
<>
|
|
146
|
+
<IngestLoader />
|
|
147
|
+
<RelationTagsLoader />
|
|
148
|
+
<IngestExecutionsLoader />
|
|
149
|
+
</>
|
|
150
|
+
}
|
|
151
|
+
>
|
|
152
|
+
<IngestCrumbs />
|
|
153
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
154
|
+
<Grid.Column width={12}>
|
|
155
|
+
<Segment>
|
|
156
|
+
{ingestLoaded && <Ingest />}
|
|
157
|
+
{ingestLoaded && <IngestExecutions />}
|
|
158
|
+
</Segment>
|
|
159
|
+
</Grid.Column>
|
|
160
|
+
<Grid.Column width={4}>
|
|
161
|
+
{ingestLoaded && <IngestSummary />}
|
|
162
|
+
</Grid.Column>
|
|
163
|
+
</Grid>
|
|
164
|
+
</Loader>
|
|
165
|
+
}
|
|
166
|
+
/>
|
|
167
|
+
|
|
168
|
+
<Route
|
|
169
|
+
path={INGEST_ARCHIVE}
|
|
170
|
+
element={
|
|
171
|
+
<Loader
|
|
172
|
+
loaders={
|
|
173
|
+
<>
|
|
174
|
+
<IngestLoader />
|
|
175
|
+
<RelationTagsLoader />
|
|
176
|
+
<IngestArchiveLoader />
|
|
177
|
+
</>
|
|
178
|
+
}
|
|
179
|
+
>
|
|
180
|
+
<IngestCrumbs />
|
|
181
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
182
|
+
<Grid.Column width={12}>
|
|
183
|
+
<Segment>
|
|
184
|
+
{ingestLoaded && <Ingest />}
|
|
185
|
+
{ingestLoaded && <IngestArchive />}
|
|
186
|
+
</Segment>
|
|
187
|
+
</Grid.Column>
|
|
188
|
+
<Grid.Column width={4}>
|
|
189
|
+
{ingestLoaded && <IngestSummary />}
|
|
190
|
+
</Grid.Column>
|
|
191
|
+
</Grid>
|
|
192
|
+
</Loader>
|
|
193
|
+
}
|
|
194
|
+
/>
|
|
195
|
+
|
|
196
|
+
<Route
|
|
197
|
+
path={INGEST_EVENTS}
|
|
198
|
+
element={
|
|
199
|
+
<Loader
|
|
200
|
+
loaders={
|
|
201
|
+
<>
|
|
202
|
+
<IngestLoader />
|
|
203
|
+
<RelationTagsLoader />
|
|
204
|
+
<IngestArchiveLoader />
|
|
205
|
+
{ingestLoaded && (
|
|
206
|
+
<EventsLoader
|
|
207
|
+
resource_id={ingest_id}
|
|
208
|
+
resource_type="ingest"
|
|
79
209
|
/>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
/>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
<EventsLoader
|
|
190
|
-
resource_id={ingest_id}
|
|
191
|
-
resource_type="ingest"
|
|
192
|
-
/>
|
|
193
|
-
)}
|
|
194
|
-
{ingestLoaded && <Ingest />}
|
|
195
|
-
{ingestLoaded && <Events />}
|
|
196
|
-
</Segment>
|
|
197
|
-
</Grid.Column>
|
|
198
|
-
<Grid.Column width={4}>
|
|
199
|
-
{ingestLoaded && <IngestSummary />}
|
|
200
|
-
</Grid.Column>
|
|
201
|
-
</Grid>
|
|
202
|
-
</>
|
|
203
|
-
)}
|
|
204
|
-
/>
|
|
205
|
-
<Route
|
|
206
|
-
path={INGEST_RELATIONS_STRUCTURES}
|
|
207
|
-
render={() => (
|
|
208
|
-
<>
|
|
209
|
-
<IngestCrumbs />
|
|
210
|
-
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
211
|
-
<Grid.Column width={12}>
|
|
212
|
-
<Segment>
|
|
213
|
-
<IngestLoader />
|
|
214
|
-
<RelationTagsLoader />
|
|
215
|
-
{ingestLoaded && <Ingest />}
|
|
216
|
-
{ingestLoaded && <IngestRelationsRoutes />}
|
|
217
|
-
</Segment>
|
|
218
|
-
</Grid.Column>
|
|
219
|
-
<Grid.Column width={4}>
|
|
220
|
-
{ingestLoaded && <IngestSummary />}
|
|
221
|
-
</Grid.Column>
|
|
222
|
-
</Grid>
|
|
223
|
-
</>
|
|
224
|
-
)}
|
|
225
|
-
/>
|
|
226
|
-
<Route
|
|
227
|
-
path={INGEST_RELATIONS_INGESTS}
|
|
228
|
-
render={() => (
|
|
229
|
-
<>
|
|
230
|
-
<IngestCrumbs />
|
|
231
|
-
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
232
|
-
<Grid.Column width={12}>
|
|
233
|
-
<Segment>
|
|
234
|
-
<IngestLoader />
|
|
235
|
-
<RelationTagsLoader />
|
|
236
|
-
{ingestLoaded && <Ingest />}
|
|
237
|
-
{ingestLoaded && <IngestRelationsRoutes />}
|
|
238
|
-
</Segment>
|
|
239
|
-
</Grid.Column>
|
|
240
|
-
<Grid.Column width={4}>
|
|
241
|
-
{ingestLoaded && <IngestSummary />}
|
|
242
|
-
</Grid.Column>
|
|
243
|
-
</Grid>
|
|
244
|
-
</>
|
|
245
|
-
)}
|
|
246
|
-
/>
|
|
247
|
-
<Route
|
|
248
|
-
exact
|
|
249
|
-
path={INGEST_EDIT}
|
|
250
|
-
render={() => (
|
|
251
|
-
<>
|
|
252
|
-
<IngestCrumbs ingestAction="ingests.actions.edit" />
|
|
253
|
-
<TemplatesLoader scope="ie" />
|
|
254
|
-
<IngestLoader />
|
|
255
|
-
{ingestLoaded && templatesLoaded && <IngestEdit />}
|
|
256
|
-
</>
|
|
257
|
-
)}
|
|
258
|
-
/>
|
|
259
|
-
<Route
|
|
260
|
-
exact
|
|
261
|
-
path={INGEST_DUPLICATE}
|
|
262
|
-
render={() => (
|
|
263
|
-
<>
|
|
264
|
-
<IngestCrumbs ingestAction="ingests.actions.duplicate" />
|
|
265
|
-
<TemplatesLoader scope="ie" />
|
|
266
|
-
<IngestLoader />
|
|
267
|
-
{ingestLoaded && templatesLoaded && <IngestDuplicate />}
|
|
268
|
-
</>
|
|
269
|
-
)}
|
|
270
|
-
/>
|
|
271
|
-
</Switch>
|
|
272
|
-
</>
|
|
273
|
-
) : (
|
|
274
|
-
<Unauthorized />
|
|
275
|
-
)
|
|
276
|
-
}
|
|
277
|
-
/>
|
|
210
|
+
)}
|
|
211
|
+
</>
|
|
212
|
+
}
|
|
213
|
+
>
|
|
214
|
+
<IngestCrumbs />
|
|
215
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
216
|
+
<Grid.Column width={12}>
|
|
217
|
+
<Segment>
|
|
218
|
+
{ingestLoaded && <Ingest />}
|
|
219
|
+
{ingestLoaded && <Events />}
|
|
220
|
+
</Segment>
|
|
221
|
+
</Grid.Column>
|
|
222
|
+
<Grid.Column width={4}>
|
|
223
|
+
{ingestLoaded && <IngestSummary />}
|
|
224
|
+
</Grid.Column>
|
|
225
|
+
</Grid>
|
|
226
|
+
</Loader>
|
|
227
|
+
}
|
|
228
|
+
/>
|
|
229
|
+
|
|
230
|
+
<Route
|
|
231
|
+
path={INGEST_RELATIONS_STRUCTURES}
|
|
232
|
+
element={
|
|
233
|
+
<Loader
|
|
234
|
+
loaders={
|
|
235
|
+
<>
|
|
236
|
+
<IngestLoader />
|
|
237
|
+
<RelationTagsLoader />
|
|
238
|
+
</>
|
|
239
|
+
}
|
|
240
|
+
>
|
|
241
|
+
<IngestCrumbs />
|
|
242
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
243
|
+
<Grid.Column width={12}>
|
|
244
|
+
<Segment>
|
|
245
|
+
{ingestLoaded && <Ingest />}
|
|
246
|
+
{ingestLoaded && <IngestRelationsRoutes />}
|
|
247
|
+
</Segment>
|
|
248
|
+
</Grid.Column>
|
|
249
|
+
<Grid.Column width={4}>
|
|
250
|
+
{ingestLoaded && <IngestSummary />}
|
|
251
|
+
</Grid.Column>
|
|
252
|
+
</Grid>
|
|
253
|
+
</Loader>
|
|
254
|
+
}
|
|
255
|
+
/>
|
|
256
|
+
|
|
257
|
+
<Route
|
|
258
|
+
path={INGEST_RELATIONS_INGESTS}
|
|
259
|
+
element={
|
|
260
|
+
<Loader
|
|
261
|
+
loaders={
|
|
262
|
+
<>
|
|
263
|
+
<IngestLoader />
|
|
264
|
+
<RelationTagsLoader />
|
|
265
|
+
</>
|
|
266
|
+
}
|
|
267
|
+
>
|
|
268
|
+
<IngestCrumbs />
|
|
269
|
+
<Grid columns="equal" style={{ marginTop: 0 }}>
|
|
270
|
+
<Grid.Column width={12}>
|
|
271
|
+
<Segment>
|
|
272
|
+
{ingestLoaded && <Ingest />}
|
|
273
|
+
{ingestLoaded && <IngestRelationsRoutes />}
|
|
274
|
+
</Segment>
|
|
275
|
+
</Grid.Column>
|
|
276
|
+
<Grid.Column width={4}>
|
|
277
|
+
{ingestLoaded && <IngestSummary />}
|
|
278
|
+
</Grid.Column>
|
|
279
|
+
</Grid>
|
|
280
|
+
</Loader>
|
|
281
|
+
}
|
|
282
|
+
/>
|
|
283
|
+
|
|
284
|
+
<Route
|
|
285
|
+
path={INGEST_EDIT}
|
|
286
|
+
element={
|
|
287
|
+
<Loader
|
|
288
|
+
loaders={
|
|
289
|
+
<>
|
|
290
|
+
<TemplatesLoader scope="ie" />
|
|
291
|
+
<IngestLoader />
|
|
292
|
+
</>
|
|
293
|
+
}
|
|
294
|
+
>
|
|
295
|
+
<IngestCrumbs ingestAction="ingests.actions.edit" />
|
|
296
|
+
{ingestLoaded && templatesLoaded && <IngestEdit />}
|
|
297
|
+
</Loader>
|
|
298
|
+
}
|
|
299
|
+
/>
|
|
300
|
+
|
|
301
|
+
<Route
|
|
302
|
+
path={INGEST_DUPLICATE}
|
|
303
|
+
element={
|
|
304
|
+
<Loader
|
|
305
|
+
loaders={
|
|
306
|
+
<>
|
|
307
|
+
<TemplatesLoader scope="ie" />
|
|
308
|
+
<IngestLoader />
|
|
309
|
+
</>
|
|
310
|
+
}
|
|
311
|
+
>
|
|
312
|
+
<IngestCrumbs ingestAction="ingests.actions.duplicate" />
|
|
313
|
+
{ingestLoaded && templatesLoaded && <IngestDuplicate />}
|
|
314
|
+
</Loader>
|
|
315
|
+
}
|
|
316
|
+
/>
|
|
317
|
+
</Route>
|
|
318
|
+
</Routes>
|
|
278
319
|
);
|
|
279
320
|
};
|
|
280
321
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
|
-
import {
|
|
2
|
+
import { useNavigate } from "react-router";
|
|
4
3
|
import { Table } from "semantic-ui-react";
|
|
5
4
|
import { columnDecorator } from "@truedat/core/services";
|
|
6
5
|
import { linkTo } from "@truedat/core/routes";
|
|
7
6
|
|
|
8
7
|
export const IngestRow = ({ ingest, columns }) => {
|
|
9
|
-
const
|
|
8
|
+
const navigate = useNavigate();
|
|
10
9
|
const { id } = ingest;
|
|
11
10
|
return (
|
|
12
|
-
<Table.Row key={id} onClick={() =>
|
|
11
|
+
<Table.Row key={id} onClick={() => navigate(linkTo.INGEST({ id }))}>
|
|
13
12
|
{columns &&
|
|
14
13
|
columns.map((column, key) => {
|
|
15
14
|
return (
|
|
@@ -22,7 +21,7 @@ export const IngestRow = ({ ingest, columns }) => {
|
|
|
22
21
|
|
|
23
22
|
IngestRow.propTypes = {
|
|
24
23
|
ingest: PropTypes.object,
|
|
25
|
-
columns: PropTypes.array
|
|
24
|
+
columns: PropTypes.array,
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export default IngestRow;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Route, Switch } from "react-router-dom";
|
|
1
|
+
import { Route, Routes } from "react-router";
|
|
3
2
|
import { INGESTS, INGESTS_PENDING } from "@truedat/core/routes";
|
|
3
|
+
import { Loader } from "@truedat/core/router";
|
|
4
4
|
import IngestSelectedFiltersDefault from "./IngestSelectedFiltersDefault";
|
|
5
5
|
import IngestSelectedFiltersPending from "./IngestSelectedFiltersPending";
|
|
6
6
|
import IngestSelectedFiltersPublished from "./IngestSelectedFiltersPublished";
|
|
7
7
|
|
|
8
8
|
export const IngestSelectedFilters = () => (
|
|
9
|
-
<
|
|
10
|
-
<Route exact path={INGESTS} component={IngestSelectedFiltersPublished} />
|
|
9
|
+
<Routes>
|
|
11
10
|
<Route
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
path={INGESTS}
|
|
12
|
+
element={<Loader loaders={<IngestSelectedFiltersDefault />} />}
|
|
13
|
+
>
|
|
14
|
+
<Route index element={<IngestSelectedFiltersPublished />} />
|
|
15
|
+
<Route path="pending" element={<IngestSelectedFiltersPending />} />
|
|
16
|
+
</Route>
|
|
17
|
+
</Routes>
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
export default IngestSelectedFilters;
|