mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Move dataIndex definition into dataSrc function
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -116,7 +116,6 @@ function autofilter(){
|
||||
|
||||
$(document).ready(function() {
|
||||
var status;
|
||||
var dataIndex = 0;
|
||||
|
||||
// Do we want to filter queries?
|
||||
var GETDict = {};
|
||||
@@ -302,7 +301,13 @@ $(document).ready(function() {
|
||||
"ajax": {
|
||||
"url": APIstring,
|
||||
"error": handleAjaxError,
|
||||
"dataSrc": function(data){ return data.data.map(function(x){ x[0] = x[0]*1e6+(dataIndex++); return x; }); }
|
||||
"dataSrc": function(data){
|
||||
var dataIndex = 0;
|
||||
return data.data.map(function(x){
|
||||
x[0] = x[0] * 1e6 + (dataIndex++);
|
||||
return x;
|
||||
});
|
||||
}
|
||||
},
|
||||
"autoWidth" : false,
|
||||
"processing": true,
|
||||
|
||||
Reference in New Issue
Block a user