Skip to content

Commit 9d8d395

Browse files
committed
feat: add pagination support for knowledge workflow actions
1 parent ff5150d commit 9d8d395

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

ui/src/api/system-resource-management/knowledge.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ const workflowAction: (
295295
) => Promise<Result<any>> = (knowledge_id: string, instance, loading) => {
296296
return post(`${prefix}/${knowledge_id}/action`, instance, {}, loading)
297297
}
298+
const getWorkflowActionPage: (
299+
knowledge_id: string,
300+
page: pageRequest,
301+
query: any,
302+
loading?: Ref<boolean>,
303+
) => Promise<Result<any>> = (knowledge_id: string, page, query, loading) => {
304+
return get(
305+
`${prefix}/${knowledge_id}/action/${page.current_page}/${page.page_size}`,
306+
query,
307+
loading,
308+
)
309+
}
298310
const getWorkflowAction: (
299311
knowledge_id: string,
300312
knowledge_action_id: string,
@@ -369,6 +381,7 @@ export default {
369381
putKnowledgeWorkflow,
370382
listKnowledgeVersion,
371383
workflowUpload,
384+
getWorkflowActionPage,
372385
} as {
373386
[key: string]: any
374387
}

ui/src/api/system-shared/knowledge.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,18 @@ const workflowAction: (
353353
) => Promise<Result<any>> = (knowledge_id: string, instance, loading) => {
354354
return post(`${prefix}/${knowledge_id}/action`, instance, {}, loading)
355355
}
356+
const getWorkflowActionPage: (
357+
knowledge_id: string,
358+
page: pageRequest,
359+
query: any,
360+
loading?: Ref<boolean>,
361+
) => Promise<Result<any>> = (knowledge_id: string, page, query, loading) => {
362+
return get(
363+
`${prefix}/${knowledge_id}/action/${page.current_page}/${page.page_size}`,
364+
query,
365+
loading,
366+
)
367+
}
356368
const getWorkflowAction: (
357369
knowledge_id: string,
358370
knowledge_action_id: string,
@@ -430,6 +442,7 @@ export default {
430442
putKnowledgeWorkflow,
431443
listKnowledgeVersion,
432444
workflowUpload,
445+
getWorkflowActionPage,
433446
} as {
434447
[key: string]: any
435448
}

0 commit comments

Comments
 (0)