X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flogging%2Fsrc%2FloggingSource.js;h=bf2f06a005f7760896543dc141f58eaabc71589c;hb=refs%2Fchanges%2F79%2F579%2F1;hp=690d32326b86e354970690c0a0129592d066edd4;hpb=0aadbcad27e706cedd916b4140bc621eaf46a516;p=osm%2FUI.git diff --git a/skyquake/plugins/logging/src/loggingSource.js b/skyquake/plugins/logging/src/loggingSource.js index 690d32326..bf2f06a00 100644 --- a/skyquake/plugins/logging/src/loggingSource.js +++ b/skyquake/plugins/logging/src/loggingSource.js @@ -66,12 +66,14 @@ 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', + if(loggingConfig.hasOwnProperty('allowDuplicateEvents')) { + promises.push($.ajax({ + url: apiUrl('api/config/allow-duplicate-events'), + type: 'PUT', beforeSend: Utils.addAuthorizationStub, + data: { + allowDuplicateEvents: loggingConfig.allowDuplicateEvents + }, success: function(data) { resolve(data); }, @@ -80,9 +82,25 @@ export default { 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'),