mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Merge pull request #2599 from mabashian/stack-jt-checkboxes
Moved job template checkboxes into a group
This commit is contained in:
commit
ac1f3e142f
@ -225,29 +225,36 @@ export default
|
||||
text: 'Prompt on launch'
|
||||
}
|
||||
},
|
||||
become_enabled: {
|
||||
label: 'Enable Privilege Escalation',
|
||||
type: 'checkbox',
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
column: 2,
|
||||
awPopOver: "<p>If enabled, run this playbook as an administrator. This is the equivalent of passing the <code>--become</code> option to the <code>ansible-playbook</code> command. </p>",
|
||||
dataPlacement: 'right',
|
||||
dataTitle: 'Become Privilege Escalation',
|
||||
dataContainer: "body"
|
||||
},
|
||||
allow_callbacks: {
|
||||
label: 'Allow Provisioning Callbacks',
|
||||
type: 'checkbox',
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
ngChange: "toggleCallback('host_config_key')",
|
||||
column: 2,
|
||||
awPopOver: "<p>Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " +
|
||||
"using this job template.</p>",
|
||||
dataPlacement: 'right',
|
||||
dataTitle: 'Allow Provisioning Callbacks',
|
||||
dataContainer: "body"
|
||||
checkbox_group: {
|
||||
label: 'Options',
|
||||
type: 'checkbox_group',
|
||||
fields: [{
|
||||
name: 'become_enabled',
|
||||
label: 'Enable Privilege Escalation',
|
||||
type: 'checkbox',
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
column: 2,
|
||||
awPopOver: "<p>If enabled, run this playbook as an administrator. This is the equivalent of passing the <code>--become</code> option to the <code>ansible-playbook</code> command. </p>",
|
||||
dataPlacement: 'right',
|
||||
dataTitle: 'Become Privilege Escalation',
|
||||
dataContainer: "body",
|
||||
labelClass: 'stack-inline'
|
||||
}, {
|
||||
name: 'allow_callbacks',
|
||||
label: 'Allow Provisioning Callbacks',
|
||||
type: 'checkbox',
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
ngChange: "toggleCallback('host_config_key')",
|
||||
column: 2,
|
||||
awPopOver: "<p>Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " +
|
||||
"using this job template.</p>",
|
||||
dataPlacement: 'right',
|
||||
dataTitle: 'Allow Provisioning Callbacks',
|
||||
dataContainer: "body",
|
||||
labelClass: 'stack-inline'
|
||||
}]
|
||||
},
|
||||
callback_url: {
|
||||
label: 'Provisioning Callback URL',
|
||||
|
||||
@ -110,6 +110,11 @@ angular.module('JobTemplatesHelper', ['Utilities'])
|
||||
master[form.fields[fld].sourceModel + '_' + form.fields[fld].sourceField] =
|
||||
scope[form.fields[fld].sourceModel + '_' + form.fields[fld].sourceField];
|
||||
}
|
||||
if (form.fields[fld].type === 'checkbox_group') {
|
||||
for(var j=0; j<form.fields[fld].fields.length; j++) {
|
||||
scope[form.fields[fld].fields[j].name] = data[form.fields[fld].fields[j].name];
|
||||
}
|
||||
}
|
||||
}
|
||||
Wait('stop');
|
||||
scope.url = data.url;
|
||||
|
||||
@ -482,7 +482,14 @@
|
||||
if (form.fields[fld].type === 'select' &&
|
||||
fld !== 'playbook') {
|
||||
data[fld] = $scope[fld].value;
|
||||
} else {
|
||||
}
|
||||
else if(form.fields[fld].type === 'checkbox_group') {
|
||||
// Loop across the checkboxes
|
||||
for(var i=0; i<form.fields[fld].fields.length; i++) {
|
||||
data[form.fields[fld].fields[i].name] = $scope[form.fields[fld].fields[i].name];
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (fld !== 'variables' &&
|
||||
fld !== 'survey') {
|
||||
data[fld] = $scope[fld];
|
||||
|
||||
@ -599,7 +599,14 @@ export default
|
||||
if (form.fields[fld].type === 'select' &&
|
||||
fld !== 'playbook') {
|
||||
data[fld] = $scope[fld].value;
|
||||
} else {
|
||||
}
|
||||
else if(form.fields[fld].type === 'checkbox_group') {
|
||||
// Loop across the checkboxes
|
||||
for(var i=0; i<form.fields[fld].fields.length; i++) {
|
||||
data[form.fields[fld].fields[i].name] = $scope[form.fields[fld].fields[i].name];
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (fld !== 'variables' &&
|
||||
fld !== 'survey') {
|
||||
data[fld] = $scope[fld];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user