} else {
var data = JSON.stringify(response.body);
}
- return resolve_with_delay(resolve, {
+ return resolve({
statusCode: response.statusCode,
data: data
- }, 0);
+ });
};
};
}
}));
return Promise.all(promises).then(
function(data) {
- resolve({statusCode: 200, data: data[0]});
+ resolve({statusCode: data[0].statusCode, data: data[0].data});
},
function(data) {
- reject(data);
+ reject({statusCode: data[0].statusCode, data: data[0].data});
}
)
});
return new Promise(function(resolve, reject) {
let promises = [];
let remove = null;
- if(nulledCategories.length > 0) {
- remove = $.ajax({
- // url: apiUrl('api/config/default-severity'),
- url: apiUrl('api/config/default-syslog-severity/' + nulledCategories.join(',')),
- type: 'DELETE',
- beforeSend: Utils.addAuthorizationStub,
- success: function(data) {
- resolve(data);
- },
- error: function(error) {
- console.log("There was an error updating the logging config data",
- error);
- reject(error);
- }
- });
- promises.push(remove);
- }
+ // if(nulledCategories.length > 0) {
+ // remove = $.ajax({
+ // // url: apiUrl('api/config/default-severity'),
+ // url: apiUrl('api/config/default-syslog-severity/' + nulledCategories.join(',')),
+ // type: 'DELETE',
+ // beforeSend: Utils.addAuthorizationStub,
+ // success: function(data) {
+ // resolve(data);
+ // },
+ // error: function(error) {
+ // console.log("There was an error updating the logging config data",
+ // error);
+ // reject(error);
+ // }
+ // });
+ // promises.push(remove);
+ // }
Promise.all(promises).then(function(data) {
return $.ajax({
url: apiUrl('api/aggregate'),