mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Removes unnecessary 'type' field on nodes and links
This commit is contained in:
@@ -122,7 +122,6 @@ function createLink(state, linkType) {
|
|||||||
source: { id: addLinkSourceNode.id },
|
source: { id: addLinkSourceNode.id },
|
||||||
target: { id: addLinkTargetNode.id },
|
target: { id: addLinkTargetNode.id },
|
||||||
linkType,
|
linkType,
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
newLinks.forEach((link, index) => {
|
newLinks.forEach((link, index) => {
|
||||||
@@ -150,7 +149,6 @@ function createNode(state, node) {
|
|||||||
|
|
||||||
newNodes.push({
|
newNodes.push({
|
||||||
id: nextNodeId,
|
id: nextNodeId,
|
||||||
type: 'node',
|
|
||||||
unifiedJobTemplate: node.nodeResource,
|
unifiedJobTemplate: node.nodeResource,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -164,7 +162,6 @@ function createNode(state, node) {
|
|||||||
source: { id: addNodeSource },
|
source: { id: addNodeSource },
|
||||||
target: { id: nextNodeId },
|
target: { id: nextNodeId },
|
||||||
linkType: node.linkType,
|
linkType: node.linkType,
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (addNodeTarget) {
|
if (addNodeTarget) {
|
||||||
@@ -268,7 +265,6 @@ function deleteLink(state) {
|
|||||||
id: linkToDelete.target.id,
|
id: linkToDelete.target.id,
|
||||||
},
|
},
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,7 +292,6 @@ function addLinksFromParentsToChildren(
|
|||||||
source: { id: parentId },
|
source: { id: parentId },
|
||||||
target: { id: child.id },
|
target: { id: child.id },
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (!linkParentMapping[child.id].includes(parentId)) {
|
} else if (!linkParentMapping[child.id].includes(parentId)) {
|
||||||
@@ -304,7 +299,6 @@ function addLinksFromParentsToChildren(
|
|||||||
source: { id: parentId },
|
source: { id: parentId },
|
||||||
target: { id: child.id },
|
target: { id: child.id },
|
||||||
linkType: child.linkType,
|
linkType: child.linkType,
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -382,7 +376,6 @@ function generateNodes(workflowNodes, i18n) {
|
|||||||
unifiedJobTemplate: {
|
unifiedJobTemplate: {
|
||||||
name: i18n._(t`START`),
|
name: i18n._(t`START`),
|
||||||
},
|
},
|
||||||
type: 'node',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
workflowNodes.forEach(node => {
|
workflowNodes.forEach(node => {
|
||||||
@@ -390,7 +383,6 @@ function generateNodes(workflowNodes, i18n) {
|
|||||||
|
|
||||||
const nodeObj = {
|
const nodeObj = {
|
||||||
id: nodeIdCounter,
|
id: nodeIdCounter,
|
||||||
type: 'node',
|
|
||||||
originalNodeObject: node,
|
originalNodeObject: node,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -434,7 +426,6 @@ function generateLinks(
|
|||||||
source: arrayOfNodesForChart[sourceIndex],
|
source: arrayOfNodesForChart[sourceIndex],
|
||||||
target: arrayOfNodesForChart[targetIndex],
|
target: arrayOfNodesForChart[targetIndex],
|
||||||
linkType: 'success',
|
linkType: 'success',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
nonRootNodeIds.push(nodeId);
|
nonRootNodeIds.push(nodeId);
|
||||||
});
|
});
|
||||||
@@ -445,7 +436,6 @@ function generateLinks(
|
|||||||
source: arrayOfNodesForChart[sourceIndex],
|
source: arrayOfNodesForChart[sourceIndex],
|
||||||
target: arrayOfNodesForChart[targetIndex],
|
target: arrayOfNodesForChart[targetIndex],
|
||||||
linkType: 'failure',
|
linkType: 'failure',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
nonRootNodeIds.push(nodeId);
|
nonRootNodeIds.push(nodeId);
|
||||||
});
|
});
|
||||||
@@ -456,7 +446,6 @@ function generateLinks(
|
|||||||
source: arrayOfNodesForChart[sourceIndex],
|
source: arrayOfNodesForChart[sourceIndex],
|
||||||
target: arrayOfNodesForChart[targetIndex],
|
target: arrayOfNodesForChart[targetIndex],
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
nonRootNodeIds.push(nodeId);
|
nonRootNodeIds.push(nodeId);
|
||||||
});
|
});
|
||||||
@@ -496,7 +485,6 @@ function generateNodesAndLinks(state, workflowNodes, i18n) {
|
|||||||
source: arrayOfNodesForChart[0],
|
source: arrayOfNodesForChart[0],
|
||||||
target: arrayOfNodesForChart[targetIndex],
|
target: arrayOfNodesForChart[targetIndex],
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const workflowContext = {
|
|||||||
id: 4,
|
id: 4,
|
||||||
},
|
},
|
||||||
linkType: 'success',
|
linkType: 'success',
|
||||||
type: 'link',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@@ -23,7 +22,6 @@ const workflowContext = {
|
|||||||
id: 3,
|
id: 3,
|
||||||
},
|
},
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@@ -33,7 +31,6 @@ const workflowContext = {
|
|||||||
id: 3,
|
id: 3,
|
||||||
},
|
},
|
||||||
linkType: 'success',
|
linkType: 'success',
|
||||||
type: 'link',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@@ -43,7 +40,6 @@ const workflowContext = {
|
|||||||
id: 2,
|
id: 2,
|
||||||
},
|
},
|
||||||
linkType: 'always',
|
linkType: 'always',
|
||||||
type: 'link',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@@ -53,7 +49,6 @@ const workflowContext = {
|
|||||||
id: 5,
|
id: 5,
|
||||||
},
|
},
|
||||||
linkType: 'success',
|
linkType: 'success',
|
||||||
type: 'link',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
nodePositions: {
|
nodePositions: {
|
||||||
@@ -66,11 +61,9 @@ const workflowContext = {
|
|||||||
nodes: [
|
nodes: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
type: 'node',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
type: 'node',
|
|
||||||
job: {
|
job: {
|
||||||
name: 'Foo JT',
|
name: 'Foo JT',
|
||||||
type: 'job',
|
type: 'job',
|
||||||
@@ -80,15 +73,12 @@ const workflowContext = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
type: 'node',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
type: 'node',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
type: 'node',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
showLegend: false,
|
showLegend: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user