aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-09 15:59:28 +0100
committerGitHub <noreply@github.com>2016-08-09 15:59:28 +0100
commit36fead2e11779262c4d99efcbfde28925fbb74bf (patch)
treeb8b09cacc2af73a1e679d3fc75ef6632b3ae6e7d
parent1f8963431387b0dab66d6e9dbf5dc7d71bf001ef (diff)
parentaa68c4952d83b254c837115a86f7769d7adf88cb (diff)
downloadrspamd-36fead2e11779262c4d99efcbfde28925fbb74bf.tar.gz
rspamd-36fead2e11779262c4d99efcbfde28925fbb74bf.zip
Merge pull request #830 from fatalbanana/www
[WebUI] Retain history length on update (#829)
-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
});
}
});