summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_system_activity.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-04-15 07:41:24 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-04-15 07:41:45 -0400
commitebaf36ebe5b6f409887d2352db44aba45bf7e086 (patch)
treeb7f622011696a3f8417b23a26a1466272ba45f24 /src/usr/local/www/diag_system_activity.php
parent69ac0a881676cce5d261cf8af013ab4066fc405e (diff)
downloadpfsense-ebaf36ebe5b6f409887d2352db44aba45bf7e086.zip
pfsense-ebaf36ebe5b6f409887d2352db44aba45bf7e086.tar.gz
Fixed #6166
Diffstat (limited to 'src/usr/local/www/diag_system_activity.php')
-rw-r--r--src/usr/local/www/diag_system_activity.php46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/usr/local/www/diag_system_activity.php b/src/usr/local/www/diag_system_activity.php
index 2442b5f..8885855 100644
--- a/src/usr/local/www/diag_system_activity.php
+++ b/src/usr/local/www/diag_system_activity.php
@@ -79,25 +79,39 @@ if ($input_errors) {
?>
<script type="text/javascript">
//<![CDATA[
-function getcpuactivity() {
- $.ajax(
- '/diag_system_activity.php',
- {
- method: 'post',
- data: {
- getactivity: 'yes'
- },
- dataType: "html",
- success: function (data) {
- $('#xhrOutput').html(data);
- },
+events.push(function() {
+ ajaxbusy = false;
+
+ function getcpuactivity() {
+
+ if (ajaxbusy) {
+ return;
}
- );
-}
-events.push(function() {
- setInterval('getcpuactivity()', 2500);
+ ajaxbusy = true;
+
+ ajaxRequest = $.ajax(
+ {
+ url: '/diag_system_activity.php',
+ type: 'post',
+ data: {
+ getactivity: 'yes'
+ },
+ dataType: "html",
+ }
+ );
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+ $('#xhrOutput').html(response);
+ ajaxbusy = false;
+ });
+
+ setTimeout(getcpuactivity, 2500);
+ };
+
getcpuactivity();
+
});
//]]>
</script>
OpenPOWER on IntegriCloud