From a8881cc7a6191079f66753e06808621393212119 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 2 Jan 2025 11:00:03 +0800 Subject: [PATCH] chore: temp --- .../utils/format-log/simple-graph-to-log-struct.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 web/app/components/workflow/run/utils/format-log/simple-graph-to-log-struct.ts diff --git a/web/app/components/workflow/run/utils/format-log/simple-graph-to-log-struct.ts b/web/app/components/workflow/run/utils/format-log/simple-graph-to-log-struct.ts new file mode 100644 index 0000000000..4aea146a7f --- /dev/null +++ b/web/app/components/workflow/run/utils/format-log/simple-graph-to-log-struct.ts @@ -0,0 +1,14 @@ +const STEP_SPLIT = '->' + +/* +* : 1 -> 2 -> 3 +* iteration: (iteration, 1, [2, 3]) -> 4. (1, [2, 3]) means 1 is parent, [2, 3] is children +* parallel: 1 -> (parallel, [1,2,3], [4, (parallel: (6,7))]). +* retry: (retry, 1, [2,3]). 1 is parent, [2, 3] is retry nodes +*/ +const simpleGraphToLogStruct = (input: string): any[] => { + const list = input.split(STEP_SPLIT) + return list +} + +export default simpleGraphToLogStruct