mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 16:47:45 -02:30
Add new common inventory source fields
This commit is contained in:
committed by
Ryan Petrello
parent
42e70bc852
commit
b253540047
@@ -194,6 +194,9 @@ export default ['$state', 'ConfigData', '$scope', 'SourcesFormDefinition', 'Pars
|
|||||||
verbosity: $scope.verbosity.value,
|
verbosity: $scope.verbosity.value,
|
||||||
update_cache_timeout: $scope.update_cache_timeout || 0,
|
update_cache_timeout: $scope.update_cache_timeout || 0,
|
||||||
custom_virtualenv: $scope.custom_virtualenv || null,
|
custom_virtualenv: $scope.custom_virtualenv || null,
|
||||||
|
enabled_var: $scope.enabled_var,
|
||||||
|
enabled_value: $scope.enabled_value,
|
||||||
|
host_filter: $scope.host_filter
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.source) {
|
if ($scope.source) {
|
||||||
|
|||||||
@@ -233,6 +233,8 @@ export default ['$state', '$scope', 'ParseVariableString', 'ParseTypeChange',
|
|||||||
$scope.formSave = function() {
|
$scope.formSave = function() {
|
||||||
var params;
|
var params;
|
||||||
|
|
||||||
|
console.log($scope);
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
id: inventorySourceData.id,
|
id: inventorySourceData.id,
|
||||||
name: $scope.name,
|
name: $scope.name,
|
||||||
@@ -246,6 +248,9 @@ export default ['$state', '$scope', 'ParseVariableString', 'ParseTypeChange',
|
|||||||
update_cache_timeout: $scope.update_cache_timeout || 0,
|
update_cache_timeout: $scope.update_cache_timeout || 0,
|
||||||
verbosity: $scope.verbosity.value,
|
verbosity: $scope.verbosity.value,
|
||||||
custom_virtualenv: $scope.custom_virtualenv || null,
|
custom_virtualenv: $scope.custom_virtualenv || null,
|
||||||
|
enabled_var: $scope.enabled_var,
|
||||||
|
enabled_value: $scope.enabled_value,
|
||||||
|
host_filter: $scope.host_filter
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.source) {
|
if ($scope.source) {
|
||||||
|
|||||||
@@ -300,6 +300,36 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n){
|
|||||||
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
subForm: 'sourceSubForm'
|
subForm: 'sourceSubForm'
|
||||||
},
|
},
|
||||||
|
host_filter: {
|
||||||
|
label: i18n._("Host Filter"),
|
||||||
|
type: 'text',
|
||||||
|
dataTitle: i18n._('Host Filter'),
|
||||||
|
dataPlacement: 'right',
|
||||||
|
awPopOver: "<p>" + i18n._("Regular expression where only matching hosts will be imported.") + "</p>",
|
||||||
|
dataContainer: 'body',
|
||||||
|
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
subForm: 'sourceSubForm'
|
||||||
|
},
|
||||||
|
enabled_var: {
|
||||||
|
label: i18n._("Enabled Variable"),
|
||||||
|
type: 'text',
|
||||||
|
dataTitle: i18n._('Enabled Variable'),
|
||||||
|
dataPlacement: 'right',
|
||||||
|
awPopOver: "<p>" + i18n._("Retrieve the enabled state from the given dict of host variables. The enabled variable may be specified using dot notation, e.g: 'foo.bar'") + "</p>",
|
||||||
|
dataContainer: 'body',
|
||||||
|
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
subForm: 'sourceSubForm'
|
||||||
|
},
|
||||||
|
enabled_value: {
|
||||||
|
label: i18n._("Enabled Value"),
|
||||||
|
type: 'text',
|
||||||
|
dataTitle: i18n._('Enabled Value'),
|
||||||
|
dataPlacement: 'right',
|
||||||
|
awPopOver: "<p>" + i18n._("If the enabled variable matches this value, the host will be enabled on import.") + "</p>",
|
||||||
|
dataContainer: 'body',
|
||||||
|
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
subForm: 'sourceSubForm'
|
||||||
|
},
|
||||||
checkbox_group: {
|
checkbox_group: {
|
||||||
label: i18n._('Update Options'),
|
label: i18n._('Update Options'),
|
||||||
type: 'checkbox_group',
|
type: 'checkbox_group',
|
||||||
|
|||||||
Reference in New Issue
Block a user