Commit ffba54f5 authored by Ad Schellevis's avatar Ad Schellevis

(ids) delay update of classtypes

parent 70a54ff5
......@@ -30,6 +30,25 @@ POSSIBILITY OF SUCH DAMAGE.
$( document ).ready(function() {
// list all known classtypes and add to selection box
function updateRuleClassTypes() {
ajaxGet(url="/api/ids/settings/listRuleClasstypes",sendData={}, callback=function(data, status) {
if (status == "success") {
$.each(data['items'], function(key, value) {
$('#ruleclass').append($("<option></option>").attr("value",value).text(value));
});
$('.selectpicker').selectpicker('refresh');
// link on change event
$('#ruleclass').on('change', function(){
$('#grid-installedrules').bootgrid('reload');
});
}
});
}
// delay refresh for a bit
setTimeout(updateRuleClassTypes, 500);
function addFilters(request) {
var selected =$('#ruleclass').find("option:selected").val();
if ( selected != "") {
......@@ -63,22 +82,6 @@ POSSIBILITY OF SUCH DAMAGE.
);
// list all known classtypes and add to selection box
ajaxGet(url="/api/ids/settings/listRuleClasstypes",sendData={}, callback=function(data, status) {
if (status == "success") {
$.each(data['items'], function(key, value) {
$('#ruleclass').append($("<option></option>").attr("value",value).text(value));
});
$('.selectpicker').selectpicker('refresh');
// link on change event
$('#ruleclass').on('change', function(){
$('#grid-installedrules').bootgrid('reload');
});
}
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment