ntopng/httpdocs/js/pages/toast-config-change-flows.js
2021-02-12 17:49:53 +01:00

30 lines
668 B
JavaScript

/**
* (C) 2020 - ntop.org
* This script implements the logic for the system_alerts_stats.lua script
*/
const toastConfigFlowChanges = function() {
$.ajax({
type: 'POST',
contentType: "application/json",
dataType: "json",
url: `${http_prefix}/lua/rest/v1/edit/ntopng/incr_flows.lua`, /* TODO: Change */
data: JSON.stringify({
csrf: toastCSRF,
}),
success: function(rsp) {
$('#toast-config-change-modal-flows').modal('hide');
},
error: function(rsp) {
$('#toast-config-change-modal-flows_more_content').show();
}
});
}
$('.toast-config-change-flows').click(() => {
$('#toast-config-change-modal-flows').modal('show');
});