open workflow visualizer from form

This commit is contained in:
Jake McDermott 2018-11-17 16:07:52 -05:00
parent c6a7d0859d
commit 0e3bf6db09
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
3 changed files with 13 additions and 1 deletions

View File

@ -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'
}
}
};

View File

@ -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;

View File

@ -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 () {