Skip to content

Commit 76314fc

Browse files
authored
Merge pull request #88 from zenml-io/pagination-integration
Pagination integration
2 parents bf5c747 + 96738b2 commit 76314fc

File tree

68 files changed

+1142
-455
lines changed

Some content is hidden

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

68 files changed

+1142
-455
lines changed

src/api/organizations/getMembersApi.ts

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

66
const getMembersApi = ({
7+
name,
78
authenticationToken,
89
}: {
10+
name?: string;
911
authenticationToken: string;
1012
}): Promise<TMember[]> =>
1113
fetchApiWithAuthRequest({
1214
url: apiUrl(endpoints.organizations.members),
15+
params: { name, size: 5 },
1316
method: httpMethods.get,
1417
authenticationToken,
1518
});

src/api/pipelines/getAllRunsByPipelineIdApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ import { apiUrl } from '../apiUrl';
66
const getAllRunsByPipelineIdApi = ({
77
authenticationToken,
88
pipelineId,
9+
sort_by,
10+
logical_operator,
911
page,
1012
size,
1113
filtersParam,
1214
}: {
1315
authenticationToken: string;
16+
sort_by: string;
17+
logical_operator: string;
1418
pipelineId: TId;
1519
page: number;
1620
size: number;
1721
filtersParam?: any;
1822
}): Promise<TOrganization> =>
1923
fetchApiWithAuthRequest({
2024
url: apiUrl(endpoints.runs.pipeline.get(pipelineId)),
21-
params: { page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
25+
params: { sort_by, logical_operator, page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
2226
method: httpMethods.get,
2327
authenticationToken,
2428
});

src/api/pipelines/getMyPipelinesApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ import { apiUrl } from '../apiUrl';
66
const getMyPipelinesApi = ({
77
authenticationToken,
88
project,
9+
sort_by,
10+
logical_operator,
911
page,
1012
size,
1113
filtersParam,
1214
}: {
15+
sort_by: string;
16+
logical_operator: string;
1317
page: number;
1418
size: number;
1519
name?: string;
@@ -19,7 +23,7 @@ const getMyPipelinesApi = ({
1923
}): Promise<TPipeline> =>
2024
fetchApiWithAuthRequest({
2125
url: apiUrl(endpoints.pipelines.my(project)),
22-
params: { page, size, ...filtersParam },
26+
params: { sort_by, logical_operator, page, size, ...filtersParam },
2327
method: httpMethods.get,
2428
authenticationToken,
2529
});

src/api/runs/getAllRunsApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import { apiUrl } from '../apiUrl';
55

66
const getAllRunsApi = ({
77
project,
8+
sort_by,
9+
logical_operator,
810
page,
911
size,
1012
filtersParam,
1113
authenticationToken,
1214
}: {
15+
sort_by: string;
16+
logical_operator: string;
1317
page: number;
1418
size: number;
1519
authenticationToken: string;
@@ -18,7 +22,7 @@ const getAllRunsApi = ({
1822
}): Promise<TOrganization> =>
1923
fetchApiWithAuthRequest({
2024
url: apiUrl(endpoints.runs.all(project)),
21-
params: { page, size, ...filtersParam },
25+
params: { sort_by, logical_operator, page, size, ...filtersParam },
2226
method: httpMethods.get,
2327
authenticationToken,
2428
});

src/api/stackComponents/getAllRunsByStackComponentIdApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ import { apiUrl } from '../apiUrl';
66
const getAllRunsByStackComponentIdApi = ({
77
authenticationToken,
88
stackComponentId,
9+
sort_by,
10+
logical_operator,
911
page,
1012
size,
1113
filtersParam,
1214
}: {
15+
sort_by: string;
16+
logical_operator: string;
1317
page: number;
1418
size: number;
1519
filtersParam?: any;
@@ -18,7 +22,7 @@ const getAllRunsByStackComponentIdApi = ({
1822
}): Promise<TOrganization> =>
1923
fetchApiWithAuthRequest({
2024
url: apiUrl(endpoints.runs.stackComponent.get(stackComponentId)),
21-
params: { page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
25+
params: { sort_by, logical_operator, page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
2226
method: httpMethods.get,
2327
authenticationToken,
2428
});

src/api/stackComponents/getStackComponentListApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { apiUrl } from '../apiUrl';
55

66
const getMyStackComponentsApi = ({
77
authenticationToken,
8+
sort_by,
9+
logical_operator,
810
page,
911
size,
1012
type,
@@ -13,14 +15,16 @@ const getMyStackComponentsApi = ({
1315
}: {
1416
project: string;
1517
authenticationToken: string;
18+
sort_by: string;
19+
logical_operator: string;
1620
type: string;
1721
filtersParam?: object;
1822
page: number;
1923
size: number;
2024
}): Promise<TStack> =>
2125
fetchApiWithAuthRequest({
2226
url: apiUrl(endpoints.StackComponents.my(type, project)),
23-
params: { page, size, ...filtersParam },
27+
params: { sort_by, logical_operator, page, size, ...filtersParam },
2428
method: httpMethods.get,
2529
authenticationToken,
2630
});

src/api/stacks/getAllRunsByStackIdApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ import { apiUrl } from '../apiUrl';
66
const getAllRunsByStackIdApi = ({
77
authenticationToken,
88
stackId,
9+
sort_by,
10+
logical_operator,
911
page,
1012
size,
1113
filtersParam,
1214
}: {
15+
sort_by: string;
16+
logical_operator: string;
1317
page: number;
1418
size: number;
1519
filtersParam?: any;
@@ -18,7 +22,7 @@ const getAllRunsByStackIdApi = ({
1822
}): Promise<TOrganization> =>
1923
fetchApiWithAuthRequest({
2024
url: apiUrl(endpoints.runs.stack.get(stackId)),
21-
params: { page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
25+
params: { sort_by, logical_operator, page, size, ...filtersParam }, // todo: get runs by pipeline id please update endpoint
2226
method: httpMethods.get,
2327
authenticationToken,
2428
});

src/api/stacks/getMyStacksApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ import { apiUrl } from '../apiUrl';
55

66
const getMyStacksApi = ({
77
project,
8+
sort_by,
9+
logical_operator,
810
page,
911
size,
1012
filtersParam,
1113
authenticationToken,
1214
}: {
1315
project: string;
16+
sort_by: string;
17+
logical_operator: string;
1418
page: number;
1519
size: number;
1620
filtersParam?: object;
1721
authenticationToken: string;
1822
}): Promise<TStack> =>
1923
fetchApiWithAuthRequest({
2024
url: apiUrl(endpoints.Stacks.my(project)),
21-
params: { page, size, ...filtersParam },
25+
params: { sort_by, logical_operator, page, size, ...filtersParam },
2226
method: httpMethods.get,
2327
authenticationToken,
2428
});

src/redux/actions/organizations/getMembersAction.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ import { organizationActionTypes } from '../../actionTypes';
22
import getMembersApi from '../../../api/organizations/getMembersApi';
33

44
export const getMembersAction = ({
5+
name,
56
onSuccess,
67
onFailure,
78
}: {
9+
name?: string;
810
onSuccess?: () => void;
911
onFailure?: (err: any) => void;
1012
}): TRequestAction => ({
@@ -14,6 +16,7 @@ export const getMembersAction = ({
1416
isAuthenticated: true,
1517
failureActionType: organizationActionTypes.getMembers.failure,
1618
successActionType: organizationActionTypes.getMembers.success,
19+
params: { name },
1720
onSuccess,
1821
onFailure,
1922
},

src/redux/actions/pipelines/getAllRunsByPipelineId.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import getAllRunsByPipelineIdApi from '../../../api/pipelines/getAllRunsByPipeli
33

44
export const getAllRunsByPipelineId = ({
55
pipelineId,
6+
sort_by,
7+
logical_operator,
68
page,
79
size,
810
filtersParam,
911
onSuccess,
1012
onFailure,
1113
}: {
14+
sort_by: string;
15+
logical_operator: string;
1216
pipelineId: TId;
1317
page: number;
1418
size: number;
@@ -23,7 +27,14 @@ export const getAllRunsByPipelineId = ({
2327
isAuthenticated: true,
2428
failureActionType: pipelineActionTypes.getRunsByPipelineId.failure,
2529
successActionType: pipelineActionTypes.getRunsByPipelineId.success,
26-
params: { pipelineId, page, size, filtersParam },
30+
params: {
31+
pipelineId,
32+
sort_by,
33+
logical_operator,
34+
page,
35+
size,
36+
filtersParam,
37+
},
2738
onSuccess,
2839
onFailure,
2940
},

0 commit comments

Comments
 (0)