Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed to allow specifying limit of job api #1330

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/src/repository/AironeApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,10 @@
const groupTrees = await this.group.groupApiV2GroupsTreeList();

// typing children here because API side type definition will break API client generation.
const toTyped = (groupTree: { [key: string]: any }): GroupTree => ({

Check warning on line 521 in frontend/src/repository/AironeApiClient.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
id: groupTree["id"],
name: groupTree["name"],
children: groupTree["children"].map((child: { [key: string]: any }) =>

Check warning on line 524 in frontend/src/repository/AironeApiClient.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
toTyped(child)
),
});
Expand All @@ -529,7 +529,7 @@
return groupTrees.map((groupTree) => ({
id: groupTree.id,
name: groupTree.name,
children: groupTree.children.map((child: { [key: string]: any }) =>

Check warning on line 532 in frontend/src/repository/AironeApiClient.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
toTyped(child)
),
}));
Expand Down Expand Up @@ -913,11 +913,12 @@

async getJobs(
page: number = 1,
targetId?: number
targetId?: number,
limit?: number
): Promise<PaginatedJobSerializersList> {
return await this.job.jobApiV2JobsList({
offset: (page - 1) * JobList.MAX_ROW_COUNT,
limit: JobList.MAX_ROW_COUNT,
limit: limit ?? JobList.MAX_ROW_COUNT,
targetId,
});
}
Expand Down
Loading