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:43:10 -0400
commit79e348e4729f7978ac16f5c81a9d9062ef311ddb (patch)
treed4a47e0d8339abc6f1d9fb4e48238a598983e3cd /src/usr/local/www/diag_system_activity.php
parente2ddef9e288322db6a133b2e43a5e120f01c17a1 (diff)
downloadpfsense-79e348e4729f7978ac16f5c81a9d9062ef311ddb.zip
pfsense-79e348e4729f7978ac16f5c81a9d9062ef311ddb.tar.gz
Fixed #6166
(cherry picked from commit ebaf36ebe5b6f409887d2352db44aba45bf7e086)
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