Enhance batch management functionality by adding node flow execution support and improving batch configuration creation. Introduce new API endpoint for retrieving node flows and update existing batch services to handle execution types. Update frontend components to support new scheduling options and node flow selection.

This commit is contained in:
DDD1542
2026-03-19 15:07:07 +09:00
parent 7f781b0177
commit 43cf91e748
41 changed files with 4020 additions and 3155 deletions

View File

@@ -1,75 +1,25 @@
"use client";
/**
* DELETE 액션 노드
*/
import { memo } from "react";
import { Handle, Position, NodeProps } from "reactflow";
import { Trash2, AlertTriangle } from "lucide-react";
import { NodeProps } from "reactflow";
import { Trash2 } from "lucide-react";
import { CompactNodeShell } from "./CompactNodeShell";
import type { DeleteActionNodeData } from "@/types/node-editor";
export const DeleteActionNode = memo(({ data, selected }: NodeProps<DeleteActionNodeData>) => {
const whereCount = data.whereConditions?.length || 0;
const summary = data.targetTable
? `${data.targetTable} (${whereCount}개 조건)`
: "대상 테이블을 선택해 주세요";
return (
<div
className={`min-w-[250px] rounded-lg border-2 bg-white shadow-md transition-all ${
selected ? "border-destructive shadow-lg" : "border-border"
}`}
>
{/* 입력 핸들 */}
<Handle type="target" position={Position.Left} className="!h-3 !w-3 !border-2 !border-destructive !bg-white" />
{/* 헤더 */}
<div className="flex items-center gap-2 rounded-t-lg bg-destructive px-3 py-2 text-white">
<Trash2 className="h-4 w-4" />
<div className="flex-1">
<div className="text-sm font-semibold">DELETE</div>
<div className="text-xs opacity-80">{data.displayName || data.targetTable}</div>
</div>
</div>
{/* 본문 */}
<div className="p-3">
<div className="mb-2 text-xs font-medium text-muted-foreground">: {data.targetTable}</div>
{/* WHERE 조건 */}
{data.whereConditions && data.whereConditions.length > 0 ? (
<div className="space-y-1">
<div className="text-xs font-medium text-foreground">WHERE :</div>
<div className="max-h-[120px] space-y-1 overflow-y-auto">
{data.whereConditions.map((condition, idx) => (
<div key={idx} className="rounded bg-destructive/10 px-2 py-1 text-xs">
<span className="font-mono text-foreground">{condition.field}</span>
<span className="mx-1 text-destructive">{condition.operator}</span>
<span className="text-muted-foreground">{condition.sourceField || condition.staticValue || "?"}</span>
</div>
))}
</div>
</div>
) : (
<div className="rounded bg-amber-50 p-2 text-xs text-yellow-700"> - !</div>
)}
{/* 경고 메시지 */}
<div className="mt-3 flex items-start gap-2 rounded border border-destructive/20 bg-destructive/10 p-2">
<AlertTriangle className="h-3 w-3 flex-shrink-0 text-destructive" />
<div className="text-xs text-destructive">
<div className="font-medium"></div>
<div className="mt-0.5"> </div>
</div>
</div>
{/* 옵션 */}
{data.options?.requireConfirmation && (
<div className="mt-2">
<span className="rounded bg-destructive/10 px-1.5 py-0.5 text-xs text-destructive"> </span>
</div>
)}
</div>
{/* 출력 핸들 */}
<Handle type="source" position={Position.Right} className="!h-3 !w-3 !border-2 !border-destructive !bg-white" />
</div>
<CompactNodeShell
color="#EF4444"
label={data.displayName || "DELETE"}
summary={summary}
icon={<Trash2 className="h-3.5 w-3.5" />}
selected={selected}
/>
);
});