/************************************************* * Copyright (c) 2015 Ansible, Inc. * * All Rights Reserved *************************************************/ /** * @ngdoc function * @name forms.function:Hosts * @description This form is for adding/editing a host on the inventory page */ export default angular.module('HostFormDefinition', []) .value('HostForm', { addTitle: 'Create Host', editTitle: '{{ host.name }}', name: 'host', well: false, formLabelSize: 'col-lg-3', formFieldSize: 'col-lg-9', iterator: 'host', headerFields:{ enabled: { class: 'Form-header-field', ngClick: 'toggleHostEnabled(host)', type: 'toggle', editRequired: false, awToolTip: "

Indicates if a host is available and should be included in running jobs.

For hosts that " + "are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.

", dataTitle: 'Host Enabled', } }, fields: { name: { label: 'Host Name', type: 'text', addRequired: true, editRequired: true, awPopOver: "

Provide a host name, ip address, or ip address:port. Examples include:

" + "
myserver.domain.com
" + "127.0.0.1
" + "10.1.0.140:25
" + "server.example.com:25" + "
", dataTitle: 'Host Name', dataPlacement: 'right', dataContainer: 'body' }, description: { label: 'Description', type: 'text', addRequired: false, editRequired: false }, variables: { label: 'Variables', type: 'textarea', addRequired: false, editRequird: false, rows: 6, "class": "modal-input-xlarge Form-textArea", "default": "---", awPopOver: "

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

" + "JSON:
\n" + "
{
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
\n" + "YAML:
\n" + "
---
somevar: somevalue
password: magic
\n" + '

View JSON examples at www.json.org

' + '

View YAML examples at docs.ansible.com

', dataTitle: 'Host Variables', dataPlacement: 'right', dataContainer: 'body' }, inventory: { type: 'hidden', includeOnEdit: true, includeOnAdd: true } }, buttons: { save: { ngClick: 'formSave()', ngDisabled: true }, cancel: { ngClick: 'formCancel()', ngDisabled: true } }, related: {} });