mirror of
https://github.com/ansible/awx.git
synced 2026-07-30 09:29:54 -02:30
AC-503 Latest cloud inventory changes.
This commit is contained in:
@@ -11,21 +11,15 @@ angular.module('GroupFormDefinition', [])
|
||||
'GroupForm', {
|
||||
|
||||
addTitle: 'Create Group', //Legend in add mode
|
||||
editTitle: '{{ name }}', //Legend in edit mode
|
||||
editTitle: 'Group Properties: {{ name }}', //Legend in edit mode
|
||||
showTitle: true,
|
||||
cancelButton: false,
|
||||
name: 'group', //Form name attribute
|
||||
well: false, //Wrap the form with TB well
|
||||
//formLabelSize: 'col-lg-3',
|
||||
//formFieldSize: 'col-lg-9',
|
||||
formLabelSize: 'col-lg-3',
|
||||
formFieldSize: 'col-lg-9',
|
||||
|
||||
fields: {
|
||||
/*has_active_failures: {
|
||||
label: 'Status',
|
||||
control: '<div class="job-failures-\{\{ has_active_failures \}\}">' +
|
||||
'<i class="icon-exclamation-sign"></i> Contains hosts with failed jobs</div>',
|
||||
type: 'custom',
|
||||
ngShow: 'has_active_failures',
|
||||
readonly: true
|
||||
},*/
|
||||
name: {
|
||||
label: 'Name',
|
||||
type: 'text',
|
||||
@@ -44,11 +38,11 @@ angular.module('GroupFormDefinition', [])
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
rows: 10,
|
||||
"class": 'modal-input-xlarge',
|
||||
"default": "---",
|
||||
'default': '---',
|
||||
dataTitle: 'Group Variables',
|
||||
dataPlacement: 'left',
|
||||
awPopOver: "<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
||||
awPopOver: "<p>Variables defined here apply to all child groups and hosts. Enter variables using either JSON or YAML syntax. Use the " +
|
||||
"radio button to toggle between the two.</p>" +
|
||||
"JSON:<br />\n" +
|
||||
"<blockquote>{<br />\"somevar\": \"somevalue\",<br />\"password\": \"magic\"<br /> }</blockquote>\n" +
|
||||
"YAML:<br />\n" +
|
||||
@@ -56,10 +50,164 @@ angular.module('GroupFormDefinition', [])
|
||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||
'<p>View YAML examples at <a href="http://www.ansibleworks.com/docs/YAMLSyntax.html" target="_blank">ansibleworks.com</a></p>',
|
||||
dataContainer: 'body'
|
||||
}
|
||||
},
|
||||
source: {
|
||||
label: 'Source',
|
||||
excludeModal: true,
|
||||
type: 'select',
|
||||
ngOptions: 'source.label for source in source_type_options',
|
||||
ngChange: 'sourceChange()',
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
'default': { label: 'Manual', value: null }
|
||||
},
|
||||
source_path: {
|
||||
label: 'Script Path',
|
||||
excludeModal: true,
|
||||
ngShow: "source.value == 'file'",
|
||||
type: 'text',
|
||||
awRequiredWhen: {variable: "sourcePathRequired", init: "false" }
|
||||
},
|
||||
source_env: {
|
||||
label: 'Script Environment Variables',
|
||||
ngShow: "source.value == 'file'",
|
||||
type: 'textarea',
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
excludeModal: true,
|
||||
rows: 10,
|
||||
'default': '---',
|
||||
parseTypeName: 'envParseType',
|
||||
dataTitle: 'Script Environment Variables',
|
||||
dataPlacement: 'left',
|
||||
awPopOver: "<p>Define environment variables here that will be referenced by the inventory script at runtime. " +
|
||||
"Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
||||
"JSON:<br />\n" +
|
||||
"<blockquote>{<br />\"somevar\": \"somevalue\",<br />\"password\": \"magic\"<br /> }</blockquote>\n" +
|
||||
"YAML:<br />\n" +
|
||||
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||
'<p>View YAML examples at <a href="http://www.ansibleworks.com/docs/YAMLSyntax.html" target="_blank">ansibleworks.com</a></p>',
|
||||
dataContainer: 'body',
|
||||
awPopOverRight: true
|
||||
},
|
||||
source_username: {
|
||||
labelBind: 'sourceUsernameLabel',
|
||||
excludeModal: true,
|
||||
type: 'text',
|
||||
ngShow: "source.value == 'rackspace' || source.value == 'ec2'",
|
||||
awRequiredWhen: {variable: "sourceUsernameRequired", init: "false" }
|
||||
},
|
||||
source_password: {
|
||||
labelBind: 'sourcePasswordLabel',
|
||||
excludeModal: true,
|
||||
type: 'password',
|
||||
ngShow: "source.value == 'rackspace' || source.value == 'ec2'",
|
||||
editRequired: false,
|
||||
addRequired: false,
|
||||
ngChange: "clearPWConfirm('source_password_confirm')",
|
||||
ask: true,
|
||||
clear: true,
|
||||
associated: 'source_password_confirm',
|
||||
autocomplete: false
|
||||
},
|
||||
source_password_confirm: {
|
||||
labelBind: 'sourcePasswordConfirmLabel',
|
||||
type: 'password',
|
||||
ngShow: "source.value == 'rackspace' || source.value == 'ec2'",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPassMatch: true,
|
||||
associated: 'source_password',
|
||||
autocomplete: false
|
||||
},
|
||||
source_regions: {
|
||||
label: 'Regions',
|
||||
excludeModal: true,
|
||||
type: 'text',
|
||||
ngShow: "source.value == 'rackspace' || source.value == 'ec2'",
|
||||
addRequired: false,
|
||||
editRequired: false
|
||||
},
|
||||
source_tags: {
|
||||
label: 'Tags',
|
||||
excludeModal: true,
|
||||
type: 'text',
|
||||
ngShow: "source.value == 'rackspace' || source.value == 'ec2'",
|
||||
addRequired: false,
|
||||
editRequired: false
|
||||
},
|
||||
checkbox_group: {
|
||||
label: 'Update Options',
|
||||
type: 'checkbox_group',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
|
||||
fields: [
|
||||
{
|
||||
name: 'overwite_hosts',
|
||||
label: 'Overwrite Hosts',
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPopOver: '<p>Replace AWX inventory hosts with cloud inventory hosts.</p>',
|
||||
dataTitle: 'Overwrite Hosts',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'left',
|
||||
labelClass: 'checkbox-options',
|
||||
inline: false
|
||||
},
|
||||
{
|
||||
name: 'overwite_vars',
|
||||
label: 'Overwrite Variables',
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPopOver: '<p></p>',
|
||||
dataTitle: 'Overwrite Variables',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'left',
|
||||
labelClass: 'checkbox-options',
|
||||
inline: false
|
||||
},
|
||||
{
|
||||
name: 'keep_vars',
|
||||
label: 'Keep Variables',
|
||||
type: 'checkbox',
|
||||
ngShow: "source.value !== '' && source.value !== null",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awPopOver: '<p></p>',
|
||||
dataTitle: 'Keep Variables',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'left',
|
||||
labelClass: 'checkbox-options',
|
||||
inline: false
|
||||
},
|
||||
{
|
||||
name: 'update_on_launch',
|
||||
label: 'Update on Launch',
|
||||
type: 'checkbox',
|
||||
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</p>',
|
||||
dataTitle: 'Update on Launch',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'left',
|
||||
labelClass: 'checkbox-options',
|
||||
inline: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
|
||||
labelClass: 'col-lg-3',
|
||||
controlClass: 'col-lg-5',
|
||||
|
||||
save: {
|
||||
label: 'Save',
|
||||
icon: 'icon-ok',
|
||||
|
||||
@@ -76,8 +76,8 @@ angular.module('InventoryFormDefinition', [])
|
||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||
'<p>View YAML examples at <a href="http://www.ansibleworks.com/docs/YAMLSyntax.html" target="_blank">ansibleworks.com</a></p>',
|
||||
dataTitle: 'Inventory Variables',
|
||||
dataPlacement: 'bottom',
|
||||
dataContainer: '#inventory'
|
||||
dataPlacement: 'left',
|
||||
dataContainer: 'body'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user