aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-08-09 16:49:14 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-08-09 16:49:14 +0200
commitaa68c4952d83b254c837115a86f7769d7adf88cb (patch)
treeb8b09cacc2af73a1e679d3fc75ef6632b3ae6e7d /interface/js
parent1f8963431387b0dab66d6e9dbf5dc7d71bf001ef (diff)
downloadrspamd-aa68c4952d83b254c837115a86f7769d7adf88cb.tar.gz
rspamd-aa68c4952d83b254c837115a86f7769d7adf88cb.zip
[WebUI] Retain history length on update (#829)
Diffstat (limited to 'interface/js')
-rw-r--r--interface/js/rspamd.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js
index 688715e24..6cfca7373 100644
--- a/interface/js/rspamd.js
+++ b/interface/js/rspamd.js
@@ -556,6 +556,12 @@
function getHistory() {
if (history) {
+ var history_length = document.getElementsByName('historyLog_length')[0];
+ if (history_length !== undefined) {
+ history_length = parseInt(history_length.value);
+ } else {
+ history_length = 10;
+ }
history.destroy();
$('#historyLog').children('tbody').remove();
}
@@ -608,7 +614,8 @@
});
$('<tbody/>', { html: items.join('') }).insertAfter('#historyLog thead');
history = $('#historyLog').DataTable({
- "order": [[ 0, "desc" ]]
+ "order": [[ 0, "desc" ]],
+ "pageLength": history_length
});
}
});