OK.
My script worked eventually, after some hours of waiting...
You need to :
Eventually, it will delete everything and then you can start all over....
Now, I went from 24000 rules adjustments to only 3!
My script worked eventually, after some hours of waiting...
Code Select
var d = $.Deferred(), prom = d.promise(), times = 0;
d.resolve();
$('#rules tr[data-row-id]').each((i, r) => {
if(times < 0) return;
prom = prom.then(function() { return $.post('/api/ids/settings/delPolicyRule/' + $(r).attr('data-row-id')).promise(); } );
times++;
if(times > 100000) { times = -1; prom = prom.then($.post('/api/ids/service/reconfigure').promise()); return; }
});
prom = prom.then(function() { return $.post('/api/ids/service/reconfigure').promise(); });
You need to :
- Go to this URL : /ui/ids/policy#rules
- Select to show ALL rule adjustments
- Open the dev tools console in the browser, go to the console tab, paste it in and hit Enter
- Monitor the requests in the Network tab to see when it will finish. It can take several hours if you have many rule adjustments.
Eventually, it will delete everything and then you can start all over....
Now, I went from 24000 rules adjustments to only 3!