diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-23 13:21:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 13:21:52 +0000 |
commit | 65e81bc2199bcac0096d2a48686cd84dc8221586 (patch) | |
tree | 2241e69ba64545f3fec111eba835b170016d86a0 | |
parent | 5daef8fa4a4e7aadd422c943569862a9a3a7e597 (diff) | |
parent | c326da2c45ae7165eebc268a208abb8e9c40fc44 (diff) | |
download | rspamd-65e81bc2199bcac0096d2a48686cd84dc8221586.tar.gz rspamd-65e81bc2199bcac0096d2a48686cd84dc8221586.zip |
Merge pull request #1280 from moisseev/refresh
[WebUI] Fix excessive refreshing
-rw-r--r-- | interface/js/rspamd.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js index fcc63f809..e5f37e6df 100644 --- a/interface/js/rspamd.js +++ b/interface/js/rspamd.js @@ -76,9 +76,18 @@ return false; }); $('#refresh').on('click', function (event) { - statWidgets(); - getChart(); - getGraphData(selected.selData); + if (!$(this).attr('disabled')) { + $(this).attr('disabled', true); + clearTimeout(stat_timeout); + + getChart(); + getGraphData(selected.selData); + statWidgets(); + + setTimeout(function () { + $('#refresh').removeAttr('disabled'); + }, 1000); + } }); // @supports session storage function supportsSessionStorage() { |