/********************************************* * Copyright (c) 2013 AnsibleWorks, Inc. * * Hosts.js * Form definition for Host model * * */ angular.module('HostFormDefinition', []) .value( 'HostForm', { addTitle: 'Create Host', //Legend in add mode editTitle: '{{ name }}', //Legend in edit mode name: 'host', //Form name attribute well: false, //Wrap the form with TB well fields: { name: { label: 'Name', type: 'text', addRequired: true, editRequired: true }, description: { label: 'Description', type: 'text', addRequired: false, editRequired: false }, inventory: { type: 'hidden', includeOnEdit: true, includeOnAdd: true }, variables: { label: 'Variables', type: 'textarea', addRequired: false, editRequird: false, rows: 10, default: "\{\}", awPopOver: "

Enter variables as JSON. Both the key and value must be wrapped in double quotes. " + "Separate variables with commas, and wrap the entire string with { }. " + " For example:

{"ntp_server": "ntp.example.com",
" + '"proxy": "proxy.example.com"
}

See additional JSON examples at www.json.org

', dataTitle: 'Host Variables', dataPlacement: 'right' } }, buttons: { //for now always generates