mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
updated $http get request from deprecated syntax for angular 1.4
This commit is contained in:
parent
f88320a5f7
commit
33a82222b9
@ -34,10 +34,10 @@ angular.module('LoadConfigHelper', ['Utilities'])
|
|||||||
$rootScope.enteredPath = $location.path();
|
$rootScope.enteredPath = $location.path();
|
||||||
// Load js/local_settings.json
|
// Load js/local_settings.json
|
||||||
$http({ method:'GET', url: $basePath + 'local_settings.json' })
|
$http({ method:'GET', url: $basePath + 'local_settings.json' })
|
||||||
.success(function(data) {
|
.then(function(response) {
|
||||||
$log.info('loaded local_settings.json');
|
$log.info('loaded local_settings.json');
|
||||||
if(angular.isObject(data)){
|
if(angular.isObject(response.data)){
|
||||||
$AnsibleConfig = _.extend($AnsibleConfig, data);
|
$AnsibleConfig = _.extend($AnsibleConfig, response.data);
|
||||||
Store('AnsibleConfig', $AnsibleConfig);
|
Store('AnsibleConfig', $AnsibleConfig);
|
||||||
$rootScope.$emit('ConfigReady');
|
$rootScope.$emit('ConfigReady');
|
||||||
}
|
}
|
||||||
@ -46,8 +46,7 @@ angular.module('LoadConfigHelper', ['Utilities'])
|
|||||||
$rootScope.$emit('ConfigReady');
|
$rootScope.$emit('ConfigReady');
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}, function(response) {
|
||||||
.error(function() {
|
|
||||||
//local_settings.json not found
|
//local_settings.json not found
|
||||||
$log.info('local_settings.json not found');
|
$log.info('local_settings.json not found');
|
||||||
$rootScope.$emit('ConfigReady');
|
$rootScope.$emit('ConfigReady');
|
||||||
|
Loading…
Reference in New Issue
Block a user