added tooltips for cloud credential options

This commit is contained in:
Jared Tabor
2014-07-30 22:05:54 -04:00
parent 0a44de3346
commit 759a5775cb
2 changed files with 40 additions and 9 deletions

View File

@@ -86,9 +86,7 @@ angular.module('CredentialFormDefinition', [])
ngChange: 'kindChange()', ngChange: 'kindChange()',
addRequired: true, addRequired: true,
editRequired: true, editRequired: true,
helpCollapse: [{ awPopOver:'<dl>\n' +
hdr: 'Select a Credential Type',
content: '<dl>\n' +
'<dt>Machine</dt>\n' + '<dt>Machine</dt>\n' +
'<dd>Authentication for remote machine access. This can include SSH keys, usernames, passwords, ' + '<dd>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 ' + 'and sudo information. Machine credentials are used when submitting jobs to run playbooks against ' +
@@ -101,8 +99,27 @@ angular.module('CredentialFormDefinition', [])
'<dd>Access keys for authenticating to the specific ' + '<dd>Access keys for authenticating to the specific ' +
'cloud provider, usually used for inventory sync ' + 'cloud provider, usually used for inventory sync ' +
'and deployment.</dd>\n' + 'and deployment.</dd>\n' +
'</dl>\n' '</dl>\n',
}] dataTitle: 'Type',
dataPlacement: 'right',
dataContainer: "body"
// helpCollapse: [{
// hdr: 'Select a Credential Type',
// content: '<dl>\n' +
// '<dt>Machine</dt>\n' +
// '<dd>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.</dd>' +
// '<dt>Source Control</dt>\n' +
// '<dd>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.</dd>\n' +
// '<dt>Others (Cloud Providers)</dt>\n' +
// '<dd>Access keys for authenticating to the specific ' +
// 'cloud provider, usually used for inventory sync ' +
// 'and deployment.</dd>\n' +
// '</dl>\n'
// }]
}, },
access_key: { access_key: {
label: 'Access Key', label: 'Access Key',
@@ -153,7 +170,11 @@ angular.module('CredentialFormDefinition', [])
variable: 'email_required', variable: 'email_required',
init: false init: false
}, },
autocomplete: false autocomplete: false,
awPopOver: '<p>The e-mail address assigned to the Google Compute Engine <b><i>service account.</b></i></p>',
dataTitle: 'Subscription ID',
dataPlacement: 'right',
dataContainer: "body"
}, },
"subscription_id": { "subscription_id": {
labelBind: "usernameLabel", labelBind: "usernameLabel",
@@ -166,7 +187,7 @@ angular.module('CredentialFormDefinition', [])
addRequired: false, addRequired: false,
editRequired: false, editRequired: false,
autocomplete: false, autocomplete: false,
awPopOver: '<p>Subscription ID is generated by Azure as a way to identify the requested resource.</p>', awPopOver: '<p>Subscription ID is an Azure construct, which is mapped to a username.</p>',
dataTitle: 'Subscription ID', dataTitle: 'Subscription ID',
dataPlacement: 'right', dataPlacement: 'right',
dataContainer: "body" dataContainer: "body"
@@ -243,7 +264,11 @@ angular.module('CredentialFormDefinition', [])
editRequired: false, editRequired: false,
awDropFile: true, awDropFile: true,
'class': 'ssh-key-field', '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": { "ssh_key_unlock": {
label: 'Key Password', label: 'Key Password',
@@ -304,6 +329,10 @@ angular.module('CredentialFormDefinition', [])
variable: 'project_required', variable: 'project_required',
init: false init: false
}, },
awPopOver: "<p>The Project ID is the GCE assigned identification. It is constructed as two words followed by a three digit number. Such as: </p><p>adjective-noun-000</p>", //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, addRequired: false,
editRequired: false, editRequired: false,
autocomplete: false autocomplete: false

View File

@@ -29,7 +29,7 @@ angular.module('CredentialsHelper', ['Utilities'])
scope.key_required = false; // JT -- doing the same for key and project scope.key_required = false; // JT -- doing the same for key and project
scope.project_required = false; scope.project_required = false;
scope.subscription_required = false; scope.subscription_required = false;
scope.key_description = '';
if (!Empty(scope.kind)) { if (!Empty(scope.kind)) {
// Apply kind specific settings // Apply kind specific settings
switch (scope.kind.value) { switch (scope.kind.value) {
@@ -52,12 +52,14 @@ angular.module('CredentialsHelper', ['Utilities'])
scope.email_required = true; scope.email_required = true;
scope.key_required = true; scope.key_required = true;
scope.project_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; break;
case 'azure': case 'azure':
scope.usernameLabel = "Subscription ID"; scope.usernameLabel = "Subscription ID";
scope.sshKeyDataLabel = 'RSA Private Key'; scope.sshKeyDataLabel = 'RSA Private Key';
scope.subscription_required = true; scope.subscription_required = true;
scope.key_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; break;
} }
} }