Cleaned up verbosity drop down options to match AC-104. Applied all Job Template changes to Job detail page.

This commit is contained in:
chouseknecht 2013-06-06 18:50:45 -04:00
parent 9373fbca61
commit 9a98b4f573
5 changed files with 41 additions and 22 deletions

View File

@ -171,10 +171,9 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP
scope.job_type_options = [{ value: 'run', label: 'Run' }, { value: 'check', label: 'Check' }];
scope.verbosity_options = [
{ value: '0', label: 'Silent' },
{ value: '1', label: 'Whisper' },
{ value: '2', label: 'Talk' },
{ value: '3', label: 'Scream' }];
{ value: '0', label: 'Default' },
{ value: '1', label: 'Verbose' },
{ value: '3', label: 'Debug' }];
scope.playbook_options = [];
generator.reset();
@ -291,10 +290,9 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
// Our job type options
scope.job_type_options = [{ value: 'run', label: 'Run' }, { value: 'check', label: 'Check' }];
scope.verbosity_options = [
{ value: '0', label: 'Silent' },
{ value: '1', label: 'Whisper' },
{ value: '2', label: 'Talk' },
{ value: '3', label: 'Scream' }];
{ value: '0', label: 'Default' },
{ value: '1', label: 'Verbose' },
{ value: '3', label: 'Debug' }];
scope.playbook_options = null;
scope.playbook = null;

View File

@ -191,10 +191,16 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
}
// Set the playbook lookup
getPlaybooks(scope.project);
$('#forks-slider').slider("option", "value", scope.forks);
$('#forks-slider').slider("disable");
});
// Our job type options
scope.job_type_options = [{ value: 'run', label: 'Run' }, { value: 'check', label: 'Check' }];
scope.verbosity_options = [
{ value: '0', label: 'Default' },
{ value: '1', label: 'Verbose' },
{ value: '3', label: 'Debug' }];
scope.playbook_options = null;
scope.playbook = null;
@ -313,6 +319,7 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
for (var fld in master) {
scope[fld] = master[fld];
}
$('#forks-slider').slider("option", "value", scope.forks);
};
// Related set: Add button

View File

@ -97,7 +97,7 @@ angular.module('JobTemplateFormDefinition', [])
addRequired: false,
editRequired: false,
column: 2,
awPopOver: "<p>Specify the number of parallel or simultaneous processes to use while executing the playbook. Provide a value between 0 and 100. " +
awPopOver: "<p>The number of parallel or simultaneous processes to use while executing the playbook. Provide a value between 0 and 100. " +
"A value of zero will use the ansible default setting of 5 parallel processes.</p>",
dataTitle: 'Forks',
dataPlacement: 'left'
@ -123,8 +123,8 @@ angular.module('JobTemplateFormDefinition', [])
addRequired: true,
editRequired: true,
column: 2,
awPopOver: "<p>Indicate the amount of debugging type information ansible should produce as the playbook executes.</p>",
dataTitle: 'Forks',
awPopOver: "<p>Control the level of output ansible will produce as the playbook executes.</p>",
dataTitle: 'Verbosity',
dataPlacement: 'left'
},
extra_vars: {

View File

@ -81,32 +81,46 @@ angular.module('JobFormDefinition', [])
},
forks: {
label: 'Forks',
id: 'forks-number',
type: 'number',
integer: true,
min: 0,
max: 100,
default: 0,
slider: true,
class: 'input-mini',
default: '0',
addRequired: false,
editRequired: false,
column: 2
column: 2,
awPopOver: "<p>The number of parallel or simultaneous processes to use while executing the playbook. Provide a value between 0 and 100. " +
"A value of zero will use the ansible default setting of 5 parallel processes.</p>",
dataTitle: 'Forks',
dataPlacement: 'left'
},
limit: {
label: 'Limit',
type: 'text',
addRequired: false,
editRequired: false,
column: 2
column: 2,
awPopOver: "<p>Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. " +
"Multiple patterns can be separated by &#59; &#58; or &#44;</p><p>For more information and examples see the " +
"<a href=\"http://ansible.cc/docs/patterns.html#selecting-targets\" target=\"_blank\">Selecting Targets section</a> under Inventory and Patterns " +
" in the Ansible documentation.</p>",
dataTitle: 'Forks',
dataPlacement: 'left'
},
verbosity: {
label: 'Verbosity',
type: 'number',
integer: true,
type: 'select',
ngOptions: 'v.label for v in verbosity_options',
default: 0,
min: 0,
max: 3,
addRequired: false,
editRequired: false,
column: 2
addRequired: true,
editRequired: true,
column: 2,
awPopOver: "<p>Control the level of output ansible will produce as the playbook executes.</p>",
dataTitle: 'Verbosity',
dataPlacement: 'left'
},
extra_vars: {
label: 'Extra Variables',

View File

@ -194,7 +194,7 @@ angular.module('AWDirectives', ['RestServices'])
ctrl.$setValidity('max', true);
ctrl.$dirty = true;
ctrl.$render();
scope['job_templates_form'].$dirty = true;
//scope['job_templates_form'].$dirty = true;
if (!scope.$$phase) {
scope.$digest();
}