diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index 9f5bbf7d8b..a5aa5c13dc 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -275,26 +275,31 @@ export default askShow: "kind.value == 'ssh'", // Only allow ask for machine credentials }, "login_method": { - label: "Privilege Escalation Credentials", + label: "Privilege Escalation Credential", hintText: "If your playbooks use privilege escalation (\"sudo: true\", \"su: true\", etc), you can specify the username to become, and the password to use here.", - type: 'radio_group', + type: 'select', ngShow: "kind.value == 'ssh'", ngChange: "loginMethodChange()", - options: [{ - label: 'None', // FIXME: Maybe 'Default' or 'SSH only' instead? - value: '', - selected: true - }, { - label: 'Sudo', - value: 'sudo' - }, { - label: 'Su', - value: 'su' - },{ - label: 'Pbrun', - value: 'pbrun' - }], - awPopOver: "

Sudo: Optionally specify a username for sudo operations. This is equivalent to specifying the ansible-playbook --sudo-user parameter.
Su: Optionally specify a username for su operations. This is equivalent to specifying the ansible-playbook --su-user parameter.", + ngOptions: 'kind.label for kind in credential_kind_options track by kind.value', + // options: [{ + // label: 'None', // FIXME: Maybe 'Default' or 'SSH only' instead? + // value: '', + // selected: true + // }, { + // label: 'Sudo', + // value: 'sudo' + // }, { + // label: 'Su', + // value: 'su' + // },{ + // label: 'Pbrun', + // value: 'pbrun' + // }], + awPopOver: "

Sudo: Optionally specify a username for sudo operations. "+ + "This is equivalent to specifying the ansible-playbook --sudo-user parameter.
" + + "Su: Optionally specify a username for su operations. This is equivalent to specifying the ansible-playbook --su-user parameter.
"+ + "Pbrun: Optionally specify a username for pbrun operations. This is equivalent to specifying the ansible-playbook --become_method=pbrun parameter."+ + "Note that this option is only available with Tower instances using Ansible v1.9 or later (Current: Ansible v.{{ansible_version}})", dataPlacement: 'right', dataContainer: "body" },