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

View File

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

View File

@@ -97,7 +97,7 @@ angular.module('JobTemplateFormDefinition', [])
addRequired: false, addRequired: false,
editRequired: false, editRequired: false,
column: 2, 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>", "A value of zero will use the ansible default setting of 5 parallel processes.</p>",
dataTitle: 'Forks', dataTitle: 'Forks',
dataPlacement: 'left' dataPlacement: 'left'
@@ -123,8 +123,8 @@ angular.module('JobTemplateFormDefinition', [])
addRequired: true, addRequired: true,
editRequired: true, editRequired: true,
column: 2, column: 2,
awPopOver: "<p>Indicate the amount of debugging type information ansible should produce as the playbook executes.</p>", awPopOver: "<p>Control the level of output ansible will produce as the playbook executes.</p>",
dataTitle: 'Forks', dataTitle: 'Verbosity',
dataPlacement: 'left' dataPlacement: 'left'
}, },
extra_vars: { extra_vars: {

View File

@@ -81,32 +81,46 @@ angular.module('JobFormDefinition', [])
}, },
forks: { forks: {
label: 'Forks', label: 'Forks',
id: 'forks-number',
type: 'number', type: 'number',
integer: true, integer: true,
min: 0, min: 0,
max: 100, max: 100,
default: 0, slider: true,
class: 'input-mini',
default: '0',
addRequired: false, addRequired: false,
editRequired: 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: { limit: {
label: 'Limit', label: 'Limit',
type: 'text', type: 'text',
addRequired: false, addRequired: false,
editRequired: 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: { verbosity: {
label: 'Verbosity', label: 'Verbosity',
type: 'number', type: 'select',
integer: true, ngOptions: 'v.label for v in verbosity_options',
default: 0, default: 0,
min: 0, addRequired: true,
max: 3, editRequired: true,
addRequired: false, column: 2,
editRequired: false, awPopOver: "<p>Control the level of output ansible will produce as the playbook executes.</p>",
column: 2 dataTitle: 'Verbosity',
dataPlacement: 'left'
}, },
extra_vars: { extra_vars: {
label: 'Extra Variables', label: 'Extra Variables',

View File

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