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

@@ -82,7 +82,8 @@ JobTemplatesList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$rout
function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm,
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
GetBasePath, InventoryList, CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange)
GetBasePath, InventoryList, CredentialList, ProjectList, LookUpInit,
md5Setup, ParseTypeChange)
{
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
//scope.
@@ -123,23 +124,30 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP
field: 'inventory'
});
LookUpInit({
url: GetBasePath('credentials') + '?cloud=false',
scope: scope,
form: form,
current_item: null,
list: CredentialList,
field: 'credential'
});
// Clone the CredentialList object for use with cloud_credential. Cloning
// and changing properties to avoid collision.
var CloudCredentialList = {};
jQuery.extend(true, CloudCredentialList, CredentialList);
CloudCredentialList.name = 'cloudcredentials',
CloudCredentialList.iterator = 'cloudcredential',
LookUpInit({
url: GetBasePath('credentials') + '?cloud=true',
scope: scope,
form: form,
current_item: null,
list: CredentialList,
list: CloudCredentialList,
field: 'cloud_credential'
});
LookUpInit({
url: GetBasePath('credentials') + '?kind=ssh',
scope: scope,
form: form,
current_item: null,
list: CredentialList,
field: 'credential'
});
// Update playbook select whenever project value changes
var selectPlaybook = function(oldValue, newValue) {
@@ -277,7 +285,8 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP
JobTemplatesAdd.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'JobTemplateForm',
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope',
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit', 'md5Setup', 'ParseTypeChange' ];
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
'md5Setup', 'ParseTypeChange' ];
function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, JobTemplateForm,