<commit_before>/*************************************************
 * Copyright (c) 2015 Ansible, Inc.
 *
 * All Rights Reserved
 *************************************************/

 /**
 * @ngdoc function
 * @name forms.function:Adhoc
 * @description This form is for executing an adhoc command
*/

export default function() {
    return {
        addTitle: 'Execute Command',
        name: 'adhoc',
        well: true,
        forceListeners: true,

        fields: {
            module_name: {
                label: 'Module',
                excludeModal: true,
                type: 'select',
                ngOptions: 'module.label for module in adhoc_module_options' +
                    ' track by module.value',
                ngChange: 'moduleChange()',
                addRequired: true,
                awPopOver:'<p>These are the modules that Tower supports ' +
                    'running commands against.',
                dataTitle: 'Module',
                dataPlacement: 'right',
                dataContainer: 'body'
            },
            module_args: {
                label: 'Arguments',
                type: 'text',
                awPopOverWatch: 'argsPopOver',
                awPopOver: '{{ argsPopOver }}',
                dataTitle: 'Arguments',
                dataPlacement: 'right',
                dataContainer: 'body',
                addRequired: false,
                autocomplete: false
            },
            limit: {
                label: 'Host Pattern',
                type: 'text',
                addRequired: false,
                awPopOver: '<p>The pattern used to target hosts in the ' +
                    'inventory. Leaving the field blank, all, and * will ' +
                    'all target all hosts in the inventory.  You can find ' +
                    'more information about Ansible\'s host patterns ' +
                    '<a id=\"adhoc_form_hostpatterns_doc_link\"' +
                    'href=\"http://docs.ansible.com/intro_patterns.html\" ' +
                    'target=\"_blank\">here</a>.</p>',
                dataTitle: 'Host Pattern',
                dataPlacement: 'right',
                dataContainer: 'body'
            },
            credential: {
                label: 'Machine Credential',
                type: 'lookup',
                sourceModel: 'credential',
                sourceField: 'name',
                ngClick: 'lookUpCredential()',
                class: 'squeeze',
                awPopOver: '<p>Select the credential you want to use when ' +
                    'accessing the remote hosts to run the command. ' +
                    'Choose the credential containing ' +
                    'the username and SSH key or password that Ansbile ' +
                    'will need to log into the remote hosts.</p>',
                dataTitle: 'Credential',
                dataPlacement: 'right',
                dataContainer: 'body',
                awRequiredWhen: {
                    reqExpression: 'credRequired',
                    init: 'false'
                }
            },
            become_enabled: {
                label: 'Enable Privilege Escalation',
                type: 'checkbox',
                addRequired: false,
                column: 2,
                awPopOver: "<p>If enabled,  run this playbook as an administrator. This is the equivalent of passing the<code> --become</code> option to the <code> ansible</code> command. </p>",
                dataPlacement: 'right',
                dataTitle: 'Become Privilege Escalation',
                dataContainer: "body"
            },
            verbosity: {
                label: 'Verbosity',
                excludeModal: true,
                type: 'select',
                ngOptions: 'verbosity.label for verbosity in ' +
                    'adhoc_verbosity_options ' +
                    'track by verbosity.value',
                addRequired: true,
                awPopOver:'<p>These are the verbosity levels for standard ' +
                    'out of the command run that are supported.',
                dataTitle: 'Module',<commit_msg>Rename 'Host Pattern' to 'Limit', and fix paste-o in 'Verbosity' popover title. (#2776)<commit_after>/*************************************************
 * Copyright (c) 2015 Ansible, Inc.
 *
 * All Rights Reserved
 *************************************************/

 /**
 * @ngdoc function
 * @name forms.function:Adhoc
 * @description This form is for executing an adhoc command
*/

export default function() {
    return {
        addTitle: 'Execute Command',
        name: 'adhoc',
        well: true,
        forceListeners: true,

        fields: {
            module_name: {
                label: 'Module',
                excludeModal: true,
                type: 'select',
                ngOptions: 'module.label for module in adhoc_module_options' +
                    ' track by module.value',
                ngChange: 'moduleChange()',
                addRequired: true,
                awPopOver:'<p>These are the modules that Tower supports ' +
                    'running commands against.',
                dataTitle: 'Module',
                dataPlacement: 'right',
                dataContainer: 'body'
            },
            module_args: {
                label: 'Arguments',
                type: 'text',
                awPopOverWatch: 'argsPopOver',
                awPopOver: '{{ argsPopOver }}',
                dataTitle: 'Arguments',
                dataPlacement: 'right',
                dataContainer: 'body',
                addRequired: false,
                autocomplete: false
            },
            limit: {
                label: 'Limit',
                type: 'text',
                addRequired: false,
                awPopOver: '<p>The pattern used to target hosts in the ' +
                    'inventory. Leaving the field blank, all, and * will ' +
                    'all target all hosts in the inventory.  You can find ' +
                    'more information about Ansible\'s host patterns ' +
                    '<a id=\"adhoc_form_hostpatterns_doc_link\"' +
                    'href=\"http://docs.ansible.com/intro_patterns.html\" ' +
                    'target=\"_blank\">here</a>.</p>',
                dataTitle: 'Limit',
                dataPlacement: 'right',
                dataContainer: 'body'
            },
            credential: {
                label: 'Machine Credential',
                type: 'lookup',
                sourceModel: 'credential',
                sourceField: 'name',
                ngClick: 'lookUpCredential()',
                class: 'squeeze',
                awPopOver: '<p>Select the credential you want to use when ' +
                    'accessing the remote hosts to run the command. ' +
                    'Choose the credential containing ' +
                    'the username and SSH key or password that Ansbile ' +
                    'will need to log into the remote hosts.</p>',
                dataTitle: 'Credential',
                dataPlacement: 'right',
                dataContainer: 'body',
                awRequiredWhen: {
                    reqExpression: 'credRequired',
                    init: 'false'
                }
            },
            become_enabled: {
                label: 'Enable Privilege Escalation',
                type: 'checkbox',
                addRequired: false,
                column: 2,
                awPopOver: "<p>If enabled,  run this playbook as an administrator. This is the equivalent of passing the<code> --become</code> option to the <code> ansible</code> command. </p>",
                dataPlacement: 'right',
                dataTitle: 'Become Privilege Escalation',
                dataContainer: "body"
            },
            verbosity: {
                label: 'Verbosity',
                excludeModal: true,
                type: 'select',
                ngOptions: 'verbosity.label for verbosity in ' +
                    'adhoc_verbosity_options ' +
                    'track by verbosity.value',
                addRequired: true,
                awPopOver:'<p>These are the verbosity levels for standard ' +
                    'out of the command run that are supported.',
                dataTitle: 'Verbosity',
{'fraction_non_alphanumeric': 0.1175344105326152, 'fraction_numerical': 0.0016756433273488929, 'mean_word_length': 1.3691522540402608, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '370055', 'n_tokens_mistral': 2108, 'n_tokens_neox': 1927, 'n_words': 577}