From 759a5775cb53575cc89553d74026615e863e43b6 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 30 Jul 2014 22:05:54 -0400 Subject: [PATCH] added tooltips for cloud credential options --- awx/ui/static/js/forms/Credentials.js | 45 ++++++++++++++++++++----- awx/ui/static/js/helpers/Credentials.js | 4 ++- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index 4726b5d540..6b6b7252ca 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -86,9 +86,7 @@ angular.module('CredentialFormDefinition', []) ngChange: 'kindChange()', addRequired: true, editRequired: true, - helpCollapse: [{ - hdr: 'Select a Credential Type', - content: '
\n' + + awPopOver:'
\n' + '
Machine
\n' + '
Authentication for remote machine access. This can include SSH keys, usernames, passwords, ' + 'and sudo information. Machine credentials are used when submitting jobs to run playbooks against ' + @@ -101,8 +99,27 @@ angular.module('CredentialFormDefinition', []) '
Access keys for authenticating to the specific ' + 'cloud provider, usually used for inventory sync ' + 'and deployment.
\n' + - '
\n' - }] + '
\n', + dataTitle: 'Type', + dataPlacement: 'right', + dataContainer: "body" + // helpCollapse: [{ + // hdr: 'Select a Credential Type', + // content: '
\n' + + // '
Machine
\n' + + // '
Authentication for remote machine access. This can include SSH keys, usernames, passwords, ' + + // 'and sudo information. Machine credentials are used when submitting jobs to run playbooks against ' + + // 'remote hosts.
' + + // '
Source Control
\n' + + // '
Used to check out and synchronize playbook repositories with a remote source control ' + + // 'management system such as Git, Subversion (svn), or Mercurial (hg). These credentials are ' + + // 'used on the Projects tab.
\n' + + // '
Others (Cloud Providers)
\n' + + // '
Access keys for authenticating to the specific ' + + // 'cloud provider, usually used for inventory sync ' + + // 'and deployment.
\n' + + // '
\n' + // }] }, access_key: { label: 'Access Key', @@ -153,7 +170,11 @@ angular.module('CredentialFormDefinition', []) variable: 'email_required', init: false }, - autocomplete: false + autocomplete: false, + awPopOver: '

The e-mail address assigned to the Google Compute Engine service account.

', + dataTitle: 'Subscription ID', + dataPlacement: 'right', + dataContainer: "body" }, "subscription_id": { labelBind: "usernameLabel", @@ -166,7 +187,7 @@ angular.module('CredentialFormDefinition', []) addRequired: false, editRequired: false, autocomplete: false, - awPopOver: '

Subscription ID is generated by Azure as a way to identify the requested resource.

', + awPopOver: '

Subscription ID is an Azure construct, which is mapped to a username.

', dataTitle: 'Subscription ID', dataPlacement: 'right', dataContainer: "body" @@ -243,7 +264,11 @@ angular.module('CredentialFormDefinition', []) editRequired: false, awDropFile: true, 'class': 'ssh-key-field', - rows: 10 + rows: 10, + awPopOver: "key_description", //kind.value" ==="gce") return "Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Windows Azure console."; + dataTitle: 'Subscription ID', + dataPlacement: 'right', + dataContainer: "body" }, "ssh_key_unlock": { label: 'Key Password', @@ -304,6 +329,10 @@ angular.module('CredentialFormDefinition', []) variable: 'project_required', init: false }, + awPopOver: "

The Project ID is the GCE assigned identification. It is constructed as two words followed by a three digit number. Such as:

adjective-noun-000

", //kind.value" ==="gce") return "Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Windows Azure console."; + dataTitle: 'Project ID', + dataPlacement: 'right', + dataContainer: "body", addRequired: false, editRequired: false, autocomplete: false diff --git a/awx/ui/static/js/helpers/Credentials.js b/awx/ui/static/js/helpers/Credentials.js index b3b16f3f02..bbc412b680 100644 --- a/awx/ui/static/js/helpers/Credentials.js +++ b/awx/ui/static/js/helpers/Credentials.js @@ -29,7 +29,7 @@ angular.module('CredentialsHelper', ['Utilities']) scope.key_required = false; // JT -- doing the same for key and project scope.project_required = false; scope.subscription_required = false; - + scope.key_description = ''; if (!Empty(scope.kind)) { // Apply kind specific settings switch (scope.kind.value) { @@ -52,12 +52,14 @@ angular.module('CredentialsHelper', ['Utilities']) scope.email_required = true; scope.key_required = true; scope.project_required = true; + scope.key_description = "Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Windows Azure console."; break; case 'azure': scope.usernameLabel = "Subscription ID"; scope.sshKeyDataLabel = 'RSA Private Key'; scope.subscription_required = true; scope.key_required = true; + scope.key_description = 'Paste the value of the private key within a GCE service account\'s JSON key.'; break; } }