remove dead fields from Groups > Add manual source type, resovles #2288 (#2305)

This commit is contained in:
Leigh
2016-06-10 10:09:47 -04:00
committed by GitHub
parent 47a81e63f5
commit 902787b63b
2 changed files with 11 additions and 11 deletions

View File

@@ -69,7 +69,7 @@ export default
credential: {
label: 'Cloud Credential',
type: 'lookup',
ngShow: "source && source.value !== 'manual' && source.value !== 'custom'",
ngShow: "source && source.value !== '' && source.value !== 'custom'",
sourceModel: 'credential',
sourceField: 'name',
ngClick: 'lookUpCredential()',
@@ -157,7 +157,7 @@ export default
addRequired: false,
editRequired: false,
rows: 6,
'default': '---',
'default': null,
parseTypeName: 'envParseType',
dataTitle: "Environment Variables",
dataPlacement: 'right',
@@ -177,7 +177,7 @@ export default
addRequired: false,
editRequird: false,
rows: 6,
'default': '---',
'default': null,
parseTypeName: 'envParseType',
dataTitle: "Source Variables",
dataPlacement: 'right',
@@ -203,7 +203,7 @@ export default
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
editRequird: false,
rows: 6,
'default': '---',
'default': null,
parseTypeName: 'envParseType',
dataTitle: "Source Variables",
dataPlacement: 'right',
@@ -229,7 +229,7 @@ export default
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
editRequird: false,
rows: 6,
'default': '---',
'default': null,
parseTypeName: 'envParseType',
dataTitle: "Source Variables",
dataPlacement: 'right',
@@ -248,14 +248,14 @@ export default
checkbox_group: {
label: 'Update Options',
type: 'checkbox_group',
ngShow: "source && (source.value !== 'manual' && source.value !== null)",
ngShow: "source && (source.value !== '' && source.value !== null)",
class: 'Form-checkbox--stacked',
fields: [{
name: 'overwrite',
label: 'Overwrite',
type: 'checkbox',
ngShow: "source.value !== 'manual' && source.value !== null",
ngShow: "source.value !== '' && source.value !== null",
addRequired: false,
editRequired: false,
awPopOver: '<p>If checked, all child groups and hosts not found on the external source will be deleted from ' +
@@ -269,7 +269,7 @@ export default
name: 'overwrite_vars',
label: 'Overwrite Variables',
type: 'checkbox',
ngShow: "source.value !== 'manual' && source.value !== null",
ngShow: "source.value !== '' && source.value !== null",
addRequired: false,
editRequired: false,
awPopOver: '<p>If checked, all variables for child groups and hosts will be removed and replaced by those ' +
@@ -283,7 +283,7 @@ export default
name: 'update_on_launch',
label: 'Update on Launch',
type: 'checkbox',
ngShow: "source.value !== 'manual' && source.value !== null",
ngShow: "source.value !== '' && source.value !== null",
addRequired: false,
editRequired: false,
awPopOver: '<p>Each time a job runs using this inventory, refresh the inventory from the selected source before ' +
@@ -300,7 +300,7 @@ export default
type: 'number',
integer: true,
min: 0,
ngShow: "source && source.value !== 'manual' && update_on_launch",
ngShow: "source && source.value !== '' && update_on_launch",
spinner: true,
"default": 0,
addRequired: false,

View File

@@ -28,7 +28,7 @@
// inventory_source fields
params = {
instance_filters: $scope.instance_filters,
source_vars: $scope[$scope.source.value + '_variables'] === '---' || $scope[$scope.source.value + '_variables'] === '{}' ? null : $scope[$scope.source.value + '_variables'],
source_vars: $scope[$scope.source.value + '_variables'] === null ? null : $scope[$scope.source.value + '_variables'],
source_script: $scope.inventory_script,
source: $scope.source.value,
credential: $scope.credential,