improve defender and quotas REST API

This commit is contained in:
Nicola Murino
2021-06-07 21:52:43 +02:00
parent 43182fc25e
commit feec2118bb
16 changed files with 1068 additions and 259 deletions

View File

@@ -199,13 +199,11 @@
action: function (e, dt, node, config) {
dt.button('quota_scan:name').enable(false);
var username = dt.row({ selected: true }).data()[1];
var path = '{{.QuotaScanURL}}'
var path = '{{.QuotaScanURL}}'+ "/" + fixedEncodeURIComponent(username);
$.ajax({
url: path,
type: 'POST',
dataType: 'json',
headers: {'X-CSRF-TOKEN' : '{{.CSRFToken}}'},
data: JSON.stringify({ "username": username }),
timeout: 15000,
success: function (result) {
dt.button('quota_scan:name').enable(true);