From bbb4701fa92b7c8776b1e1ca3cd7576feb48251e Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 21 Jan 2020 12:30:33 -0500 Subject: [PATCH] Don't show any/all convergence option on root node --- .../forms/workflow-node-form.partial.html | 2 +- .../workflow-maker/workflow-maker.controller.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html index 223897948f..cdc6c966aa 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html @@ -183,7 +183,7 @@ -
+
diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js index 95dbe04d2f..17d3d0b05e 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js +++ b/awx/ui/client/src/templates/workflows/workflow-maker/workflow-maker.controller.js @@ -720,6 +720,15 @@ export default ['$scope', 'TemplatesService', /* EDIT NODE FUNCTIONS */ $scope.startEditNode = (nodeToEdit) => { + // Determine if this is a root node + let editNodeIsRoot = false; + $scope.graphState.arrayOfLinksForChart.forEach((link) => { + if (link.source.id === 1 && link.target.id === nodeIdToChartNodeIdMapping[nodeToEdit.id]) { + editNodeIsRoot = true; + return; + } + }); + $scope.workflowChangesStarted = true; if ($scope.linkConfig) { $scope.cancelLinkForm(); @@ -733,7 +742,8 @@ export default ['$scope', 'TemplatesService', $scope.nodeConfig = { mode: "edit", nodeId: nodeToEdit.id, - node: nodeRef[nodeToEdit.id] + node: nodeRef[nodeToEdit.id], + editNodeIsRoot, }; $scope.graphState.nodeBeingEdited = nodeToEdit.id;