feat(ui): workflow logs
This commit is contained in:
19
ui/src/repository/workflowLog.ts
Normal file
19
ui/src/repository/workflowLog.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { type WorkflowLogModel } from "@/domain/workflowLog";
|
||||
|
||||
import { COLLECTION_NAME_WORKFLOW_LOG, getPocketBase } from "./_pocketbase";
|
||||
|
||||
export const listByWorkflowRunId = async (workflowRunId: string) => {
|
||||
const pb = getPocketBase();
|
||||
|
||||
const list = await pb.collection(COLLECTION_NAME_WORKFLOW_LOG).getFullList<WorkflowLogModel>({
|
||||
batch: 65535,
|
||||
filter: pb.filter("runId={:runId}", { runId: workflowRunId }),
|
||||
// sort: "created",
|
||||
requestKey: null,
|
||||
});
|
||||
|
||||
return {
|
||||
totalItems: list.length,
|
||||
items: list,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user