Removes unnecessary 'type' field on nodes and links

This commit is contained in:
mabashian 2020-01-31 11:53:27 -05:00
parent bc7fd26af6
commit 05a3bb0622
2 changed files with 0 additions and 22 deletions

View File

@ -122,7 +122,6 @@ function createLink(state, linkType) {
source: { id: addLinkSourceNode.id },
target: { id: addLinkTargetNode.id },
linkType,
type: 'link',
});
newLinks.forEach((link, index) => {
@ -150,7 +149,6 @@ function createNode(state, node) {
newNodes.push({
id: nextNodeId,
type: 'node',
unifiedJobTemplate: node.nodeResource,
});
@ -164,7 +162,6 @@ function createNode(state, node) {
source: { id: addNodeSource },
target: { id: nextNodeId },
linkType: node.linkType,
type: 'link',
});
if (addNodeTarget) {
@ -268,7 +265,6 @@ function deleteLink(state) {
id: linkToDelete.target.id,
},
linkType: 'always',
type: 'link',
});
}
@ -296,7 +292,6 @@ function addLinksFromParentsToChildren(
source: { id: parentId },
target: { id: child.id },
linkType: 'always',
type: 'link',
});
}
} else if (!linkParentMapping[child.id].includes(parentId)) {
@ -304,7 +299,6 @@ function addLinksFromParentsToChildren(
source: { id: parentId },
target: { id: child.id },
linkType: child.linkType,
type: 'link',
});
}
});
@ -382,7 +376,6 @@ function generateNodes(workflowNodes, i18n) {
unifiedJobTemplate: {
name: i18n._(t`START`),
},
type: 'node',
},
];
workflowNodes.forEach(node => {
@ -390,7 +383,6 @@ function generateNodes(workflowNodes, i18n) {
const nodeObj = {
id: nodeIdCounter,
type: 'node',
originalNodeObject: node,
};
@ -434,7 +426,6 @@ function generateLinks(
source: arrayOfNodesForChart[sourceIndex],
target: arrayOfNodesForChart[targetIndex],
linkType: 'success',
type: 'link',
});
nonRootNodeIds.push(nodeId);
});
@ -445,7 +436,6 @@ function generateLinks(
source: arrayOfNodesForChart[sourceIndex],
target: arrayOfNodesForChart[targetIndex],
linkType: 'failure',
type: 'link',
});
nonRootNodeIds.push(nodeId);
});
@ -456,7 +446,6 @@ function generateLinks(
source: arrayOfNodesForChart[sourceIndex],
target: arrayOfNodesForChart[targetIndex],
linkType: 'always',
type: 'link',
});
nonRootNodeIds.push(nodeId);
});
@ -496,7 +485,6 @@ function generateNodesAndLinks(state, workflowNodes, i18n) {
source: arrayOfNodesForChart[0],
target: arrayOfNodesForChart[targetIndex],
linkType: 'always',
type: 'link',
});
});

View File

@ -13,7 +13,6 @@ const workflowContext = {
id: 4,
},
linkType: 'success',
type: 'link',
},
{
source: {
@ -23,7 +22,6 @@ const workflowContext = {
id: 3,
},
linkType: 'always',
type: 'link',
},
{
source: {
@ -33,7 +31,6 @@ const workflowContext = {
id: 3,
},
linkType: 'success',
type: 'link',
},
{
source: {
@ -43,7 +40,6 @@ const workflowContext = {
id: 2,
},
linkType: 'always',
type: 'link',
},
{
source: {
@ -53,7 +49,6 @@ const workflowContext = {
id: 5,
},
linkType: 'success',
type: 'link',
},
],
nodePositions: {
@ -66,11 +61,9 @@ const workflowContext = {
nodes: [
{
id: 1,
type: 'node',
},
{
id: 2,
type: 'node',
job: {
name: 'Foo JT',
type: 'job',
@ -80,15 +73,12 @@ const workflowContext = {
},
{
id: 3,
type: 'node',
},
{
id: 4,
type: 'node',
},
{
id: 5,
type: 'node',
},
],
showLegend: false,