AC-1076 Added update_cache_timeout to inventory group add/edit dialog.

This commit is contained in:
Chris Houseknecht
2014-03-26 18:29:28 -04:00
parent ba5c396630
commit 4889681df3
4 changed files with 34 additions and 9 deletions

View File

@@ -218,13 +218,13 @@ angular.module('ProjectFormDefinition', [])
"default": '0', "default": '0',
addRequired: false, addRequired: false,
editRequired: false, editRequired: false,
awPopOver: '<p>Time in seconds to consider a project update current. During job runs and callbacks the task system will ' + 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, the project update is not current, ' + 'evaluate the timestamp of the latest project update. If it is older than Cache Timeout, it is not considered current, ' +
'and a new update will be performed.', 'and a new project update will be performed.</p>',
dataTitle: 'Cache Timeout', dataTitle: 'Cache Timeout',
dataPlacement: 'right', dataPlacement: 'right',
dataContainer: "body" dataContainer: "body"
}, }
}, },
buttons: { buttons: {

View File

@@ -128,6 +128,24 @@ angular.module('SourceFormDefinition', [])
dataPlacement: 'right', dataPlacement: 'right',
labelClass: 'checkbox-options' 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"
} }
}, },

View File

@@ -202,6 +202,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
id: 'all', id: 'all',
text: 'All' text: 'All'
}]); }]);
$('#source_form').removeClass('squeeze');
} else if (scope.source.value === 'ec2') { } else if (scope.source.value === 'ec2') {
scope.source_region_choices = scope.ec2_regions; scope.source_region_choices = scope.ec2_regions;
//$('#s2id_group_source_regions').select2('data', []); //$('#s2id_group_source_regions').select2('data', []);
@@ -209,6 +210,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
id: 'all', id: 'all',
text: 'All' text: 'All'
}]); }]);
$('#source_form').addClass('squeeze');
} }
if (scope.source.value === 'rax' || scope.source.value === 'ec2') { if (scope.source.value === 'rax' || scope.source.value === 'ec2') {
kind = (scope.source.value === 'rax') ? 'rax' : 'aws'; kind = (scope.source.value === 'rax') ? 'rax' : 'aws';
@@ -650,15 +652,15 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
if (ww > 1199) { if (ww > 1199) {
// desktop // desktop
x = 675; x = 675;
y = (750 > wh) ? wh - 20 : 750; y = (780 > wh) ? wh - 15 : 780;
maxrows = 18; maxrows = 18;
} else if (ww <= 1199 && ww >= 768) { } else if (ww <= 1199 && ww >= 768) {
x = 550; x = 550;
y = (620 > wh) ? wh - 15 : 620; y = (770 > wh) ? wh - 15 : 770;
maxrows = 12; maxrows = 12;
} else { } else {
x = (ww - 20); x = (ww - 20);
y = (500 > wh) ? wh : 500; y = (770 > wh) ? wh - 15 : 770;
maxrows = 10; maxrows = 10;
} }
@@ -843,7 +845,7 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
// Parse source_vars, converting to YAML. // Parse source_vars, converting to YAML.
sources_scope.source_vars = ParseVariableString(data.source_vars); sources_scope.source_vars = ParseVariableString(data.source_vars);
master.source_vars = sources_scope.variables; master.source_vars = sources_scope.variables;
} else if (data[fld]) { } else if (data[fld] !== undefined) {
sources_scope[fld] = data[fld]; sources_scope[fld] = data[fld];
master[fld] = sources_scope[fld]; master[fld] = sources_scope[fld];
} }
@@ -1056,7 +1058,8 @@ function(SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize) {
credential: sources_scope.credential, credential: sources_scope.credential,
overwrite: sources_scope.overwrite, overwrite: sources_scope.overwrite,
overwrite_vars: sources_scope.overwrite_vars, 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 // Create a string out of selected list of regions

View File

@@ -1306,6 +1306,10 @@ input[type="checkbox"].checkbox-no-label {
text-overflow: clip;*/ text-overflow: clip;*/
} }
// Inventory edit dialog, source form, ec2
#source_form.squeeze .form-group {
margin-bottom: 10px;
}
.disabled { .disabled {
color: @grey; color: @grey;