mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 05:45:02 -02:30
fix undefined function
This commit is contained in:
@@ -342,22 +342,7 @@ export function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $
|
|||||||
parent_scope: $scope
|
parent_scope: $scope
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($routeParams.inventory_id) {
|
|
||||||
// This means that the job template form was accessed via inventory prop's
|
|
||||||
// This also means the job is a scan job.
|
|
||||||
$scope.job_type.value = 'scan';
|
|
||||||
$scope.jobTypeChange();
|
|
||||||
$scope.inventory = $routeParams.inventory_id;
|
|
||||||
Rest.setUrl(GetBasePath('inventory') + $routeParams.inventory_id + '/');
|
|
||||||
Rest.get()
|
|
||||||
.success(function (data) {
|
|
||||||
$scope.inventory_name = data.name;
|
|
||||||
})
|
|
||||||
.error(function (data, status) {
|
|
||||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!',
|
|
||||||
msg: 'Failed to lookup inventory: ' + data.id + '. GET returned status: ' + status });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update playbook select whenever project value changes
|
// Update playbook select whenever project value changes
|
||||||
selectPlaybook = function (oldValue, newValue) {
|
selectPlaybook = function (oldValue, newValue) {
|
||||||
@@ -415,6 +400,23 @@ export function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ($routeParams.inventory_id) {
|
||||||
|
// This means that the job template form was accessed via inventory prop's
|
||||||
|
// This also means the job is a scan job.
|
||||||
|
$scope.job_type.value = 'scan';
|
||||||
|
$scope.jobTypeChange();
|
||||||
|
$scope.inventory = $routeParams.inventory_id;
|
||||||
|
Rest.setUrl(GetBasePath('inventory') + $routeParams.inventory_id + '/');
|
||||||
|
Rest.get()
|
||||||
|
.success(function (data) {
|
||||||
|
$scope.inventory_name = data.name;
|
||||||
|
})
|
||||||
|
.error(function (data, status) {
|
||||||
|
ProcessErrors($scope, data, status, form, { hdr: 'Error!',
|
||||||
|
msg: 'Failed to lookup inventory: ' + data.id + '. GET returned status: ' + status });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Detect and alert user to potential SCM status issues
|
// Detect and alert user to potential SCM status issues
|
||||||
checkSCMStatus = function (oldValue, newValue) {
|
checkSCMStatus = function (oldValue, newValue) {
|
||||||
if (oldValue !== newValue && !Empty($scope.project)) {
|
if (oldValue !== newValue && !Empty($scope.project)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user