From b8cd4d063ec83d674adc16e4dfddf3f89b172024 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 31 Jul 2014 10:38:43 -0400 Subject: [PATCH] updated credential help descriptions --- awx/ui/static/js/forms/Credentials.js | 13 +++++++------ awx/ui/static/js/helpers/Credentials.js | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index 971dc5623c..e07de982e4 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -172,7 +172,7 @@ angular.module('CredentialFormDefinition', []) }, autocomplete: false, awPopOver: '

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

', - dataTitle: 'Subscription ID', + dataTitle: 'Email', dataPlacement: 'right', dataContainer: "body" }, @@ -259,16 +259,17 @@ angular.module('CredentialFormDefinition', []) variable: 'key_required', init: true }, - hintText:"drag and drop an SSH private key file on the field below", + hintText: "{{ key_hint }}", addRequired: false, editRequired: false, awDropFile: true, 'class': 'ssh-key-field', rows: 10, - // awPopOver: "key_description", - // dataTitle: 'Subscription ID', - // dataPlacement: 'right', - // dataContainer: "body" + awPopOver: "SSH key description", + awPopOverWatch: "key_description", + dataTitle: 'Help', + dataPlacement: 'right', + dataContainer: "body" }, "ssh_key_unlock": { label: 'Key Password', diff --git a/awx/ui/static/js/helpers/Credentials.js b/awx/ui/static/js/helpers/Credentials.js index bbc412b680..14d14f17ac 100644 --- a/awx/ui/static/js/helpers/Credentials.js +++ b/awx/ui/static/js/helpers/Credentials.js @@ -19,6 +19,14 @@ angular.module('CredentialsHelper', ['Utilities']) reset = params.reset, collapse, id; + $('.popover').each(function() { + // remove lingering popover
. Seems to be a bug in TB3 RC1 + $(this).remove(); + }); + $('.tooltip').each( function() { + // close any lingering tool tipss + $(this).hide(); + }); // Put things in a default state scope.usernameLabel = 'Username'; scope.aws_required = false; @@ -29,7 +37,8 @@ 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 = ''; + scope.key_description = "Paste the contents of the SSH private key file.
esc or click to close
"; + scope.key_hint= "drag and drop an SSH private key file on the field below"; if (!Empty(scope.kind)) { // Apply kind specific settings switch (scope.kind.value) { @@ -52,14 +61,16 @@ 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."; + scope.key_description = 'Paste the value of the private key found within a GCE service account\'s JSON key.
esc or click to close
'; + scope.key_hint= "drag and drop a private key file on the field below"; break; case 'azure': scope.usernameLabel = "Subscription ID"; - scope.sshKeyDataLabel = 'RSA Private Key'; + scope.sshKeyDataLabel = 'Management Certificate'; 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.'; + scope.key_description = "Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Windows Azure console.
esc or click to close
"; + scope.key_hint= "drag and drop a management certificate file on the field below"; break; } }