Latest UI changes. Credential List and Edit working -need to add ask pw option and validation around team vs. user. Lookup dialog is now a generic helper that can be shared by all controllers. Credentials controller is first to use api-loader which reads the \/api and \/api\/v1 to determine base set of urls. And more...

This commit is contained in:
chouseknecht
2013-05-09 23:49:51 -04:00
parent 2cbed11034
commit fdceb46c12
25 changed files with 1218 additions and 65 deletions

View File

@@ -0,0 +1,66 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Credentials.js
* List view object for Credential data model.
*
*
*/
angular.module('CredentialListDefinition', [])
.value(
'CredentialList', {
name: 'credentials',
iterator: 'credential',
selectTitle: 'Add Credentials',
editTitle: 'Credentials',
selectInstructions: 'Check the Select checkbox next to each user to be added, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new user.',
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
},
team: {
label: 'Team',
ngBind: 'credential.summary_fields.team.name',
sourceModel: 'team',
sourceField: 'name'
},
user: {
label: 'User',
ngBind: 'credential.summary_fields.user.usename',
sourceModel: 'user',
sourceField: 'username'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'select', // One of: edit, select, all
ngClick: 'addCredential()',
basePaths: ['credentials'], // base path must be in list, or action not available
class: 'btn btn-mini btn-success',
awToolTip: 'Create a new credential'
}
},
fieldActions: {
edit: {
ngClick: "editCredential(\{\{ credential.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit credential'
},
delete: {
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete credential'
}
}
});