diff --git a/awx/ui/client/src/templates/workflows.form.js b/awx/ui/client/src/templates/workflows.form.js index b531798248..eece22f6fe 100644 --- a/awx/ui/client/src/templates/workflows.form.js +++ b/awx/ui/client/src/templates/workflows.form.js @@ -238,6 +238,14 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { class: 'Form-primaryButton', awToolTip: '{{surveyTooltip}}', dataPlacement: 'top' + }, + workflow_visualizer: { + ngClick: 'openWorkflowMaker()', + ngShow: '$state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate.workflowMaker\')', + awToolTip: '{{workflowVisualizerTooltip}}', + dataPlacement: 'top', + label: i18n._('Workflow Visualizer'), + class: 'Form-primaryButton' } } }; diff --git a/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js b/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js index 0b78eba354..fc695c8482 100644 --- a/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js +++ b/awx/ui/client/src/templates/workflows/edit-workflow/workflow-edit.controller.js @@ -60,6 +60,10 @@ export default [ $scope.inventory_name = Inventory.name; } + $scope.openWorkflowMaker = function() { + $state.go('.workflowMaker'); + }; + $scope.formSave = function () { let fld, data = {}; $scope.invalid_survey = false; @@ -262,6 +266,7 @@ export default [ opts: opts }); + $scope.workflowVisualizerTooltip = i18n._("Click here to open the workflow visualizer."); $scope.surveyTooltip = i18n._('Surveys allow users to be prompted at job launch with a series of questions related to the job. This allows for variables to be defined that affect the playbook run at time of launch.'); $scope.workflow_job_template_obj = workflowJobTemplateData; 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 b0dd90eb35..8a8258220b 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 @@ -360,7 +360,6 @@ export default ['$scope', 'WorkflowService', 'TemplatesService', // Revert the data to the master which was created when the dialog was opened $scope.treeData.data = angular.copy($scope.treeDataMaster); $scope.closeDialog(); - $state.transitionTo('templates'); }; $scope.saveWorkflowMaker = function () {