diff --git a/awx/ui/static/js/forms/Projects.js b/awx/ui/static/js/forms/Projects.js index 28f3510a98..462526ec64 100644 --- a/awx/ui/static/js/forms/Projects.js +++ b/awx/ui/static/js/forms/Projects.js @@ -218,13 +218,13 @@ angular.module('ProjectFormDefinition', []) "default": '0', addRequired: false, editRequired: false, - awPopOver: '

Time in seconds to consider a project update current. During job runs and callbacks the task system will ' + - 'evaluate the timestamp of the latest project update. If it is older than Cache Timeout, the project update is not current, ' + - 'and a new update will be performed.', + awPopOver: '

Time in seconds to consider a project to be current. During job runs and callbacks the task system will ' + + 'evaluate the timestamp of the latest project update. If it is older than Cache Timeout, it is not considered current, ' + + 'and a new project update will be performed.

', dataTitle: 'Cache Timeout', dataPlacement: 'right', dataContainer: "body" - }, + } }, buttons: { diff --git a/awx/ui/static/js/forms/Source.js b/awx/ui/static/js/forms/Source.js index 0906f545c1..716d66db71 100644 --- a/awx/ui/static/js/forms/Source.js +++ b/awx/ui/static/js/forms/Source.js @@ -128,6 +128,24 @@ angular.module('SourceFormDefinition', []) dataPlacement: 'right', labelClass: 'checkbox-options' }] + }, + update_cache_timeout: { + label: 'Cache Timeout', + id: 'source-cache-timeout', + type: 'number', + integer: true, + min: 0, + ngShow: "update_on_launch", + spinner: true, + "default": '0', + addRequired: false, + editRequired: false, + awPopOver: '

Time in seconds to consider an inventory sync to be current. During job runs and callbacks the task system will ' + + 'evaluate the timestamp of the latest sync. If it is older than Cache Timeout, it is not considered current, ' + + 'and a new inventory sync will be performed.

', + dataTitle: 'Cache Timeout', + dataPlacement: 'right', + dataContainer: "body" } }, diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 05d58c2d20..ddb4f31b66 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -202,6 +202,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G id: 'all', text: 'All' }]); + $('#source_form').removeClass('squeeze'); } else if (scope.source.value === 'ec2') { scope.source_region_choices = scope.ec2_regions; //$('#s2id_group_source_regions').select2('data', []); @@ -209,6 +210,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G id: 'all', text: 'All' }]); + $('#source_form').addClass('squeeze'); } if (scope.source.value === 'rax' || scope.source.value === 'ec2') { kind = (scope.source.value === 'rax') ? 'rax' : 'aws'; @@ -650,15 +652,15 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) { if (ww > 1199) { // desktop x = 675; - y = (750 > wh) ? wh - 20 : 750; + y = (780 > wh) ? wh - 15 : 780; maxrows = 18; } else if (ww <= 1199 && ww >= 768) { x = 550; - y = (620 > wh) ? wh - 15 : 620; + y = (770 > wh) ? wh - 15 : 770; maxrows = 12; } else { x = (ww - 20); - y = (500 > wh) ? wh : 500; + y = (770 > wh) ? wh - 15 : 770; maxrows = 10; } @@ -843,7 +845,7 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) { // Parse source_vars, converting to YAML. sources_scope.source_vars = ParseVariableString(data.source_vars); master.source_vars = sources_scope.variables; - } else if (data[fld]) { + } else if (data[fld] !== undefined) { sources_scope[fld] = data[fld]; master[fld] = sources_scope[fld]; } @@ -1056,7 +1058,8 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) { credential: sources_scope.credential, overwrite: sources_scope.overwrite, overwrite_vars: sources_scope.overwrite_vars, - update_on_launch: sources_scope.update_on_launch + update_on_launch: sources_scope.update_on_launch, + update_cache_timeout: sources_scope.update_cache_timeout }; // Create a string out of selected list of regions diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index b1ba03e777..dcaa18a9c3 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -1306,6 +1306,10 @@ input[type="checkbox"].checkbox-no-label { text-overflow: clip;*/ } +// Inventory edit dialog, source form, ec2 +#source_form.squeeze .form-group { + margin-bottom: 10px; +} .disabled { color: @grey;