Skip to content

Commit 6893c73

Browse files
Merge pull request #349 from zenml-io/dev
Dev to UAT
2 parents a6452f7 + 329d78d commit 6893c73

File tree

168 files changed

+9368
-761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+9368
-761
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
],
5+
"plugins": [
6+
"@babel/plugin-proposal-class-properties"
7+
]
8+
}

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
REACT_APP_BASE_API_URL="https://appserver.zenml.io/api/v1"
2-
REACT_APP_HUB_API_URL="https://hubapi.zenml.io"
1+
# REACT_APP_BASE_API_URL= https://felix.develaws.zenml.io/api/v1
2+
REACT_APP_BASE_API_URL= https://appserver.zenml.io/api/v1
33
REACT_APP_VERSION=$npm_package_version

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,6 @@ build/
110110
# TernJS port file
111111
.tern-port
112112

113-
!.env
113+
!.env
114+
115+
build

global.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ interface TAction {
3232
payload: any;
3333
}
3434

35+
interface TServerInfo {
36+
id: string;
37+
version: string;
38+
deploymentType: string;
39+
databaseType: string;
40+
secretsStoreType: string;
41+
}
42+
3543
type TClickEvent = (arg1: React.MouseEvent) => void;
3644

3745
interface TUser {
@@ -47,6 +55,27 @@ interface TUser {
4755
created: any;
4856
}
4957

58+
interface TRepository {
59+
id: TId;
60+
created: string;
61+
updated: string;
62+
user: TUser;
63+
workspace: TWorkspace;
64+
name: string;
65+
logo_url: string;
66+
description: string;
67+
config: {
68+
owner: string;
69+
repository: string;
70+
token: string;
71+
};
72+
source: {
73+
module: string;
74+
attribute: string;
75+
type: string;
76+
};
77+
}
78+
5079
interface THubUser {
5180
id: string;
5281
email: string;

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@types/dagre": "^0.7.48",
1717
"@types/jest": "^26.0.8",
1818
"@types/node": "^14.0.27",
19+
"@types/papaparse": "^5.3.7",
1920
"@types/react": "^16.9.44",
2021
"@types/react-datepicker": "^4.4.2",
2122
"@types/react-dom": "^16.9.8",
@@ -45,6 +46,7 @@
4546
"lottie-react": "^2.4.0",
4647
"moment": "^2.29.4",
4748
"node-sass": "^4.14.1",
49+
"papaparse": "^5.4.1",
4850
"query-string": "^6.13.1",
4951
"react": "^16.13.1",
5052
"react-bootstrap": "^1.3.0",

src/App.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,57 @@ html {
5454
padding-left: 0;
5555
padding-right: 0;
5656
}
57+
58+
/* reactflow */
59+
.react-flow__edge-path {
60+
stroke: #443E99;
61+
}
62+
63+
.react-flow__controls {
64+
border: none;
65+
display: flex;
66+
justify-content: center;
67+
align-items: center;
68+
flex-direction: column;
69+
filter: none;
70+
box-shadow: none;
71+
/* bottom: 10%; */
72+
/* left: 40px; */
73+
}
74+
75+
.react-flow__controls button :first-child {
76+
border: none;
77+
height: 55px;
78+
width: 55px;
79+
}
80+
81+
.react-flow__controls :nth-child(n) {
82+
border-radius: 100%;
83+
background-color: #fffffd;
84+
height: 35px;
85+
width: 35px;
86+
filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.08));
87+
margin: 5px;
88+
}
89+
90+
.react-flow__controls :nth-child(n) :first-child {
91+
border-radius: 0%;
92+
height: 35px;
93+
width: 35px;
94+
}
95+
96+
97+
.react-flow__zoom-in {
98+
background-color: #443E99;
99+
height: 100px;
100+
width: 100px;
101+
}
102+
a[class*='MenuItem'][class*='active'] .sidebar-fill path {
103+
stroke: transparent !important;
104+
fill: #e8a562 !important;
105+
}
106+
107+
a[class*='MenuItem']:hover .sidebar-fill path {
108+
stroke: transparent !important;
109+
fill: #e8a562 !important;
110+
}

