Skip to content
Snippets Groups Projects
Commit b13c30df authored by ali asaria's avatar ali asaria
Browse files

remove fakestartnode

parent 084a22e1
No related branches found
No related tags found
No related merge requests found
......@@ -18,21 +18,9 @@ const nodeTypes = { customNode: CustomNode };
function generateNodes(workflow: any): any[] {
const workflowConfig = JSON.parse(workflow?.config);
const fakeStartNode = {
id: 'start',
type: 'input',
position: { x: 0, y: -70 },
data: {
id: 'start',
label: 'Start',
jobType: 'start',
template: 'start',
metadata: {},
},
};
if (workflowConfig.nodes.length == 0) {
return [fakeStartNode];
return [];
}
let out: any[] = [];
......@@ -41,9 +29,6 @@ function generateNodes(workflow: any): any[] {
// console.log(workflowConfig);
// Add a fake start node for now -- later the backend will do this
out.push(fakeStartNode);
for (let i = 0; i < workflowConfig.nodes.length; i++) {
const node = workflowConfig.nodes[i];
// console.log(node);
......@@ -73,17 +58,8 @@ function generateNodes(workflow: any): any[] {
function generateEdges(workflow: any) {
const workflowConfig = JSON.parse(workflow?.config);
let fakeStartNodeEdge = {
id: '-100',
source: 'start',
target: null,
markerEnd: {
type: 'arrow',
},
};
if (workflowConfig.nodes.length < 1) {
return [fakeStartNodeEdge];
return [];
}
let out: any[] = [];
......@@ -92,10 +68,6 @@ function generateEdges(workflow: any) {
// console.log(workflowConfig);
// conect the fake start node to the first node:
fakeStartNodeEdge.target = currentTask;
out.push(fakeStartNodeEdge);
for (let i = 0; i < workflowConfig.nodes.length; i++) {
const currentNode = workflowConfig.nodes[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment