mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Fixed survey and workflow editor tooltips
This commit is contained in:
parent
8140fc2fb2
commit
75f3188fb8
@ -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,
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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'),
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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/',
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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 () {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user