adhoc ui fixes

This commit is contained in:
John Mitchell 2015-09-28 10:47:12 -04:00
parent f1f9f5f982
commit 2e43ed0405
2 changed files with 7 additions and 10 deletions

View File

@ -159,7 +159,7 @@ function adhocController($q, $scope, $rootScope, $location, $routeParams,
privateFn.initializeForm = function(id, urls, hostPattern) {
// inject the adhoc command form
GenerateForm.inject(adhocForm,
{ mode: 'edit', related: true, scope: $scope });
{ mode: 'add', related: true, scope: $scope });
// set when "working" starts and stops
privateFn.setLoadingStartStop();
@ -210,7 +210,7 @@ function adhocController($q, $scope, $rootScope, $location, $routeParams,
data = {
"job_type": "run",
"limit": "",
"credential": null,
"credential": "",
"module_name": "command",
"module_args": "",
"forks": 0,
@ -224,7 +224,7 @@ function adhocController($q, $scope, $rootScope, $location, $routeParams,
for (fld in adhocForm.fields) {
if (adhocForm.fields[fld].type === 'select') {
data[fld] = $scope[fld].value;
} else {
} else if ($scope[fld]) {
data[fld] = $scope[fld];
}
}

View File

@ -25,7 +25,7 @@ export default function() {
ngOptions: 'module.label for module in adhoc_module_options' +
' track by module.value',
ngChange: 'moduleChange()',
editRequired: true,
addRequired: true,
awPopOver:'<p>These are the modules that Tower supports ' +
'running commands against.',
dataTitle: 'Module',
@ -40,14 +40,13 @@ export default function() {
dataTitle: 'Arguments',
dataPlacement: 'right',
dataContainer: 'body',
editRequired: false,
addRequired: false,
autocomplete: false
},
limit: {
label: 'Host Pattern',
type: 'text',
addRequired: false,
editRequired: false,
awPopOver: '<p>The pattern used to target hosts in the ' +
'inventory. Leaving the field blank, all, and * will ' +
'all target all hosts in the inventory. You can find ' +
@ -83,7 +82,6 @@ export default function() {
label: 'Enable Privilege Escalation',
type: 'checkbox',
addRequired: false,
editRequired: 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</code> command. </p>",
dataPlacement: 'right',
@ -97,7 +95,7 @@ export default function() {
ngOptions: 'verbosity.label for verbosity in ' +
'adhoc_verbosity_options ' +
'track by verbosity.value',
editRequired: true,
addRequired: true,
awPopOver:'<p>These are the verbosity levels for standard ' +
'out of the command run that are supported.',
dataTitle: 'Module',
@ -113,8 +111,7 @@ export default function() {
min: 0,
spinner: true,
"default": 0,
addRequired: false,
editRequired: true,
addRequired: true,
'class': "input-small",
column: 1,
awPopOver: '<p>The number of parallel or simultaneous processes to use while executing the command. 0 signifies ' +