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