mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 20:50:06 -03:30
Added variable data fied to Host detail page. Save/edit work -made changes in the Hosts controller for this. Still need to validate text blob is valid JSON.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition' ])
|
||||
.factory('PromptPasswords',['CredentialForm', '$compile', 'Rest', function(JobTemplateForm, $compile, Rest) {
|
||||
.factory('PromptPasswords',['CredentialForm', '$compile', 'Rest', '$location', function(JobTemplateForm, $compile, Rest, $location) {
|
||||
return function(params) {
|
||||
|
||||
var scope = params.scope;
|
||||
|
||||
@@ -50,8 +50,10 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
|
||||
if (scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) {
|
||||
scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] =
|
||||
listScope[list.name][i][form.fields[field].sourceField];
|
||||
scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]
|
||||
.$setValidity('awlookup',true);
|
||||
if (scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]) {
|
||||
scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]
|
||||
.$setValidity('awlookup',true);
|
||||
}
|
||||
}
|
||||
if (scope[form.name + '_form']) {
|
||||
scope[form.name + '_form'].$setDirty();
|
||||
@@ -64,6 +66,7 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
|
||||
'and then click the Select button.');
|
||||
}
|
||||
else {
|
||||
console.log('found!');
|
||||
if (postAction) {
|
||||
postAction();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user