diff options
-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() { |