mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Resolves lookup issues blocking job template creation flow
@NoIssue
This commit is contained in:
@@ -54,7 +54,10 @@
|
|||||||
default_val: false
|
default_val: false
|
||||||
});
|
});
|
||||||
CallbackHelpInit({ scope: $scope });
|
CallbackHelpInit({ scope: $scope });
|
||||||
ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback });
|
SurveyControllerInit({
|
||||||
|
scope: $scope,
|
||||||
|
parent_scope: $scope
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
@@ -62,10 +65,6 @@
|
|||||||
$scope[form.name + '_form'].$setDirty();
|
$scope[form.name + '_form'].$setDirty();
|
||||||
};
|
};
|
||||||
|
|
||||||
SurveyControllerInit({
|
|
||||||
scope: $scope,
|
|
||||||
parent_scope: $scope
|
|
||||||
});
|
|
||||||
|
|
||||||
var selectCount = 0;
|
var selectCount = 0;
|
||||||
|
|
||||||
@@ -73,6 +72,7 @@
|
|||||||
$scope.removeChoicesReady();
|
$scope.removeChoicesReady();
|
||||||
}
|
}
|
||||||
$scope.removeChoicesReady = $scope.$on('choicesReadyVerbosity', function () {
|
$scope.removeChoicesReady = $scope.$on('choicesReadyVerbosity', function () {
|
||||||
|
ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback });
|
||||||
selectCount++;
|
selectCount++;
|
||||||
if (selectCount === 3) {
|
if (selectCount === 3) {
|
||||||
var verbosity;
|
var verbosity;
|
||||||
@@ -120,8 +120,6 @@
|
|||||||
element:'#job_template_verbosity',
|
element:'#job_template_verbosity',
|
||||||
multiple: false
|
multiple: false
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$emit('lookUpInitialize');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -517,7 +517,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
|||||||
function($rootScope) {
|
function($rootScope) {
|
||||||
|
|
||||||
return function(directive) {
|
return function(directive) {
|
||||||
/* @todo re-enable
|
|
||||||
var docw, doch, spinnyw, spinnyh;
|
var docw, doch, spinnyw, spinnyh;
|
||||||
if (directive === 'start' && !$rootScope.waiting) {
|
if (directive === 'start' && !$rootScope.waiting) {
|
||||||
$rootScope.waiting = true;
|
$rootScope.waiting = true;
|
||||||
@@ -538,7 +537,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
|||||||
$rootScope.waiting = false;
|
$rootScope.waiting = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
|||||||
function buildFieldDefinition(field) {
|
function buildFieldDefinition(field) {
|
||||||
let state = $stateExtender.buildDefinition({
|
let state = $stateExtender.buildDefinition({
|
||||||
searchPrefix: field.sourceModel,
|
searchPrefix: field.sourceModel,
|
||||||
squashSearchUrl: true,
|
//squashSearchUrl: true, @issue enable
|
||||||
name: `${formStateDefinition.name}.${field.sourceModel}`,
|
name: `${formStateDefinition.name}.${field.sourceModel}`,
|
||||||
url: `/${field.sourceModel}`,
|
url: `/${field.sourceModel}`,
|
||||||
// a lookup field's basePath takes precedence over generic list definition's basePath, if supplied
|
// a lookup field's basePath takes precedence over generic list definition's basePath, if supplied
|
||||||
@@ -391,6 +391,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
|
|||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
ListDefinition: [field.list, function(list) {
|
ListDefinition: [field.list, function(list) {
|
||||||
|
list.iterator = field.sourceModel;
|
||||||
return list;
|
return list;
|
||||||
}],
|
}],
|
||||||
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath', '$interpolate', '$rootScope', '$state',
|
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath', '$interpolate', '$rootScope', '$state',
|
||||||
|
|||||||
Reference in New Issue
Block a user