From: Laurence Maultsby Date: Thu, 20 Oct 2016 16:30:41 +0000 (-0400) Subject: RIFT-14916: Code added but commented out for removing cat severity filter X-Git-Tag: v1.0.1~10^2~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=660c2a10bd46b81968e3ed354ea4b3f218c90b29;p=osm%2FUI.git RIFT-14916: Code added but commented out for removing cat severity filter Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/logging/api/logging.js b/skyquake/plugins/logging/api/logging.js index 499a81421..c2f56f834 100644 --- a/skyquake/plugins/logging/api/logging.js +++ b/skyquake/plugins/logging/api/logging.js @@ -112,10 +112,10 @@ function requestCallback(resolve, reject, transformFunc) { } else { var data = JSON.stringify(response.body); } - return resolve_with_delay(resolve, { + return resolve({ statusCode: response.statusCode, data: data - }, 0); + }); }; }; } @@ -341,10 +341,10 @@ Config.deleteDefaultSyslogSeverity = function(req) { })); 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}); } ) }); diff --git a/skyquake/plugins/logging/src/loggingSource.js b/skyquake/plugins/logging/src/loggingSource.js index 690d32326..dc28aa4cc 100644 --- a/skyquake/plugins/logging/src/loggingSource.js +++ b/skyquake/plugins/logging/src/loggingSource.js @@ -66,23 +66,23 @@ export default { 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'),