Skip to content

Commit 83eb66a

Browse files
committed
Merged UAT
2 parents f575e2e + 3b90059 commit 83eb66a

File tree

187 files changed

+6680
-1570
lines changed

Some content is hidden

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

187 files changed

+6680
-1570
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
REACT_APP_BASE_API_URL=https://appserver.zenml.io/api/v1
12
REACT_APP_VERSION=$npm_package_version
2-
REACT_APP_ITEMS_PER_PAGE=10

global.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@ interface TMember {
6767
created: Date;
6868
active: boolean;
6969
activation_token: string;
70+
user: {
71+
id: TId;
72+
organizationId: any;
73+
fullName: any;
74+
email: any;
75+
name: any;
76+
created: Date;
77+
active: boolean;
78+
activation_token: any;
79+
},
80+
roles: [
81+
{
82+
id: string;
83+
name: string
84+
}
85+
]
7086
}
7187

7288
interface TWorkspace {

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@emotion/react": "^11.10.5",
67
"@stripe/react-stripe-js": "^1.1.2",
78
"@stripe/stripe-js": "^1.9.0",
9+
"@table-library/react-table-library": "^4.0.23",
810
"@testing-library/dom": "^7.21.7",
911
"@testing-library/jest-dom": "^5.11.2",
1012
"@testing-library/react": "^10.4.7",
@@ -24,6 +26,7 @@
2426
"@types/react-scroll": "^1.5.5",
2527
"@types/react-syntax-highlighter": "^11.0.4",
2628
"@types/redux-logger": "^3.0.8",
29+
"@types/styled-components": "^5.1.26",
2730
"axios": "^0.19.2",
2831
"axios-mock-adapter": "^1.18.2",
2932
"bootstrap": "^4.5.0",
@@ -38,17 +41,21 @@
3841
"i18next-browser-languagedetector": "^5.0.0",
3942
"json2yaml": "^1.1.0",
4043
"jwt-decode": "^3.1.2",
44+
"moment": "^2.29.4",
4145
"node-sass": "^4.14.1",
4246
"query-string": "^6.13.1",
4347
"react": "^16.13.1",
4448
"react-bootstrap": "^1.3.0",
49+
"react-cookie-consent": "^8.0.1",
4550
"react-datepicker": "^4.8.0",
4651
"react-dom": "^16.13.1",
4752
"react-flow-renderer": "^10.3.16",
53+
"react-joyride": "^2.5.3",
4854
"react-outside-click-handler": "^1.3.0",
4955
"react-redux": "^7.2.1",
5056
"react-router-dom": "^5.2.0",
5157
"react-scripts": "^3.4.1",
58+
"react-select": "^5.7.0",
5259
"react-syntax-highlighter": "^13.3.1",
5360
"react-tooltip": "^4.2.10",
5461
"react-tooltip-lite": "^1.12.0",
@@ -58,6 +65,7 @@
5865
"redux-saga": "^1.1.3",
5966
"redux-saga-test-plan": "^4.0.0-rc.3",
6067
"reselect": "^4.0.0",
68+
"styled-components": "^5.3.6",
6169
"typescript": "^3.9.7"
6270
},
6371
"scripts": {
@@ -70,6 +78,7 @@
7078
"tslint": "tsc",
7179
"all": "eslint './src/**/*.ts*' & react-scripts test --all & tsc"
7280
},
81+
7382
"browserslist": {
7483
"production": [
7584
">0.2%",

src/api/endpoints.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ export const endpoints = {
1515
`/users/${username}/deactivate`,
1616
invites: '/organizations/invite?status=pending',
1717
members: '/users',
18+
membersWithRole: '/role_assignments',
1819
invite: '/users',
1920
deleteInvite: (id: string): string => `/users/${id}`,
2021
},
2122

2223
projects: {
2324
my: '/projects',
25+
stats: (project: string) => `/projects/${project}/statistics`,
2426
},
2527

2628
pipelines: {

src/api/fetchApi/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ export const fetchApiWithAuthRequest = ({
3333
url,
3434
data,
3535
method,
36+
params,
3637
authenticationToken,
3738
headers,
3839
}: {
3940
url: string;
41+
params?: any;
4042
data?: any;
4143
method: any;
4244
authenticationToken: string;
@@ -47,6 +49,7 @@ export const fetchApiWithAuthRequest = ({
4749
return axios({
4850
method: method || httpMethods.get,
4951
url,
52+
params,
5053
data,
5154
cancelToken: new CancelToken(function executor(c) {
5255
// An executor function receives a cancel function as a parameter

src/api/organizations/getMembersApi.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ import { httpMethods } from '../constants';
44
import { apiUrl } from '../apiUrl';
55

66
const getMembersApi = ({
7+
sort_by,
8+
page,
9+
size,
10+
name,
711
authenticationToken,
812
}: {
13+
sort_by?: string;
14+
page?: number;
15+
size?: number;
16+
name?: string;
917
authenticationToken: string;
1018
}): Promise<TMember[]> =>
1119
fetchApiWithAuthRequest({
1220
url: apiUrl(endpoints.organizations.members),
21+
params: { name, size, page, sort_by },
1322
method: httpMethods.get,
1423
authenticationToken,
1524
});

src/api/organizations/inviteApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const inviteApi = ({
1111
name: string;
1212
}): Promise<void> =>
1313
fetchApiWithAuthRequest({
14-
url: apiUrl(endpoints.organizations.invite),
14+
url: apiUrl(`${endpoints.organizations.invite}?assign_default_role=false`),
1515
method: httpMethods.post,
1616
authenticationToken,
1717
headers: {

src/api/pipelines/getAllRunsByPipelineIdApi.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ import { apiUrl } from '../apiUrl';
66
const getAllRunsByPipelineIdApi = ({
77
authenticationToken,
88
pipelineId,
9+
sort_by,
10+
logical_operator,
11+
page,
12+
size,
13+
filtersParam,
914
}: {
1015
authenticationToken: string;
16+
sort_by: string;
17+
logical_operator: string;
1118
pipelineId: TId;
19+
page: number;
20+
size: number;
21+
filtersParam?: any;
1222
}): Promise<TOrganization> =>
1323
fetchApiWithAuthRequest({
14-
url: apiUrl(endpoints.runs.pipeline.get(pipelineId)), // todo: get runs by pipeline id please update endpoint
24+
url: apiUrl(endpoints.runs.pipeline.get(pipelineId)),
25+
params: { sort_by, logical_operator, page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
1526
method: httpMethods.get,
1627
authenticationToken,
1728
});

src/api/pipelines/getMyPipelinesApi.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@ import { apiUrl } from '../apiUrl';
66
const getMyPipelinesApi = ({
77
authenticationToken,
88
project,
9+
sort_by,
10+
logical_operator,
11+
page,
12+
size,
13+
filtersParam,
914
}: {
15+
sort_by: string;
16+
logical_operator: string;
17+
page: number;
18+
size: number;
19+
name?: string;
1020
authenticationToken: string;
1121
project: string;
22+
filtersParam?: object;
1223
}): Promise<TPipeline> =>
1324
fetchApiWithAuthRequest({
1425
url: apiUrl(endpoints.pipelines.my(project)),
26+
params: { sort_by, logical_operator, page, size, ...filtersParam },
1527
method: httpMethods.get,
1628
authenticationToken,
1729
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { fetchApiWithAuthRequest } from '../fetchApi';
2+
import { endpoints } from '../endpoints';
3+
import { httpMethods } from '../constants';
4+
import { apiUrl } from '../apiUrl';
5+
6+
interface ProjectStats {}
7+
8+
const getMyProjectStatsApi = ({
9+
authenticationToken,
10+
project,
11+
}: {
12+
authenticationToken: string;
13+
project: string;
14+
}): Promise<ProjectStats> =>
15+
fetchApiWithAuthRequest({
16+
url: apiUrl(endpoints.projects.stats(project)),
17+
method: httpMethods.get,
18+
authenticationToken,
19+
});
20+
21+
export default getMyProjectStatsApi;

0 commit comments

Comments
 (0)