@truedat/dq 4.40.7 → 4.40.8
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 +6 -0
- package/package.json +5 -5
- package/src/api.js +2 -0
- package/src/components/ExecutionDetails.js +65 -40
- package/src/components/ImplementationResultBar.js +1 -1
- package/src/components/NewRemediation.js +62 -0
- package/src/components/RemediationCrumbs.js +76 -0
- package/src/components/RemediationForm.js +129 -0
- package/src/components/RemediationPlan.js +161 -0
- package/src/components/RuleImplementation.js +1 -1
- package/src/components/RuleImplementationResults.js +2 -1
- package/src/components/RuleResultRow.js +4 -1
- package/src/components/RuleRoutes.js +324 -296
- package/src/components/__tests__/ExecutionDetails.spec.js +17 -5
- package/src/components/__tests__/RemediationForm.spec.js +68 -0
- package/src/components/__tests__/RemediationPlan.spec.js +106 -0
- package/src/components/__tests__/__snapshots__/ExecutionDetails.spec.js.snap +104 -0
- package/src/components/__tests__/__snapshots__/RemediationForm.spec.js.snap +19 -0
- package/src/components/__tests__/__snapshots__/RemediationPlan.spec.js.snap +3 -0
- package/src/messages/en.js +7 -0
- package/src/messages/es.js +7 -0
- package/src/reducers/__tests__/remediation.spec.js +83 -0
- package/src/reducers/__tests__/remediationActions.spec.js +46 -0
- package/src/reducers/__tests__/remediationLoading.spec.js +50 -0
- package/src/reducers/dqMessage.js +8 -2
- package/src/reducers/index.js +6 -0
- package/src/reducers/remediation.js +35 -0
- package/src/reducers/remediationActions.js +19 -0
- package/src/reducers/remediationLoading.js +29 -0
- package/src/routines.js +6 -0
- package/src/sagas/__tests__/createRemediation.spec.js +83 -0
- package/src/sagas/__tests__/deleteRemediation.spec.js +82 -0
- package/src/sagas/__tests__/fetchRemediation.spec.js +78 -0
- package/src/sagas/__tests__/fetchRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/updateRemediation.spec.js +81 -0
- package/src/sagas/createRemediation.js +31 -0
- package/src/sagas/deleteRemediation.js +29 -0
- package/src/sagas/fetchRemediation.js +30 -0
- package/src/sagas/index.js +12 -0
- package/src/sagas/updateRemediation.js +29 -0
- package/src/styles/executionDetails.less +3 -0
- package/src/styles/remediationPlan.less +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import { Route,
|
|
4
|
+
import { Route, useRouteMatch } from "react-router-dom";
|
|
5
5
|
import { connect } from "react-redux";
|
|
6
6
|
import { Segment } from "semantic-ui-react";
|
|
7
7
|
import { Unauthorized } from "@truedat/core/components";
|
|
@@ -95,324 +95,352 @@ export const RuleRoutes = ({
|
|
|
95
95
|
template,
|
|
96
96
|
structuresAliasesLoading,
|
|
97
97
|
ruleImplementation,
|
|
98
|
+
}) => {
|
|
99
|
+
return (
|
|
100
|
+
<>
|
|
101
|
+
<Route
|
|
102
|
+
exact
|
|
103
|
+
path={RULE_NEW}
|
|
104
|
+
render={() => (
|
|
105
|
+
<>
|
|
106
|
+
<DomainsLoader actions="manage_quality_rule" />
|
|
107
|
+
<QualityTemplatesLoader />
|
|
108
|
+
<NewRule />
|
|
109
|
+
</>
|
|
110
|
+
)}
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<Route
|
|
114
|
+
path={RULE}
|
|
115
|
+
render={() => (
|
|
116
|
+
<>
|
|
117
|
+
<RuleLoader />
|
|
118
|
+
|
|
119
|
+
<Route
|
|
120
|
+
exact
|
|
121
|
+
path={RULE}
|
|
122
|
+
render={() => (
|
|
123
|
+
<>
|
|
124
|
+
<RuleCrumbs />
|
|
125
|
+
<Segment>
|
|
126
|
+
<RuleSubscriptionLoader />
|
|
127
|
+
<QualityTemplatesLoader />
|
|
128
|
+
<RuleImplementationsFromRuleLoader />
|
|
129
|
+
{ruleLoaded && <Rule />}
|
|
130
|
+
{ruleLoaded && <RuleProperties />}
|
|
131
|
+
{templatesLoaded && template && (
|
|
132
|
+
<DynamicFormViewer
|
|
133
|
+
template={template}
|
|
134
|
+
content={rule.df_content}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
</Segment>
|
|
138
|
+
</>
|
|
139
|
+
)}
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<Route
|
|
143
|
+
exact
|
|
144
|
+
path={RULE_EDIT}
|
|
145
|
+
render={() => (
|
|
146
|
+
<>
|
|
147
|
+
<DomainsLoader actions="manage_quality_rule" />
|
|
148
|
+
<QualityTemplatesLoader />
|
|
149
|
+
<EditRule />
|
|
150
|
+
</>
|
|
151
|
+
)}
|
|
152
|
+
/>
|
|
153
|
+
|
|
154
|
+
<Route
|
|
155
|
+
exact
|
|
156
|
+
path={RULE_EVENTS}
|
|
157
|
+
render={() => (
|
|
158
|
+
<>
|
|
159
|
+
<RuleCrumbs />
|
|
160
|
+
<Segment>
|
|
161
|
+
<RuleEventsLoader />
|
|
162
|
+
{ruleLoaded && <Rule />}
|
|
163
|
+
{ruleLoaded && <RuleEvents />}
|
|
164
|
+
</Segment>
|
|
165
|
+
</>
|
|
166
|
+
)}
|
|
167
|
+
/>
|
|
168
|
+
|
|
169
|
+
<Route
|
|
170
|
+
exact
|
|
171
|
+
path={RULE_IMPLEMENTATIONS}
|
|
172
|
+
render={() => (
|
|
173
|
+
<>
|
|
174
|
+
<RuleCrumbs />
|
|
175
|
+
<Segment>
|
|
176
|
+
<RuleSubscriptionLoader />
|
|
177
|
+
<RuleImplementationsFromRuleLoader />
|
|
178
|
+
{ruleLoaded && <Rule />}
|
|
179
|
+
{ruleLoaded && <RuleFormImplementations />}
|
|
180
|
+
</Segment>
|
|
181
|
+
</>
|
|
182
|
+
)}
|
|
183
|
+
/>
|
|
184
|
+
|
|
185
|
+
<Route
|
|
186
|
+
exact
|
|
187
|
+
path={RULE_IMPLEMENTATION_NEW}
|
|
188
|
+
render={() => (
|
|
189
|
+
<>
|
|
190
|
+
<ImplementationTemplatesLoader />
|
|
191
|
+
{!structuresAliasesLoading && !systemsLoading && (
|
|
192
|
+
<NewRuleImplementation edition={false} />
|
|
193
|
+
)}
|
|
194
|
+
</>
|
|
195
|
+
)}
|
|
196
|
+
/>
|
|
197
|
+
|
|
198
|
+
<ImplementationRoutes
|
|
199
|
+
{...{
|
|
200
|
+
ruleLoaded,
|
|
201
|
+
ruleImplementationLoaded,
|
|
202
|
+
implementationStructures,
|
|
203
|
+
implementationStructuresLoaded,
|
|
204
|
+
structuresAliasesLoading,
|
|
205
|
+
ruleImplementation,
|
|
206
|
+
}}
|
|
207
|
+
/>
|
|
208
|
+
</>
|
|
209
|
+
)}
|
|
210
|
+
/>
|
|
211
|
+
</>
|
|
212
|
+
);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const ImplementationRoutes = ({
|
|
216
|
+
ruleLoaded,
|
|
217
|
+
ruleImplementationLoaded,
|
|
218
|
+
implementationStructures,
|
|
219
|
+
implementationStructuresLoaded,
|
|
220
|
+
structuresAliasesLoading,
|
|
221
|
+
ruleImplementation,
|
|
98
222
|
}) => {
|
|
99
223
|
const latest = _.head(ruleImplementation.results);
|
|
100
224
|
const authorized = useAuthorized();
|
|
101
225
|
return (
|
|
102
226
|
<>
|
|
103
|
-
<Route
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
render={() => (
|
|
109
|
-
<>
|
|
110
|
-
<DomainsLoader actions="manage_quality_rule" />
|
|
111
|
-
<QualityTemplatesLoader />
|
|
112
|
-
<NewRule />
|
|
113
|
-
</>
|
|
114
|
-
)}
|
|
115
|
-
/>
|
|
116
|
-
<Route
|
|
117
|
-
path={RULE}
|
|
118
|
-
render={() => (
|
|
119
|
-
<>
|
|
120
|
-
<RuleLoader />
|
|
121
|
-
<Switch>
|
|
122
|
-
<Route
|
|
123
|
-
exact
|
|
124
|
-
path={RULE_EDIT}
|
|
125
|
-
render={() => (
|
|
126
|
-
<>
|
|
127
|
-
<DomainsLoader actions="manage_quality_rule" />
|
|
128
|
-
<QualityTemplatesLoader />
|
|
129
|
-
<EditRule />
|
|
130
|
-
</>
|
|
131
|
-
)}
|
|
132
|
-
/>
|
|
133
|
-
<Route
|
|
134
|
-
exact
|
|
135
|
-
path={RULE}
|
|
136
|
-
render={() => (
|
|
137
|
-
<>
|
|
138
|
-
<RuleCrumbs />
|
|
139
|
-
<Segment>
|
|
140
|
-
<RuleSubscriptionLoader />
|
|
141
|
-
<QualityTemplatesLoader />
|
|
142
|
-
<RuleImplementationsFromRuleLoader />
|
|
143
|
-
{ruleLoaded && <Rule />}
|
|
144
|
-
{ruleLoaded && <RuleProperties />}
|
|
145
|
-
{templatesLoaded && template && (
|
|
146
|
-
<DynamicFormViewer
|
|
147
|
-
template={template}
|
|
148
|
-
content={rule.df_content}
|
|
149
|
-
/>
|
|
150
|
-
)}
|
|
151
|
-
</Segment>
|
|
152
|
-
</>
|
|
153
|
-
)}
|
|
154
|
-
/>
|
|
227
|
+
<Route
|
|
228
|
+
path={RULE_IMPLEMENTATION}
|
|
229
|
+
render={() => (
|
|
230
|
+
<>
|
|
231
|
+
<RuleImplementationLoader />
|
|
155
232
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
233
|
+
<Route
|
|
234
|
+
exact
|
|
235
|
+
path={RULE_IMPLEMENTATION}
|
|
236
|
+
render={() => (
|
|
237
|
+
<>
|
|
238
|
+
<RuleCrumbs />
|
|
239
|
+
<Segment>
|
|
240
|
+
<ImplementationTemplatesLoader />
|
|
241
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
242
|
+
<RuleImplementation>
|
|
243
|
+
<RuleImplementationProperties />
|
|
244
|
+
</RuleImplementation>
|
|
245
|
+
)}
|
|
246
|
+
</Segment>
|
|
247
|
+
</>
|
|
248
|
+
)}
|
|
249
|
+
/>
|
|
170
250
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
exact
|
|
189
|
-
path={RULE_IMPLEMENTATION_EVENTS}
|
|
190
|
-
render={() => (
|
|
191
|
-
<>
|
|
192
|
-
<RuleCrumbs />
|
|
193
|
-
<Segment>
|
|
194
|
-
<ImplementationEventsLoader />
|
|
195
|
-
<RuleImplementationLoader />
|
|
196
|
-
{ruleLoaded && ruleImplementationLoaded && (
|
|
197
|
-
<RuleImplementation>
|
|
198
|
-
<RuleImplementationEvents />
|
|
199
|
-
</RuleImplementation>
|
|
200
|
-
)}
|
|
201
|
-
</Segment>
|
|
202
|
-
</>
|
|
203
|
-
)}
|
|
204
|
-
/>
|
|
251
|
+
<Route
|
|
252
|
+
exact
|
|
253
|
+
path={RULE_IMPLEMENTATION_EVENTS}
|
|
254
|
+
render={() => (
|
|
255
|
+
<>
|
|
256
|
+
<RuleCrumbs />
|
|
257
|
+
<Segment>
|
|
258
|
+
<ImplementationEventsLoader />
|
|
259
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
260
|
+
<RuleImplementation>
|
|
261
|
+
<RuleImplementationEvents />
|
|
262
|
+
</RuleImplementation>
|
|
263
|
+
)}
|
|
264
|
+
</Segment>
|
|
265
|
+
</>
|
|
266
|
+
)}
|
|
267
|
+
/>
|
|
205
268
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
)}
|
|
217
|
-
/>
|
|
218
|
-
<Route
|
|
219
|
-
exact
|
|
220
|
-
path={RULE_IMPLEMENTATION_CLONE}
|
|
221
|
-
render={() => (
|
|
222
|
-
<>
|
|
223
|
-
<RuleImplementationLoader />
|
|
224
|
-
<ImplementationTemplatesLoader />
|
|
225
|
-
{ruleImplementationLoaded && (
|
|
226
|
-
<ImplementationStructuresLoader
|
|
227
|
-
structureIds={implementationStructures}
|
|
228
|
-
/>
|
|
229
|
-
)}
|
|
230
|
-
{!structuresAliasesLoading &&
|
|
231
|
-
ruleImplementationLoaded &&
|
|
232
|
-
implementationStructuresLoaded && (
|
|
233
|
-
<NewRuleImplementation edition={true} clone={true} />
|
|
234
|
-
)}
|
|
235
|
-
</>
|
|
269
|
+
<Route
|
|
270
|
+
exact
|
|
271
|
+
path={RULE_IMPLEMENTATION_CLONE}
|
|
272
|
+
render={() => (
|
|
273
|
+
<>
|
|
274
|
+
<ImplementationTemplatesLoader />
|
|
275
|
+
{ruleImplementationLoaded && (
|
|
276
|
+
<ImplementationStructuresLoader
|
|
277
|
+
structureIds={implementationStructures}
|
|
278
|
+
/>
|
|
236
279
|
)}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
</>
|
|
256
|
-
)}
|
|
257
|
-
/>
|
|
258
|
-
<Route
|
|
259
|
-
exact
|
|
260
|
-
path={RULE_IMPLEMENTATION_MOVE}
|
|
261
|
-
render={() => (
|
|
262
|
-
<>
|
|
263
|
-
<RuleCrumbs />
|
|
264
|
-
<Segment>
|
|
265
|
-
<RuleImplementationLoader />
|
|
266
|
-
{ruleLoaded && ruleImplementationLoaded ? (
|
|
267
|
-
<RuleImplementation>
|
|
268
|
-
{authorized ? (
|
|
269
|
-
<MoveImplementation />
|
|
270
|
-
) : (
|
|
271
|
-
<Unauthorized />
|
|
272
|
-
)}
|
|
273
|
-
</RuleImplementation>
|
|
274
|
-
) : null}
|
|
275
|
-
</Segment>
|
|
276
|
-
</>
|
|
280
|
+
{!structuresAliasesLoading &&
|
|
281
|
+
ruleImplementationLoaded &&
|
|
282
|
+
implementationStructuresLoaded && (
|
|
283
|
+
<NewRuleImplementation edition={true} clone={true} />
|
|
284
|
+
)}
|
|
285
|
+
</>
|
|
286
|
+
)}
|
|
287
|
+
/>
|
|
288
|
+
<Route
|
|
289
|
+
exact
|
|
290
|
+
path={RULE_IMPLEMENTATION_EDIT}
|
|
291
|
+
render={() => (
|
|
292
|
+
<>
|
|
293
|
+
<ImplementationTemplatesLoader />
|
|
294
|
+
{ruleImplementationLoaded && (
|
|
295
|
+
<ImplementationStructuresLoader
|
|
296
|
+
structureIds={implementationStructures}
|
|
297
|
+
/>
|
|
277
298
|
)}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
299
|
+
{!structuresAliasesLoading &&
|
|
300
|
+
ruleImplementationLoaded &&
|
|
301
|
+
implementationStructuresLoaded && (
|
|
302
|
+
<NewRuleImplementation edition />
|
|
303
|
+
)}
|
|
304
|
+
</>
|
|
305
|
+
)}
|
|
306
|
+
/>
|
|
307
|
+
|
|
308
|
+
<Route
|
|
309
|
+
exact
|
|
310
|
+
path={RULE_IMPLEMENTATION_MOVE}
|
|
311
|
+
render={() => (
|
|
312
|
+
<>
|
|
313
|
+
<RuleCrumbs />
|
|
314
|
+
<Segment>
|
|
315
|
+
{ruleLoaded && ruleImplementationLoaded ? (
|
|
316
|
+
<RuleImplementation>
|
|
317
|
+
{authorized ? <MoveImplementation /> : <Unauthorized />}
|
|
318
|
+
</RuleImplementation>
|
|
319
|
+
) : null}
|
|
320
|
+
</Segment>
|
|
321
|
+
</>
|
|
322
|
+
)}
|
|
323
|
+
/>
|
|
324
|
+
<Route
|
|
325
|
+
exact
|
|
326
|
+
path={IMPLEMENTATION_CONCEPT_LINKS}
|
|
327
|
+
render={() => (
|
|
328
|
+
<>
|
|
329
|
+
<RuleCrumbs />
|
|
330
|
+
<Segment>
|
|
331
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
332
|
+
<RuleImplementation>
|
|
333
|
+
<ImplementationLinks />
|
|
334
|
+
</RuleImplementation>
|
|
335
|
+
)}
|
|
336
|
+
</Segment>
|
|
337
|
+
</>
|
|
338
|
+
)}
|
|
339
|
+
/>
|
|
340
|
+
<Route
|
|
341
|
+
exact
|
|
342
|
+
path={IMPLEMENTATION_CONCEPT_LINKS_NEW}
|
|
343
|
+
render={() => (
|
|
344
|
+
<>
|
|
345
|
+
<RuleCrumbs />
|
|
346
|
+
<Segment>
|
|
347
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
348
|
+
<RuleImplementation>
|
|
349
|
+
<ImplementationRelationForm />
|
|
350
|
+
</RuleImplementation>
|
|
351
|
+
)}
|
|
352
|
+
</Segment>
|
|
353
|
+
</>
|
|
354
|
+
)}
|
|
355
|
+
/>
|
|
356
|
+
<Route
|
|
357
|
+
exact
|
|
358
|
+
path={RULE_IMPLEMENTATION_RESULTS}
|
|
359
|
+
render={() => (
|
|
360
|
+
<>
|
|
361
|
+
<RuleCrumbs />
|
|
362
|
+
<Segment>
|
|
363
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
364
|
+
<RuleImplementation>
|
|
365
|
+
<RuleImplementationResults ruleResult={latest} />
|
|
366
|
+
</RuleImplementation>
|
|
367
|
+
)}
|
|
368
|
+
</Segment>
|
|
369
|
+
</>
|
|
370
|
+
)}
|
|
371
|
+
/>
|
|
372
|
+
|
|
373
|
+
<Route
|
|
374
|
+
exact
|
|
375
|
+
path={RULE_IMPLEMENTATION_RESULTS_DETAILS}
|
|
376
|
+
render={() => (
|
|
377
|
+
<>
|
|
378
|
+
<RuleCrumbs />
|
|
379
|
+
<Segment>
|
|
380
|
+
{ruleLoaded && ruleImplementationLoaded && (
|
|
381
|
+
<RuleImplementation>
|
|
382
|
+
<ExecutionDetails ruleResultId={latest.id} />
|
|
383
|
+
</RuleImplementation>
|
|
384
|
+
)}
|
|
385
|
+
</Segment>
|
|
386
|
+
</>
|
|
387
|
+
)}
|
|
388
|
+
/>
|
|
389
|
+
|
|
390
|
+
<Route
|
|
391
|
+
exact
|
|
392
|
+
path={RULE_IMPLEMENTATION_RESULT_DETAILS}
|
|
393
|
+
render={() => (
|
|
394
|
+
<>
|
|
395
|
+
<Segment>
|
|
352
396
|
<>
|
|
353
397
|
<RuleCrumbs />
|
|
354
|
-
<
|
|
355
|
-
<RuleImplementationLoader />
|
|
356
|
-
{ruleLoaded && ruleImplementationLoaded && (
|
|
357
|
-
<RuleImplementation>
|
|
358
|
-
<ExecutionDetails ruleResultId={latest.id} />
|
|
359
|
-
</RuleImplementation>
|
|
360
|
-
)}
|
|
361
|
-
</Segment>
|
|
362
|
-
</>
|
|
363
|
-
)}
|
|
364
|
-
/>
|
|
365
|
-
<Route
|
|
366
|
-
exact
|
|
367
|
-
path={RULE_IMPLEMENTATION_RESULT_DETAILS}
|
|
368
|
-
render={() => (
|
|
369
|
-
<>
|
|
370
|
-
<Segment>
|
|
371
|
-
<RuleImplementationLoader />
|
|
372
|
-
{ruleLoaded && ruleImplementationLoaded && (
|
|
373
|
-
<>
|
|
374
|
-
<RuleCrumbs />
|
|
375
|
-
<ExecutionDetails />
|
|
376
|
-
</>
|
|
377
|
-
)}
|
|
378
|
-
</Segment>
|
|
398
|
+
<ExecutionDetails />
|
|
379
399
|
</>
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
400
|
+
</Segment>
|
|
401
|
+
</>
|
|
402
|
+
)}
|
|
403
|
+
/>
|
|
404
|
+
</>
|
|
405
|
+
)}
|
|
406
|
+
/>
|
|
387
407
|
</>
|
|
388
408
|
);
|
|
389
409
|
};
|
|
390
410
|
|
|
391
|
-
|
|
392
|
-
rule: PropTypes.object,
|
|
393
|
-
implementationStructures: PropTypes.array,
|
|
411
|
+
const implementationPropTypes = {
|
|
394
412
|
ruleLoaded: PropTypes.bool,
|
|
395
|
-
template: PropTypes.object,
|
|
396
|
-
ruleImplementation: PropTypes.object,
|
|
397
413
|
ruleImplementationLoaded: PropTypes.bool,
|
|
414
|
+
implementationStructures: PropTypes.array,
|
|
398
415
|
implementationStructuresLoaded: PropTypes.bool,
|
|
416
|
+
structuresAliasesLoading: PropTypes.bool,
|
|
417
|
+
ruleImplementation: PropTypes.object,
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
ImplementationRoutes.propTypes = implementationPropTypes;
|
|
421
|
+
|
|
422
|
+
RuleRoutes.propTypes = {
|
|
423
|
+
rule: PropTypes.object,
|
|
424
|
+
template: PropTypes.object,
|
|
399
425
|
systemsLoading: PropTypes.bool,
|
|
400
426
|
templatesLoaded: PropTypes.bool,
|
|
401
|
-
|
|
427
|
+
...implementationPropTypes,
|
|
402
428
|
};
|
|
403
429
|
|
|
404
|
-
const mapStateToProps = (state) =>
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
430
|
+
const mapStateToProps = (state) => {
|
|
431
|
+
return {
|
|
432
|
+
rule: state.rule,
|
|
433
|
+
ruleLoaded: !_.isEmpty(state.rule),
|
|
434
|
+
ruleImplementationLoaded:
|
|
435
|
+
!state.ruleImplementationLoading && !_.isEmpty(state.ruleImplementation),
|
|
436
|
+
implementationStructures: getImplementationStructures(state),
|
|
437
|
+
implementationStructuresLoaded: getImplementationStructuresLoaded(state),
|
|
438
|
+
systemsLoading: state.systemsLoading,
|
|
439
|
+
templatesLoaded: !state.templatesLoading && !_.isEmpty(state.templates),
|
|
440
|
+
template: _.find(_.propEq("name", state.rule.df_name))(state.templates),
|
|
441
|
+
structuresAliasesLoading: state.structuresAliasesLoading,
|
|
442
|
+
ruleImplementation: state.ruleImplementation,
|
|
443
|
+
};
|
|
444
|
+
};
|
|
417
445
|
|
|
418
446
|
export default connect(mapStateToProps)(RuleRoutes);
|