diff --git a/awx/ui/client/src/inventories-hosts/hosts/host.form.js b/awx/ui/client/src/inventories-hosts/hosts/host.form.js index 9cfec370d2..a736fd5448 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/host.form.js +++ b/awx/ui/client/src/inventories-hosts/hosts/host.form.js @@ -106,14 +106,14 @@ function(i18n) { related: { ansible_facts: { name: 'ansible_facts', - awToolTip: i18n._('Please save before viewing facts'), + awToolTip: i18n._('Please save before viewing facts.'), dataPlacement: 'top', title: i18n._('Facts'), skipGenerator: true }, groups: { name: 'groups', - awToolTip: i18n._('Please save before defining groups'), + awToolTip: i18n._('Please save before defining groups.'), dataPlacement: 'top', ngClick: "$state.go('hosts.edit.groups')", title: i18n._('Groups'), @@ -122,7 +122,7 @@ function(i18n) { }, insights: { name: 'insights', - awToolTip: i18n._('Please save before viewing Insights'), + awToolTip: i18n._('Please save before viewing Insights.'), dataPlacement: 'top', title: i18n._('Insights'), skipGenerator: true, diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js index b8990de7f9..c69a7889e2 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/completed-jobs/completed-jobs.list.js @@ -8,7 +8,7 @@ export default ['i18n', function(i18n) { return { // These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view - awToolTip: i18n._('Please save and run a job to view'), + awToolTip: i18n._('Please save and run a job to view.'), dataPlacement: 'top', name: 'completed_jobs', basePath: 'unified_jobs', diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/groups.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/groups.form.js index eb52db6ad7..cefa0fbff9 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/groups.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/groups.form.js @@ -83,7 +83,7 @@ function(i18n){ related: { nested_groups: { name: 'nested_groups', - awToolTip: i18n._('Please save before defining groups'), + awToolTip: i18n._('Please save before defining groups.'), dataPlacement: 'top', ngClick: "$state.go('inventories.edit.groups.edit.nested_groups')", title: i18n._('Groups'), @@ -91,7 +91,7 @@ function(i18n){ }, nested_hosts: { name: 'nested_hosts', - awToolTip: i18n._('Please save before defining hosts'), + awToolTip: i18n._('Please save before defining hosts.'), dataPlacement: 'top', ngClick: "$state.go('inventories.edit.groups.edit.nested_hosts')", include: "NestedHostsListDefinition", diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js index 37e207ce9f..f46c4e2176 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.form.js @@ -107,14 +107,14 @@ function(i18n) { related: { ansible_facts: { name: 'ansible_facts', - awToolTip: i18n._('Please save before viewing facts'), + awToolTip: i18n._('Please save before viewing facts.'), dataPlacement: 'top', title: i18n._('Facts'), skipGenerator: true }, nested_groups: { name: 'nested_groups', - awToolTip: i18n._('Please save before defining groups'), + awToolTip: i18n._('Please save before defining groups.'), dataPlacement: 'top', ngClick: "$state.go('inventories.edit.groups.edit.nested_hosts.edit.nested_groups')", title: i18n._('Groups'), diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.form.js index 0ad88d8835..8ddc10a5a4 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.form.js @@ -107,14 +107,14 @@ function(i18n) { related: { ansible_facts: { name: 'ansible_facts', - awToolTip: i18n._('Please save before viewing facts'), + awToolTip: i18n._('Please save before viewing facts.'), dataPlacement: 'top', title: i18n._('Facts'), skipGenerator: true }, nested_groups: { name: 'nested_groups', - awToolTip: i18n._('Please save before defining groups'), + awToolTip: i18n._('Please save before defining groups.'), dataPlacement: 'top', ngClick: "$state.go('inventories.edit.hosts.edit.nested_groups')", title: i18n._('Groups'), @@ -122,7 +122,7 @@ function(i18n) { }, insights: { name: 'insights', - awToolTip: i18n._('Please save before viewing Insights'), + awToolTip: i18n._('Please save before viewing Insights.'), dataPlacement: 'top', title: i18n._('Insights'), skipGenerator: true, diff --git a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js index ecf59a02f0..0e864fc4a1 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js @@ -110,7 +110,7 @@ export default ['i18n', 'InventoryCompletedJobsList', function(i18n, InventoryCo related: { permissions: { name: 'permissions', - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), dataPlacement: 'top', basePath: 'api/v2/inventories/{{$stateParams.smartinventory_id}}/access_list/', type: 'collection', diff --git a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js index 673896e994..5d4c24d811 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js @@ -127,7 +127,7 @@ function(i18n, InventoryCompletedJobsList) { related: { permissions: { name: 'permissions', - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), dataPlacement: 'top', basePath: 'api/v2/inventories/{{$stateParams.inventory_id}}/access_list/', type: 'collection', @@ -172,7 +172,7 @@ function(i18n, InventoryCompletedJobsList) { }, groups: { name: 'groups', - awToolTip: i18n._('Please save before creating groups'), + awToolTip: i18n._('Please save before creating groups.'), dataPlacement: 'top', include: "GroupList", title: i18n._('Groups'), @@ -181,7 +181,7 @@ function(i18n, InventoryCompletedJobsList) { }, hosts: { name: 'hosts', - awToolTip: i18n._('Please save before creating hosts'), + awToolTip: i18n._('Please save before creating hosts.'), dataPlacement: 'top', include: "RelatedHostsListDefinition", title: i18n._('Hosts'), @@ -190,7 +190,7 @@ function(i18n, InventoryCompletedJobsList) { }, inventory_sources: { name: 'inventory_sources', - awToolTip: i18n._('Please save before defining inventory sources'), + awToolTip: i18n._('Please save before defining inventory sources.'), dataPlacement: 'top', title: i18n._('Sources'), iterator: 'inventory_source', diff --git a/awx/ui/client/src/notifications/notifications.list.js b/awx/ui/client/src/notifications/notifications.list.js index ad554ac3f2..c836e87476 100644 --- a/awx/ui/client/src/notifications/notifications.list.js +++ b/awx/ui/client/src/notifications/notifications.list.js @@ -12,7 +12,7 @@ export default ['i18n', function(i18n){ return { // These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view dataPlacement: 'top', - awToolTip: i18n._('Please save before adding notifications'), + awToolTip: i18n._('Please save before adding notifications.'), name: 'notifications' , title: i18n._('Notifications'), iterator: 'notification', diff --git a/awx/ui/client/src/organizations/organizations.form.js b/awx/ui/client/src/organizations/organizations.form.js index 588523b677..42bda9b716 100644 --- a/awx/ui/client/src/organizations/organizations.form.js +++ b/awx/ui/client/src/organizations/organizations.form.js @@ -65,7 +65,7 @@ export default ['NotificationsList', 'i18n', users: { name: 'users', dataPlacement: 'top', - awToolTip: i18n._('Please save before adding users'), + awToolTip: i18n._('Please save before adding users.'), basePath: 'api/v2/organizations/{{$stateParams.organization_id}}/access_list/', search: { order_by: 'username' diff --git a/awx/ui/client/src/projects/projects.form.js b/awx/ui/client/src/projects/projects.form.js index 021242b4bf..af5b6b47a9 100644 --- a/awx/ui/client/src/projects/projects.form.js +++ b/awx/ui/client/src/projects/projects.form.js @@ -221,7 +221,7 @@ export default ['i18n', 'NotificationsList', function(i18n, NotificationsList) { related: { permissions: { name: 'permissions', - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), djangoModel: 'access_list', dataPlacement: 'top', basePath: 'api/v2/projects/{{$stateParams.project_id}}/access_list/', diff --git a/awx/ui/client/src/teams/teams.form.js b/awx/ui/client/src/teams/teams.form.js index 78ba95f159..ca4e8dc4c3 100644 --- a/awx/ui/client/src/teams/teams.form.js +++ b/awx/ui/client/src/teams/teams.form.js @@ -66,7 +66,7 @@ export default ['i18n', function(i18n) { users: { name: 'users', dataPlacement: 'top', - awToolTip: i18n._('Please save before adding users'), + awToolTip: i18n._('Please save before adding users.'), basePath: 'api/v2/teams/{{$stateParams.team_id}}/access_list/', search: { order_by: 'username' @@ -110,7 +110,7 @@ export default ['i18n', function(i18n) { // @todo ask about name field / serializer on this endpoint order_by: 'id' }, - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), dataPlacement: 'top', hideSearchAndActions: true, type: 'collection', diff --git a/awx/ui/client/src/templates/completed-jobs.list.js b/awx/ui/client/src/templates/completed-jobs.list.js index 56a0f76f52..a370145c96 100644 --- a/awx/ui/client/src/templates/completed-jobs.list.js +++ b/awx/ui/client/src/templates/completed-jobs.list.js @@ -8,7 +8,7 @@ export default ['i18n', function(i18n) { return { // These tooltip fields are consumed to build disabled related tabs tooltips in the form > add view - awToolTip: i18n._('Please save and run a job to view'), + awToolTip: i18n._('Please save and run a job to view.'), dataPlacement: 'top', name: 'completed_jobs', basePath: 'api/v2/job_templates/{{$stateParams.job_template_id}}/jobs', diff --git a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js index e9b2176471..f2ab5e3792 100644 --- a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js +++ b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js @@ -17,7 +17,7 @@ Empty, ToJSON, CallbackHelpInit, GetChoices, $state, availableLabels, CreateSelect2, $q, i18n, Inventory, Project, InstanceGroupsService, MultiCredentialService ) { - + // Inject dynamic view let defaultUrl = GetBasePath('job_templates'), form = JobTemplateForm(), @@ -45,6 +45,8 @@ default_val: false }); CallbackHelpInit({ scope: $scope }); + + $scope.surveyTooltip = i18n._('Please save before adding a survey to this job template.'); } callback = function() { diff --git a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js index ff88cf9473..8a3b5b9a75 100644 --- a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js +++ b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js @@ -14,7 +14,7 @@ export default [ '$filter', '$scope', '$rootScope', '$location', '$stateParams', 'JobTemplateForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'GetBasePath', 'md5Setup', - 'ParseTypeChange', 'Wait', 'selectedLabels', + 'ParseTypeChange', 'Wait', 'selectedLabels', 'i18n', 'Empty', 'Prompt', 'ToJSON', 'GetChoices', 'CallbackHelpInit', 'InitiatePlaybookRun' , 'initSurvey', '$state', 'CreateSelect2', 'ToggleNotification','$q', 'InstanceGroupsService', 'InstanceGroupsData', 'MultiCredentialService', 'availableLabels', @@ -22,7 +22,7 @@ export default $filter, $scope, $rootScope, $location, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert, ProcessErrors, GetBasePath, md5Setup, - ParseTypeChange, Wait, selectedLabels, + ParseTypeChange, Wait, selectedLabels, i18n, Empty, Prompt, ToJSON, GetChoices, CallbackHelpInit, InitiatePlaybookRun, SurveyControllerInit, $state, CreateSelect2, ToggleNotification, $q, InstanceGroupsService, InstanceGroupsData, MultiCredentialService, availableLabels ) { @@ -54,6 +54,7 @@ export default $scope.showJobType = false; $scope.instance_groups = InstanceGroupsData; $scope.credentialNotPresent = false; + $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.'); SurveyControllerInit({ scope: $scope, diff --git a/awx/ui/client/src/templates/job_templates/job-template.form.js b/awx/ui/client/src/templates/job_templates/job-template.form.js index fe10b8e952..e2b076d60b 100644 --- a/awx/ui/client/src/templates/job_templates/job-template.form.js +++ b/awx/ui/client/src/templates/job_templates/job-template.form.js @@ -386,7 +386,7 @@ function(NotificationsList, CompletedJobsList, i18n) { }, permissions: { name: 'permissions', - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), dataPlacement: 'top', basePath: 'api/v2/job_templates/{{$stateParams.job_template_id}}/access_list/', search: { @@ -447,7 +447,7 @@ function(NotificationsList, CompletedJobsList, i18n) { ngClick: 'addSurvey()', ngShow: '($state.is(\'templates.addJobTemplate\') || $state.is(\'templates.editJobTemplate\')) && !survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)', awFeature: 'surveys', - awToolTip: '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.', + awToolTip: '{{surveyTooltip}}', dataPlacement: 'top', label: i18n._('Add Survey'), class: 'Form-primaryButton' @@ -457,7 +457,9 @@ function(NotificationsList, CompletedJobsList, i18n) { awFeature: 'surveys', ngShow: '($state.is(\'templates.addJobTemplate\') || $state.is(\'templates.editJobTemplate\')) && survey_exists && (job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)', label: i18n._('Edit Survey'), - class: 'Form-primaryButton' + class: 'Form-primaryButton', + awToolTip: '{{surveyTooltip}}', + dataPlacement: 'top' } } }; diff --git a/awx/ui/client/src/templates/workflows.form.js b/awx/ui/client/src/templates/workflows.form.js index a929e8b77e..360f8025f1 100644 --- a/awx/ui/client/src/templates/workflows.form.js +++ b/awx/ui/client/src/templates/workflows.form.js @@ -106,7 +106,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { related: { permissions: { name: 'permissions', - awToolTip: i18n._('Please save before assigning permissions'), + awToolTip: i18n._('Please save before assigning permissions.'), dataPlacement: 'top', basePath: 'api/v2/workflow_job_templates/{{$stateParams.workflow_job_template_id}}/access_list/', search: { @@ -167,7 +167,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { ngClick: 'addSurvey()', ngShow: '!survey_exists && ($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\'))', awFeature: 'surveys', - awToolTip: '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.', + awToolTip: '{{surveyTooltip}}', dataPlacement: 'top', label: i18n._('Add Survey'), class: 'Form-primaryButton' @@ -177,12 +177,14 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) { awFeature: 'surveys', ngShow: 'survey_exists && ($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\'))', label: i18n._('Edit Survey'), - class: 'Form-primaryButton' + class: 'Form-primaryButton', + awToolTip: '{{surveyTooltip}}', + dataPlacement: 'top' }, workflow_editor: { ngClick: 'openWorkflowMaker()', ngShow: '$state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\')', - awToolTip: i18n._('Please save before defining the workflow graph'), + awToolTip: '{{workflowEditorTooltip}}', dataPlacement: 'top', label: i18n._('Workflow Editor'), class: 'Form-primaryButton' diff --git a/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js b/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js index 9c32fe652a..6fdbff391d 100644 --- a/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js +++ b/awx/ui/client/src/templates/workflows/add-workflow/workflow-add.controller.js @@ -7,10 +7,10 @@ export default [ '$scope', 'WorkflowForm', 'GenerateForm', 'Alert', 'ProcessErrors', 'Wait', '$state', 'CreateSelect2', 'TemplatesService', - 'ToJSON', 'ParseTypeChange', '$q', 'Rest', 'GetBasePath', 'availableLabels', + 'ToJSON', 'ParseTypeChange', '$q', 'Rest', 'GetBasePath', 'availableLabels', 'i18n', function($scope, WorkflowForm, GenerateForm, Alert, ProcessErrors, Wait, $state, CreateSelect2, TemplatesService, ToJSON, - ParseTypeChange, $q, Rest, GetBasePath, availableLabels) { + ParseTypeChange, $q, Rest, GetBasePath, availableLabels, i18n) { // Inject dynamic view let form = WorkflowForm(), @@ -41,6 +41,9 @@ export default [ multiple: true, addNew: true }); + + $scope.workflowEditorTooltip = i18n._("Please save before defining the workflow graph."); + $scope.surveyTooltip = i18n._('Please save before adding a survey to this workflow.'); } $scope.formSave = function () { 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 d61beadd78..71257b99e2 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 @@ -9,12 +9,12 @@ export default [ 'ProcessErrors', 'GetBasePath', '$q', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON', 'initSurvey', '$state', 'CreateSelect2', 'ParseVariableString', 'TemplatesService', 'Rest', 'ToggleNotification', - 'OrgAdminLookup', 'availableLabels', 'selectedLabels', 'workflowJobTemplateData', + 'OrgAdminLookup', 'availableLabels', 'selectedLabels', 'workflowJobTemplateData', 'i18n', function($scope, $stateParams, WorkflowForm, GenerateForm, Alert, ProcessErrors, GetBasePath, $q, ParseTypeChange, Wait, Empty, ToJSON, SurveyControllerInit, $state, CreateSelect2, ParseVariableString, - TemplatesService, Rest, ToggleNotification, OrgAdminLookup, availableLabels, selectedLabels, workflowJobTemplateData) { - + TemplatesService, Rest, ToggleNotification, OrgAdminLookup, availableLabels, selectedLabels, workflowJobTemplateData, i18n) { + $scope.$watch('workflow_job_template_obj.summary_fields.user_capabilities.edit', function(val) { if (val === false) { $scope.canAddWorkflowJobTemplate = false; @@ -60,6 +60,9 @@ export default [ opts: opts }); + $scope.workflowEditorTooltip = i18n._("Click here to open the workflow graph editor."); + $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; $scope.name = workflowJobTemplateData.name; $scope.can_edit = workflowJobTemplateData.summary_fields.user_capabilities.edit; diff --git a/awx/ui/client/src/users/users.form.js b/awx/ui/client/src/users/users.form.js index 931d26e4a2..08f0fc543f 100644 --- a/awx/ui/client/src/users/users.form.js +++ b/awx/ui/client/src/users/users.form.js @@ -118,7 +118,7 @@ export default ['i18n', function(i18n) { related: { organizations: { name: 'organizations', - awToolTip: i18n._('Please save before assigning to organizations'), + awToolTip: i18n._('Please save before assigning to organizations.'), basePath: 'api/v2/users/{{$stateParams.user_id}}/organizations', emptyListText: i18n._('Please add user to an Organization.'), search: { @@ -146,7 +146,7 @@ export default ['i18n', function(i18n) { }, teams: { name: 'teams', - awToolTip: i18n._('Please save before assigning to teams'), + awToolTip: i18n._('Please save before assigning to teams.'), basePath: 'api/v2/users/{{$stateParams.user_id}}/teams', search: { page_size: '10' @@ -177,7 +177,7 @@ export default ['i18n', function(i18n) { page_size: '10', order_by: 'id' }, - awToolTip: i18n._('Please save before assigning to organizations'), + awToolTip: i18n._('Please save before assigning to organizations.'), dataPlacement: 'top', hideSearchAndActions: true, type: 'collection',