X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flogging%2Fsrc%2FloggingSource.js;h=dfba1677a5268ab64412d621bb0d15d0fc91a1f0;hp=bf2f06a005f7760896543dc141f58eaabc71589c;hb=refs%2Ftags%2Fv3.0.0rc2;hpb=472709b4582d4c242aee39f537b9dab369e25918 diff --git a/skyquake/plugins/logging/src/loggingSource.js b/skyquake/plugins/logging/src/loggingSource.js index bf2f06a00..dfba1677a 100644 --- a/skyquake/plugins/logging/src/loggingSource.js +++ b/skyquake/plugins/logging/src/loggingSource.js @@ -75,6 +75,9 @@ export default { allowDuplicateEvents: loggingConfig.allowDuplicateEvents }, success: function(data) { + if (!loggingConfig.allowDuplicateEvents) { + delete state.loggingConfig.allowDuplicateEvents + } resolve(data); }, error: function(error) { @@ -84,23 +87,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'),