src/api/endpoints.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const endpoints = {
44
userEmail: (userId: string): string => `/users/${userId}/email-opt-in`,
55
forgot: '/login/email/resetpassword',
66
version: '/version',
7+
serverInfo: '/info',
78
users: {
89
me: '/current-user',
910
get: (id: TId): string => `/users/${id}`,
@@ -37,6 +38,10 @@ export const endpoints = {
3738
my: `/secrets`,
3839
get: (secretId: TId): string => `/secrets/${secretId}`,
3940
},
41+
repositories: {
42+
getAll: (workspace: string) => `/workspaces/${workspace}/code_repositories`,
43+
getByID: (repositoryID: string) => `/code_repositories/${repositoryID}`,
44+
},
4045
StackComponents: {
4146
types: '/component-types',
4247
my: (type: string, workspace: string): string =>
@@ -52,6 +57,10 @@ export const endpoints = {
5257
pipeline: {
5358
get: (pipelineId: TId): string => `/runs?pipeline_id=${pipelineId}`,
5459
},
60+
repository: {
61+
get: (repositoryId: TId): string =>
62+
`/runs?code_repository_id=${repositoryId}`,
63+
},
5564
stack: {
5665
get: (stackId: TId): string => `/runs?stack_id=${stackId}`,
5766
},
@@ -62,6 +71,15 @@ export const endpoints = {
6271
graphById: {
6372
get: (runId: TId): string => `/runs/${runId}/graph`,
6473
},
74+
artifact: {
75+
get: (exe_id: TId): string => `/artifacts/${exe_id}`,
76+
},
77+
artifactVisualization: {
78+
get: (id: TId): string => `/artifacts/${id}/visualize`,
79+
},
80+
step: {
81+
get: (exe_id: TId): string => `/steps/${exe_id}`,
82+
},
6583
all: (workspace: string): string => `/workspaces/${workspace}/runs`,
6684
get: (runId: TId): string => `/runs/${runId}`,
6785
},

src/api/fetchApi/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const fetchApiWithAuthRequest = ({
4545
headers?: any;
4646
}): Promise<any> => {
4747
const CancelToken = axios.CancelToken;
48-
4948
return axios({
5049
method: method || httpMethods.get,
5150
url,

src/api/info/getInfo.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { apiUrl } from '../apiUrl';
2+
import { httpMethods } from '../constants';
3+
import { endpoints } from '../endpoints';
4+
import { fetchApi } from '../fetchApi';
5+
6+
export default function getServerInfo() {
7+
return fetchApi({
8+
url: apiUrl(endpoints.serverInfo),
9+
method: httpMethods.get,
10+
});
11+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { fetchApiWithAuthRequest } from '../fetchApi';
2+
import { endpoints } from '../endpoints';
3+
import { httpMethods } from '../constants';
4+
import { apiUrl } from '../apiUrl';
5+
6+
const getRepositories = ({
7+
component_id,
8+
workspace,
9+
sort_by,
10+
logical_operator,
11+
page,
12+
size,
13+
name,
14+
filtersParam,
15+
// id,
16+
authenticationToken,
17+
}: {
18+
component_id?: any;
19+
workspace: string;
20+
sort_by: string;
21+
logical_operator: string;
22+
page: number;
23+
size: number;
24+
name?: string;
25+
filtersParam?: object;
26+
// id?: any;
27+
authenticationToken: string;
28+
}): Promise<TStack> =>
29+
fetchApiWithAuthRequest({
30+
url: apiUrl(endpoints.repositories.getAll(workspace)),
31+
params: {
32+
component_id,
33+
sort_by,
34+
logical_operator,
35+
page,
36+
size,
37+
name,
38+
...filtersParam,
39+
// id,
40+
},
41+
method: httpMethods.get,
42+
authenticationToken,
43+
});
44+
45+
export default getRepositories;

0 commit comments

Comments
 (0)