Fixed form-generator and awRequiredWhen directive to not overlap when setting * on required field labels. Fixed job submission to work with new cloud credential implementation.

This commit is contained in:
Chris Houseknecht
2013-11-04 04:03:55 +00:00
committed by Chris Church
parent 0466629718
commit bac22205a8
12 changed files with 280 additions and 84 deletions

View File

@@ -0,0 +1,75 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* CloudCredentials.js
* List view object for Credential data model.
*
* @dict
*/
angular.module('CloudCredentialsListDefinition', [])
.value(
'CloudCredentialList', {
name: 'cloudcredentials',
iterator: 'cloudcredential',
selectTitle: 'Add Cloud Credentials',
editTitle: 'Cloud Credentials',
selectInstructions: '<p>Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue ' +
'<em>Select</em> button, located bottom right.</p> <p>Create a brand new credential by clicking the green <em>Create New</em> button.</p>',
index: true,
hover: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description',
excludeModal: false
},
team: {
label: 'Team',
ngBind: 'credential.team_name',
sourceModel: 'team',
sourceField: 'name',
excludeModal: true
},
user: {
label: 'User',
ngBind: 'credential.user_username',
sourceModel: 'user',
sourceField: 'username',
excludeModal: true
}
},
actions: {
add: {
icon: 'icon-plus',
label: 'Create New',
mode: 'all', // One of: edit, select, all
ngClick: 'addCredential()',
"class": 'btn-success btn-xs',
awToolTip: 'Create a new credential'
}
},
fieldActions: {
edit: {
ngClick: "editCredential(\{\{ credential.id \}\})",
icon: 'icon-edit',
label: 'Edit',
"class": 'btn-xs btn-default',
awToolTip: 'View/Edit credential'
},
"delete": {
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
icon: 'icon-trash',
label: 'Delete',
"class": 'btn-xs btn-danger',
awToolTip: 'Delete credential'
}
}
});

View File

@@ -26,20 +26,31 @@ angular.module('CredentialsListDefinition', [])
},
description: {
label: 'Description',
excludeModal: true
excludeModal: false
},
kind: {
label: 'Type',
searchType: 'select',
searchOptions: [], // will be set by Options call to credentials resource
excludeModal: true,
nosort: true
}
/*
team: {
label: 'Team',
ngBind: 'credential.team_name',
sourceModel: 'team',
sourceField: 'name'
sourceField: 'name',
excludeModal: true
},
user: {
label: 'User',
ngBind: 'credential.user_username',
sourceModel: 'user',
sourceField: 'username'
sourceField: 'username',
excludeModal: true
}
*/
},
actions: {

View File

@@ -41,7 +41,8 @@ angular.module('ProjectsListDefinition', [])
last_updated: {
label: 'Last Updated',
type: 'date',
excludeModal: true
excludeModal: true,
searchable: false
}
},