Skip to content

Commit 3ae05c7

Browse files
authored
Merge pull request #44 from zenml-io/feature/pipeline-run-dag
Pipeline run dag
2 parents 1fce089 + 6b70412 commit 3ae05c7

39 files changed

+2233
-88
lines changed

.prettierrc.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
module.exports = {
2-
semi: true,
3-
trailingComma: 'all',
4-
singleQuote: true,
5-
tabWidth: 2,
6-
};
1+
module.exports = {
2+
semi: true,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
tabWidth: 2,
6+
endOfLine: 'auto',
7+
};

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@testing-library/user-event": "^12.1.0",
1212
"@types/classnames": "^2.2.10",
1313
"@types/country-list": "^2.1.0",
14+
"@types/dagre": "^0.7.48",
1415
"@types/jest": "^26.0.8",
1516
"@types/lodash": "^4.14.158",
1617
"@types/node": "^14.0.27",
@@ -28,6 +29,7 @@
2829
"bootstrap": "^4.5.0",
2930
"classnames": "^2.2.6",
3031
"country-list": "^2.2.0",
32+
"dagre": "^0.8.5",
3133
"date-fns": "^2.15.0",
3234
"eslint-import-resolver-babel-module": "^5.1.2",
3335
"eslint-plugin-react-hooks": "^4.0.8",
@@ -41,6 +43,7 @@
4143
"react-bootstrap": "^1.3.0",
4244
"react-datepicker": "^4.8.0",
4345
"react-dom": "^16.13.1",
46+
"react-flow-renderer": "^10.3.16",
4447
"react-outside-click-handler": "^1.3.0",
4548
"react-redux": "^7.2.1",
4649
"react-router-dom": "^5.2.0",
@@ -81,12 +84,14 @@
8184
"devDependencies": {
8285
"@typescript-eslint/eslint-plugin": "^3.7.1",
8386
"@typescript-eslint/parser": "^3.7.1",
87+
"autoprefixer": "^10.4.8",
8488
"babel-plugin-inline-react-svg": "^1.1.1",
8589
"eslint-config-prettier": "^6.11.0",
8690
"eslint-plugin-import": "^2.22.0",
8791
"eslint-plugin-prettier": "^3.1.4",
8892
"eslint-plugin-react": "^7.20.5",
8993
"eslint-plugin-redux-saga": "^1.1.3",
94+
"postcss": "^8.4.16",
9095
"prettier": "^2.0.5",
9196
"react-hooks-testing-library": "^0.6.0",
9297
"react-test-renderer": "^16.13.1"

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

src/App.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
src: url('./ui/assets/SourceCodePro-Regular.ttf') format('truetype');
1414
}
1515

16-
html , #root, body, .App {
16+
html,
17+
#root,
18+
body,
19+
.App {
1720
height: 100%;
1821
-webkit-tap-highlight-color: transparent;
1922
}
@@ -23,11 +26,13 @@ html {
2326
box-sizing: border-box;
2427
}
2528

26-
*, *:before, *:after {
29+
*,
30+
*:before,
31+
*:after {
2732
box-sizing: inherit;
2833
}
2934

3035
.container-fluid {
3136
padding-left: 0;
3237
padding-right: 0;
33-
}
38+
}

src/index.css

Lines changed: 118 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,134 @@
1-
html, body, div, span, applet, object, iframe,
2-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3-
a, abbr, acronym, address, big, cite, code,
4-
del, dfn, em, img, ins, kbd, q, s, samp,
5-
small, strike, strong, sub, sup, tt, var,
6-
b, u, i, center,
7-
dl, dt, dd, ol, ul, li,
8-
fieldset, form, label, legend,
9-
table, caption, tbody, tfoot, thead, tr, th, td,
10-
article, aside, canvas, details, embed,
11-
figure, figcaption, footer, header, hgroup,
12-
menu, nav, output, ruby, section, summary,
13-
time, mark, audio, video {
14-
margin: 0;
15-
padding: 0;
16-
border: 0;
17-
font-size: 100%;
18-
font: inherit;
19-
vertical-align: baseline;
1+
html,
2+
body,
3+
div,
4+
span,
5+
applet,
6+
object,
7+
iframe,
8+
h1,
9+
h2,
10+
h3,
11+
h4,
12+
h5,
13+
h6,
14+
p,
15+
blockquote,
16+
pre,
17+
a,
18+
abbr,
19+
acronym,
20+
address,
21+
big,
22+
cite,
23+
code,
24+
del,
25+
dfn,
26+
em,
27+
img,
28+
ins,
29+
kbd,
30+
q,
31+
s,
32+
samp,
33+
small,
34+
strike,
35+
strong,
36+
sub,
37+
sup,
38+
tt,
39+
var,
40+
b,
41+
u,
42+
i,
43+
center,
44+
dl,
45+
dt,
46+
dd,
47+
ol,
48+
ul,
49+
li,
50+
fieldset,
51+
form,
52+
label,
53+
legend,
54+
table,
55+
caption,
56+
tbody,
57+
tfoot,
58+
thead,
59+
tr,
60+
th,
61+
td,
62+
article,
63+
aside,
64+
canvas,
65+
details,
66+
embed,
67+
figure,
68+
figcaption,
69+
footer,
70+
header,
71+
hgroup,
72+
menu,
73+
nav,
74+
output,
75+
ruby,
76+
section,
77+
summary,
78+
time,
79+
mark,
80+
audio,
81+
video {
82+
margin: 0;
83+
padding: 0;
84+
border: 0;
85+
font-size: 100%;
86+
font: inherit;
87+
vertical-align: baseline;
2088
}
2189

2290
/* HTML5 display-role reset for older browsers */
23-
article, aside, details, figcaption, figure,
24-
footer, header, hgroup, menu, nav, section {
25-
display: block;
91+
article,
92+
aside,
93+
details,
94+
figcaption,
95+
figure,
96+
footer,
97+
header,
98+
hgroup,
99+
menu,
100+
nav,
101+
section {
102+
display: block;
26103
}
27104
body {
28-
line-height: 1;
105+
line-height: 1;
29106
}
30-
ol, ul {
31-
list-style: none;
107+
ol,
108+
ul {
109+
list-style: none;
32110
}
33-
blockquote, q {
34-
quotes: none;
111+
blockquote,
112+
q {
113+
quotes: none;
35114
}
36-
blockquote:before, blockquote:after,
37-
q:before, q:after {
38-
content: '';
39-
content: none;
115+
blockquote:before,
116+
blockquote:after,
117+
q:before,
118+
q:after {
119+
content: '';
120+
content: none;
40121
}
41122
table {
42-
border-collapse: collapse;
43-
border-spacing: 0;
123+
border-collapse: collapse;
124+
border-spacing: 0;
44125
}
45126

46127
html {
47-
font-size: 8px;
128+
font-size: 8px;
48129
}
49130

50131
.__PrivateStripeElement {
51-
top: 50%;
52-
transform: translateY(-50%);
53-
}
132+
top: 50%;
133+
transform: translateY(-50%);
134+
}

src/routes/appRoutesConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,4 +394,4 @@ const routes = [
394394
},
395395
];
396396

397-
export const appRoutesConfig = [...routes] as RouteInterface[];
397+
export const appRoutesConfig = [...routes] as RouteInterface[];

src/routes/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export const RouteConfig: React.FC = () => {
109109
component={route.Component}
110110
/>
111111
))}
112-
113112
<Route exact={true} component={NotFound} />
114113
</Switch>
115114
</Router>

src/services/locales/zu.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"text": "Billing"
2323
},
2424
"organizationSettings": {
25-
"text": "Organization Settings"
25+
"text": "Project Settings"
2626
}
2727
}
2828
},

src/ui/components/dag/index.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import { useService } from './useService';
3+
import { LayoutFlow } from '../lineage';
4+
5+
const styles = {
6+
container: { width: '100%', height: '100%' },
7+
dag: { width: '100%', height: '100%', marginTop: '2rem' },
8+
};
9+
10+
export const DAG: React.FC<{ runId: TId }> = ({ runId }) => {
11+
const { graph } = useService({ runId });
12+
13+
console.log(graph);
14+
15+
return (
16+
<div style={styles.container}>
17+
<div style={styles.dag}>
18+
<LayoutFlow graph={graph} />
19+
</div>
20+
</div>
21+
);
22+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// import { useEffect } from 'react';
2+
import { useSelector } from 'react-redux';
3+
import { runSelectors } from '../../../redux/selectors';
4+
5+
export const useService = ({ runId }: { runId: TId }) => {
6+
const graph = useSelector(runSelectors.graphByRunId(runId));
7+
// debugger;
8+
// useEffect(() => {}, [graph]);
9+
// const graph: any = useSelector(runSelectors.graphByRunId(runId));
10+
return { graph };
11+
};

0 commit comments

Comments
 (0)