1
0
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:
Jared Tabor 2015-09-21 11:38:53 -04:00
parent f88320a5f7
commit 33a82222b9

View File

@ -34,10 +34,10 @@ angular.module('LoadConfigHelper', ['Utilities'])
$rootScope.enteredPath = $location.path();
// Load js/local_settings.json
$http({ method:'GET', url: $basePath + 'local_settings.json' })
.success(function(data) {
.then(function(response) {
$log.info('loaded local_settings.json');
if(angular.isObject(data)){
$AnsibleConfig = _.extend($AnsibleConfig, data);
if(angular.isObject(response.data)){
$AnsibleConfig = _.extend($AnsibleConfig, response.data);
Store('AnsibleConfig', $AnsibleConfig);
$rootScope.$emit('ConfigReady');
}
@ -46,8 +46,7 @@ angular.module('LoadConfigHelper', ['Utilities'])
$rootScope.$emit('ConfigReady');
}
})
.error(function() {
}, function(response) {
//local_settings.json not found
$log.info('local_settings.json not found');
$rootScope.$emit('ConfigReady');