@truedat/dq 4.43.6 → 4.44.2
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 +5 -5
- package/src/components/ImplementationCrumbs.js +91 -0
- package/src/components/ImplementationResultBar.js +1 -2
- package/src/components/ImplementationStructures.js +1 -3
- package/src/components/Implementations.js +9 -2
- package/src/components/ImplementationsRoutes.js +386 -17
- package/src/components/NewRuleImplementation.js +11 -27
- package/src/components/RemediationCrumbs.js +1 -2
- package/src/components/RuleCrumbs.js +6 -63
- package/src/components/RuleImplementation.js +15 -36
- package/src/components/RuleImplementationActions.js +18 -12
- package/src/components/RuleImplementationLink.js +2 -3
- package/src/components/RuleImplementationProperties.js +13 -14
- package/src/components/RuleImplementationResultTabs.js +27 -35
- package/src/components/RuleImplementationResults.js +1 -6
- package/src/components/RuleImplementationResultsLink.js +3 -9
- package/src/components/RuleImplementationTabs.js +13 -18
- package/src/components/RuleImplementationsActions.js +47 -1
- package/src/components/RuleLink.js +3 -4
- package/src/components/RuleResultRow.js +1 -6
- package/src/components/RuleResultSegmentRow.js +0 -3
- package/src/components/RuleResultSegments.js +2 -6
- package/src/components/RuleResultsRoutes.js +10 -10
- package/src/components/RuleRoutes.js +8 -285
- package/src/components/__tests__/__snapshots__/ImplementationResultBar.spec.js.snap +5 -5
- package/src/components/__tests__/__snapshots__/NewRuleImplementation.spec.js.snap +3 -0
- package/src/components/__tests__/__snapshots__/RuleCrumbs.spec.js.snap +2 -73
- package/src/components/__tests__/__snapshots__/RuleImplementation.spec.js.snap +7 -86
- package/src/components/__tests__/__snapshots__/RuleImplementationResultTabs.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleImplementationResults.spec.js.snap +0 -7
- package/src/components/__tests__/__snapshots__/RuleImplementationResultsLink.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleImplementationTabs.spec.js.snap +5 -5
- package/src/components/ruleImplementationForm/InformationForm.js +14 -1
- package/src/components/ruleImplementationForm/RuleImplementationForm.js +16 -11
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +16 -0
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +4 -2
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +40 -0
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationForm.spec.js.snap +4 -0
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +5 -0
- package/src/messages/en.js +4 -0
- package/src/messages/es.js +4 -0
- package/src/reducers/__tests__/ruleImplementationRedirect.spec.js +2 -2
- package/src/reducers/__tests__/ruleRedirect.spec.js +3 -3
- package/src/reducers/ruleImplementation.js +3 -0
- package/src/reducers/ruleImplementationRedirect.js +7 -6
- package/src/reducers/ruleRedirect.js +4 -2
- package/src/reducers/userRulePermissions.js +3 -1
- package/src/sagas/__tests__/deleteRuleResult.spec.js +3 -5
- package/src/sagas/__tests__/setRuleImplementationStatus.spec.js +7 -4
- package/src/sagas/deleteRuleResult.js +2 -7
- package/src/sagas/setRuleImplementationStatus.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.44.2] 2022-05-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- [TD-4089] Segments tab was not displaying segments
|
|
8
|
+
|
|
9
|
+
## [4.44.1] 2022-05-11
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- [TD-4089] Support for Implementations without Rules
|
|
14
|
+
|
|
3
15
|
## [4.43.5] 2022-05-05
|
|
4
16
|
|
|
5
17
|
# Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.44.2",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/plugin-transform-modules-commonjs": "^7.15.0",
|
|
32
32
|
"@babel/preset-env": "^7.15.0",
|
|
33
33
|
"@babel/preset-react": "^7.14.5",
|
|
34
|
-
"@truedat/test": "4.
|
|
34
|
+
"@truedat/test": "4.44.2",
|
|
35
35
|
"babel-jest": "^27.0.6",
|
|
36
36
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
37
37
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@apollo/client": "^3.4.10",
|
|
85
|
-
"@truedat/core": "4.
|
|
86
|
-
"@truedat/df": "4.
|
|
85
|
+
"@truedat/core": "4.44.2",
|
|
86
|
+
"@truedat/df": "4.44.2",
|
|
87
87
|
"axios": "^0.19.2",
|
|
88
88
|
"graphql": "^15.5.3",
|
|
89
89
|
"path-to-regexp": "^1.7.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"react-dom": ">= 16.8.6 < 17",
|
|
104
104
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "ca0c5fffcba96736f7a2054f3c37789da8c30a9e"
|
|
107
107
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import _ from "lodash/fp";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Breadcrumb } from "semantic-ui-react";
|
|
5
|
+
import { connect } from "react-redux";
|
|
6
|
+
import { Link, useParams } from "react-router-dom";
|
|
7
|
+
import { FormattedMessage } from "react-intl";
|
|
8
|
+
import { RULES, IMPLEMENTATIONS, linkTo } from "@truedat/core/routes";
|
|
9
|
+
import { DateTime } from "@truedat/core/components";
|
|
10
|
+
|
|
11
|
+
export const ImplementationCrumbs = ({ ruleImplementation }) => {
|
|
12
|
+
const { rule_result_id } = useParams();
|
|
13
|
+
const rule = _.get("rule")(ruleImplementation);
|
|
14
|
+
|
|
15
|
+
const ruleResultDate = _.flow(
|
|
16
|
+
_.propOr([], "results"),
|
|
17
|
+
_.find(_.propEq("id", _.toNumber(rule_result_id))),
|
|
18
|
+
_.pathOr("0000-00-00 00:00", "date")
|
|
19
|
+
)(ruleImplementation);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Breadcrumb>
|
|
23
|
+
{rule ? (
|
|
24
|
+
<>
|
|
25
|
+
<Breadcrumb.Section as={Link} to={RULES} active={false}>
|
|
26
|
+
<FormattedMessage id="rules.crumbs.top" />
|
|
27
|
+
</Breadcrumb.Section>
|
|
28
|
+
{rule.name && (
|
|
29
|
+
<>
|
|
30
|
+
<Breadcrumb.Divider icon="right angle" />
|
|
31
|
+
{ruleImplementation.id ? (
|
|
32
|
+
<Breadcrumb.Section
|
|
33
|
+
as={Link}
|
|
34
|
+
to={linkTo.RULE({ id: ruleImplementation.rule_id })}
|
|
35
|
+
active={_.isEmpty(ruleImplementation)}
|
|
36
|
+
>
|
|
37
|
+
{rule.name}
|
|
38
|
+
</Breadcrumb.Section>
|
|
39
|
+
) : (
|
|
40
|
+
<Breadcrumb.Section active>{rule.name}</Breadcrumb.Section>
|
|
41
|
+
)}
|
|
42
|
+
</>
|
|
43
|
+
)}
|
|
44
|
+
</>
|
|
45
|
+
) : (
|
|
46
|
+
<Breadcrumb.Section as={Link} to={IMPLEMENTATIONS} active={false}>
|
|
47
|
+
<FormattedMessage id="implementations.crumbs.top" />
|
|
48
|
+
</Breadcrumb.Section>
|
|
49
|
+
)}
|
|
50
|
+
|
|
51
|
+
{ruleImplementation.id && (
|
|
52
|
+
<>
|
|
53
|
+
<Breadcrumb.Divider icon="right angle" />
|
|
54
|
+
{rule_result_id ? (
|
|
55
|
+
<Breadcrumb.Section
|
|
56
|
+
as={Link}
|
|
57
|
+
to={linkTo.IMPLEMENTATION({
|
|
58
|
+
implementation_id: ruleImplementation.id,
|
|
59
|
+
})}
|
|
60
|
+
active={_.isEmpty(ruleImplementation)}
|
|
61
|
+
>
|
|
62
|
+
{ruleImplementation.implementation_key}
|
|
63
|
+
</Breadcrumb.Section>
|
|
64
|
+
) : (
|
|
65
|
+
<Breadcrumb.Section active>
|
|
66
|
+
{ruleImplementation.implementation_key}
|
|
67
|
+
</Breadcrumb.Section>
|
|
68
|
+
)}
|
|
69
|
+
</>
|
|
70
|
+
)}
|
|
71
|
+
{rule_result_id && (
|
|
72
|
+
<>
|
|
73
|
+
<Breadcrumb.Divider icon="right angle" />
|
|
74
|
+
<Breadcrumb.Section active>
|
|
75
|
+
{<DateTime value={ruleResultDate} />}
|
|
76
|
+
</Breadcrumb.Section>
|
|
77
|
+
</>
|
|
78
|
+
)}
|
|
79
|
+
</Breadcrumb>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
ImplementationCrumbs.propTypes = {
|
|
84
|
+
ruleImplementation: PropTypes.object,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const mapStateToProps = ({ rule, ruleImplementation }) => ({
|
|
88
|
+
rule,
|
|
89
|
+
ruleImplementation,
|
|
90
|
+
});
|
|
91
|
+
export default connect(mapStateToProps)(ImplementationCrumbs);
|
|
@@ -52,8 +52,7 @@ export default function ImplementationResultBar({ implementation }) {
|
|
|
52
52
|
<Link
|
|
53
53
|
as="div"
|
|
54
54
|
className="rule-summary pointer"
|
|
55
|
-
to={linkTo.
|
|
56
|
-
id: implementation.rule_id,
|
|
55
|
+
to={linkTo.IMPLEMENTATION_RESULTS({
|
|
57
56
|
implementation_id: implementation.id,
|
|
58
57
|
})}
|
|
59
58
|
>
|
|
@@ -74,20 +74,18 @@ export const ImplementationStructures = ({ implementation, canCreateLink }) => {
|
|
|
74
74
|
/>
|
|
75
75
|
));
|
|
76
76
|
|
|
77
|
-
const id = _.prop("rule_id")(implementation);
|
|
78
77
|
const implementation_id = _.prop("id")(implementation);
|
|
79
78
|
|
|
80
79
|
return (
|
|
81
80
|
<Segment attached="bottom">
|
|
82
81
|
<Grid>
|
|
83
|
-
{
|
|
82
|
+
{implementation_id && canCreateLink && (
|
|
84
83
|
<Grid.Column width={16}>
|
|
85
84
|
<Button
|
|
86
85
|
floated="right"
|
|
87
86
|
primary
|
|
88
87
|
as={Link}
|
|
89
88
|
to={linkTo.IMPLEMENTATION_STRUCTURES_NEW({
|
|
90
|
-
id,
|
|
91
89
|
implementation_id,
|
|
92
90
|
})}
|
|
93
91
|
content={<FormattedMessage id="links.actions.create" />}
|
|
@@ -78,9 +78,10 @@ export const Implementations = ({
|
|
|
78
78
|
deletedRender,
|
|
79
79
|
setRuleImplementationStatus,
|
|
80
80
|
manageRuleImplementationAction,
|
|
81
|
+
rule,
|
|
81
82
|
}) => {
|
|
82
83
|
const handleStatusChange = (id, mode) =>
|
|
83
|
-
setRuleImplementationStatus({ id, ...mode });
|
|
84
|
+
setRuleImplementationStatus({ id, ruleId: rule?.id, ...mode });
|
|
84
85
|
const additionalColumns = manageRuleImplementationAction
|
|
85
86
|
? [<Table.HeaderCell key={"status"} width={1} />]
|
|
86
87
|
: [];
|
|
@@ -107,13 +108,19 @@ Implementations.propTypes = {
|
|
|
107
108
|
deletedRender: PropTypes.bool,
|
|
108
109
|
setRuleImplementationStatus: PropTypes.func,
|
|
109
110
|
manageRuleImplementationAction: PropTypes.bool,
|
|
111
|
+
rule: PropTypes.object,
|
|
110
112
|
};
|
|
111
113
|
|
|
112
|
-
const mapStateToProps = ({
|
|
114
|
+
const mapStateToProps = ({
|
|
115
|
+
ruleImplementations,
|
|
116
|
+
userRulePermissions,
|
|
117
|
+
rule,
|
|
118
|
+
}) => ({
|
|
113
119
|
ruleImplementations,
|
|
114
120
|
manageRuleImplementationAction: _.prop("manage_quality_rule_implementations")(
|
|
115
121
|
userRulePermissions
|
|
116
122
|
),
|
|
123
|
+
rule,
|
|
117
124
|
});
|
|
118
125
|
|
|
119
126
|
export default connect(mapStateToProps, { setRuleImplementationStatus })(
|
|
@@ -1,30 +1,399 @@
|
|
|
1
|
+
import _ from "lodash/fp";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Route, Switch, useRouteMatch, useParams } from "react-router-dom";
|
|
5
|
+
import { connect } from "react-redux";
|
|
6
|
+
import { Segment } from "semantic-ui-react";
|
|
7
|
+
import { Unauthorized } from "@truedat/core/components";
|
|
8
|
+
import { useAuthorized } from "@truedat/core/hooks";
|
|
9
|
+
import {
|
|
10
|
+
IMPLEMENTATION_CLONE,
|
|
11
|
+
IMPLEMENTATION_CONCEPT_LINKS_NEW,
|
|
12
|
+
IMPLEMENTATION_CONCEPT_LINKS,
|
|
13
|
+
IMPLEMENTATION_EDIT,
|
|
14
|
+
IMPLEMENTATION_EVENTS,
|
|
15
|
+
IMPLEMENTATION_MOVE,
|
|
16
|
+
IMPLEMENTATION_NEW,
|
|
17
|
+
IMPLEMENTATION_NEW_RAW,
|
|
18
|
+
IMPLEMENTATION_RESULT_DETAILS,
|
|
19
|
+
IMPLEMENTATION_RESULTS_DETAILS,
|
|
20
|
+
IMPLEMENTATION_RESULTS,
|
|
21
|
+
IMPLEMENTATION_STRUCTURES_NEW,
|
|
22
|
+
IMPLEMENTATION_STRUCTURES,
|
|
23
|
+
IMPLEMENTATION,
|
|
24
|
+
IMPLEMENTATIONS,
|
|
25
|
+
} from "@truedat/core/routes";
|
|
26
|
+
import {
|
|
27
|
+
getImplementationStructures,
|
|
28
|
+
getImplementationStructuresLoaded,
|
|
29
|
+
} from "../selectors";
|
|
30
|
+
import ImplementationCrumbs from "./ImplementationCrumbs";
|
|
4
31
|
import ImplementationFiltersLoader from "./ImplementationFiltersLoader";
|
|
5
32
|
import RuleImplementations from "./RuleImplementations";
|
|
6
33
|
import RuleImplementationsLoader from "./RuleImplementationsLoader";
|
|
7
34
|
|
|
35
|
+
import ImplementationStructures from "./ImplementationStructures";
|
|
36
|
+
import ImplementationStructuresNew from "./ImplementationStructuresNew";
|
|
37
|
+
import MoveImplementation from "./MoveImplementation";
|
|
38
|
+
import NewRuleImplementation from "./NewRuleImplementation";
|
|
39
|
+
import RuleImplementation from "./RuleImplementation";
|
|
40
|
+
import RuleImplementationEvents from "./RuleImplementationEvents";
|
|
41
|
+
import RuleImplementationLoader from "./RuleImplementationLoader";
|
|
42
|
+
import RuleImplementationProperties from "./RuleImplementationProperties";
|
|
43
|
+
import RuleImplementationResults from "./RuleImplementationResults";
|
|
44
|
+
import RuleResultDetails from "./RuleResultDetails";
|
|
45
|
+
import RuleResultsRoutes from "./RuleResultsRoutes";
|
|
46
|
+
import RuleResultRemediationLoader from "./RuleResultRemediationLoader";
|
|
47
|
+
|
|
8
48
|
const TemplatesLoader = React.lazy(() =>
|
|
9
49
|
import("@truedat/df/templates/components/TemplatesLoader")
|
|
10
50
|
);
|
|
11
51
|
const UserSearchFiltersLoader = React.lazy(() =>
|
|
12
52
|
import("@truedat/dd/components/UserSearchFiltersLoader")
|
|
13
53
|
);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</>
|
|
26
|
-
)}
|
|
27
|
-
/>
|
|
54
|
+
const DomainsLoader = React.lazy(() =>
|
|
55
|
+
import("@truedat/bg/taxonomy/components/DomainsLoader")
|
|
56
|
+
);
|
|
57
|
+
const EventsLoader = React.lazy(() =>
|
|
58
|
+
import("@truedat/audit/components/EventsLoader")
|
|
59
|
+
);
|
|
60
|
+
const ImplementationStructuresLoader = React.lazy(() =>
|
|
61
|
+
import("@truedat/dd/components/ImplementationStructuresLoader")
|
|
62
|
+
);
|
|
63
|
+
const ImplementationLinks = React.lazy(() =>
|
|
64
|
+
import("@truedat/lm/components/ImplementationLinks")
|
|
28
65
|
);
|
|
66
|
+
const ImplementationRelationForm = React.lazy(() =>
|
|
67
|
+
import("@truedat/lm/components/ImplementationRelationForm")
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const ImplementationEventsLoader = () => {
|
|
71
|
+
const match = useRouteMatch();
|
|
72
|
+
const id = _.path("params.implementation_id")(match);
|
|
73
|
+
return <EventsLoader resource_id={id} resource_type="implementation" />;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const ImplementationTemplatesLoader = () => <TemplatesLoader scope="ri" />;
|
|
77
|
+
|
|
78
|
+
const ImplementationsRoutes = ({
|
|
79
|
+
structuresAliasesLoading,
|
|
80
|
+
systemsLoading,
|
|
81
|
+
ruleImplementationLoaded,
|
|
82
|
+
ruleImplementation,
|
|
83
|
+
implementationStructures,
|
|
84
|
+
implementationStructuresLoaded,
|
|
85
|
+
}) => {
|
|
86
|
+
const latest = _.head(ruleImplementation.results);
|
|
87
|
+
const authorized = useAuthorized();
|
|
88
|
+
const { rule_result_id: ruleResultId } = useParams();
|
|
89
|
+
return (
|
|
90
|
+
<Switch>
|
|
91
|
+
<Route
|
|
92
|
+
exact
|
|
93
|
+
path={IMPLEMENTATION_NEW}
|
|
94
|
+
render={() => (
|
|
95
|
+
<>
|
|
96
|
+
<DomainsLoader
|
|
97
|
+
actions={[
|
|
98
|
+
"manage_ruleless_implementations",
|
|
99
|
+
"manage_quality_rule_implementations",
|
|
100
|
+
]}
|
|
101
|
+
filter="all"
|
|
102
|
+
/>
|
|
103
|
+
<TemplatesLoader scope="ri" />
|
|
104
|
+
{!structuresAliasesLoading && !systemsLoading && (
|
|
105
|
+
<NewRuleImplementation edition={false} />
|
|
106
|
+
)}
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
/>
|
|
110
|
+
<Route
|
|
111
|
+
exact
|
|
112
|
+
path={IMPLEMENTATION_NEW_RAW}
|
|
113
|
+
render={() => (
|
|
114
|
+
<>
|
|
115
|
+
<DomainsLoader
|
|
116
|
+
actions={[
|
|
117
|
+
"manage_ruleless_implementations",
|
|
118
|
+
"manage_raw_quality_rule_implementations",
|
|
119
|
+
]}
|
|
120
|
+
filter="all"
|
|
121
|
+
/>
|
|
122
|
+
<TemplatesLoader scope="ri" />
|
|
123
|
+
{!structuresAliasesLoading && !systemsLoading && (
|
|
124
|
+
<NewRuleImplementation edition={false} implementationType="raw" />
|
|
125
|
+
)}
|
|
126
|
+
</>
|
|
127
|
+
)}
|
|
128
|
+
/>
|
|
129
|
+
<Route
|
|
130
|
+
path={IMPLEMENTATION}
|
|
131
|
+
render={() => (
|
|
132
|
+
<>
|
|
133
|
+
<RuleImplementationLoader />
|
|
134
|
+
|
|
135
|
+
<Route
|
|
136
|
+
exact
|
|
137
|
+
path={IMPLEMENTATION}
|
|
138
|
+
render={() => (
|
|
139
|
+
<>
|
|
140
|
+
<ImplementationCrumbs />
|
|
141
|
+
<Segment>
|
|
142
|
+
<ImplementationTemplatesLoader />
|
|
143
|
+
{ruleImplementationLoaded && (
|
|
144
|
+
<RuleImplementation>
|
|
145
|
+
<RuleImplementationProperties />
|
|
146
|
+
</RuleImplementation>
|
|
147
|
+
)}
|
|
148
|
+
</Segment>
|
|
149
|
+
</>
|
|
150
|
+
)}
|
|
151
|
+
/>
|
|
152
|
+
|
|
153
|
+
<Route
|
|
154
|
+
exact
|
|
155
|
+
path={IMPLEMENTATION_EVENTS}
|
|
156
|
+
render={() => (
|
|
157
|
+
<>
|
|
158
|
+
<ImplementationCrumbs />
|
|
159
|
+
<Segment>
|
|
160
|
+
<ImplementationEventsLoader />
|
|
161
|
+
{ruleImplementationLoaded && (
|
|
162
|
+
<RuleImplementation>
|
|
163
|
+
<RuleImplementationEvents />
|
|
164
|
+
</RuleImplementation>
|
|
165
|
+
)}
|
|
166
|
+
</Segment>
|
|
167
|
+
</>
|
|
168
|
+
)}
|
|
169
|
+
/>
|
|
170
|
+
|
|
171
|
+
<Route
|
|
172
|
+
exact
|
|
173
|
+
path={IMPLEMENTATION_CLONE}
|
|
174
|
+
render={() => (
|
|
175
|
+
<>
|
|
176
|
+
{!ruleImplementation?.rule_id ? (
|
|
177
|
+
<DomainsLoader
|
|
178
|
+
actions={[
|
|
179
|
+
"manage_ruleless_implementations",
|
|
180
|
+
ruleImplementation?.implementation_type === "raw"
|
|
181
|
+
? "manage_raw_quality_rule_implementations"
|
|
182
|
+
: "manage_quality_rule_implementations",
|
|
183
|
+
]}
|
|
184
|
+
filter="all"
|
|
185
|
+
/>
|
|
186
|
+
) : null}
|
|
187
|
+
|
|
188
|
+
<ImplementationTemplatesLoader />
|
|
189
|
+
{ruleImplementationLoaded && (
|
|
190
|
+
<ImplementationStructuresLoader
|
|
191
|
+
structureIds={implementationStructures}
|
|
192
|
+
/>
|
|
193
|
+
)}
|
|
194
|
+
{!structuresAliasesLoading &&
|
|
195
|
+
ruleImplementationLoaded &&
|
|
196
|
+
implementationStructuresLoaded && (
|
|
197
|
+
<NewRuleImplementation edition={true} clone={true} />
|
|
198
|
+
)}
|
|
199
|
+
</>
|
|
200
|
+
)}
|
|
201
|
+
/>
|
|
202
|
+
<Route
|
|
203
|
+
exact
|
|
204
|
+
path={IMPLEMENTATION_EDIT}
|
|
205
|
+
render={() => (
|
|
206
|
+
<>
|
|
207
|
+
{!ruleImplementation?.rule_id ? (
|
|
208
|
+
<DomainsLoader
|
|
209
|
+
actions={[
|
|
210
|
+
"manage_ruleless_implementations",
|
|
211
|
+
ruleImplementation?.implementation_type === "raw"
|
|
212
|
+
? "manage_raw_quality_rule_implementations"
|
|
213
|
+
: "manage_quality_rule_implementations",
|
|
214
|
+
]}
|
|
215
|
+
filter="all"
|
|
216
|
+
/>
|
|
217
|
+
) : null}
|
|
218
|
+
|
|
219
|
+
<ImplementationTemplatesLoader />
|
|
220
|
+
{ruleImplementationLoaded && (
|
|
221
|
+
<ImplementationStructuresLoader
|
|
222
|
+
structureIds={implementationStructures}
|
|
223
|
+
/>
|
|
224
|
+
)}
|
|
225
|
+
{!structuresAliasesLoading &&
|
|
226
|
+
ruleImplementationLoaded &&
|
|
227
|
+
implementationStructuresLoaded && (
|
|
228
|
+
<NewRuleImplementation edition />
|
|
229
|
+
)}
|
|
230
|
+
</>
|
|
231
|
+
)}
|
|
232
|
+
/>
|
|
233
|
+
|
|
234
|
+
<Route
|
|
235
|
+
exact
|
|
236
|
+
path={IMPLEMENTATION_MOVE}
|
|
237
|
+
render={() => (
|
|
238
|
+
<>
|
|
239
|
+
<ImplementationCrumbs />
|
|
240
|
+
<Segment>
|
|
241
|
+
{ruleImplementationLoaded ? (
|
|
242
|
+
<RuleImplementation>
|
|
243
|
+
{authorized ? <MoveImplementation /> : <Unauthorized />}
|
|
244
|
+
</RuleImplementation>
|
|
245
|
+
) : null}
|
|
246
|
+
</Segment>
|
|
247
|
+
</>
|
|
248
|
+
)}
|
|
249
|
+
/>
|
|
250
|
+
<Route
|
|
251
|
+
exact
|
|
252
|
+
path={IMPLEMENTATION_CONCEPT_LINKS}
|
|
253
|
+
render={() => (
|
|
254
|
+
<>
|
|
255
|
+
<ImplementationCrumbs />
|
|
256
|
+
<Segment>
|
|
257
|
+
{ruleImplementationLoaded && (
|
|
258
|
+
<RuleImplementation>
|
|
259
|
+
<ImplementationLinks />
|
|
260
|
+
</RuleImplementation>
|
|
261
|
+
)}
|
|
262
|
+
</Segment>
|
|
263
|
+
</>
|
|
264
|
+
)}
|
|
265
|
+
/>
|
|
266
|
+
<Route
|
|
267
|
+
exact
|
|
268
|
+
path={IMPLEMENTATION_CONCEPT_LINKS_NEW}
|
|
269
|
+
render={() => (
|
|
270
|
+
<>
|
|
271
|
+
<ImplementationCrumbs />
|
|
272
|
+
<Segment>
|
|
273
|
+
{ruleImplementationLoaded && (
|
|
274
|
+
<RuleImplementation>
|
|
275
|
+
<ImplementationRelationForm />
|
|
276
|
+
</RuleImplementation>
|
|
277
|
+
)}
|
|
278
|
+
</Segment>
|
|
279
|
+
</>
|
|
280
|
+
)}
|
|
281
|
+
/>
|
|
282
|
+
<Route
|
|
283
|
+
exact
|
|
284
|
+
path={IMPLEMENTATION_STRUCTURES}
|
|
285
|
+
render={() => (
|
|
286
|
+
<>
|
|
287
|
+
<ImplementationCrumbs />
|
|
288
|
+
<Segment>
|
|
289
|
+
{ruleImplementationLoaded && (
|
|
290
|
+
<RuleImplementation>
|
|
291
|
+
<ImplementationStructures />
|
|
292
|
+
</RuleImplementation>
|
|
293
|
+
)}
|
|
294
|
+
</Segment>
|
|
295
|
+
</>
|
|
296
|
+
)}
|
|
297
|
+
/>
|
|
298
|
+
<Route
|
|
299
|
+
exact
|
|
300
|
+
path={IMPLEMENTATION_STRUCTURES_NEW}
|
|
301
|
+
render={() => (
|
|
302
|
+
<>
|
|
303
|
+
<ImplementationCrumbs />
|
|
304
|
+
<Segment>
|
|
305
|
+
{ruleImplementationLoaded && (
|
|
306
|
+
<RuleImplementation>
|
|
307
|
+
<ImplementationStructuresNew />
|
|
308
|
+
</RuleImplementation>
|
|
309
|
+
)}
|
|
310
|
+
</Segment>
|
|
311
|
+
</>
|
|
312
|
+
)}
|
|
313
|
+
/>
|
|
314
|
+
<Route
|
|
315
|
+
exact
|
|
316
|
+
path={IMPLEMENTATION_RESULTS}
|
|
317
|
+
render={() => (
|
|
318
|
+
<>
|
|
319
|
+
<ImplementationCrumbs />
|
|
320
|
+
<Segment>
|
|
321
|
+
{ruleImplementationLoaded && (
|
|
322
|
+
<RuleImplementation>
|
|
323
|
+
<RuleImplementationResults ruleResult={latest} />
|
|
324
|
+
</RuleImplementation>
|
|
325
|
+
)}
|
|
326
|
+
</Segment>
|
|
327
|
+
</>
|
|
328
|
+
)}
|
|
329
|
+
/>
|
|
330
|
+
|
|
331
|
+
<Route
|
|
332
|
+
exact
|
|
333
|
+
path={IMPLEMENTATION_RESULTS_DETAILS}
|
|
334
|
+
render={() => (
|
|
335
|
+
<>
|
|
336
|
+
<ImplementationCrumbs />
|
|
337
|
+
<Segment>
|
|
338
|
+
{ruleImplementationLoaded && (
|
|
339
|
+
<RuleImplementation>
|
|
340
|
+
<RuleResultDetails ruleResultId={latest.id} />
|
|
341
|
+
</RuleImplementation>
|
|
342
|
+
)}
|
|
343
|
+
</Segment>
|
|
344
|
+
</>
|
|
345
|
+
)}
|
|
346
|
+
/>
|
|
347
|
+
<Route
|
|
348
|
+
path={IMPLEMENTATION_RESULT_DETAILS}
|
|
349
|
+
render={() => (
|
|
350
|
+
<>
|
|
351
|
+
<RuleResultRemediationLoader
|
|
352
|
+
propRuleResultId={ruleResultId}
|
|
353
|
+
/>
|
|
354
|
+
<TemplatesLoader scope="remediation" />
|
|
355
|
+
<RuleResultsRoutes />
|
|
356
|
+
</>
|
|
357
|
+
)}
|
|
358
|
+
/>
|
|
359
|
+
</>
|
|
360
|
+
)}
|
|
361
|
+
/>
|
|
362
|
+
<Route
|
|
363
|
+
path={IMPLEMENTATIONS}
|
|
364
|
+
render={() => (
|
|
365
|
+
<>
|
|
366
|
+
<RuleImplementationsLoader />
|
|
367
|
+
<ImplementationFiltersLoader />
|
|
368
|
+
<TemplatesLoader scope="qe" />
|
|
369
|
+
<UserSearchFiltersLoader scope="rule_implementation" />
|
|
370
|
+
<RuleImplementations exact />
|
|
371
|
+
</>
|
|
372
|
+
)}
|
|
373
|
+
/>
|
|
374
|
+
</Switch>
|
|
375
|
+
);
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
ImplementationsRoutes.propTypes = {
|
|
379
|
+
structuresAliasesLoading: PropTypes.bool,
|
|
380
|
+
systemsLoading: PropTypes.bool,
|
|
381
|
+
ruleImplementationLoaded: PropTypes.bool,
|
|
382
|
+
ruleImplementation: PropTypes.object,
|
|
383
|
+
implementationStructures: PropTypes.array,
|
|
384
|
+
implementationStructuresLoaded: PropTypes.bool,
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
export const mapStateToProps = (state) => ({
|
|
388
|
+
..._.pick([
|
|
389
|
+
"structuresAliasesLoading",
|
|
390
|
+
"systemsLoading",
|
|
391
|
+
"ruleImplementation",
|
|
392
|
+
])(state),
|
|
393
|
+
ruleImplementationLoaded:
|
|
394
|
+
!state.ruleImplementationLoading && !_.isEmpty(state.ruleImplementation),
|
|
395
|
+
implementationStructures: getImplementationStructures(state),
|
|
396
|
+
implementationStructuresLoaded: getImplementationStructuresLoaded(state),
|
|
397
|
+
});
|
|
29
398
|
|
|
30
|
-
export default ImplementationsRoutes;
|
|
399
|
+
export default connect(mapStateToProps)(ImplementationsRoutes);
|