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

View File

@@ -28,7 +28,7 @@
// inventory_source fields // inventory_source fields
params = { params = {
instance_filters: $scope.instance_filters, 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_script: $scope.inventory_script,
source: $scope.source.value, source: $scope.source.value,
credential: $scope.credential, credential: $scope.credential,