mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
AC-1076 Added update_cache_timeout to inventory group add/edit dialog.
This commit is contained in:
parent
ba5c396630
commit
4889681df3
@ -218,13 +218,13 @@ angular.module('ProjectFormDefinition', [])
|
||||
"default": '0',
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPopOver: '<p>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: '<p>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.</p>',
|
||||
dataTitle: 'Cache Timeout',
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body"
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
buttons: {
|
||||
|
||||
@ -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: '<p>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.</p>',
|
||||
dataTitle: 'Cache Timeout',
|
||||
dataPlacement: 'right',
|
||||
dataContainer: "body"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user