X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flogging%2Fsrc%2FloggingSource.js;h=dc28aa4cc8ee866783d7240ce22882025654dab7;hb=660c2a10bd46b81968e3ed354ea4b3f218c90b29;hp=47e6e48ae0f01cfd0038287685c6156fab07a061;hpb=58b264f094f5351c5662a6d5640e65ea890c14f4;p=osm%2FUI.git diff --git a/skyquake/plugins/logging/src/loggingSource.js b/skyquake/plugins/logging/src/loggingSource.js index 47e6e48ae..dc28aa4cc 100644 --- a/skyquake/plugins/logging/src/loggingSource.js +++ b/skyquake/plugins/logging/src/loggingSource.js @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -66,7 +66,25 @@ export default { return new Promise(function(resolve, reject) { let promises = []; let remove = null; - let change = $.ajax({ + // 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'), type: 'PUT', beforeSend: Utils.addAuthorizationStub, @@ -80,31 +98,7 @@ export default { reject(error); } }); - promises.push(change); - /* Backend bug disallows deleting: RIFT-14910 - - if(nulledCategories.length > 0) { - remove = $.ajax({ - // url: apiUrl('api/config/default-severity'), - url: apiUrl('api/config/default-syslog-severity'), - type: 'DELETE', - beforeSend: Utils.addAuthorizationStub, - data: nulledCategories, - 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){ + }).then(function(data){ resolve(data) }, function(){ reject(arguments)