Finixhed applying jsHint linting to js files. Created initial Gruntfile.js build script and package.json script for keeping track of required node modules.

This commit is contained in:
vagrant
2014-02-11 04:52:15 +00:00
parent f891c30ebb
commit d25e712e21
94 changed files with 10589 additions and 11059 deletions
+96 -78
View File
@@ -6,23 +6,22 @@
*
*/
angular.module('CredentialFormDefinition', [])
.value(
'CredentialForm', {
addTitle: 'Create Credential', //Legend in add mode
editTitle: '{{ name }}', //Legend in edit mode
.value('CredentialForm', {
addTitle: 'Create Credential', //Legend in add mode
editTitle: '{{ name }}', //Legend in edit mode
name: 'credential',
well: true,
forceListeners: true,
actions: {
stream: {
ngClick: "showActivity()",
awToolTip: "View Activity Stream",
mode: 'edit'
}
},
}
},
fields: {
name: {
label: 'Name',
@@ -30,27 +29,31 @@ angular.module('CredentialFormDefinition', [])
addRequired: true,
editRequired: true,
autocomplete: false
},
description: {
},
description: {
label: 'Description',
type: 'text',
addRequired: false,
editRequired: false
},
},
owner: {
label: "Does this credential belong to a team or user?",
type: 'radio_group',
ngChange: "ownerChange()",
options: [
{ label: 'User', value: 'user', selected: true },
{ label: 'Team', value: 'team' }
],
awPopOver: "<p>A credential must be associated with either a user or a team. Choosing a user allows only the selected user access " +
options: [{
label: 'User',
value: 'user',
selected: true
}, {
label: 'Team',
value: 'team'
}],
awPopOver: "<p>A credential must be associated with either a user or a team. Choosing a user allows only the selected user access " +
"to the credential. Choosing a team shares the credential with all team members.</p>",
dataTitle: 'Owner',
dataPlacement: 'right',
dataContainer: "body"
},
},
user: {
label: 'User that owns this credential',
type: 'lookup',
@@ -58,8 +61,11 @@ angular.module('CredentialFormDefinition', [])
sourceField: 'username',
ngClick: 'lookUpUser()',
ngShow: "owner == 'user'",
awRequiredWhen: { variable: "user_required", init: "false" }
},
awRequiredWhen: {
variable: "user_required",
init: "false"
}
},
team: {
label: 'Team that owns this credential',
type: 'lookup',
@@ -67,69 +73,84 @@ angular.module('CredentialFormDefinition', [])
sourceField: 'name',
ngClick: 'lookUpTeam()',
ngShow: "owner == 'team'",
awRequiredWhen: { variable: "team_required", init: "false" }
},
awRequiredWhen: {
variable: "team_required",
init: "false"
}
},
kind: {
label: 'Type',
excludeModal: true,
type: 'select',
ngOptions: 'kind.label for kind in credential_kind_options',
ngChange: 'kindChange()',
addRequired: true,
addRequired: true,
editRequired: true,
helpCollapse: [
{ hdr: 'Select a Credential Type',
content: '<dl>\n' +
'<dt>AWS</dt>\n' +
'<dd>Access keys for Amazon Web Services used for inventory management or deployment.</dd>\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>Rackspace</dt>\n' +
'<dd>Access information for Rackspace Cloud used for inventory management or deployment.</dd>\n' +
'<dt>SCM</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' +
'</dl>\n'
}]
},
helpCollapse: [{
hdr: 'Select a Credential Type',
content: '<dl>\n' +
'<dt>AWS</dt>\n' +
'<dd>Access keys for Amazon Web Services used for inventory management or deployment.</dd>\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>Rackspace</dt>\n' +
'<dd>Access information for Rackspace Cloud used for inventory management or deployment.</dd>\n' +
'<dt>SCM</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' +
'</dl>\n'
}]
},
access_key: {
label: 'Access Key',
type: 'text',
ngShow: "kind.value == 'aws'",
awRequiredWhen: { variable: "aws_required", init: false },
awRequiredWhen: {
variable: "aws_required",
init: false
},
autocomplete: false,
apiField: 'username'
},
},
secret_key: {
label: 'Secret Key',
type: 'password',
ngShow: "kind.value == 'aws'",
awRequiredWhen: { variable: "aws_required", init: false },
awRequiredWhen: {
variable: "aws_required",
init: false
},
autocomplete: false,
ask: false,
clear: false,
apiField: 'passwowrd'
},
},
"username": {
labelBind: 'usernameLabel',
type: 'text',
ngShow: "kind.value && kind.value !== 'aws'",
awRequiredWhen: {variable: 'rackspace_required', init: false },
autocomplete: false
awRequiredWhen: {
variable: 'rackspace_required',
init: false
},
autocomplete: false
},
"api_key": {
label: 'API Key',
type: 'password',
ngShow: "kind.value == 'rax'",
awRequiredWhen: { variable: "rackspace_required", init: false },
awRequiredWhen: {
variable: "rackspace_required",
init: false
},
autocomplete: false,
ask: false,
clear: false,
apiField: 'passwowrd'
},
},
"password": {
label: 'Password',
type: 'password',
@@ -141,7 +162,7 @@ angular.module('CredentialFormDefinition', [])
clear: false,
associated: 'password_confirm',
autocomplete: false
},
},
"password_confirm": {
label: 'Confirm Password',
type: 'password',
@@ -151,7 +172,7 @@ angular.module('CredentialFormDefinition', [])
awPassMatch: true,
associated: 'password',
autocomplete: false
},
},
"ssh_password": {
label: 'SSH Password',
type: 'password',
@@ -163,7 +184,7 @@ angular.module('CredentialFormDefinition', [])
clear: true,
associated: 'ssh_password_confirm',
autocomplete: false
},
},
"ssh_password_confirm": {
label: 'Confirm SSH Password',
type: 'password',
@@ -173,7 +194,7 @@ angular.module('CredentialFormDefinition', [])
awPassMatch: true,
associated: 'ssh_password',
autocomplete: false
},
},
"ssh_key_data": {
labelBind: 'sshKeyDataLabel',
type: 'textarea',
@@ -182,7 +203,7 @@ angular.module('CredentialFormDefinition', [])
editRequired: false,
'class': 'ssh-key-field',
rows: 10
},
},
"ssh_key_unlock": {
label: 'Key Password',
type: 'password',
@@ -192,9 +213,9 @@ angular.module('CredentialFormDefinition', [])
ngChange: "clearPWConfirm('ssh_key_unlock_confirm')",
associated: 'ssh_key_unlock_confirm',
ask: true,
askShow: "kind.value == 'ssh'", //Only allow ask for machine credentials
askShow: "kind.value == 'ssh'", //Only allow ask for machine credentials
clear: true
},
},
"ssh_key_unlock_confirm": {
label: 'Confirm Key Password',
type: 'password',
@@ -203,7 +224,7 @@ angular.module('CredentialFormDefinition', [])
editRequired: false,
awPassMatch: true,
associated: 'ssh_key_unlock'
},
},
"sudo_username": {
label: 'Sudo Username',
type: 'text',
@@ -211,7 +232,7 @@ angular.module('CredentialFormDefinition', [])
addRequired: false,
editRequired: false,
autocomplete: false
},
},
"sudo_password": {
label: 'Sudo Password',
type: 'password',
@@ -223,7 +244,7 @@ angular.module('CredentialFormDefinition', [])
clear: true,
associated: 'sudo_password_confirm',
autocomplete: false
},
},
"sudo_password_confirm": {
label: 'Confirm Sudo Password',
type: 'password',
@@ -233,24 +254,21 @@ angular.module('CredentialFormDefinition', [])
awPassMatch: true,
associated: 'sudo_password',
autocomplete: false
}
},
buttons: { //for now always generates <button> tags
save: {
label: 'Save',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
reset: {
ngClick: 'formReset()',
ngDisabled: true //Disabled when $pristine
}
},
related: { //related colletions (and maybe items?)
}
}); //InventoryForm
},
buttons: {
save: {
label: 'Save',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
reset: {
ngClick: 'formReset()',
ngDisabled: true //Disabled when $pristine
}
},
related: {}
});