X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flogging%2Fsrc%2FloggingSource.js;h=2810ac8cb9cefdeb8520830fe1c00763c05d227b;hb=ae1f791347fb154f43aea97cd7fb607dfba57d7e;hp=c83b322d3b74e5d5d0c2aa287177cc2619dad296;hpb=cf5edafaf6923b748a229cbd3f2422da255f5806;p=osm%2FUI.git diff --git a/skyquake/plugins/logging/src/loggingSource.js b/skyquake/plugins/logging/src/loggingSource.js index c83b322d3..2810ac8cb 100644 --- a/skyquake/plugins/logging/src/loggingSource.js +++ b/skyquake/plugins/logging/src/loggingSource.js @@ -66,14 +66,8 @@ export default { return new Promise(function(resolve, reject) { let promises = []; let remove = null; - // $.ajax({ - // url: 'https://10.66.202.130:8008/api/config/logging/allow/duplicate', - // type: 'DELETE', - // beforeSend: Utils.addAuthorizationStub - // }) if(loggingConfig.hasOwnProperty('allowDuplicateEvents')) { promises.push($.ajax({ - // url: apiUrl('api/config/default-severity'), url: apiUrl('api/config/allow-duplicate-events'), type: 'PUT', beforeSend: Utils.addAuthorizationStub, @@ -90,23 +84,23 @@ export default { } })) } - // 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'),