From c3a3b2662eda7a707d96427a0ab2d6c758f66361 Mon Sep 17 00:00:00 2001
From: Michael Abashian Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing " +
- " the username and SSH key or password that Ansible will need to log into the remote hosts. Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing " +
+ " the username and SSH key or password that Ansible will need to log into the remote hosts. Select the inventory containing the hosts you want this job to manage. Select the inventory containing the hosts you want this job to manage. When this template is submitted as a job, setting the type to run will execute the playbook, running tasks " +
+ awPopOver: i18n._(" When this template is submitted as a job, setting the type to run will execute the playbook, running tasks " +
" on the selected hosts. Setting the type to check will not execute the playbook. Instead, Setting the type to scan will execute the playbook and store any " +
- " scanned facts for use with Tower's System Tracking feature.ansible
will check playbook " +
" syntax, test environment setup and report problems.
Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. " + + awPopOver: i18n._("
Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. " + "Multiple patterns can be separated by ; : or ,
For more information and examples see " + - "the Patterns topic at docs.ansible.com.
", - dataTitle: 'Limit', + "the Patterns topic at docs.ansible.com."), + dataTitle: i18n._('Limit'), dataPlacement: 'right', dataContainer: "body", ngShow: "selectedTemplate.ask_limit_on_launch", ngDisabled: '!canAddWorkflowJobTemplate' }, job_tags: { - label: 'Job Tags', + label: i18n._('Job Tags'), type: 'textarea', rows: 5, 'elementClass': 'Form-textInput', class: 'Form-formGroup--fullWidth', - awPopOver: "Provide a comma separated list of tags.
\n" + + awPopOver: i18n._("Provide a comma separated list of tags.
\n" + "Tags are useful when you have a large playbook, and you want to run a specific part of a play or task.
" + - "Consult the Ansible documentation for further details on the usage of tags.
", - dataTitle: "Job Tags", + "Consult the Ansible documentation for further details on the usage of tags.
"), + dataTitle: i18n._("Job Tags"), dataPlacement: "right", dataContainer: "body", ngShow: "selectedTemplate.ask_tags_on_launch", ngDisabled: '!canAddWorkflowJobTemplate' }, skip_tags: { - label: 'Skip Tags', + label: i18n._('Skip Tags'), type: 'textarea', rows: 5, 'elementClass': 'Form-textInput', class: 'Form-formGroup--fullWidth', - awPopOver: "Provide a comma separated list of tags.
\n" + + awPopOver: i18n._("Provide a comma separated list of tags.
\n" + "Skip tags are useful when you have a large playbook, and you want to skip specific parts of a play or task.
" + - "Consult the Ansible documentation for further details on the usage of tags.
", - dataTitle: "Skip Tags", + "Consult the Ansible documentation for further details on the usage of tags.
"), + dataTitle: i18n._("Skip Tags"), dataPlacement: "right", dataContainer: "body", ngShow: "selectedTemplate.ask_skip_tags_on_launch", @@ -167,7 +173,7 @@ export default ngShow: 'canAddWorkflowJobTemplate' } } - }) + };}]) .factory('WorkflowMakerForm', ['WorkflowMakerFormObject', 'NotificationsList', function(WorkflowMakerFormObject, NotificationsList) { return function() { var itm; diff --git a/awx/ui/client/src/forms/Workflows.js b/awx/ui/client/src/forms/Workflows.js index 66841c1557..113251b8c4 100644 --- a/awx/ui/client/src/forms/Workflows.js +++ b/awx/ui/client/src/forms/Workflows.js @@ -13,9 +13,10 @@ export default angular.module('WorkflowFormDefinition', []) - .value ('WorkflowFormObject', { + .factory('WorkflowFormObject', ['i18n', function(i18n) { + return { - addTitle: 'New Workflow', + addTitle: i18n._('New Workflow'), editTitle: '{{ name }}', name: 'workflow_job_template', base: 'workflow', @@ -27,57 +28,57 @@ export default fields: { name: { - label: 'Name', + label: i18n._('Name'), type: 'text', required: true, ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)', column: 1 }, description: { - label: 'Description', + label: i18n._('Description'), type: 'text', column: 1, ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)' }, organization: { - label: 'Organization', + label: i18n._('Organization'), type: 'lookup', sourceModel: 'organization', basePath: 'organizations', list: 'OrganizationList', sourceField: 'name', - dataTitle: 'Organization', + dataTitle: i18n._('Organization'), dataContainer: 'body', dataPlacement: 'right', column: 1, ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)' }, labels: { - label: 'Labels', + label: i18n._('Labels'), type: 'select', class: 'Form-formGroup--fullWidth', ngOptions: 'label.label for label in labelOptions track by label.value', multiSelect: true, - dataTitle: 'Labels', + dataTitle: i18n._('Labels'), dataPlacement: 'right', - awPopOver: "Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs in the Tower display.
", + awPopOver: i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs in the Tower display.
"), dataContainer: 'body', ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)' }, variables: { - label: 'Extra Variables', + label: i18n._('Extra Variables'), type: 'textarea', class: 'Form-textAreaLabel Form-formGroup--fullWidth', rows: 6, "default": "---", column: 2, - awPopOver: "Pass extra command line variables to the playbook. This is the -e
or --extra-vars
command line parameter " +
+ awPopOver: i18n._("
Pass extra command line variables to the playbook. This is the -e
or --extra-vars
command line parameter " +
"for ansible-playbook
. Provide key/value pairs using either YAML or JSON.
{\n" + "YAML:
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
---\n", - dataTitle: 'Extra Variables', + "
somevar: somevalue
password: magic
---\n"), + dataTitle: i18n._('Extra Variables'), dataPlacement: 'right', dataContainer: "body", ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)' // TODO: get working @@ -102,18 +103,20 @@ export default related: { permissions: { - awToolTip: 'Please save before assigning permissions', + awToolTip: i18n._('Please save before assigning permissions'), dataPlacement: 'top', - basePath: 'job_templates/:id/access_list/', + basePath: 'api/v1/workflow_job_templates/{{$stateParams.workflow_job_template_id}}/access_list/', + search: { + order_by: 'username' + }, type: 'collection', - title: 'Permissions', + title: i18n._('Permissions'), iterator: 'permission', index: false, open: false, - searchType: 'select', actions: { add: { - ngClick: "addPermission", + ngClick: "$state.go('.add')", label: 'Add', awToolTip: 'Add a permission', actionClass: 'btn List-buttonSubmit', @@ -134,14 +137,12 @@ export default type: 'role', noSort: true, class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', - searchable: false }, team_roles: { label: 'Team Roles', type: 'team_roles', noSort: true, class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', - searchable: false } } }, @@ -155,23 +156,23 @@ export default ngClick: 'addSurvey()', ngShow: '!survey_exists', awFeature: 'surveys', - awToolTip: 'Please save before adding a survey', + awToolTip: i18n._('Please save before adding a survey'), dataPlacement: 'top', - label: 'Add Survey', + label: i18n._('Add Survey'), class: 'Form-primaryButton' }, edit_survey: { ngClick: 'editSurvey()', awFeature: 'surveys', ngShow: 'survey_exists', - label: 'Edit Survey', + label: i18n._('Edit Survey'), class: 'Form-primaryButton' }, workflow_editor: { ngClick: 'openWorkflowMaker()', - awToolTip: 'Please save before defining the workflow graph', + awToolTip: i18n._('Please save before defining the workflow graph'), dataPlacement: 'top', - label: 'Workflow Editor', + label: i18n._('Workflow Editor'), class: 'Form-primaryButton' } }, @@ -188,7 +189,7 @@ export default } }; } - }) + };}]) .factory('WorkflowForm', ['WorkflowFormObject', 'NotificationsList', function(WorkflowFormObject, NotificationsList) {
somevar: somevalue
password: magic