feat: DAG可视化编排画布 - 图查询/依赖增删接口 + React Flow画布
This commit is contained in:
@@ -30,8 +30,10 @@ import type {
|
||||
AlertUnreadCount,
|
||||
Webhook,
|
||||
WebhookCreate,
|
||||
DagGraph,
|
||||
DagExecutePayload,
|
||||
DagExecuteResult,
|
||||
DependencyPayload,
|
||||
} from '@/types';
|
||||
|
||||
// ============ Auth ============
|
||||
@@ -228,4 +230,13 @@ export const webhookApi = {
|
||||
export const dagApi = {
|
||||
execute: (data: DagExecutePayload) =>
|
||||
apiClient.post<DagExecuteResult>('/dag/execute', data).then((r) => r.data),
|
||||
|
||||
graph: (projectId: number) =>
|
||||
apiClient.get<DagGraph>(`/dag/graph/${projectId}`).then((r) => r.data),
|
||||
|
||||
addDependency: (data: DependencyPayload) =>
|
||||
apiClient.post('/dag/dependencies', data).then((r) => r.data),
|
||||
|
||||
removeDependency: (data: DependencyPayload) =>
|
||||
apiClient.delete('/dag/dependencies', { data }).then((r) => r.data),
|
||||
};
|
||||
Reference in New Issue
Block a user